/* Pedesta brand tokens. THE ONLY PLACE A COLOUR OR A TYPEFACE IS DECIDED.
 *
 * No page may carry a hex literal. tests/test_brand.py asserts it, because a colour
 * typed into one page is how a palette stops being a palette: it drifts, and the drift
 * is invisible until someone screenshots two pages side by side.
 *
 * CONTRAST. The owner is dyslexic and needs high contrast, so every pair actually used
 * was measured against WCAG AA rather than eyeballed. Measured ratios are in the
 * comments beside each token. Three pairs failed and were fixed:
 *
 *   muted on the unlit floor   4.01:1  ->  4.69:1   by lifting muted to #969084
 *   muted on the lit surface   3.30:1  ->  4.97:1   by using --muted-on-light instead
 *   beam on the lit surface    1.52:1  ->  never used as text; beam is a DARK-GROUND
 *                                          token only, and there is a separate token
 *                                          for text on light surfaces
 *
 * One prediction was wrong and is worth recording: layer-failed on the ground measures
 * 5.06:1 and PASSES. It was expected to fail at about 4.4:1 and needed no change.
 */
:root{
  /* ── surfaces ─────────────────────────────────────────────────────── */
  --ground:#0E0E10;          /* the floor the whole thing sits on */
  --floor:#2A2721;           /* unlit floor: panels and cards on the ground */
  --lit:#F7F1E3;             /* lit surface: light backgrounds, and text on dark */
  --beam:#CFC5AE;            /* the beam. Headings and accents ON DARK ONLY */

  /* ── text ─────────────────────────────────────────────────────────── */
  --ink:var(--lit);          /* primary text on dark      17.12:1 on ground */
  --muted:#969084;           /* secondary text on dark     6.08:1 ground, 4.69:1 floor */
  --ink-on-light:#0E0E10;    /* primary text on light     17.12:1 on lit */
  --muted-on-light:#6E675A;  /* secondary text on light    4.97:1 on lit */
  --deep-on-light:#46433B;   /* strong text on light       8.77:1 on lit */

  /* ── functional, never decorative ─────────────────────────────────── */
  --pass:#7FA89F;            /* layer passed               7.35:1 on ground */
  --fail:#B0736A;            /* layer failed               5.06:1 on ground */

  /* ── the spotlight: THE ONE ACCENT, and it only points ─────────────── */
  /* Added 2026-09-15 with the first run redesign the owner approved. It marks the step
     you are on, the stage that is running, progress, and the next control, and nothing
     else: never decoration, never a second thing competing for the eye.
     Measured: 10.98:1 on ground, 8.47:1 on floor, and ground text on it 10.98:1. */
  --spot:#FFB547;
  --spot-soft:rgba(255,181,71,.16);  /* the wash behind the live step */
  --spot-edge:rgba(255,181,71,.45);  /* its border */
  --spot-glow:rgba(255,181,71,.38);  /* the beacon and the scan */
  --pass-edge:rgba(127,168,159,.5);
  --fail-edge:rgba(176,115,106,.7);
  /* ── lines and shadow ─────────────────────────────────────────────── */
  --rule:#26262A;
  --rule-on-light:#DED5C2;
  --shadow:rgba(0,0,0,.5);

  /* ── type ─────────────────────────────────────────────────────────── */
  --geo:"Century Gothic","Futura","Avenir Next",system-ui,sans-serif;  /* headings */
  --ui:"Segoe UI",-apple-system,Arial,sans-serif;                      /* body */
  --mono:"Consolas","JetBrains Mono","Courier New",monospace;          /* prices, numerals */

  /* The first run's two faces, self hosted (web/static/fonts, SIL OFL 1.1). Scoped to
     the first run, the generation log and the first image, so every other page keeps
     its measured widths. A browser only downloads a face a page actually uses. */
  --game:"Jost",var(--geo);          /* rung titles, the stage line, the found sentence */
  --hud:"JetBrains Mono",var(--mono);/* RUN 3/5, timers, layer names, SHOT 01 */
  /* ── derived, so a surface colour is decided once ─────────────────── */
  --paper:color-mix(in srgb,var(--floor) 38%,var(--ground));
  --line:var(--rule);
  --radius:14px;
  --maxw:1120px;
}

@font-face{font-family:"Jost";src:url("/static/fonts/jost-latin-var.woff2") format("woff2");
  font-weight:100 900;font-style:normal;font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"JetBrains Mono";src:url("/static/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight:100 800;font-style:normal;font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* Shared primitives, so a page does not restate them and drift. */
body{background:var(--ground);color:var(--ink);font-family:var(--ui);}
h1,h2,h3,.h{font-family:var(--geo);}
.num,.price,.credits,code,kbd{font-family:var(--mono);}
a{color:inherit;}
.muted{color:var(--muted);}
.on-light{background:var(--lit);color:var(--ink-on-light);}
.on-light .muted{color:var(--muted-on-light);}
