/* Design tokens. "Pitch at night": deep green-black surfaces, pitch green for actions,
   armband yellow reserved for the captain, the deadline and the thing you've selected.
   Dark is the default; [data-theme="light"] switches the whole set. */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #0f1a16;
  --surface: #15221c;
  --raised: #1b2b24;
  --sunk: #0b1411;
  --line: #24352d;
  --line-strong: #33493e;

  /* text */
  --fg: #e7efe9;
  --muted: #93a69a;
  --faint: #7d9286;

  /* brand */
  --accent: #2fa36b;
  --accent-hover: #38b878;
  --accent-fg: #04140b;
  --accent-text: #5ccf94;
  --accent-soft: rgb(47 163 107 / 14%);
  --hi: #ffd23f;
  --hi-fg: #1d1600;
  --hi-text: #ffd23f;
  --hi-soft: rgb(255 210 63 / 14%);
  --focus: #ffd23f;

  /* status */
  --good: #4fcf8a;
  --warn: #f2b33d;
  --bad: #ff6b5e;
  --info: #6fb3ff;

  /* fixture difficulty: 1–2 green, 3 grey, 4–5 red */
  --f1: #2fb36d; --f1-fg: #04140b;
  --f2: #93d9ad; --f2-fg: #04140b;
  --f3: #4b5852; --f3-fg: #fff;
  --f4: #ff9d8f; --f4-fg: #2a0703;
  --f5: #c8352c; --f5-fg: #fff;

  /* xP table heat scale, low -> high: accent mixed into the surface. Text stays --fg; every step passes AA with it. */
  --heat-0: var(--surface);
  --heat-1: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --heat-2: color-mix(in srgb, var(--accent) 20%, var(--surface));
  --heat-3: color-mix(in srgb, var(--accent) 31%, var(--surface));
  --heat-4: color-mix(in srgb, var(--accent) 43%, var(--surface));
  --heat-5: color-mix(in srgb, var(--accent) 55%, var(--surface));
  --hatch: rgb(255 255 255 / 7%);   /* xP table columns outside the counted horizon */

  /* the pitch */
  --turf: #123d29;
  --turf-2: #164831;
  --chalk: rgb(255 255 255 / 20%);
  --floodlight: rgb(190 255 220 / 9%);
  --hero-glow: rgb(255 255 255 / 10%);

  /* text and marks on the turf (the turf is dark green in both themes, so these do not change) */
  --on-turf: #fff;
  --on-turf-muted: rgb(255 255 255 / 80%);
  --on-turf-glass: rgb(0 0 0 / 34%);
  --on-turf-line: rgb(255 255 255 / 18%);
  --on-turf-good: #6fe0a2;
  --on-turf-warn: #ffc857;
  --on-turf-bad: #ff9a8f;
  --armband: #ffd23f;
  --armband-fg: #1d1600;
  --armband-vice: #dfe5e1;

  /* type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", roboto, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --fs-label: 11px;
  --ls-label: .09em;
  --ls-eyebrow: .12em;
  --fs-xs: 11.5px;
  --fs-sm: 13px;
  --fs-md: 14.5px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-num: 26px;

  /* shape and space */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --gap: 16px;
  --sidebar: 232px;

  /* desktop side padding (FL-204), used by the top bar, status line, content and footer so their edges line up.
     32px up to 1280px wide, then ramps: about 41px at 1366px, 48px at 1440px, capped at 56px from 1520px.
     Phones (<900px) don't use it: they keep 16px or the safe-area inset (layout.css). No fallback is needed for
     clamp(): it's older than color-mix() and :has(), which the site already needs to render at all. */
  --gutter: clamp(32px, 10vw - 96px, 56px);
  --shadow: 0 10px 30px rgb(0 0 0 / 35%);

  /* weekly-honours medals (Rivals): label text on a tinted chip; the word is always shown, colour only backs it up */
  --gold-fg: #f0c46b; --gold-bg: rgb(240 196 107 / 16%);
  --silver-fg: #cdd6dc; --silver-bg: rgb(205 214 220 / 14%);
  --bronze-fg: #e7a77f; --bronze-bg: rgb(231 167 127 / 16%);

  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t: 200ms;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f4;
  --surface: #fff;
  --raised: #fff;
  --sunk: #e9efeb;
  --line: #d7e0da;
  --line-strong: #bccbc1;
  --fg: #0f1a16;
  --muted: #55675c;
  --faint: #5a6b61;
  --accent: #17804e;
  --accent-hover: #126c41;
  --accent-fg: #fff;
  --accent-text: #13703f;
  --accent-soft: rgb(23 128 78 / 10%);
  --hi: #ffd23f;
  --hi-fg: #1d1600;
  --hi-text: #856000;
  --hi-soft: rgb(255 210 63 / 28%);
  --focus: #856000;
  --good: #0f6a3a;
  --warn: #875200;
  --bad: #b02f26;
  --info: #1f63b5;
  --f3: #56635c;
  --heat-1: color-mix(in srgb, var(--accent) 8%, var(--surface));
  --heat-2: color-mix(in srgb, var(--accent) 16%, var(--surface));
  --heat-3: color-mix(in srgb, var(--accent) 25%, var(--surface));
  --heat-4: color-mix(in srgb, var(--accent) 35%, var(--surface));
  --heat-5: color-mix(in srgb, var(--accent) 45%, var(--surface));
  --hatch: rgb(15 26 22 / 9%);
  --gold-fg: #7a5600; --gold-bg: rgb(214 160 40 / 20%);
  --silver-fg: #4a5560; --silver-bg: rgb(120 135 150 / 18%);
  --bronze-fg: #8a4a22; --bronze-bg: rgb(190 110 60 / 18%);

  /* FL-123: was #1b6440 / #1f7049 with a 10% glow; the hero's muted text and yellow countdown fell to 3.7-3.9:1 */
  --turf: #155536;
  --turf-2: #175c3d;
  --hero-glow: rgb(255 255 255 / 6%);
  --chalk: rgb(255 255 255 / 35%);
  --floodlight: rgb(255 255 255 / 10%);
  --shadow: 0 10px 30px rgb(15 26 22 / 14%);
}

/* Inter, self-hosted so it works offline (SIL Open Font License, see vendor/fonts/LICENSE-Inter.txt) */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/fonts/inter-var-latin.woff2") format("woff2");
}

/* Barlow Condensed, the display face for titles, hero numbers and verdicts (SIL Open Font License, see vendor/fonts/LICENSE-BarlowCondensed.txt) */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../vendor/fonts/barlow-condensed-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../vendor/fonts/barlow-condensed-700-latin.woff2") format("woff2");
}
