/* PITWALL design tokens (v2). Signed-off mockup: https://claude.ai/artifact/CkfVrJqXSLk72JPWNKSTpH
 *
 * One visual language for the broadcast, the site pages and the standings:
 * - dark only (the race is lit, the chrome is not);
 * - neutral chrome; the only hue comes from the team you are looking at (--team), plus fixed tyre and status colours;
 * - Titillium Web on a fixed 12/13/14/16/20/24/32/48 scale, tabular numbers everywhere;
 * - a 4-pt spacing grid.
 * Set --team on any element (style="--team:#ff2d55") and every component inside it picks it up.
 */
:root {
  color-scheme: dark;

  /* ---- neutrals: blue-black, biased toward the night-race asphalt */
  --ink-0: #090b0f;          /* page */
  --ink-1: #0f1218;          /* card */
  --ink-2: #151922;          /* raised: buttons, inputs, tabs */
  --ink-3: #1c212c;          /* hairlines on cards, table rules */
  --line-2: #262c38;         /* input borders, slider track */
  --line-3: #333b4a;         /* button borders, inactive dots */
  --text: #eef1f5;
  --text-2: #a9b1bf;         /* secondary, meta */
  --text-3: #717a8b;         /* tertiary, table heads, disabled */
  --on-light: #0b0d12;       /* text on a light (selected) surface */
  --on-light-2: #4a5160;

  /* ---- glass: overlays that sit on the live 3D view */
  --glass: rgba(16, 19, 26, .56);
  --glass-strong: rgba(14, 17, 23, .86);
  --glass-blur: blur(20px) saturate(1.45);
  --glass-edge: rgba(255, 255, 255, .08);
  --hair: rgba(255, 255, 255, .07);       /* dividers inside glass */
  --hair-2: rgba(255, 255, 255, .12);     /* meter tracks */
  --wash: rgba(255, 255, 255, .045);      /* your own rows */
  --hover: rgba(255, 255, 255, .06);
  --on: rgba(255, 255, 255, .08);         /* active nav item, ghost chip */

  /* ---- semantic status colours (never used as a team colour) */
  --good: #34d27b;     --good-ink: #06140c;      /* personal best, DRS open, places gained */
  --fastest: #b26bff;  --fastest-ink: #12041f;   /* overall fastest lap */
  --caution: #ffc53d;  --caution-ink: #1a1300;   /* safety car, yellow flag */
  --alert: #ff4d4f;    --alert-ink: #ffffff;     /* live, retired, places lost, brake */
  --info: #3d8bff;     --info-ink: #031026;      /* rain */
  --neutral-chip: #a9b1bf;                       /* pit */

  /* ---- tyres (the standard F1 compound colours) */
  --tyre-soft: #ff3b3b;
  --tyre-medium: #ffd43b;
  --tyre-hard: #f1f1f1;
  --tyre-inter: #38c96b;
  --tyre-wet: #3d8bff;

  /* ---- brand: the wordmark only */
  --brand: #ff2d55;

  /* ---- the team accent (override per element) */
  --team: var(--text);

  /* ---- type */
  --font: "Titillium Web", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-12: 12px;   /* caps labels */
  --fs-13: 13px;   /* meta, secondary detail */
  --fs-14: 14px;   /* body, tower rows (default) */
  --fs-16: 16px;   /* card titles */
  --fs-20: 20px;   /* battle names, card numbers */
  --fs-24: 24px;   /* section heads */
  --fs-32: 32px;   /* page titles, battle gap */
  --fs-48: 48px;   /* speed, countdown */
  --fw-regular: 400;
  --fw-semi: 600;
  --fw-bold: 700;
  --fw-black: 900;
  --lh-tight: 1.1;
  --lh-body: 1.4;
  --label-track: .08em;      /* letter-spacing for caps labels */

  /* ---- space (4-pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* ---- radii */
  --r-1: 2px;      /* ticks, pips */
  --r-2: 4px;      /* chips, nav items */
  --r-3: 6px;      /* glass panels, buttons */
  --r-4: 10px;     /* cards, modals */
  --r-5: 16px;     /* bottom sheet */
  --r-pill: 999px;

  /* ---- motion */
  --t-fast: 120ms;           /* hover, press */
  --t-med: 200ms;            /* overlay open, tower reorder, banner out */
  --t-slow: 320ms;           /* banner in */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --banner-hold: 6s;

  /* ---- elevation */
  --shadow-glass: inset 0 1px 0 rgba(255, 255, 255, .05), 0 6px 24px rgba(0, 0, 0, .18);
  --shadow-sheet: 0 -12px 32px rgba(0, 0, 0, .4);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, .5);

  /* ---- layers */
  --z-scene: 0;
  --z-overlay: 10;
  --z-banner: 20;
  --z-nav: 30;
  --z-sheet: 40;
  --z-modal: 50;
  --z-toast: 60;

  /* ---- layout */
  --page-max: 1280px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; }
}
