/* The design tokens, as one file.
 *
 * Canonical set from prototypes/seed-deck-v2/styles.css, which
 * docs/DESIGN-SYSTEM-V2.md names as the source of truth. Four font stacks
 * deviate from it and the deviation is recorded in DECISIONS.md: the seed deck
 * names Tiempos Headline, Canela, Aeonik, Sohne and Homemade Apple, none of
 * which this site loads or licenses, plus JetBrains Mono, which was retired on
 * 2026-08-31 and would turn test/retired-fonts.test.js red on the first commit.
 * A font that is never loaded can never paint, so dropping them is provably
 * non-visual rather than a judgement call.
 *
 * Before this file, 46 pages declared their own :root. The largest held 23
 * declarations of which only 22 were canonical names, against the 76 here, and
 * a token a page omitted fell through to whatever fallback the referencing
 * stylesheet happened to name. That is the mechanism behind the corporation-tax
 * page painting its labels in system monospace.
 */

:root {
  /* Colors */
  --paper: #F0E9DC;
  --paper-2: #E8DFCC;
  --paper-3: #DCD1B9;
  --paper-card: #E4DBCE;
  --paper-edge: #C9BD9F;

  --ink: #141414;
  --ink-2: #2A2724;
  --ink-muted: #5A5347;
  --ink-faded: #8B8270;

  --orange: #DF5911;
  --orange-deep: #B8431A;
  --orange-soft: #EA8F58;
  --orange-pale: #F4D2B5;
  --orange-wash: rgba(223, 89, 17, 0.18);

  --rule: #1A1A1A;
  --rule-soft: #B3A887;
  --stamp: #1A1A1A;
  --grid-dot: #DF5911;

  --status-ok: #4A6B3E;
  --status-warn: #B8431A;
  --status-error: #8B1F12;

  /* Typography: families. Corrected stacks, see the header comment. */
  --font-display: "Newsreader", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-script: "Caveat", cursive;

  /* Typography: scale */
  --fs-display-xl: clamp(56px, 7.5vw, 120px);
  --fs-display-lg: clamp(44px, 5.2vw, 80px);
  --fs-display-md: clamp(32px, 3.6vw, 56px);
  --fs-h1: 36px;
  --fs-h2: 28px;
  --fs-h3: 22px;
  --fs-h4: 18px;
  --fs-body-lg: 18px;
  --fs-body: 16px;
  --fs-body-sm: 14px;
  --fs-caption: 12px;
  --fs-micro: 10px;
  --fs-stat-xl: 96px;
  --fs-stat-lg: 72px;

  /* Tracking */
  --tracking-tight: -0.02em;
  --tracking-base: 0;
  --tracking-wide: 0.06em;
  --tracking-mono: 0.04em;

  /* Line height */
  --lh-display: 0.98;
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-base: 1.5;
  --lh-loose: 1.65;

  /* Spacing (8pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* Radii */
  --radius-0: 0;
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-pill: 999px;

  /* Borders */
  --hairline: 1px solid var(--rule);
  --hairline-soft: 1px solid var(--rule-soft);
  --double-rule: 3px double var(--rule);
  --bracket-rule: 2px solid var(--orange);

  /* Shadows */
  --shadow-paper: 0 1px 0 rgba(20, 20, 20, 0.04), 0 2px 4px rgba(80, 65, 30, 0.06);
  --shadow-stamp: 0 0 0 1px rgba(20, 20, 20, 0.08) inset, 0 1px 1px rgba(20, 20, 20, 0.12);
  --shadow-lift: 0 1px 2px rgba(80, 65, 30, 0.10), 0 8px 18px rgba(80, 65, 30, 0.10);

  /* Motion */
  --ease-ink: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-precise: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 360ms;

  /* ---------- LEGACY ALIASES ----------
   *
   * A parallel naming scheme that grew alongside the canonical one. Fourteen
   * names remain in scope once the seven client documents are excluded, and
   * each of them holds exactly one value across every page that declares it,
   * which is what makes a global alias pixel-neutral by construction rather
   * than by hope. Together they stand behind 106 call sites.
   *
   * The block is CLOSED, and test/tokens.test.js freezes it at fourteen so a
   * new legacy name cannot be introduced. Each entry carries its remaining
   * call-site count, and an alias may be deleted once that count reaches zero.
   *
   * Migrating a name is a SEPARATE, small, reviewed change carrying a
   * before-and-after screenshot, because roughly half of these need a judgement
   * about which canonical token is actually meant and some would change a
   * rendered colour, which this block of work is explicitly not doing.
   */
  --green: #4A6B3E;         /* 24 call sites, migrates to --status-ok */
  --rule-cream: #C9BD9F;    /* 21 call sites, migrates to --paper-edge */
  --surface: #FFFFFF;       /* 15 call sites, no canonical equivalent yet */
  --line: #D8CFC0;          /* 13 call sites, no canonical equivalent yet */
  --muted: #5A5347;         /* 9 call sites, migrates to --ink-muted */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;  /* 7 call sites, migrates to --font-display */
  --graphite: #33302A;      /* 3 call sites, no canonical equivalent yet */
  --ease: cubic-bezier(.2,.6,.2,1);  /* 3 call sites, differs from --ease-ink */
  --ink2: #2A2724;          /* 3 call sites, migrates to --ink-2 */
  --pick-soft: #F2EADC;     /* 3 call sites, no canonical equivalent yet */
  --ok: #4A6B3E;            /* 2 call sites, migrates to --status-ok */
  --ink-working: #736B5A;   /* 1 call site, no canonical equivalent yet */
  --card: #FFFFFF;          /* 1 call site, migrates to --surface, then retire both */
  --req-soft: #F6E8D8;      /* 1 call site, no canonical equivalent yet */
}
