/* FnExec design system: tokens. Version in VERSION.
   Every colour, size and face on every FnExec surface refers to a name here.
   Primitives first (raw scales), then semantic tokens (what a value is FOR), in light and dark.

   Neutral scale: Untitled UI's warm grey (the kit FnExec bought, September 2026),
   kept warm so light mode reads as paper, not as a dashboard.
   Brand scale: eleven steps around FnExec's signature blue #2c46c4, which is step 600.
   Register: the Business / Nerd switch (register.js) sets data-register on <html>.
   Theme: follows the reader's system setting; data-theme="light|dark" on <html> forces one. */

:root {
  /* ---- primitives: neutral, warm ---- */
  --gray-25:  #fdfdfc;
  --gray-50:  #f9f9f8;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d7d3d0;
  --gray-400: #a9a29d;
  --gray-500: #79716b;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;
  --gray-950: #171412;

  /* ---- primitives: brand ---- */
  --brand-50:  #eef1fc;
  --brand-100: #dde3f9;
  --brand-200: #bcc8f3;
  --brand-300: #93a6ea;
  --brand-400: #6680dd;
  --brand-500: #3f5bd0;
  --brand-600: #2c46c4;
  --brand-700: #2438a0;
  --brand-800: #1d2d7d;
  --brand-900: #17245f;
  --brand-950: #0f1740;

  /* ---- primitives: the two outcomes a check can have ---- */
  --pass-700: #166a42;
  --pass-300: #7fd1a6;
  --pass-100: #d9f2e4;
  --fail-700: #a3261c;
  --fail-300: #f0a099;
  --fail-100: #fde8e6;

  /* ---- type ---- */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-text: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --display-xs: 1.5rem;
  --display-sm: 1.875rem;
  --display-md: 2.25rem;
  --display-lg: 3rem;
  --display-xl: 3.75rem;
  --display-2xl: 4.5rem;

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-loose: 1.75;

  /* ---- spacing, 4px grid ---- */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  /* ---- radii ---- */
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 9999px;

  /* ---- layout ---- */
  --container: 1200px;
  --measure: 62ch;

  /* ---- semantic, light ---- */
  --bg: var(--gray-50);
  --bg-raised: var(--gray-25);
  --bg-sunken: var(--gray-100);
  --bg-inverse: var(--gray-950);
  --fg: var(--gray-950);
  --fg-muted: var(--gray-600);
  --fg-faint: var(--gray-600);
  --fg-inverse: var(--gray-50);
  --line: var(--gray-300);
  --line-strong: var(--gray-400);
  --accent: var(--brand-600);
  --accent-hover: var(--brand-700);
  --accent-fg: #ffffff;
  --accent-soft: var(--brand-50);
  --focus: var(--brand-600);
  --pass: var(--pass-700);
  --pass-soft: var(--pass-100);
  --fail: var(--fail-700);
  --fail-soft: var(--fail-100);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--gray-950);
    --bg-raised: var(--gray-900);
    --bg-sunken: #100e0c;
    --bg-inverse: var(--gray-50);
    --fg: var(--gray-50);
    --fg-muted: var(--gray-400);
    --fg-faint: var(--gray-400);
    --fg-inverse: var(--gray-950);
    --line: var(--gray-800);
    --line-strong: var(--gray-700);
    --accent: var(--brand-300);
    --accent-hover: var(--brand-200);
    --accent-fg: var(--brand-950);
    --accent-soft: var(--brand-950);
    --focus: var(--brand-300);
    --pass: var(--pass-300);
    --pass-soft: #0f2a1c;
    --fail: var(--fail-300);
    --fail-soft: #3a1512;
  }
}
:root[data-theme="dark"] {
  --bg: var(--gray-950);
  --bg-raised: var(--gray-900);
  --bg-sunken: #100e0c;
  --bg-inverse: var(--gray-50);
  --fg: var(--gray-50);
  --fg-muted: var(--gray-400);
  --fg-faint: var(--gray-400);
  --fg-inverse: var(--gray-950);
  --line: var(--gray-800);
  --line-strong: var(--gray-700);
  --accent: var(--brand-300);
  --accent-hover: var(--brand-200);
  --accent-fg: var(--brand-950);
  --accent-soft: var(--brand-950);
  --focus: var(--brand-300);
  --pass: var(--pass-300);
  --pass-soft: #0f2a1c;
  --fail: var(--fail-300);
  --fail-soft: #3a1512;
}

/* ---- register ----
   The HTML carries both texts. With no script and no stored choice, Business shows. */
:root { --register-font: var(--font-text); }
:root[data-register="nerd"] { --register-font: var(--font-mono); }
:root:not([data-register="nerd"]) .nerd { display: none !important; }
:root[data-register="nerd"] .business { display: none !important; }
