/* f1gures — design tokens & global styles */

:root {
  /* Surfaces */
  --bg-0: #050505;
  --bg-1: #0a0a0a;
  --bg-2: #111113;
  --bg-3: #15161a;
  --bg-hover: #1a1c20;
  --bg-elevated: #18191d;

  /* Borders */
  --line-1: #1f2024;
  --line-2: #2a2c32;
  --line-3: #3a3d44;

  /* Text */
  --fg-1: #f5f5f5;
  --fg-2: #b8b9bd;
  --fg-3: #9a9ba1;
  --fg-4: #636469;

  /* Accent — F1 red */
  --accent: #E8002D;
  --accent-dim: #b8002a;
  --accent-glow: rgba(232, 0, 45, 0.18);

  /* Semantic */
  --pos: #2ecc71;
  --neg: #ff4444;
  --neutral: #75767b;
  --warn: #ffb020;
  --live: #ff1e1e;

  /* Type */
  --f-display: 'Barlow Condensed', 'Barlow', 'Helvetica Neue Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Barlow', 'Inter', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Roboto Mono', ui-monospace, 'SF Mono', monospace;

  /* Layout */
  --nav-h: 56px;
}

/* ── Light mode ───────────────────────────────────────────── */
html.light {
  --bg-0: #eeeef2;
  --bg-1: #f5f5f8;
  --bg-2: #ffffff;
  --bg-3: #ededf1;
  --bg-hover: #e6e6ea;
  --bg-elevated: #ffffff;
  --line-1: #e0e1e6;
  --line-2: #cccdd4;
  --line-3: #b2b3bc;
  --fg-1: #0d0e12;
  --fg-2: #3d3e48;
  --fg-3: #6a6b75;
  --fg-4: #9a9ba6;
  --accent-glow: rgba(232, 0, 45, 0.10);
  --pos: #15803d;
  --neg: #dc2626;
  --warn: #b45309;
}
html.light .f1-app {
  background: var(--bg-1);
}
html.light .nav {
  background: rgba(245, 245, 248, 0.92);
  border-bottom-color: var(--line-1);
}
html.light .botnav {
  background: rgba(245, 245, 248, 0.96);
  border-top-color: var(--line-1);
}
html.light .topbar-mobile {
  background: rgba(245, 245, 248, 0.96);
  border-bottom-color: var(--line-1);
}

/* Theme toggle wrapper with moon/sun icons */
.theme-toggle-wrap {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
}
.theme-icon {
  font-size: 13px; line-height: 1;
  color: var(--fg-4);
  transition: color .2s, opacity .2s;
}
.theme-icon-moon  { color: var(--fg-2); }
.theme-icon-sun   { color: var(--fg-4); }
html.light .theme-icon-moon { color: var(--fg-4); }
html.light .theme-icon-sun  { color: var(--accent); }

/* Theme toggle pill */
.theme-toggle {
  width: 36px; height: 20px; border-radius: 10px;
  background: var(--line-2); border: none; padding: 0;
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.theme-toggle::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--fg-1);
  transition: transform .2s, background .2s;
}
html.light .theme-toggle { background: var(--accent); }
html.light .theme-toggle::after { transform: translateX(16px); background: #fff; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}

button { font-family: inherit; }

/* Carbon fibre undertone via subtle SVG noise */
.f1-app {
  background:
    linear-gradient(180deg, #0a0a0a 0%, #08080a 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.008) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.008) 0 1px, transparent 1px 3px);
  min-height: 100%;
  color: var(--fg-1);
}

/* Type primitives */
.t-display {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  line-height: 0.95;
}
.t-eyebrow {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.t-mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.t-num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-1);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 24px;
}
.nav-logo {
  font-family: var(--f-display); font-weight: 800; font-size: 22px;
  letter-spacing: 0.04em; line-height: 1; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent-glow); }
