/* ==========================================================================
   v9 tokens. The ONE token file. Every colour, face, size and gap on the site resolves here.

   DARK ONLY (Julio, Oct 30 2026). One ink everywhere, broken up by two green fields lower down
   (Process and the record). No green block above Process.
       white on ink      19.8:1  -> all type, all rules
       green on ink      15.5:1  -> accents, focus rings, green type is fine
       ink on green      15.5:1  -> the green fields, buttons on hover, badges
       white on green     1.3:1  -> NEVER. On green, everything is ink.

   Rules use the ROLE tokens (--bg, --fg, --fg-2, --line, --grid, --on-green), never the raw
   palette. A green field re-points the roles, so the same rules work inside it. The light build
   (white paper, --white/--ink tokens) is kept at _dev/_retired/light-v947/.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* palette */
  --c-ink: #0B0A08;
  --c-white: #FFFFFF;
  --green: #9EFC52;

  /* roles */
  --bg: var(--c-ink);                    /* the page, and any surface that hides what is behind */
  --fg: var(--c-white);                  /* type, rules, marks */
  --fg-2: rgba(255, 255, 255, .66);      /* secondary type, 8.7:1 */
  --line: rgba(255, 255, 255, .16);      /* hairlines */
  --grid: rgba(255, 255, 255, .07);      /* the hero graph paper */
  --on-green: var(--c-ink);              /* type and marks on any green fill */
  --plate-tile: #2b2824;                 /* split-flap tiles: one step up from the ink */

  /* type */
  --font-display: 'Cook Conthic', 'Arial Narrow', sans-serif;   /* two places only: wall + closing heading */
  --font-text: 'Host Grotesk', system-ui, sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, monospace;
  /* Julio's handwriting (margin spec notes): BlackCat Hand, built from his own sheets by
     _dev/handwriting/build.py. The system faces after it are only a fallback while it loads. */
  --font-hand: 'BlackCat Hand', 'Bradley Hand', 'Segoe Print', cursive;

  --step--1: .6875rem;   /* 11px: mono labels, corner markers */
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: 3.5rem;

  /* space */
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* the frame: every block of content starts on the same left edge; above 1440 it centres */
  --content-max: 1440px;
  --gutter: clamp(1rem, 3.4vw, 3rem);
  --frame-pad: max(var(--gutter), calc((100vw - var(--content-max)) / 2 + var(--gutter)));

  /* structure */
  --rule: 1px;
  --cell: 120px;          /* hero graph-paper cell */
  --header-h: 64px;       /* measured and overwritten by v9.js */

  /* motion: things lock into place. No float, no bounce, no elastic. */
  --lock: cubic-bezier(.7, 0, .2, 1);
  --settle: cubic-bezier(.16, .8, .2, 1);   /* fast in, hard stop: for things arriving on scroll */
  --smooth: cubic-bezier(.2, .8, .2, 1);    /* things that open and close: a long, soft landing */
  --t-open: 420ms;
  --t-fast: 120ms;
  --t-med: 240ms;

  /* stacking */
  --z-content: 1;
  --z-header: 100;
  --z-nav: 110;
}
