/* Spartan brand tokens: the only file where a colour value is written. Light (Bone) and dark (Night) follow the OS
   (color-scheme). Shield-wall brand, approved 2026-11-12; source of truth is the design-system artifact
   https://claude.ai/artifact/Gmr4rgQotqxUdzdRBy6qwa (project/tokens.json). */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f2eee4, #0b0f17);
  --surface: light-dark(#fbf9f3, #121824);
  --surface-sunk: light-dark(#e7e1d3, #19212f);
  --line: light-dark(#d6cdb9, #252f41);
  --line-strong: light-dark(#8a816c, #63718c);
  --ink: light-dark(#121a2b, #f2ede1);
  --ink-muted: light-dark(#565c69, #a0a7b5);
  --navy: light-dark(#14213d, #22355f);
  --on-navy: light-dark(#f2ede1, #f2ede1);
  --bronze: light-dark(#c2914a, #cf9f58);           /* a fill (primary action, the mark); never text on bg */
  --on-bronze: light-dark(#121a2b, #0b0f17);
  --bronze-deep: light-dark(#7d5718, #dcb679);      /* bronze as text: eyebrows, links, active nav */
  --bronze-tint: light-dark(#ecdcbd, #2c2416);      /* selected rows and active filters; carries ink text */
  --good: light-dark(#0b6b62, #62d1c0);
  --ok: light-dark(#7f5a00, #e3b757);
  --bad: light-dark(#ad2a1f, #ff9085);
  --focus: light-dark(#14213d, #dcb679);            /* 2px ring, offset 2px; on a navy band use on-navy */

  /* Type: families resolve the next/font variables first (set on <html> in app/layout.tsx), then system fallbacks. */
  --type-sans: var(--next-font-sans, "Sofia Sans"), system-ui, -apple-system, "Segoe UI", sans-serif;
  --type-display: var(--next-font-display, "Sofia Sans Extra Condensed"), "Arial Narrow", "Helvetica Neue", sans-serif;
  --type-mono: var(--next-font-mono, "IBM Plex Mono"), ui-monospace, Menlo, monospace;
  /* App scale (dense; kept from Ledger by owner decision 2026-11-12). h1 and h2 set in the display face, uppercase. */
  --size-h1: 1.375rem;   --leading-h1: 1.1;    --tracking-h1: 0.005em;
  --size-h2: 0.9375rem;  --leading-h2: 1.2;    --tracking-h2: 0.01em;
  --size-h3: 0.875rem;   --leading-h3: 1.4;    --tracking-h3: 0;
  --size-body: 0.8125rem; --leading-body: 1.45;
  --size-caption: 0.75rem; --leading-caption: 1.35;
  --size-micro: 0.6875rem; --leading-micro: 1.2; --tracking-micro: 0.12em;
  --size-control: 0.875rem; --leading-control: 1.45;   /* inputs */
  --tracking-button: 0.04em;   /* button labels, uppercase */
  --size-figure: 2.75rem; --leading-figure: 1;   --tracking-figure: -0.04em;
  --size-figure-sm: 1.25rem; --leading-figure-sm: 1.2; --tracking-figure-sm: -0.02em;
  /* Site-only scale (marketing site and documents). */
  --size-display-xl: 7rem;  --leading-display-xl: 0.893; --tracking-display-xl: -0.005em;
  --size-display: 4.5rem;   --leading-display: 0.917;    --tracking-display: 0;
  --size-display-h1: 2.75rem; --leading-display-h1: 1;   --tracking-display-h1: 0.005em;
  --size-display-h2: 1.875rem; --leading-display-h2: 1.067; --tracking-display-h2: 0.01em;
  --size-lead: 1.25rem;     --leading-lead: 1.5;
  --size-site-body: 1rem;   --leading-site-body: 1.5625;
  --size-small: 0.875rem;   --leading-small: 1.43;
  --size-label: 0.75rem;    --leading-label: 1.33;       --tracking-label: 0.12em;
  --size-site-h3: 1.25rem;  --leading-site-h3: 1.3;
  --size-site-price: 2rem;
  --site-gutter: 1.5rem;    /* the design system's space-6 */
  --site-section: 3rem;     /* space-12 on phones; space-24 from 900px (below) */
  --site-control-h: 3rem;   /* 48px buttons and inputs on the site */
  /* Shape: square blocks; 2px controls; 4px menus and dialogs only. */
  --r-control: 2px;
  --r-card: 0;
  --r-panel: 0;
  --r-menu: 4px;
  /* Rules separate; there are no shadows. */
  --rule-1: 1px;
  --rule-2: 2px;
  --rule-4: 4px;
  --elev-card: 0 0 #0000;
  --elev-raised: 0 0 #0000;
  --easing-standard: cubic-bezier(.2, 0, 0, 1);
  --easing-emphasized: cubic-bezier(.3, 0, 0, 1);
  --duration-standard: 150ms;
  --width-page: 75rem; --width-narrow: 36rem; --width-auth: 24rem; --width-prose-card: 42rem; --width-table: 57.5rem;
  --width-measure: 42.5rem;   /* 680px reading measure */
}

@media (min-width: 900px) { :root { --site-section: 6rem; } }

/* Inputs must stay 16 px on touch so iOS does not zoom. */
@media (pointer: coarse) { :root { --size-control: 1rem; } }
