/* ProbaLab design tokens: the ONE source for colour, type and motion (Phase 2, Dec 2026).
   Loaded first by index.html and by every Pages Function page (functions/_shared/site.js shell()).
   page.css, phone.css, site-nav.css, members-tips.css and index.html only reference these variables.
   The light colours between lights:begin / lights:end are generated: edit lights.json, then run
   node tools/build_lights.mjs (it rewrites that block in this file). */
:root {
  color-scheme: dark;

  /* Surfaces: deep ink, separated by surface shifts and 1px hairlines */
  --bg: #07090e;          /* page */
  --bg-2: #0a0e15;        /* page, raised band */
  --surface: #0d121b;     /* elevated surface */
  --surface-2: #131b28;   /* interactive surface */
  --line: #1e293b;        /* hairline */
  --line-hi: #2b3a52;     /* hairline, hover / focus */
  --border: var(--line);  /* alias: header / bar separators */

  /* Text: primary 17:1 and muted 7.7:1 on --bg (both pass WCAG AA) */
  --ink: #eef2f8;
  --muted: #94a3b8;

  /* One accent */
  --accent: #19e3ff;
  --accent-soft: rgba(25, 227, 255, 0.12);
  --accent-ink: #07090e;  /* text on an accent fill */

  /* Legacy names, kept so existing CSS/JS keeps working. Magenta is retired as a decorative colour:
     it now resolves to the accent, so no neon second colour or glow is drawn anywhere. */
  --cyan: var(--accent);
  --cyan-soft: var(--accent-soft);
  --magenta: var(--accent);
  --magenta-soft: var(--accent-soft);
  --yellow: #f5e900;      /* EPL third-outcome bar only */
  --win: #3dff8f;         /* result state: won */
  --win-soft: rgba(61, 255, 143, 0.12);

  /* Model / pick states: only for real lights, never decoration */
  /* lights:begin (Generated from lights.json by tools/build_lights.mjs. Do not edit: edit lights.json and run node tools/build_lights.mjs.) */
  --green: #2fd7a0; --green-soft: rgba(47, 215, 160, 0.12);
  --super: #b56cff; --super-soft: rgba(181, 108, 255, 0.14);
  --orange: #ffad33; --orange-soft: rgba(255, 173, 51, 0.12);
  --red: #ff4f6e; --red-soft: rgba(255, 79, 110, 0.13);
  /* lights:end */

  /* Type: two families. Numbers use IBM Plex Sans with tabular, slashed-zero figures (no third font). */
  --f-display: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: var(--f-body);
  --num-features: "tnum" 1, "zero" 1;
  --tracking-display: -0.02em;

  /* Three body sizes */
  --text-heading: 1.25rem;  /* 20px: section and panel headings */
  --text-body: 1rem;        /* 16px: body, UI, tables */
  --text-sm: 0.8125rem;     /* 13px: notes, meta, labels (the floor) */
  --measure: 65ch;          /* prose width */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 160ms;

  --cut: 14px;

  /* Phone layout (phone.css) aliases */
  --pf-bg: var(--bg); --pf-bg-2: var(--bg-2); --pf-surface: var(--surface); --pf-surface-2: var(--surface-2);
  --pf-ink: var(--ink); --pf-muted: var(--muted); --pf-line: var(--line); --pf-line-hi: var(--line-hi);
  --pf-cyan: var(--accent); --pf-magenta: var(--accent);
  --pf-super: var(--super); --pf-green: var(--green); --pf-orange: var(--orange); --pf-red: var(--red);
}

/* Numbers line up everywhere the old mono face was used, including inline styles set from JS. */
[style*="--f-mono"], .num, td.num, th.num, .mono, time, .units, .price, .pct {
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--num-features);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* 13px floor for text the per-page CSS does not size: unstyled <small>, SVG chart labels (CSS beats the
   font-size attribute), and the free-board unlock label that free-board.js injects as 11px caps. */
small { font-size: max(var(--text-sm), 0.85em); }
svg text { font-size: var(--text-sm); }
html .pl-unlock .plu-eyebrow { font: 600 var(--text-sm) var(--f-body); letter-spacing: 0; text-transform: none; }
html .pl-unlock .plu-fine { font-size: var(--text-sm); }
