/* Design tokens — spec §03. Dark "Matchday" is the default; light and high-contrast
   are selected with html[data-theme]. Stadium hero art stays dark in every theme. */
@font-face { font-family: 'Inter'; src: url('/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root, html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0B1728;
  --surface: #16263B;
  --surface-raised: #203248;
  --text: #F8FAFC;
  --muted: #AAB8C9;
  --border: #34465B;
  --control-border: #70849B;     /* ≥3:1 on bg/surface/raised — inputs, pick options */
  --accent: #BDF45B;
  --on-accent: #0B1728;
  --accent-text: #BDF45B;         /* accent used as text/icon on surfaces */
  --accent-soft: rgba(189, 244, 91, 0.14);
  --accent-line: rgba(189, 244, 91, 0.45);
  --success: #36C98A;
  --success-soft: rgba(54, 201, 138, 0.14);
  --danger: #FF8994;
  --danger-soft: rgba(255, 137, 148, 0.13);
  --warning: #F5BD55;
  --warning-soft: rgba(245, 189, 85, 0.14);
  --focus: #BDF45B;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.18);
  --scrim: rgba(3, 8, 16, 0.72);
  --skeleton: #22344B;
  --nav-active-bg: #BDF45B;
  --nav-active-text: #0B1728;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --surface-raised: #E9EFF5;
  --text: #0B1728;
  --muted: #475569;
  --border: #CBD5E1;
  --control-border: #728297;
  --accent: #BDF45B;
  --on-accent: #0B1728;
  --accent-text: #3F6212;          /* lime fails as text on white; use deep olive */
  --accent-soft: #EEF9D9;
  --accent-line: #84B82F;
  --success: #166534;
  --success-soft: #DCFCE7;
  --danger: #B91C1C;
  --danger-soft: #FEE2E2;
  --warning: #854D0E;
  --warning-soft: #FEF3C7;
  --focus: #0B1728;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.06);
  --scrim: rgba(11, 23, 40, 0.55);
  --skeleton: #E2E8F0;
  --nav-active-bg: #BDF45B;
  --nav-active-text: #0B1728;
}

html[data-theme='contrast'] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0A0A0A;
  --surface-raised: #1A1A1A;
  --text: #FFFFFF;
  --muted: #E2E8F0;
  --border: #FFFFFF;
  --control-border: #FFFFFF;
  --accent: #D4FF7A;
  --on-accent: #000000;
  --accent-text: #D4FF7A;
  --accent-soft: #1A2600;
  --accent-line: #D4FF7A;
  --success: #6EF0B4;
  --success-soft: #00261A;
  --danger: #FFB3BA;
  --danger-soft: #2B0006;
  --warning: #FFD58A;
  --warning-soft: #2B1D00;
  --focus: #FFFF00;
  --shadow: none;
  --scrim: rgba(0, 0, 0, 0.85);
  --skeleton: #262626;
  --nav-active-bg: #D4FF7A;
  --nav-active-text: #000000;
}

:root {
  /* Fixed stadium palette (hero art is always dark) */
  --stadium-0: #07111F;
  --stadium-1: #0D2036;
  --stadium-text: #F8FAFC;
  --stadium-muted: #C3D0DE;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --fs-hero: 2rem;      --lh-hero: 2.375rem;   /* 32/38 */
  --fs-title: 1.625rem; --lh-title: 2rem;      /* 26/32 */
  --fs-section: 1.125rem; --lh-section: 1.5rem;/* 18/24 */
  --fs-body: 1rem;      --lh-body: 1.5rem;     /* 16/24 */
  --fs-small: 0.875rem; --lh-small: 1.25rem;   /* 14/20 */
  --fs-meta: 0.75rem;   --lh-meta: 1rem;       /* 12/16 */

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-pill: 999px;
  --sidebar-w: 248px;
  --bottom-nav-h: 64px;
  --content-max: 1280px;
  --gutter: 16px;
}
@media (max-width: 359px) { :root { --gutter: 12px; } }
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }
