/* linguabite.com — one stylesheet for every page. */
:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --fg: #16150f;
  --muted: #6b675c;
  --rule: #e4e0d8;
  --accent: #8a5a2b;
  --surface: #f4f1eb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --fg: #f2efe8;
    --muted: #9a958a;
    --rule: #2c2a24;
    --accent: #d8a76a;
    --surface: #1c1a15;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* Hero pages — index, 404. Centred, single message. */
body.hero { display: grid; place-items: center; min-height: 100vh; padding: 2rem; }
body.hero main { max-width: 32rem; }
body.hero h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 .5rem; }
body.hero p { margin: 0 0 1rem; color: var(--muted); }

/* Document pages — privacy, terms, support. Long-form reading. */
body.doc { padding: 0 1.5rem 5rem; }
body.doc main { max-width: 44rem; margin: 0 auto; }
body.doc h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 1.5rem; }
body.doc h2 { font-size: 1.25rem; margin: 2.5rem 0 .75rem; }
body.doc h3 { font-size: 1rem; margin: 1.75rem 0 .5rem; color: var(--muted);
              text-transform: uppercase; letter-spacing: .06em; }
body.doc p, body.doc li { margin: 0 0 .85rem; }
body.doc ul { padding-left: 1.25rem; }
body.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* Wide content must scroll inside itself, never the page. */
body.doc .tablewrap { overflow-x: auto; margin: 0 0 1.5rem; }
body.doc table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .9375rem; }
body.doc th, body.doc td {
  text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top;
}
body.doc thead th { background: var(--surface); font-weight: 600; }

.sitehead { max-width: 44rem; margin: 0 auto; padding: 1.75rem 0 2.5rem; }
.sitehead a { color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.sitefoot {
  max-width: 44rem; margin: 3.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--rule); font-size: .875rem; color: var(--muted);
}
.sitefoot a { color: var(--muted); margin-right: 1rem; }

/* Landing page (W2). Reuses the tokens above — no new colours. The document and
   hero layouts cap at 44rem for reading; the landing runs wider because it is
   scanned in columns rather than read in sequence. */
body.landing { padding: 0 1.5rem 4rem; }
body.landing main { max-width: 60rem; margin: 0 auto; }
.sitehead.wide, .sitefoot.wide { max-width: 60rem; }

body.landing section { margin: 0 0 4.5rem; }
body.landing h1 {
  font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.1;
  letter-spacing: -0.03em; margin: 0 0 1rem;
}
body.landing h2 {
  font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 .5rem;
}
body.landing h3 { font-size: 1rem; margin: 0 0 .4rem; }
body.landing p { margin: 0 0 1rem; }
body.landing .sub { color: var(--muted); max-width: 42rem; }

.lede { padding: 1rem 0 1.5rem; }
.lede .sub { font-size: 1.125rem; }
.cta { margin-top: 1.5rem; }
.cta p { margin: 0; }
.cta a {
  display: inline-block; margin: 0 .75rem .5rem 0; padding: .7rem 1.15rem;
  background: var(--accent); color: var(--bg); border-radius: .5rem;
  text-decoration: none; font-weight: 600;
}

/* Auto-fit rather than fixed columns: one column on a phone, no media query. */
.grid { display: grid; gap: 1rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: .75rem; padding: 1.15rem 1.25rem;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); font-size: .9375rem; }

.flags { list-style: none; padding: 0; margin: 1.25rem 0 0;
         display: flex; flex-wrap: wrap; gap: .6rem; }
.flags li {
  border: 1px solid var(--rule); border-radius: 2rem; padding: .45rem 1rem;
  background: var(--surface); font-weight: 600; font-size: .9375rem;
}
.flags .flag { margin-right: .4rem; }

.all { margin-top: 1.5rem; }
.all summary { cursor: pointer; color: var(--accent); font-size: .9375rem; }
.langlist { color: var(--muted); font-size: .9375rem; margin-top: .75rem; }

.chips { list-style: none; padding: 0; margin: 1.25rem 0 0;
         display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  border: 1px solid var(--rule); border-radius: .5rem; padding: .4rem .75rem;
  font-size: .875rem; color: var(--muted);
}

.closing { border-top: 1px solid var(--rule); padding-top: 2.5rem; }
.sitefoot.wide a { display: inline-block; }
