:root {
  /* Type scale: body copy / secondary small print (min legible) */
  /* Desktop type (PR #105 review). Every font-size outside mobile.css and the homepage's own CSS
     (main.css, landing-polish.css) is one of the tokens below. At 701px and wider they are the
     design size x 1.33 (what the old desktop zoom gave v2 pages, now as type only) and never under
     12px. mobile.css resets --fs-scale to 1 and --fs-floor to 0 inside its one phone block, so
     on phones (<=700px) every token is its design size, exactly as before. */
  --fs-scale: 1.33;
  --fs-floor: 12px;
  --fs-body: calc(15px * var(--fs-scale));   /* 15px phones, 19.95px desktop */
  --fs-small: calc(13px * var(--fs-scale));  /* 13px phones, 17.29px desktop */
  --fs-8: max(var(--fs-floor), calc(8px * var(--fs-scale)));
  --fs-9: max(var(--fs-floor), calc(9px * var(--fs-scale)));
  --fs-10: max(var(--fs-floor), calc(10px * var(--fs-scale)));
  --fs-11: max(var(--fs-floor), calc(11px * var(--fs-scale)));
  --fs-12: max(var(--fs-floor), calc(12px * var(--fs-scale)));
  --fs-13: max(var(--fs-floor), calc(13px * var(--fs-scale)));
  --fs-14: max(var(--fs-floor), calc(14px * var(--fs-scale)));
  --fs-15: max(var(--fs-floor), calc(15px * var(--fs-scale)));
  --fs-16: max(var(--fs-floor), calc(16px * var(--fs-scale)));
  --fs-17: max(var(--fs-floor), calc(17px * var(--fs-scale)));
  --fs-18: max(var(--fs-floor), calc(18px * var(--fs-scale)));
  --fs-20: max(var(--fs-floor), calc(20px * var(--fs-scale)));
  --fs-22: max(var(--fs-floor), calc(22px * var(--fs-scale)));
  --fs-24: max(var(--fs-floor), calc(24px * var(--fs-scale)));
  --fs-26: max(var(--fs-floor), calc(26px * var(--fs-scale)));
  --fs-28: max(var(--fs-floor), calc(28px * var(--fs-scale)));
  --fs-30: max(var(--fs-floor), calc(30px * var(--fs-scale)));
  --fs-32: max(var(--fs-floor), calc(32px * var(--fs-scale)));
  --fs-36: max(var(--fs-floor), calc(36px * var(--fs-scale)));
  --fs-42: max(var(--fs-floor), calc(42px * var(--fs-scale)));
  /* Shared page container (layout.css .tl-page). 900px is the column below
     the desktop layouts. desktop.css raises it to 1200px from 1100px. */
  --page-max: 900px;
  --page-pad: 20px;
  /* Secondary / muted text on the dark theme (single source; was v2-only) */
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  /* ── ACCENT: TrackLab soft blue (single source; loaded once per page by the core entry) ──
     Contrast (WCAG 2.x), navy = #0a0e1a, white = #ffffff:
       --accent-fill  #1d4ed8  white text 6.70:1   (buttons, CTAs, badges)
       --accent-fill-hover #2563eb  white text 5.17:1
       --accent-text  #93c5fd  on navy 10.68:1, on card #111828 9.83:1 (links/accent text on dark)
       --accent-text-on-light #1d4ed8  on white 6.70:1
       --accent-400 #60a5fa and lighter tints: DECORATIVE ONLY (gradients,
       shadows, brush underlay, dots). Never as text or behind text. */
  --accent-50: #eff6ff;
  --accent-100: #dbeafe;
  --accent-200: #bfdbfe;
  --accent-300: #93c5fd;
  --accent-400: #60a5fa;
  --accent-500: #3b82f6;
  --accent-600: #2563eb;
  --accent-700: #1d4ed8;
  --accent-dim: var(--accent-300);
  --accent-rgb: 96,165,250;          /* #60a5fa — decorative only */
  --accent-soft-rgb: 191,219,254;    /* #bfdbfe — soft second stop in gradients */
  --accent-soft: rgba(var(--accent-rgb),0.07);
  --accent-bdr: rgba(var(--accent-rgb),0.14);
  --accent-glow: rgba(var(--accent-rgb),0.28);
  --card-shadow: 0 8px 22px -14px var(--accent-glow), 0 2px 6px rgba(0,0,0,0.18);
  --card-shadow-hover: 0 18px 36px -16px rgba(var(--accent-rgb),0.45), 0 4px 12px rgba(0,0,0,0.22);
  --accent-fill: var(--accent-700);         /* #1d4ed8, white text */
  --accent-fill-hover: var(--accent-600);   /* #2563eb */
  --on-accent: #ffffff;
  --accent-text: var(--accent-300);         /* #93c5fd on navy */
  --accent-text-on-light: var(--accent-700);/* #1d4ed8 on white/light */

  /* ── SCORE BANDS (single source: racing/score_bands.py) ──
     top 40%+ / great 20-39% / good 12-19% / mid 6-11% / low under 6%. All >= 4.5:1
     on the navy page background (#0a0e1a) and card #111827
     (enforced by racing/tests/test_score_bands.py). Literal hexes only (no var()
     aliases) so the contrast test can read them.
     --score-top   #60a5fa  "Very strong chance" TrackLab blue; 6.98:1 on card #111827, 7.57:1 on page #0a0e1a
     --score-great #00FF41  "Strong chance"      green;         12.99:1 on card #111827
     --score-good  #facc15  "Solid chance"       yellow;        11.58:1 on card #111827
     --score-mid   #f87171  "Could surprise"     red;           6.41:1 on card #111827
     --score-low   #9ca3af  "Long shot"          soft grey;     6.99:1 on card #111827, 7.58:1 on page #0a0e1a */
  --score-top: #60a5fa;
  --score-great: #00FF41;
  --score-good: #facc15;
  --score-mid: #f87171;
  --score-low: #9ca3af;

  /* Moved from .v2-page (v2.css) and the Stage 4A token rename */
  --bg-deep: #0a0e1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2234;
  --bg-selected: #0f1d2e;
  --border: #1e293b;
  --border-active: var(--accent-300);   /* was #2563eb */
  --text-primary: #f1f5f9;
  --accent-green: #22c55e;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a78bfa;
  --radius: 12px;
  --radius-sm: 6px;
  --bg-mid: #0f1525;
  --bg-raised: #161d30;
  --text-soft: #c0c4cf;
  --accent-red-bg: rgba(239,68,68,0.10);
  --accent-green-bg: rgba(34,197,94,0.08);
}