.nav-items { display: flex; gap: 2px; height: 100%; align-items: center; }
.nav-item {
  font-family: var(--f-display); font-weight: 600;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-2); padding: 8px 14px; cursor: pointer;
  border: none; background: transparent;
  position: relative; height: 100%; display: flex; align-items: center;
}
.nav-item:hover { color: var(--fg-1); }
.nav-item.active { color: var(--fg-1); }
.nav-item.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--accent);
}
.nav-item .caret { font-size: 10px; opacity: 0.5; margin-left: 6px; }
.nav-version {
  font-family: var(--f-mono); font-size: 10px; font-weight: 400;
  color: var(--fg-4); letter-spacing: 0.06em;
  align-self: flex-end; padding-bottom: 2px;
}
.nav-spacer { flex: 1; }
.nav-season {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; color: var(--fg-2);
  padding: 6px 12px; border: 1px solid var(--line-2); cursor: pointer;
  background: var(--bg-2);
}
.nav-season:hover { border-color: var(--line-3); color: var(--fg-1); }
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--bg-2); border: 1px solid var(--line-2);
  min-width: 160px; padding: 4px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.nav-dropdown a, .nav-dropdown button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--fg-2);
  padding: 8px 12px; font-family: var(--f-display); font-weight: 600;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  text-decoration: none;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--bg-hover); color: var(--fg-1); }

/* Mobile bottom nav */
.botnav {
  position: sticky; bottom: 0; z-index: 50;
  background: rgba(8,8,10,0.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-1);
  display: flex; padding: 6px 4px 8px;
}
.botnav-item {
  flex: 1; background: transparent; border: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; cursor: pointer;
  font-family: var(--f-display); font-weight: 600;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-3);
}
.botnav-item.active { color: var(--accent); }
.botnav-item .botnav-icon { font-size: 18px; line-height: 1; }

/* ============================================================
   PAGE / LAYOUT
   ============================================================ */
.page { padding: 24px 20px 40px; max-width: 1280px; margin: 0 auto; }
.page-mob { padding: 16px 14px 24px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-title { font-family: var(--f-display); font-weight: 800; font-size: 36px; letter-spacing: 0; line-height: 1.02; text-transform: uppercase; }
.page-mob .page-title { font-size: 28px; }
.page-sub { color: var(--fg-3); font-size: 13px; margin-top: 4px; }

.section-head {
  display: flex; align-items: center; gap: 10px; margin: 24px 0 12px;
}
.section-head h2 {
  font-family: var(--f-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.section-head .section-rule { flex: 1; height: 1px; background: var(--line-1); }

/* ============================================================
   PANEL / CARD
   ============================================================ */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
}
.panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-2);
}
.panel-body { padding: 14px; }
.panel-tight .panel-body { padding: 0; }

.kbd-corner {
  position: absolute; width: 10px; height: 10px; border: 1px solid var(--line-3);
}
.kbd-tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.kbd-tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.kbd-bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.kbd-br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 9px 16px; border: 1px solid transparent; cursor: pointer;
  background: transparent; color: var(--fg-1);
  transition: background .12s, border-color .12s, color .12s;
  line-height: 1; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff0a36; }
.btn-secondary { background: var(--bg-3); border-color: var(--line-2); color: var(--fg-1); }
.btn-secondary:hover { border-color: var(--line-3); background: var(--bg-hover); }
.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg-1); background: var(--bg-2); }
.btn-sm { padding: 6px 10px; font-size: 11px; }
.btn .arrow { font-size: 14px; line-height: 0.5; }

/* ============================================================
   TABLE
   ============================================================ */
