/* Sim Lab design tokens — direction A "Timing Screen". Single source of truth for colour, type,
   spacing and chart styling. style.css and js/render.js read these; see DESIGN.md for the rules. */
:root {
  /* ground & structure */
  --c-ground: #000000;        /* page background */
  --c-surface: #0c0c0f;       /* raised areas: modal, table header row, hover */
  --c-surface-2: #141418;     /* inputs, meters */
  --c-rule: #232329;          /* 1px rules between segments / rows */
  --c-rule-strong: #3a3a42;   /* outlines of controls, zero line */
  --c-text: #f4f4f4;          /* primary ink            19.6:1 on ground */
  --c-text-2: #cfcfd4;        /* body copy               13.7:1 */
  --c-muted: #8f8f98;         /* labels, secondary        6.5:1 on ground, 5.7:1 on surface-2 */
  --c-brand: #e10600;         /* brand mark only (5px bar next to the wordmark); never for state */

  /* channels: used for traces, channel names and meters — nothing else */
  --c-brake: #ff3b30;
  --c-throttle: #2ed06e;
  --c-steer: #4fb0ff;

  /* result semantics (timing-screen convention) */
  --c-best: #7c3aed;          /* fill: best rep / personal best (white text on it: 5.7:1) */
  --c-best-ink: #b98aff;      /* text: personal best line (8.1:1) */
  --c-good: #2ed06e;          /* ≥85% in band */
  --c-lost: #ffd400;          /* <85% in band, out-of-band marker, bad reversal */
  --c-focus: #4fb0ff;

  /* chart */
  --ch-bg: #000000;
  --ch-grid: #17171c;
  --ch-zero: #3a3a42;
  --ch-tick: #8a8a93;         /* 5.9:1 — tick labels must stay ≥4.5:1 */
  --ch-target: #ffffff;
  --ch-target-past: rgba(255, 255, 255, 0.28);
  --ch-band: rgba(255, 255, 255, 0.085);
  --ch-band-past: rgba(255, 255, 255, 0.035);
  --ch-now: #ffffff;
  --ch-rep: #34343c;

  /* type */
  --f-display: "Barlow Condensed", "SimLab CJK", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --f-text: "Barlow", "SimLab CJK", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --fs-label: 12px;   /* uppercase keys in status bar / table heads (min size) */
  --fs-small: 13px;
  --fs-body: 15px;
  --fs-value: 26px;   /* status-bar values, table figures */
  --fs-readout: 54px; /* live timing-tower value (≥48px: readable from the rig) */
  --fs-score: 68px;
  --fs-grade: 150px;
  --ls-label: 0.08em; /* letter-spacing for uppercase labels (0 for CJK) */

  /* space & shape */
  --u: 8px;           /* base grid */
  --bar-h: 52px;      /* status bar / top bar */
  --sector-h: 6px;
  --tower-w: 150px;   /* timing tower column in the live chart */
  --radius: 0;
  --line-target: 1.6;
  --line-trace: 2.6;
}
