/* Crash Dummy · design tokens v1.0 (brand round 3, 15.11.2026)
 *
 * One signal colour (safety yellow), one ink, one floor. Square corners. A 4px "pixel" unit.
 * Every text pair below is AA-checked by brand/final/check_contrast.py. Run it after any edit.
 *
 * Rules the numbers can't express:
 *  - Yellow is never text on a light background. It is a FIELD (a fill behind ink text) or a pixel.
 *  - On a light background, yellow always touches ink (an ink edge, ink text, or the ink tile).
 *  - --cd-line is decoration only. Any rule that carries meaning uses --cd-ink.
 *  - Severity is never colour alone: always label + the 4-pixel damage meter.
 *
 * Fonts are self-hosted (Google Fonts, SIL OFL 1.1), so pages make no third-party font requests.
 * The font URLs are relative to this file: copy fonts/ next to it.
 */

@font-face{font-family:"Big Shoulders Display";font-style:normal;font-weight:100 900;font-display:swap;
  src:url("fonts/big-shoulders-display-latin.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400 700;font-display:swap;
  src:url("fonts/instrument-sans-latin.woff2") format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400 800;font-display:swap;
  src:url("fonts/jetbrains-mono-latin.woff2") format("woff2")}

:root{
  color-scheme:light;

  /* ---- colour: light ("floor") ---- */
  --cd-bg:#ECEBE6;          /* the test-floor: warm concrete, never pure white */
  --cd-surface:#F8F7F3;     /* cards, report sheets */
  --cd-sunk:#E1DFD8;        /* code wells, table stripes */
  --cd-ink:#0C0C0C;         /* text, rails, the mark tile */
  --cd-muted:#4F4F49;       /* secondary text */
  --cd-line:#C6C4BA;        /* hairlines: decoration only */
  --cd-yellow:#FFC800;      /* THE signal: impact, primary action, current gate */
  --cd-on-yellow:#0C0C0C;   /* text on yellow, in both themes */
  --cd-paper:#F3F2EC;       /* Dummy A's squares, text on the ink tile */
  --cd-tile:#0C0C0C;        /* the mark tile and "footage" panels: ink in both themes */
  --cd-on-tile:#F3F2EC;
  --cd-on-tile-muted:#A6A59C;
  --cd-focus:#0C0C0C;       /* focus ring (paired with a yellow halo) */
  --cd-mark-key:#0C0C0C;    /* keyline around Dummy B in the open mark; on dark it turns yellow, i.e. no keyline */

  /* ---- type ---- */
  --cd-font-display:"Big Shoulders Display","Arial Narrow","Roboto Condensed",sans-serif; /* 24px+, uppercase */
  --cd-font-body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;  /* all reading text */
  --cd-font-mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;       /* data, timecodes, CLI */

  --cd-text-xs:.75rem;   /* 12 · mono labels only */
  --cd-text-sm:.875rem;  /* 14 */
  --cd-text-md:1rem;     /* 16 · body minimum */
  --cd-text-lg:1.125rem; /* 18 · lead */
  --cd-text-xl:1.5rem;   /* 24 · smallest display size */
  --cd-text-2xl:2.25rem; /* 36 */
  --cd-text-3xl:3.5rem;  /* 56 */
  --cd-text-hero:clamp(3rem,10vw,8.5rem);
  --cd-leading-body:1.6;
  --cd-leading-display:.88;
  --cd-tracking-display:.01em;
  --cd-tracking-label:.08em;

  /* ---- space: the pixel unit ---- */
  --cd-px:4px;
  --cd-s1:4px; --cd-s2:8px; --cd-s3:12px; --cd-s4:16px; --cd-s5:24px; --cd-s6:32px; --cd-s7:48px; --cd-s8:64px; --cd-s9:96px;
  --cd-gutter:16px;      /* phone side gutter */
  --cd-max:1200px;       /* track pages */
  --cd-max-read:720px;   /* pit pages: reports, legal */

  /* ---- shape ---- */
  --cd-radius:0;         /* squares. Always. */
  --cd-rail:5px;         /* the rail: the heavy ink rule of Track pages */
  --cd-rule:2px;         /* the rule of Pit pages */
  --cd-hair:1px;

  /* ---- motion ---- */
  --cd-ease:cubic-bezier(.2,.7,.2,1);
  --cd-fast:120ms; --cd-med:240ms;
  --cd-impact-hold:900ms; /* the replay freezes on the impact frame this long */
}

@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --cd-bg:#0B0B0A; --cd-surface:#151514; --cd-sunk:#1D1D1B;
    --cd-ink:#F3F2EC; --cd-muted:#A6A59C; --cd-line:#35352F;
    --cd-focus:#FFC800;
    --cd-mark-key:#FFC800;
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --cd-bg:#0B0B0A; --cd-surface:#151514; --cd-sunk:#1D1D1B;
  --cd-ink:#F3F2EC; --cd-muted:#A6A59C; --cd-line:#35352F;
  --cd-focus:#FFC800;
  --cd-mark-key:#FFC800;
}

@media (prefers-reduced-motion:reduce){
  :root{--cd-fast:0ms;--cd-med:0ms;--cd-impact-hold:0ms}
}