.tbl-wrap { width: 100%; overflow-x: auto; }
.tbl {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.tbl thead th {
  position: sticky; top: 0;
  background: var(--bg-3);
  font-family: var(--f-display); font-weight: 600;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
  user-select: none;
}
.tbl thead th.sortable { cursor: pointer; }
.tbl thead th.sortable:hover { color: var(--fg-1); }
.tbl thead th .sort-ind { color: var(--accent); margin-left: 4px; font-size: 9px; }
.tbl thead th.right { text-align: right; }
.tbl thead th.center { text-align: center; }

.tbl tbody tr {
  border-bottom: 1px solid var(--line-1);
  transition: background .08s;
}
.tbl tbody tr:nth-child(even) { background: rgba(255,255,255,0.012); }
.tbl tbody tr:hover { background: var(--bg-hover); }
.tbl tbody tr.clickable { cursor: pointer; }

.tbl td {
  padding: 12px;
  vertical-align: middle;
  white-space: nowrap;
}
.tbl td.right { text-align: right; }
.tbl td.center { text-align: center; }
.tbl td.num { font-variant-numeric: tabular-nums; }

/* Driver name cell with team color strip */
.driver-cell {
  display: flex; align-items: center; gap: 10px;
  padding-left: 0;
  position: relative;
  border-left: 3px solid var(--team-color, var(--line-2));
  padding-left: 10px;
  min-width: 180px;
}
.driver-flag { font-size: 14px; line-height: 1; flex-shrink: 0; }
.driver-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.driver-firstlast .first { color: var(--fg-3); font-weight: 400; margin-right: 4px; }
.driver-firstlast .last { color: var(--fg-1); font-weight: 600; }
.driver-code { font-family: var(--f-mono); font-size: 11px; color: var(--fg-3); margin-left: 6px; }
.driver-num { font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--fg-3); width: 28px; text-align: right; }

/* Position cell */
.pos {
  font-family: var(--f-display); font-weight: 800; font-size: 16px;
  width: 28px; text-align: center; color: var(--fg-1);
  letter-spacing: 0;
}
.pos-1 { color: #FFD700; }
.pos-2 { color: #C0C0C0; }
.pos-3 { color: #CD7F32; }

/* Change indicator */
.chg {
  font-family: var(--f-mono); font-size: 11px;
  display: inline-flex; align-items: center; gap: 3px;
  width: 36px;
}
.chg.up { color: var(--pos); }
.chg.down { color: var(--neg); }
.chg.flat { color: var(--fg-4); }

/* Status pills */
.pill {
  display: inline-flex; align-items: center;
  font-family: var(--f-display); font-weight: 700;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line-2); color: var(--fg-2);
  background: var(--bg-3); white-space: nowrap;
}
.pill-finished { color: var(--fg-2); border-color: var(--line-2); }
.pill-dnf { color: var(--neg); border-color: rgba(255,68,68,0.3); background: rgba(255,68,68,0.08); }
.pill-dsq { color: var(--warn); border-color: rgba(255,176,32,0.3); background: rgba(255,176,32,0.08); }
.pill-completed { color: var(--fg-3); }
.pill-next { color: var(--accent); border-color: var(--accent); background: rgba(232,0,45,0.08); }
.pill-upcoming { color: var(--fg-3); }
.pill-sprint {
  color: #fff; background: linear-gradient(90deg, var(--accent) 0%, #FF4500 100%);
  border-color: transparent;
}
.pill-live {
  color: #fff; background: var(--live); border-color: transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.pill-live .dot {
  width: 6px; height: 6px; background: #fff; border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--line-1); gap: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-family: var(--f-display); font-weight: 600;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 18px; cursor: pointer; background: transparent; border: 0;
  color: var(--fg-3); position: relative; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--fg-2); }
.tab.active { color: var(--fg-1); }
.tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
}
.tab.locked { color: var(--fg-4); cursor: not-allowed; }
.tab.live { color: var(--live); }
.tab .tab-status { font-size: 9px; opacity: 0.7; }

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown {
  display: flex; gap: 0; align-items: stretch;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.countdown-cell {
  flex: 1; padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-right: 1px solid var(--line-1);
}
.countdown-cell:last-child { border-right: 0; }
.countdown-num {
  font-family: var(--f-display); font-weight: 800;
  font-size: 44px; line-height: 0.9; color: var(--fg-1);
  font-variant-numeric: tabular-nums;
}
.countdown-lbl {
  font-family: var(--f-display); font-weight: 600;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3);
}

