/* The simple pages (privacy, terms, help, download) in the front page's
   language: the same header, type and colours; two columns from 900 px
   (words on one side, the content on the other), one column below; plain
   statements on hairlines, never icon cards. No scripts except download.js. */
:root {
  --bg: #FBF8F1; --surface: #FFFDF8; --surface-alt: #F2EFE6;
  --ink: #14214A; --muted: #5A6278; --primary: #2546B8; --on-primary: #FBF8F1;
  --gold: #F2C14E; --hairline: #E3DFD3; --focus: #2546B8;
  --gutter: clamp(20px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1433; --surface: #131F47; --surface-alt: #1A2755;
    --ink: #E8ECF8; --muted: #A3AECB; --primary: #F2C14E; --on-primary: #0B1433;
    --hairline: #26335E; --focus: #F2C14E;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html { scroll-padding-top: 24px; }
body { font: 18px/1.6 "Atkinson Hyperlegible", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: #14214A; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img { display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.serif, h1, h2, h3 { font-family: Fraunces, Georgia, serif; letter-spacing: -0.02em; }

/* Header: the front page's. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 26px/1 Fraunces, Georgia, serif; }
.wordmark img { width: 34px; height: 34px; }
.wordmark .dot { color: var(--gold); }
.top nav { display: flex; align-items: center; gap: 8px; }
.top .signin { min-height: 48px; display: inline-flex; align-items: center; padding: 0 12px; font-weight: 700; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 12px; text-decoration: none;
  font: 700 17px/1 "Atkinson Hyperlegible", system-ui, sans-serif;
  background: var(--primary); color: var(--on-primary);
  transition: transform 160ms cubic-bezier(.2,0,0,1), filter 160ms;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(0.97); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The page's title band. */
.page-hero { padding-block: clamp(24px, 5vw, 64px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--hairline); }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; font-weight: 700; margin: 0 0 16px; text-wrap: balance; }
.page-hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 40rem; margin: 0; }
.draft { margin: 24px 0 0; max-width: 46rem; padding: 14px 18px; border-radius: 12px; background: var(--surface-alt);
         box-shadow: inset 0 0 0 1px var(--hairline); font-size: 16px; }

/* Long text (privacy, terms): the sections on the left, kept in view. */
.doc { display: grid; grid-template-columns: 240px minmax(0, 46rem); gap: clamp(32px, 6vw, 96px); padding-block: clamp(32px, 5vw, 64px); }
.toc { position: sticky; top: 24px; align-self: start; }
.toc b { display: block; font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 10px 0; min-height: 44px; border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.toc li:first-child a { border-top: 0; }
.toc a:hover { color: var(--primary); }
.doc section + section { margin-top: 48px; }
.doc h2 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; margin: 0 0 12px; }
.doc ul { padding-left: 1.2em; margin: 0; }
.doc li { margin: 8px 0; }

/* Two columns: words on one side, the content on the other (help, download). */
.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px);
         align-items: start; padding-block: clamp(40px, 6vw, 88px); }
.split + .split { border-top: 1px solid var(--hairline); }
.split h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; margin: 0 0 16px; text-wrap: balance; }
.split p.lead { color: var(--muted); margin: 0 0 24px; max-width: 30rem; }

/* Plain statements on hairlines (the front page's "promises" and "steps"). */
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { padding: 22px 0; border-top: 1px solid var(--hairline); }
.lines li:first-child { border-top: 0; padding-top: 0; }
.lines h3 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.lines p { margin: 0; color: var(--muted); }
.lines p + p { margin-top: 8px; }

/* Download: scan with a phone (on computers). */
.phone-note { display: flex; gap: 18px; align-items: center; margin-top: 28px; }
#qr { flex: none; width: 104px; height: 104px; padding: 8px; background: #FFFDF9; border-radius: 12px; border: 1px solid var(--hairline); }
#qr img, #qr canvas { width: 88px !important; height: 88px !important; display: block; }
.phone-note p { margin: 0; font-size: 16px; color: var(--muted); }
.phone-note strong { color: var(--ink); display: block; margin-bottom: 2px; }
.small { font-size: 16px; color: var(--muted); }

footer { border-top: 1px solid var(--hairline); padding-block: 28px; color: var(--muted); font-size: 15px; margin-top: 24px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--muted); }

/* Tablets and phones: one column; the sections become a row of links. */
@media (max-width: 900px) {
  .split, .doc { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px; }
  .toc a { border: 0; padding: 10px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline); display: inline-flex; align-items: center; }
  .top .start { display: none; }
}
/* A phone opens the download itself: no QR code to scan. */
@media (max-width: 700px) {
  .phone-note { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