/* ============================================================
   STAT BLOCK / KPI
   ============================================================ */
.stat {
  padding: 14px;
  border: 1px solid var(--line-1);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 6px;
}
.stat-lbl {
  font-family: var(--f-display); font-weight: 600;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3);
}
.stat-val {
  font-family: var(--f-display); font-weight: 700;
  font-size: 28px; line-height: 1;
  color: var(--fg-1);
}
.stat-val.mono { font-family: var(--f-mono); font-weight: 600; font-size: 22px; }
.stat-sub { font-size: 12px; color: var(--fg-3); }

/* Highlight callout (fastest lap, pole) */
.callout {
  border: 1px solid var(--line-2);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(232,0,45,0.06) 0%, transparent 60%),
    var(--bg-2);
  padding: 16px;
  display: flex; gap: 14px; align-items: center;
  position: relative; overflow: hidden;
}
.callout::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}
.callout-icon { font-size: 28px; opacity: 0.85; }
.callout-body { flex: 1; min-width: 0; }
.callout-lbl {
  font-family: var(--f-display); font-weight: 600;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.callout-driver { font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.callout-time { font-family: var(--f-mono); font-size: 14px; color: var(--fg-2); margin-top: 2px; }

/* ============================================================
   BARS / RATINGS
   ============================================================ */
.barset { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-lbl {
  font-family: var(--f-display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
  width: 130px; flex-shrink: 0;
}
.bar-track { flex: 1; height: 6px; background: var(--bg-3); border: 1px solid var(--line-1); position: relative; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.bar-val {
  font-family: var(--f-mono); font-size: 12px; color: var(--fg-2);
  width: 80px; text-align: right; font-variant-numeric: tabular-nums;
}
.bar-rating {
  font-family: var(--f-display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; width: 80px; text-align: right;
}
.bar-rating.low { color: var(--pos); }
.bar-rating.medium { color: var(--warn); }
.bar-rating.high { color: var(--neg); }

/* Grid utilities */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-7 { grid-template-columns: repeat(7, 1fr); }

@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   RACE CARD
   ============================================================ */
.race-card {
  position: relative; padding: 16px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-1);
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .12s, background .12s;
  min-height: 200px;
}
.race-card:hover { border-color: var(--line-3); background: var(--bg-elevated); }

/* Completed — recede into history */
.race-card.is-completed {
  opacity: 0.45;
  border-color: var(--line-1);
}
.race-card.is-completed:hover { opacity: 0.75; border-color: var(--line-2); }

/* Next — dominant focal point */
.race-card.is-next {
  border: 2px solid var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px rgba(232,0,45,0.2), 0 8px 32px rgba(232,0,45,0.14);
}
.race-card.is-next::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 70% at 50% 0%, rgba(232,0,45,0.1) 0%, transparent 65%);
}
.race-card.is-next:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 1px rgba(232,0,45,0.35), 0 8px 40px rgba(232,0,45,0.2);
}

/* Upcoming — clean, forward-looking */
.race-card.is-upcoming {
  border-color: var(--line-1);
}
.race-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.race-round {
  font-family: var(--f-display); font-weight: 800; font-size: 13px;
  letter-spacing: 0.1em; color: var(--fg-3);
}
.race-name {
  font-family: var(--f-display); font-weight: 700; font-size: 22px;
  line-height: 1; text-transform: uppercase;
}
.race-circuit { color: var(--fg-3); font-size: 12px; margin-top: 4px; }
.race-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.race-flag { font-size: 18px; }
.race-card-foot { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line-1); display: flex; flex-direction: column; gap: 6px; }
.race-mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.race-mini-row .lbl { color: var(--fg-3); font-family: var(--f-display); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.race-mini-row .val { color: var(--fg-1); font-family: var(--f-mono); font-size: 11px; }

/* ============================================================
   DRIVER CARD (small)
   ============================================================ */
.driver-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  padding: 14px;
  display: flex; gap: 12px; align-items: center;
  border-left: 3px solid var(--team-color);
  cursor: pointer;
  transition: background .12s;
}
.driver-card:hover { background: var(--bg-elevated); }
.driver-card .pos {
  font-family: var(--f-display); font-weight: 800; font-size: 28px;
  width: 36px; text-align: center;
}
.driver-card .meta { flex: 1; min-width: 0; }
.driver-card .name { font-family: var(--f-display); font-weight: 700; font-size: 16px; line-height: 1.1; text-transform: uppercase; }
.driver-card .team { font-size: 11px; color: var(--fg-3); margin-top: 2px; font-family: var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; }
.driver-card .pts { text-align: right; }
.driver-card .pts-num { font-family: var(--f-display); font-weight: 800; font-size: 22px; line-height: 1; }
.driver-card .pts-lbl { font-size: 10px; color: var(--fg-3); font-family: var(--f-display); letter-spacing: 0.14em; text-transform: uppercase; }

/* ============================================================
   IMAGE PLACEHOLDER (silhouettes etc)
   ============================================================ */
.silhouette {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 6px, rgba(255,255,255,.04) 6px 12px),
    var(--bg-3);
  border: 1px solid var(--line-1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 10px; color: var(--fg-4);
  letter-spacing: 0.1em; text-transform: uppercase; text-align: center;
  position: relative;
  overflow: hidden;
}
.silhouette svg { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 90%; opacity: 0.18; }

/* Recharts dark theme tweaks */
.recharts-cartesian-axis-tick text { fill: var(--fg-3) !important; font-family: var(--f-mono) !important; font-size: 11px !important; }
.recharts-cartesian-grid line { stroke: var(--line-1) !important; }
.recharts-tooltip-wrapper { outline: none !important; }
.recharts-default-tooltip {
  background: var(--bg-3) !important;
  border: 1px solid var(--line-2) !important;
  border-radius: 0 !important;
  font-family: var(--f-mono) !important;
  font-size: 12px !important;
}
.recharts-tooltip-label { color: var(--fg-2) !important; font-family: var(--f-display) !important; letter-spacing: 0.1em !important; text-transform: uppercase !important; font-size: 11px !important; }
.recharts-legend-item-text { color: var(--fg-2) !important; font-family: var(--f-display) !important; font-size: 11px !important; letter-spacing: 0.08em !important; text-transform: uppercase !important; }

/* Selects */
.sel {
  background: var(--bg-3); color: var(--fg-1);
  border: 1px solid var(--line-2);
  font-family: var(--f-display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 28px 8px 12px; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.sel:hover { border-color: var(--line-3); }
.sel:focus { outline: none; border-color: var(--accent); }

/* Search/text input */
.input {
  background: var(--bg-3); color: var(--fg-1);
  border: 1px solid var(--line-2);
  font-family: var(--f-body); font-size: 13px;
  padding: 8px 12px;
}
.input:focus { outline: none; border-color: var(--accent); }

/* Mini progression sparkline-ish */
.team-color-bar {
  width: 4px; align-self: stretch; min-height: 30px;
  background: var(--team-color);
  flex-shrink: 0;
}
.team-strip {
  display: inline-block; width: 24px; height: 4px;
  background: var(--team-color); vertical-align: middle; margin-right: 8px;
}
.team-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--team-color); border-radius: 50%; margin-right: 6px;
}

/* Driver chip (small pill) */
.driver-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 3px 7px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-left: 2px solid var(--team-color);
  font-family: var(--f-display); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* Hide visually but keep in DOM */
.sr { position: absolute; left: -9999px; }
