/* ── F2 TYPOGRAPHY (@font-face: Venera & Titillium Web) ── */
@font-face {
  font-family: 'Venera';
  src: url('../assets/fonts/Venera/Venera-900.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Venera';
  src: url('../assets/fonts/Venera/Venera-700.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Venera';
  src: url('../assets/fonts/Venera/Venera-500.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Venera';
  src: url('../assets/fonts/Venera/Venera-300.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Venera';
  src: url('../assets/fonts/Venera/Venera-100.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Titillium Web';
  src: url('../assets/fonts/Titillium/TitilliumWeb-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* F1CC Wiki V2.00 — News-site aesthetic */
/* Fonts: Barlow + Barlow Semi Condensed loaded per-page via Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Semi+Condensed:wght@500;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Backgrounds — warm gray palette */
  --navy-deepest:  #35383d;
  --navy-deep:     #2f3339;
  --navy-mid:      #3e4248;
  --navy-light:    #454a51;
  --navy-border:   #5a6370;

  /* Brand accent */
  --blue-accent:   #3b8de0;
  --blue-bright:   #63b1ff;
  --blue-dim:      rgba(59,141,224,0.10);
  --blue-border:   rgba(97,104,116,0.35);

  /* Text */
  --text-primary:   #f7f8fa;
  --text-secondary: #ccd2dc;
  --text-muted:     #8e9aaa;
  --text-on-dark:   #f7f8fa;

  /* Status pills (unchanged role, updated to match warm palette) */
  --status-free-agent-bg:      rgba(200,210,230,0.08);
  --status-free-agent-text:    #aabbd0;
  --status-free-agent-border:  rgba(170,187,208,0.3);
  --status-retired-bg:         rgba(255,255,255,0.04);
  --status-retired-text:       #8e9aaa;
  --status-retired-border:     rgba(142,154,170,0.3);
  --status-principal-bg:       rgba(249,219,85,0.12);
  --status-principal-text:     #f9db55;
  --status-principal-border:   rgba(249,219,85,0.4);

  /* Medals */
  --gold:   #f9db55;
  --silver: #c8d0dc;
  --bronze: #d4845c;

  /* Series accents */
  --f2-accent: #7ab8ff;
  --f1-accent: #3b8de0;

  /* Typography (F1 & Default) */
  --font-display: "Barlow Semi Condensed", sans-serif;
  --font-wide:    "Barlow Semi Condensed", sans-serif;
  --font-body:    "Barlow", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;

  /* Typography (F2 Formula 2) */
  --font-f2-display: "Venera", "Barlow Semi Condensed", sans-serif;
  --font-f2-wide:    "Venera", "Barlow Semi Condensed", sans-serif;
  --font-f2-body:    "Titillium Web", "Barlow", sans-serif;

  --radius:    6px;
  --radius-lg: 8px;

  --shadow: 0 10px 24px rgba(0,0,0,0.28);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── ACCESSIBILITY ── */
:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }
.filter-select:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--blue-accent); color: var(--text-on-dark);
  font-family: var(--font-display); font-size: 13px;
  font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 10px 18px; border-radius: var(--radius);
  text-decoration: none; z-index: 999;
}
.skip-link:focus { top: 1rem; }

/* ── BODY ── */
body {
  font-family: var(--font-body);
  background:
    linear-gradient(180deg, rgba(59,141,224,0.07), transparent 160px),
    radial-gradient(circle at 10% 10%, rgba(99,177,255,0.10), transparent 26%),
    var(--navy-deepest);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── STICKY HEADER ── */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deepest);
  padding-top: 0.55rem;
  padding-bottom: 0.65rem;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--navy-border);
  border-bottom: 3px solid var(--blue-accent);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2f3339 0%, #26292f 100%);
  box-shadow: var(--shadow);
  padding: 0.65rem 1rem;
  overflow: hidden;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.brand-acc { color: var(--blue-accent); }

.tagline {
  font-family: var(--font-display);
  font-weight: 700;
  color: #d4dae4;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── NAV ROW ── */
.nav-row {
  display: flex;
  gap: 0.2rem;
  margin-top: 0.5rem;
  background: #1f2227;
  border: 1px solid #4c525d;
  border-radius: var(--radius);
  padding: 0.25rem;
  overflow-x: auto;
  list-style: none;
}

.nav-row a,
.nav-link {
  color: #eef1f7;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  padding: 0.48rem 0.65rem;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
  display: block;
  transition: background 0.12s ease;
}

.nav-row a:hover,
.nav-link:hover,
.nav-row a.active,
.nav-link.active {
  background: #2f343b;
  border-color: #555d69;
  color: #fff;
}

.nav-row a.news-link {
  margin-left: auto;
  color: #ffcbca;
  border-color: rgba(235,45,42,0.3);
}
.nav-row a.news-link:hover {
  background: rgba(235,45,42,0.15);
  border-color: var(--blue-accent);
  color: #fff;
}

/* ── HERO STRIP ── */
.hero-strip {
  background: linear-gradient(180deg, #3f444b 0%, #383c43 100%);
  border-bottom: 1px solid var(--blue-border);
  padding: 1.75rem 1.5rem 1.4rem;
  position: relative;
  overflow: hidden;
}

.hero-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.02) 0 8px,
    rgba(255,255,255,0) 8px 16px
  );
  pointer-events: none;
}

.hero-strip::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 260px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(235,45,42,0.04));
  pointer-events: none;
}
/* ── CONSTRUCTOR PROFILE HERO (#team-hero) ── */
#team-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--team-color-sec, #ffffff) 20%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--team-color, #3b8de0) 26%, transparent) 0%, transparent 65%),
    linear-gradient(180deg, #252830 0%, #1a1c22 100%);
  border-bottom: 3px solid var(--team-color, var(--blue-accent));
}

#team-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--team-color, #3b8de0) 30%, transparent) 0px,
    color-mix(in srgb, var(--team-color, #3b8de0) 30%, transparent) 12px,
    transparent 12px,
    transparent 18px,
    color-mix(in srgb, var(--team-color-sec, #ffffff) 30%, transparent) 18px,
    color-mix(in srgb, var(--team-color-sec, #ffffff) 30%, transparent) 30px,
    transparent 30px,
    transparent 36px
  );
  pointer-events: none;
  z-index: 1;
}

/* Sola dark fade: Metinlerin okunabilirliğini garantiye alır */
#team-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(14, 17, 23, 0.98) 0%,
    rgba(14, 17, 23, 0.94) 260px,
    rgba(14, 17, 23, 0.75) 440px,
    rgba(14, 17, 23, 0.30) 620px,
    transparent 800px
  );
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 768px) {
  #team-hero::after {
    background: linear-gradient(
      to bottom,
      rgba(14, 17, 23, 0.96) 0%,
      rgba(14, 17, 23, 0.88) 60%,
      rgba(14, 17, 23, 0.45) 100%
    );
  }
}

#team-hero > * {
  position: relative;
  z-index: 3;
}

#team-hero .hero-eyebrow {
  color: var(--team-color, var(--blue-accent));
  font-weight: 800;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}

#team-hero .hero-title {
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}

#team-hero .hero-sub {
  text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}


.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffcbca;
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.45rem;
  position: relative;
  z-index: 2;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
  position: relative;
  z-index: 2;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.1rem;
  position: relative;
  z-index: 2;
}

.hero-stat .val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue-accent);
  line-height: 1;
}

.hero-stat .lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* ── PAGE LAYOUT ── */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ── CARDS ── */
.card {
  background: var(--navy-mid);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.stat-card {
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}

.stat-card .s-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.stat-card .s-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-card .s-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 1.5rem;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--blue-border);
  margin-bottom: 1.5rem;
}

.tab-btn {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 12px 16px;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--blue-accent); border-bottom-color: var(--blue-accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── STANDINGS TABLE ── */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.standings-table th {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--blue-border);
}

.standings-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)) { text-align: center; }

.standings-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(97,104,116,0.2);
  color: var(--text-secondary);
  vertical-align: middle;
}

.standings-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)) { text-align: center; }

.standings-table tbody tr { transition: background 0.1s; }
.standings-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.standings-table tbody tr.leader td { background: rgba(249,219,85,0.05); }

/* ── POSITION BADGES ── */
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--navy-light);
  color: var(--text-secondary);
}

.pos-badge.p1 { background: rgba(249,219,85,0.22); color: var(--gold); }
.pos-badge.p2 { background: rgba(200,208,220,0.18); color: var(--silver); }
.pos-badge.p3 { background: rgba(212,132,92,0.20); color: var(--bronze); }

/* ── DRIVER CELLS ── */
.driver-name-cell { display: flex; align-items: center; gap: 8px; }
.driver-flag { font-size: 16px; }

.driver-name-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.driver-name-link:hover { color: var(--blue-bright); }

/* ── TEAM PILL ── */
.team-pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
}

.pts-cell {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.gap-cell {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── RACE CALENDAR ── */
.race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.race-card {
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}
.race-card:hover { border-color: rgba(97,104,116,0.7); background: rgba(255,255,255,0.03); }

.race-round {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.race-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.2;
}

.race-circuit { font-size: 0.78rem; color: var(--text-secondary); }
.race-date { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; }

.race-status-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 6px;
}

.status-complete { background: rgba(30,180,100,0.12); color: #4dcc84; border: 1px solid rgba(30,180,100,0.3); }
.status-upcoming { background: rgba(97,104,116,0.2); color: var(--text-secondary); border: 1px solid var(--blue-border); }
.status-live {
  background: rgba(235,45,42,0.18);
  color: var(--blue-bright);
  border: 1px solid rgba(235,45,42,0.4);
  animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── DRIVER CARD (grid) ── */
.driver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.driver-card {
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-decoration: none;
  display: block;
  transition: all 0.15s;
}
.driver-card:hover { border-color: rgba(97,104,116,0.7); background: rgba(255,255,255,0.03); }

.driver-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  background: var(--navy-mid);
  border: 2px solid var(--blue-border);
}

.driver-card-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.driver-card-meta { font-size: 0.78rem; color: var(--text-secondary); }

/* ── SEASON SELECTOR ── */
.season-selector { display: flex; gap: 6px; flex-wrap: wrap; }

.season-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: 4px;
  border: 1px solid var(--blue-border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.season-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.season-btn.active { background: var(--blue-accent); color: #fff; border-color: var(--blue-accent); }

/* ── MODAL ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--navy-mid);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--blue-border);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ── PODIUM CARDS ── */
.podium-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

.podium-card {
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.podium-card.p1 { border-color: rgba(249,219,85,0.4); background: rgba(249,219,85,0.06); }
.podium-card.p2 { border-color: rgba(200,208,220,0.35); background: rgba(200,208,220,0.04); }
.podium-card.p3 { border-color: rgba(212,132,92,0.3); background: rgba(212,132,92,0.04); }

.podium-pos {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.podium-card.p1 .podium-pos { color: var(--gold); }
.podium-card.p2 .podium-pos { color: var(--silver); }
.podium-card.p3 .podium-pos { color: var(--bronze); }

.podium-driver {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.podium-team { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

/* ── FOOTER ── */
footer {
  margin-top: 0.8rem;
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 0.7rem 0.95rem;
  background: var(--navy-deep);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.82rem;
}
footer a { color: var(--blue-accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--blue-accent);
  color: var(--text-on-dark);
  border-color: var(--blue-accent);
}
.btn-primary:hover { background: var(--blue-bright); border-color: var(--blue-bright); }

.btn-ghost {
  display: block;
  text-align: center;
  padding: 0.42rem 0.75rem;
  background: var(--navy-deep);
  border: 1px solid var(--navy-border);
  border-radius: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.12s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.btn-sm {
  font-size: 0.72rem !important;
  padding: 6px 12px !important;
  min-height: 34px;
}

/* ── UTILS ── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--blue-accent); }
.font-display { font-family: var(--font-display); }

.divider {
  border: none;
  border-top: 1px solid var(--blue-border);
  margin: 1.5rem 0;
}

.pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--blue-border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--text-primary); }

/* ── SIDEBAR ROW ── */
.sidebar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dotted rgba(97,104,116,0.4);
}
.sidebar-row:last-of-type { border-bottom: none; }

/* ── TABLE SCROLL ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── EXPLORE NAV (homepage) ── */
.explore-feature {
  display: block;
  background: var(--navy-mid);
  border: 1px solid var(--blue-border);
  border-top: 2px solid var(--blue-accent);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.4rem;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.15s;
}
.explore-feature:hover { background: rgba(255,255,255,0.03); }

.explore-feature-eyebrow {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: 6px;
}
.explore-feature-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-on-dark);
  margin-bottom: 4px;
  line-height: 1.1;
}
.explore-feature-sub { font-size: 0.82rem; color: var(--text-secondary); }

.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.explore-tile {
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  border-top: 2px solid var(--tile-color, var(--blue-accent));
  border-radius: var(--radius);
  padding: 12px 14px;
  text-decoration: none;
  transition: background 0.15s;
}
.explore-tile:hover { background: rgba(255,255,255,0.03); }

.explore-tile-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.explore-tile-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

.explore-vods { padding: 2px 0 12px; }
.explore-vods a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}
.explore-vods a:hover { color: var(--blue-bright); }

/* ── HERO DATASTRIP ── */
.hero-datastrip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}
.hero-datastrip .stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.hero-datastrip .stat-sep { color: var(--text-muted); user-select: none; }

/* ── SERIES TAGS ── */
.series-tag {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-f1 { background: var(--blue-accent); color: #fff; }
.tag-f2 { background: var(--f2-accent); color: #1a1f26; }

/* ── SERIES HEADINGS (seasons/teams list) ── */
.series-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
  padding-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.heading-f1 { border-bottom: 3px solid var(--blue-accent); }
.heading-f2 { border-bottom: 3px solid var(--f2-accent); }

/* ── MOBILE NAV HAMBURGER ── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--blue-border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.nav-hamburger:hover { color: var(--text-primary); border-color: var(--blue-accent); }
.nav-hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-stats { gap: 1rem; }
  .hero-title { font-size: 1.5rem; }
  .podium-row { grid-template-columns: 1fr; }
  .race-grid { grid-template-columns: 1fr 1fr; }
  .explore-grid { grid-template-columns: 1fr 1fr; }

  .nav-hamburger { display: flex; }
  .topbar .tagline { display: none; }

  .nav-row {
    display: none;
    flex-direction: column;
    gap: 2px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    padding: 0.5rem;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .nav-row.open { display: flex; }
  .nav-row a, .nav-link { padding: 12px 10px; border-radius: 3px; }
  .nav-row a.news-link { margin-left: 0; }
}

@media (max-width: 480px) {
  .explore-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr !important; }
}

/* Twemoji flag sizing */
img.emoji {
  height: 1.2em;
  width: 1.2em;
  vertical-align: -0.15em;
  display: inline-block;
}
.driver-tile-flag img.emoji { height: 2em; width: 2em; vertical-align: middle; }
.driver-avatar-lg img.emoji { height: 3em; width: 3em; }

/* ══════════════════════════════════════════════════════════════════════════
   HOME (index.html)
   ══════════════════════════════════════════════════════════════════════════ */
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }

    .sidebar-card { background: var(--navy-mid); border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; }
    .sidebar-title { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }

    .f2-title { color: var(--f2-accent); }

    .champ-card { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(59,141,224,0.08); }
    .champ-card:last-child { border-bottom: none; }
    .champ-num { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); min-width: 68px; flex-shrink: 0; }
    .champ-flag { flex-shrink: 0; margin-right: 4px; }
    .champ-flag img.emoji { height: 18px; width: 18px; vertical-align: middle; display: block; }
    .champ-info .champ-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
    .champ-info .champ-meta { font-size: 11px; color: var(--text-secondary); }
    .champ-toggle { display: flex; gap: 4px; margin-bottom: 10px; }
    .champ-toggle-btn { flex: 1; padding: 8px; min-height: 36px; border-radius: 4px; border: 1px solid var(--blue-border); background: transparent; color: var(--text-muted); font-family: var(--font-display); font-size: 11px; cursor: pointer; }
    .champ-toggle-btn.active { background: var(--blue-accent); border-color: var(--blue-accent); color: var(--text-on-dark); }

    .latest-race-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
    .latest-race-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
    .podium-mini { display: flex; flex-direction: column; gap: 6px; }
    .podium-mini-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
    .podium-mini-pos { font-family: var(--font-display); font-size: 11px; font-weight: 700; width: 20px; }
    .p1c { color: var(--gold); } .p2c { color: var(--silver); } .p3c { color: var(--bronze); }

    .news-cta {
      display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
      padding: 1.25rem; text-decoration: none;
    }
    .news-cta-label { font-size: 11px; font-family: var(--font-display); letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
    .news-cta-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
    .news-cta-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
    .news-cta-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-accent); color: var(--text-on-dark); font-family: var(--font-display); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: var(--radius); text-decoration: none; transition: opacity 0.15s; }
    .news-cta-btn:hover { opacity: 0.85; }

    @media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════════
   LEGACY HOME (pages/index.html)
   ══════════════════════════════════════════════════════════════════════════ */
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
    .home-nav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.5rem; }
    .nav-tile {
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg); padding: 1.25rem;
      text-decoration: none; display: block; transition: all 0.2s;
      position: relative; overflow: hidden;
    }
    .nav-tile::before {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
      background: var(--tile-color, var(--blue-accent)); opacity: 0; transition: opacity 0.2s;
    }
    .nav-tile:hover { transform: translateY(-2px); border-color: var(--tile-color, var(--blue-accent)); }
    .nav-tile:hover::before { opacity: 1; }
    .nav-tile-icon { font-size: 22px; margin-bottom: 10px; }
    .nav-tile-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
    .nav-tile-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
    .sidebar-card { background: var(--navy-mid); border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; }
    .sidebar-title { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
    .champ-card { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(59,141,224,0.08); }
    .champ-card:last-child { border-bottom: none; }
    .champ-num { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); width: 28px; flex-shrink: 0; }
    .champ-info .champ-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
    .champ-info .champ-meta { font-size: 11px; color: var(--text-secondary); }
    .latest-race-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
    .latest-race-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
    .podium-mini { display: flex; flex-direction: column; gap: 6px; }
    .podium-mini-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
    .podium-mini-pos { font-family: var(--font-display); font-size: 11px; font-weight: 700; width: 20px; }
    .p1c { color: var(--gold); } .p2c { color: var(--silver); } .p3c { color: var(--bronze); }
    .news-item { padding: 10px 0; border-bottom: 1px solid rgba(59,141,224,0.08); }
    .news-item:last-child { border-bottom: none; }
    .news-date { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
    .news-title { font-size: 13px; color: var(--text-primary); font-weight: 500; }
    @media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } .home-nav-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 500px) { .home-nav-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════════
   DRIVERS (pages/drivers.html)
   ══════════════════════════════════════════════════════════════════════════ */
.search-bar {
      width: 100%; background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 10px 14px; color: var(--text-primary);
      font-family: var(--font-body); font-size: 14px; transition: border-color 0.15s;
    }
    .search-bar:focus { border-color: var(--blue-accent); outline: none; }
    .search-bar:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }
    .search-bar::placeholder { color: var(--text-muted); }
    .driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 12px; }

    .driver-tile {
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg); padding: 1rem;
      text-decoration: none; display: block; transition: all 0.15s;
    }
    .driver-tile:hover { border-color: var(--blue-accent); background: rgba(235,45,42,0.06); }

    .driver-tile-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .driver-tile-number { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--text-muted); }
    .driver-tile-flag { font-size: 24px; line-height: 1; display: flex; }

    .driver-tile-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; line-height: 1.2; }
    .driver-tile-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

    .series-tag { font-family: var(--font-display); font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 4px; }
    .tag-f1 { background-color: #E8002D; color: var(--text-on-dark); }
    .tag-f2 { background-color: #0090D0; color: var(--text-on-dark); }

    .driver-tile-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); border-top: 1px solid rgba(59,141,224,0.1); padding-top: 8px; margin-top: 8px; }
    .driver-tile-stat { display: flex; flex-direction: column; align-items: center; }
    .driver-tile-stat .val { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); }
    .driver-tile-stat .lbl { font-size: 10px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   DRIVER PROFILE (pages/driver.html)
   ══════════════════════════════════════════════════════════════════════════ */
.driver-header { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; }
    .driver-header-info h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text-primary); }
    .driver-header-meta { color: var(--text-secondary); font-size: 14px; margin-top: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .career-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px,1fr)); gap: 10px; margin-bottom: 1.5rem; }
    .season-history { display: flex; flex-direction: column; gap: 8px; }
    .season-row {
      display: flex; align-items: center; gap: 12px;
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 10px 14px;
    }
    .season-year { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); width: 50px; flex-shrink: 0; }
    .season-row-info { flex: 1; }
    .season-champ-pos { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
    .result-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(59,141,224,0.07); font-size: 13px; }
    .result-row:last-child { border-bottom: none; }

    .driver-avatar-lg {
      width: 80px; height: 80px;
      border-radius: 50%; flex-shrink: 0;
      border: 3px solid var(--blue-border);
      background: var(--navy-light);
      position: relative;
      box-sizing: border-box;
    }
    .avatar-image-wrapper {
      width: 100%; height: 100%;
      border-radius: 50%; overflow: hidden;
      display: flex; align-items: center; justify-content: center;
    }
    .avatar-image-wrapper .emoji {
      width: 100% !important; height: 100% !important;
      margin: 0 !important; object-fit: cover !important; display: block;
    }
    .avatar-number {
      position: absolute; bottom: -4px; right: -8px;
      background: var(--blue-accent);
      color: var(--text-on-dark);
      font-family: var(--font-display); font-size: 13px; font-weight: 800;
      line-height: 1; padding: 4px 6px; border-radius: 6px;
      border: 3px solid var(--navy-deepest);
      box-shadow: 0 2px 4px rgba(0,0,0,0.3);
      z-index: 10;
    }

    .series-tag { font-family: var(--font-display); font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 4px; }
    .tag-f1 { background-color: #E8002D; color: var(--text-on-dark); }
    .tag-f2 { background-color: #0090D0; color: var(--text-on-dark); }
    .academy-pill {
      display: inline-flex; align-items: center; gap: 5px;
      font-family: var(--font-display); font-size: 0.65rem; font-weight: 800;
      letter-spacing: 0.06em; text-transform: uppercase;
      padding: 3px 8px; border-radius: var(--radius);
      white-space: nowrap;
    }

.driver-elo-section { margin-bottom: 1.5rem; }
    .driver-elo-cards   { display: flex; gap: 12px; flex-wrap: wrap; }
    .driver-elo-card {
      flex: 1; min-width: 260px;
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg);
      padding: 14px 16px;
    }
    .elo-pool-row {
      display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
    }
    .elo-pool-badge {
      font-family: var(--font-display); font-size: 10px; font-weight: 800;
      padding: 3px 7px; border-radius: 4px; letter-spacing: 0.06em;
    }
    .elo-pool-badge.f1 { background: #E8002D; color: #fff; }
    .elo-pool-badge.f2 { background: #0090D0; color: #fff; }
    .elo-pool-rank {
      font-family: var(--font-display); font-size: 12px; font-weight: 700;
      color: var(--text-muted);
    }
    .elo-stat-row {
      display: flex; gap: 20px; margin-bottom: 12px; flex-wrap: wrap;
    }
    .elo-stat-item { display: flex; flex-direction: column; gap: 2px; }
    .elo-stat-label {
      font-family: var(--font-display); font-size: 0.6rem; font-weight: 800;
      letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
    }
    .elo-stat-num {
      font-family: var(--font-display); font-size: 1.05rem; font-weight: 800;
      color: var(--text-primary);
    }
    .elo-stat-num.f1   { color: var(--blue-accent); }
    .elo-stat-num.f2   { color: var(--f2-accent); }
    .elo-stat-num.peak { color: var(--gold); font-size: 0.9rem; }
    .elo-sparkline-wrap { position: relative; height: 64px; }

/* ══════════════════════════════════════════════════════════════════════════
   SEASONS (pages/seasons.html)
   ══════════════════════════════════════════════════════════════════════════ */
.season-card {
      display: flex; align-items: center; gap: 16px;
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg); padding: 1.25rem;
      text-decoration: none; transition: all 0.15s;
    }
    .season-card:hover { border-color: var(--blue-accent); transform: translateX(4px); background: rgba(235,45,42,0.06); }
    .season-year-badge {
      font-family: var(--font-display); font-size: 28px; font-weight: 700;
      color: var(--blue-accent); width: 80px; flex-shrink: 0;
    }
    .season-card-info { flex: 1; min-width: 0; }
    .season-card-champ {
      font-family: var(--font-display); font-size: 18px; font-weight: 700;
      color: var(--text-primary); margin-bottom: 6px;
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    }
    .season-driver-num {
      font-family: var(--font-display); font-size: 13px; font-weight: 800;
      color: var(--gold); background: rgba(249,219,85,0.12);
      border: 1px solid rgba(249,219,85,0.35);
      padding: 1px 6px; border-radius: 4px; line-height: 1.2;
    }
    .season-driver-num.sm {
      font-size: 11px; color: var(--silver);
      background: rgba(200,208,220,0.1); border-color: rgba(200,208,220,0.3);
      padding: 1px 5px;
    }
    .season-pts-badge {
      font-family: var(--font-display); font-size: 13px; font-weight: 700;
      color: var(--text-secondary); margin-left: 2px;
    }
    .season-card-meta {
      font-size: 13px; color: var(--text-secondary);
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.6;
    }
    .season-meta-item {
      display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
    }
    .season-meta-label {
      color: var(--text-muted); font-size: 12px; font-weight: 600;
    }
    .season-meta-sep { color: var(--text-muted); opacity: 0.6; }
    .season-card-status { flex-shrink: 0; }

    .series-heading {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      color: var(--text-primary);
      margin-top: 24px;
      margin-bottom: 12px;
      padding-bottom: 4px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .heading-f1 { border-bottom: 3px solid #E8002D; }
    .heading-f2 { border-bottom: 3px solid var(--f2-accent); }

/* ══════════════════════════════════════════════════════════════════════════
   SEASON DETAIL (pages/season.html)
   ══════════════════════════════════════════════════════════════════════════ */
.race-list { display: flex; flex-direction: column; gap: 6px; }
    .race-row {
      display: flex; align-items: center; gap: 12px;
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 10px 14px;
      text-decoration: none; transition: all 0.15s; cursor: pointer;
    }
    .race-row:hover { border-color: var(--blue-accent); background: rgba(235,45,42,0.07); }
    .race-row-round { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--text-muted); width: 28px; flex-shrink: 0; }
    .race-row-flag { font-size: 18px; flex-shrink: 0; }
    .race-row-info { flex: 1; }
    .race-row-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); }
    .race-row-circuit { font-size: 12px; color: var(--text-secondary); }
    .race-row-winner { font-size: 12px; color: var(--text-secondary); flex-shrink: 0; text-align: right; }
    .race-row-winner .win-name { color: var(--text-primary); font-weight: 500; }

    .filter-container { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 15px; }

    .academy-tag {
      display: inline-block; font-size: 10px; font-weight: 700;
      padding: 1px 5px; border-radius: 3px; border: 1px solid;
      letter-spacing: 0.3px; vertical-align: middle; white-space: nowrap;
    }
    .wcc-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
    .wcc-toggle-btn {
      background: var(--navy-light); border: 1px solid var(--blue-border);
      color: var(--text-secondary); padding: 6px 14px; border-radius: var(--radius);
      font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
      font-family: var(--font-display);
    }
    .wcc-toggle-btn.active, .wcc-toggle-btn:hover {
      border-color: var(--blue-accent); color: var(--text-primary);
      background: rgba(235,45,42,0.08);
    }

/* ══════════════════════════════════════════════════════════════════════════
   RACE RESULT (pages/race.html)
   ══════════════════════════════════════════════════════════════════════════ */
.race-summary-box {
      background: rgba(235,45,42,0.07);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      padding: 1rem 1.25rem; margin-bottom: 1.5rem;
      font-size: 14px; color: var(--text-secondary); line-height: 1.7;
    }
    .fl-badge { display: inline-block; background: rgba(160,40,200,0.2); color: #c070e8;
      border: 1px solid rgba(160,40,200,0.4); font-size: 10px; font-weight: 600;
      padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
    .academy-tag {
      display: inline-block; font-size: 10px; font-weight: 700;
      padding: 1px 5px; border-radius: 3px; border: 1px solid;
      letter-spacing: 0.3px; vertical-align: middle; white-space: nowrap;
    }
    .vod-btn {
      display: inline-flex; align-items: center; gap: 8px;
      background: #cc0000; color: var(--text-on-dark); border: none;
      font-family: var(--font-display); font-size: 13px; font-weight: 600;
      padding: 8px 18px; border-radius: var(--radius); text-decoration: none;
      transition: opacity 0.15s;
    }
    .vod-btn:hover { opacity: 0.85; }
    .result-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; }
    .stat-mini { display: flex; flex-direction: column; gap: 10px; }
    .stat-mini-row { background: var(--navy-light); border: 1px solid var(--blue-border); border-radius: var(--radius); padding: 10px 14px; }
    .stat-mini-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
    .stat-mini-val { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); }
    .stat-mini-sub { font-size: 12px; color: var(--text-secondary); }
    @media (max-width: 700px) { .result-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════════
   TEAMS (pages/teams.html)
   ══════════════════════════════════════════════════════════════════════════ */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; }
    .team-tile {
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg); padding: 1.25rem;
      text-decoration: none; display: block; transition: all 0.15s;
      border-top: 3px solid var(--team-color, var(--blue-accent));
    }
    .team-tile:hover { background: rgba(235,45,42,0.05); border-color: var(--team-color); }
    .team-tile-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .team-tile-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); }
    .team-tile-drivers { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
    .team-tile-stats { display: flex; gap: 16px; border-top: 1px solid rgba(59,141,224,0.1); padding-top: 10px; }
    .ts-val { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); }
    .ts-lbl { font-size: 10px; color: var(--text-muted); }

    .series-heading {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 800;
      color: var(--text-primary);
      margin-top: 10px;
      margin-bottom: 12px;
      padding-bottom: 4px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .heading-f1 { border-bottom: 3px solid #E8002D; }
    .heading-f2 { border-bottom: 3px solid var(--f2-accent); }

/* ══════════════════════════════════════════════════════════════════════════
   RECORDS (pages/records.html)
   ══════════════════════════════════════════════════════════════════════════ */
.records-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 1rem; }
    .record-card { background: var(--navy-mid); border: 1px solid var(--blue-border); border-radius: var(--radius-lg); overflow: hidden; }
    .record-card-header { background: var(--navy-light); padding: 10px 14px; border-bottom: 1px solid var(--blue-border); display: flex; align-items: center; gap: 8px; }
    .record-card-icon { font-size: 16px; }
    .record-card-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-secondary); }
    .record-list { padding: 0; }
    .record-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid rgba(59,141,224,0.07); }
    .record-row:last-child { border-bottom: none; }
    .record-rank { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-muted); width: 20px; flex-shrink: 0; }
    .record-rank.r1 { color: var(--gold); }
    .record-rank.r2 { color: var(--silver); }
    .record-rank.r3 { color: var(--bronze); }
    .record-name { flex: 1; font-size: 14px; color: var(--text-primary); font-weight: 500; }
    .record-val { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--blue-accent); }
    .update-note { font-size: 12px; color: var(--text-muted); text-align: center; padding: 1rem 0; }

/* ══════════════════════════════════════════════════════════════════════════
   ELO RATINGS (pages/elo.html)
   ══════════════════════════════════════════════════════════════════════════ */
/* ── Series toggle (segmented pill control) ── */
    .series-toggle {
      display: inline-flex;
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      padding: 3px;
      gap: 2px;
      flex-shrink: 0;
    }
    .toggle-divider {
      width: 1px;
      background: var(--blue-border);
      margin: 4px 2px;
      flex-shrink: 0;
    }
    .series-toggle-btn {
      font-family: var(--font-display);
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      padding: 7px 18px;
      border-radius: 4px;
      border: none;
      background: none;
      color: var(--text-muted);
      cursor: pointer;
      transition: background 0.18s, color 0.18s, box-shadow 0.18s;
      min-height: 34px;
      white-space: nowrap;
    }
    .series-toggle-btn.active-f1  { background: var(--blue-accent); color: #fff; }
    .series-toggle-btn.active-f2  { background: var(--f2-accent); color: #1a1f26; }
    .series-toggle-btn.active-f1g { background: rgba(59,141,224,0.18); color: var(--blue-accent); box-shadow: inset 0 0 0 1.5px var(--blue-accent); }
    .series-toggle-btn.active-f2g { background: rgba(245,166,35,0.18); color: var(--f2-accent);   box-shadow: inset 0 0 0 1.5px var(--f2-accent); }

    /* ── Search bar ── */
    .elo-search {
      flex: 1;
      max-width: 260px;
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      color: var(--text-primary);
      font-family: var(--font-body);
      font-size: 13px;
      padding: 8px 12px;
      outline: none;
      transition: border-color 0.15s;
      min-height: 36px;
    }
    .elo-search:focus { border-color: var(--navy-border); }
    .elo-search::placeholder { color: var(--text-muted); }

    /* ── Info toggle button ── */
    .info-toggle {
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      color: var(--text-muted);
      padding: 8px 12px;
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      min-height: 36px;
    }
    .info-toggle:hover { color: var(--text-secondary); border-color: var(--navy-border); }
    .info-toggle.open  { color: var(--text-primary); border-color: var(--navy-border); background: var(--navy-light); }
    .info-caret { font-size: 10px; transition: transform 0.2s cubic-bezier(0.4,0,0.2,1); display: inline-block; }
    .info-toggle.open .info-caret { transform: rotate(180deg); }

    /* ── Controls row ── */
    .elo-controls {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 1rem;
    }

    /* ── Collapsible info panel ── */
    .elo-info-panel {
      overflow: hidden;
      max-height: 0;
      transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .elo-info-panel.open { max-height: 800px; }
    .elo-info-inner {
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg);
      padding: 1.25rem 1.5rem 1.35rem;
      margin-bottom: 1.1rem;
    }
    .info-section-label {
      font-family: var(--font-display);
      font-size: 0.67rem;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 0.6rem;
    }
    .info-body {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.7;
      max-width: 68ch;
      margin-bottom: 1.1rem;
    }
    .info-body strong { color: var(--text-primary); font-weight: 600; }
    .info-body em { color: var(--text-secondary); font-style: normal; font-family: var(--font-mono); font-size: 12px; }

    /* Retired badge */
    .retired-pill {
      font-family: var(--font-display);
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: var(--radius);
      background: rgba(100,105,120,0.15);
      color: var(--text-muted);
      border: 1px solid rgba(100,105,120,0.28);
      white-space: nowrap;
    }
    /* In F1 badge (shown on F2 table for drivers who moved up) */
    .in-f1-pill {
      font-family: var(--font-display);
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: var(--radius);
      background: rgba(232,0,45,0.14);
      color: #e8002d;
      border: 1px solid rgba(232,0,45,0.3);
      white-space: nowrap;
    }

    /* Weights grid */
    .weights-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
      gap: 7px;
    }
    .weight-chip {
      background: var(--navy-light);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      padding: 9px 12px;
    }
    .weight-chip-label {
      font-family: var(--font-display);
      font-size: 0.63rem;
      font-weight: 800;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 4px;
    }
    .weight-chip-value {
      font-family: var(--font-display);
      font-size: 0.9rem;
      font-weight: 800;
      color: var(--text-primary);
    }
    .weight-chip-desc {
      font-size: 0.68rem;
      color: var(--text-muted);
      margin-top: 3px;
      line-height: 1.4;
    }

    /* ── ELO Table ── */
    .elo-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .elo-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
    }
    .elo-table th {
      font-family: var(--font-display);
      font-size: 0.65rem;
      font-weight: 800;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      color: var(--text-muted);
      text-align: left;
      padding: 8px 12px;
      border-bottom: 1px solid var(--blue-border);
      white-space: nowrap;
    }
    .elo-table th.sortable { cursor: pointer; user-select: none; transition: color 0.12s; }
    .elo-table th.sortable:hover { color: var(--text-secondary); }
    .elo-table th.sort-active    { color: var(--blue-accent); }
    .elo-table th.sort-active-f2 { color: var(--f2-accent); }

    .sort-arrow { margin-left: 3px; font-size: 9px; opacity: 0.45; }
    .sort-arrow.live { opacity: 1; }

    .elo-table td {
      padding: 9px 12px;
      border-bottom: 1px solid rgba(97,104,116,0.17);
      color: var(--text-secondary);
      vertical-align: middle;
      white-space: nowrap;
    }
    .elo-table tbody tr { transition: background 0.1s; }
    .elo-table tbody tr:hover td { background: rgba(255,255,255,0.025); }

    /* Rank badge */
    .elo-rank {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 26px; height: 26px;
      border-radius: 4px;
      font-family: var(--font-display);
      font-size: 0.82rem;
      font-weight: 800;
      background: var(--navy-light);
      color: var(--text-secondary);
    }
    .elo-rank.r1 { background: rgba(249,219,85,0.22);  color: var(--gold); }
    .elo-rank.r2 { background: rgba(200,208,220,0.18); color: var(--silver); }
    .elo-rank.r3 { background: rgba(212,132,92,0.20);  color: var(--bronze); }

    /* Value cells */
    .elo-val     { font-family: var(--font-display); font-size: 0.95rem; font-weight: 800; color: var(--text-primary); }
    .elo-val.f1  { color: var(--blue-accent); }
    .elo-val.f2  { color: var(--f2-accent); }
    .elo-val.peak { color: var(--gold); font-size: 0.88rem; font-weight: 700; }
    .mono        { font-family: var(--font-mono); font-size: 0.78rem; }
    .col-green   { color: #4dcc84; }
    .col-red     { color: #ff6b6b; }
    .col-muted   { color: var(--text-muted); }

    /* Empty / loading states */
    .elo-empty {
      padding: 2.5rem;
      text-align: center;
      color: var(--text-muted);
      font-size: 13px;
    }

    .update-note { font-size: 11px; color: var(--text-muted); text-align: center; padding: 1rem 0 0; letter-spacing: 0.03em; }

    /* ── Graph View ── */
    #graph-view { display: none; }

    .graph-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 1rem;
      flex-wrap: wrap;
    }
    .graph-header-label {
      font-family: var(--font-display);
      font-size: 0.67rem;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .season-btn {
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      color: var(--text-muted);
      padding: 6px 14px;
      cursor: pointer;
      transition: all 0.15s;
    }
    .season-btn:hover { color: var(--text-secondary); }
    .season-btn.active-f1g { background: rgba(59,141,224,0.18); color: var(--blue-accent); box-shadow: inset 0 0 0 1.5px var(--blue-accent); }
    .season-btn.active-f2g { background: rgba(245,166,35,0.18);  color: var(--f2-accent);   box-shadow: inset 0 0 0 1.5px var(--f2-accent); }

    .graph-layout {
      display: grid;
      grid-template-columns: 210px 1fr;
      gap: 14px;
      align-items: start;
    }
    @media (max-width: 700px) {
      .graph-layout { grid-template-columns: 1fr; }
    }

    .graph-drivers-panel {
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg);
      padding: 10px 12px;
      max-height: 430px;
      overflow-y: auto;
    }

    .graph-drivers-header {
      padding-bottom: 8px;
      margin-bottom: 6px;
      border-bottom: 1px solid var(--blue-border);
    }
    .check-all-label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-family: var(--font-display);
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--text-secondary);
    }
    .check-all-label input { cursor: pointer; accent-color: var(--blue-accent); }

    .graph-driver-item {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 4px 0;
      cursor: pointer;
      border-bottom: 1px solid rgba(97,104,116,0.1);
      transition: opacity 0.12s;
    }
    .graph-driver-item:last-child { border-bottom: none; }
    .graph-driver-item.dim { opacity: 0.38; }
    .graph-driver-item input { cursor: pointer; flex-shrink: 0; accent-color: var(--blue-accent); }

    .driver-color-dot {
      width: 9px; height: 9px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .graph-driver-name {
      flex: 1;
      font-size: 11.5px;
      color: var(--text-secondary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .graph-driver-elo {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--text-muted);
      flex-shrink: 0;
    }

    .graph-chart-wrap {
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg);
      padding: 16px 12px 10px;
      height: 430px;
      position: relative;
    }

    @media (max-width: 600px) {
      .elo-search { max-width: 100%; flex-basis: 100%; order: 3; }
      .elo-controls { gap: 8px; }
      .graph-chart-wrap { height: 300px; }
    }

/* ══════════════════════════════════════════════════════════════════════════
   RADIO CARD (pages/radio.html)
   ══════════════════════════════════════════════════════════════════════════ */
@font-face {
            font-family: 'Octosquares';
            src: url('../assets/fonts/Octosquares-Trial-Black.ttf') format('truetype');
            font-weight: 900;
            font-style: normal;
        }
        @font-face {
            font-family: 'Formula1 Bold';
            src: url('../assets/fonts/Formula1-Bold_web_0.ttf') format('truetype');
            font-weight: 700;
            font-style: normal;
        }
        @font-face {
            font-family: 'Formula1 Regular';
            src: url('../assets/fonts/Formula1-Regular_web_0.ttf') format('truetype');
            font-weight: 400;
            font-style: normal;
        }

        .tool-wrap { padding-top: 1rem; }
        .app { display: flex; gap: 24px; flex-wrap: wrap; }
        .controls { flex: 1; min-width: 280px; }
        .preview-area { flex: 1; min-width: 280px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
        .section { background: var(--navy-mid); border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin-bottom: 12px; }
        .controls .section-title { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; font-family: var(--font-display); }
        .field { margin-bottom: 10px; }
        .field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
        .field input, .field textarea, .field select { width: 100%; font-size: 13px; border: 1px solid var(--blue-border); border-radius: var(--radius); padding: 6px 10px; background: var(--navy-light); color: var(--text-primary); font-family: var(--font-body); }
        .field textarea { resize: vertical; min-height: 70px; }
        .series-tabs { display: flex; gap: 0; margin-bottom: 10px; border: 1px solid var(--blue-border); border-radius: var(--radius); overflow: hidden; }
        .series-tab { flex: 1; font-size: 12px; padding: 7px; border: none; cursor: pointer; background: var(--navy-light); color: var(--text-secondary); font-family: var(--font-display); text-transform: uppercase; font-weight: 700; transition: all 0.15s; }
        .series-tab.active { background: var(--navy-deep); color: var(--text-primary); }
        .team-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
        .preset-btn { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; border: 1px solid transparent; cursor: pointer; transition: transform 0.1s, opacity 0.1s; font-family: var(--font-display); text-transform: uppercase; }
        .preset-btn:hover { opacity: 0.85; transform: scale(1.04); }
        .preset-btn.active-preset { outline: 2px solid #fff; outline-offset: 1px; }
        .controls .driver-grid { display: flex; flex-wrap: wrap; gap: 5px; }
        .driver-btn { font-size: 11px; padding: 3px 9px; border-radius: 20px; border: 1px solid transparent; cursor: pointer; transition: transform 0.1s, opacity 0.1s; font-family: var(--font-display); font-weight: 700; }
        .driver-btn:hover { opacity: 0.85; transform: scale(1.03); }
        .driver-btn.active-driver { outline: 2px solid #fff; outline-offset: 1px; }
        .msg-type-toggle { display: flex; gap: 6px; margin-bottom: 10px; }
        .toggle-btn { flex: 1; font-size: 12px; padding: 6px; border-radius: var(--radius); border: 1px solid var(--blue-border); cursor: pointer; background: var(--navy-light); color: var(--text-secondary); font-family: var(--font-display); text-transform: uppercase; font-weight: 700; transition: all 0.15s; }
        .toggle-btn.active { background: var(--navy-deep); color: var(--text-primary); border-color: var(--blue-accent); }
        .download-btn { width: 100%; padding: 10px; border-radius: var(--radius); border: 1px solid var(--blue-border); background: var(--navy-light); color: var(--text-primary); font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font-display); display: flex; align-items: center; justify-content: center; gap: 8px; text-transform: uppercase; transition: background 0.15s; }
        .download-btn:hover { background: var(--navy-deep); }
        .add-reply-btn { width: 100%; padding: 8px; border-radius: var(--radius); border: 1px dashed var(--blue-border); background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font-display); text-transform: uppercase; transition: all 0.15s; margin-bottom: 12px; }
        .add-reply-btn:hover { border-color: var(--blue-accent); color: var(--text-primary); }
        .reply-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
        .reply-section-header .controls .section-title { margin-bottom: 0; }
        .remove-reply-btn { font-size: 11px; padding: 3px 8px; border-radius: var(--radius); border: 1px solid var(--blue-border); background: transparent; color: var(--text-secondary); cursor: pointer; font-family: var(--font-display); text-transform: uppercase; font-weight: 700; transition: all 0.15s; }
        .remove-reply-btn:hover { border-color: #e8002d; color: #e8002d; }
        .no-drivers { font-size: 12px; color: var(--text-secondary); font-style: italic; }
        #repliesContainer { display: flex; flex-direction: column; gap: 0; }
        #previewCanvas { border-radius: 12px; flex-shrink: 0; display: block; }

        @media (max-width: 720px) {
            #previewCanvas { width: 300px !important; height: 300px !important; }
        }

/* ══════════════════════════════════════════════════════════════════════════
   DRIVER MARKET (pages/market.html)
   ══════════════════════════════════════════════════════════════════════════ */
/* ── TWO-COLUMN LAYOUT ── */
    .market-grid {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: 1.5rem;
      align-items: start;
    }
    @media (max-width: 900px) {
      .market-grid { grid-template-columns: 1fr; }
      .market-sidebar { position: static !important; }
    }

    /* ── FILTER BUTTONS ── */
    .filter-row { display: flex; gap: 6px; margin-bottom: 1rem; }
    .filter-btn {
      font-family: var(--font-display);
      font-size: 0.78rem;
      font-weight: 700;
      padding: 8px 16px;
      min-height: 36px;
      border-radius: var(--radius);
      border: 1px solid var(--blue-border);
      background: none;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .filter-btn:hover { color: var(--text-secondary); background: var(--blue-dim); }
    .filter-btn.active-f1 { background: var(--blue-accent); color: #fff; border-color: var(--blue-accent); }
    .filter-btn.active-f2 { background: var(--f2-accent); color: #1a1f26; border-color: var(--f2-accent); }

    /* ── TIER PILLS ── */
    .tier-pill {
      display: inline-block;
      font-family: var(--font-display);
      font-size: 0.63rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      padding: 2px 8px;
      border-radius: 10px;
      white-space: nowrap;
      text-transform: uppercase;
    }
    .tier-7 { background: rgba(249,219,85,0.22); color: #f9db55; border: 1px solid rgba(249,219,85,0.45); }
    .tier-6 { background: rgba(255,148,40,0.18); color: #ff9428; border: 1px solid rgba(255,148,40,0.40); }
    .tier-5 { background: rgba(48,200,130,0.15); color: #3bc88c; border: 1px solid rgba(48,200,130,0.35); }
    .tier-4 { background: rgba(59,141,224,0.16); color: #63b1ff; border: 1px solid rgba(59,141,224,0.38); }
    .tier-3 { background: rgba(168,100,220,0.16); color: #c080f4; border: 1px solid rgba(168,100,220,0.35); }
    .tier-2 { background: rgba(118,140,180,0.14); color: #8aaacb; border: 1px solid rgba(118,140,180,0.30); }
    .tier-1 { background: rgba(100,110,130,0.12); color: #7a8999; border: 1px solid rgba(100,110,130,0.28); }

    /* ── HIDE COLUMNS BY MODE ── */
    .hide-f2col .f2team-col   { display: none; }
    .hide-rating .rating-col  { display: none; }

    /* ── FINANCES STATUS ── */
    .fin-pill {
      display: inline-block;
      font-family: var(--font-display);
      font-size: 0.63rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      padding: 2px 8px;
      border-radius: 10px;
      white-space: nowrap;
      text-transform: uppercase;
    }
    .fin-warchest { background: rgba(48,200,90,0.18);  color: #40e878; border: 1px solid rgba(48,200,90,0.4); }
    .fin-strong   { background: rgba(90,200,80,0.15);  color: #80cc60; border: 1px solid rgba(90,200,80,0.35); }
    .fin-stable   { background: rgba(120,160,200,0.14); color: #8aaacb; border: 1px solid rgba(120,160,200,0.3); }
    .fin-tight    { background: rgba(240,130,70,0.16); color: #ff9060; border: 1px solid rgba(240,130,70,0.35); }
    .fin-debt     { background: rgba(220,50,50,0.18);  color: #f06060; border: 1px solid rgba(220,50,50,0.4); }

    /* ── SHOW RETIRED TOGGLE ── */
    .retired-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-display);
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      cursor: pointer;
      padding: 0 6px;
      user-select: none;
    }
    .retired-toggle input[type=checkbox] {
      width: 15px; height: 15px;
      accent-color: var(--blue-accent);
      cursor: pointer;
    }

    /* ── TEAM HUB SIDEBAR ── */
    .market-sidebar { position: sticky; top: 80px; }
    .hub-section-label {
      font-family: var(--font-display);
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 2px;
    }
    .hub-section-sub {
      font-size: 0.73rem;
      color: var(--text-muted);
      margin-bottom: 0.9rem;
    }
    .hub-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }
    .hub-card {
      background: var(--navy-light);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius);
      padding: 12px 8px 10px;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 7px;
      transition: all 0.15s;
    }
    .hub-card:hover {
      border-color: rgba(97,104,116,0.7);
      background: rgba(255,255,255,0.04);
      transform: translateY(-1px);
    }
    .hub-card img {
      width: 100%;
      max-width: 68px;
      height: 42px;
      object-fit: contain;
    }
    .hub-card-name {
      font-family: var(--font-display);
      font-size: 0.58rem;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      text-align: center;
      line-height: 1.3;
    }

    /* ── LOADING / ERROR ── */
    .load-state {
      text-align: center;
      padding: 2.5rem 1rem;
      color: var(--text-muted);
      font-family: var(--font-display);
      font-size: 0.82rem;
      letter-spacing: 0.04em;
    }
    .spinner {
      display: inline-block;
      width: 22px; height: 22px;
      border: 2px solid var(--blue-border);
      border-top-color: var(--blue-accent);
      border-radius: 50%;
      animation: spin 0.75s linear infinite;
      margin-bottom: 10px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── TABLE OVERRIDES ── */
    #driver-table td:nth-child(4),
    #driver-table td:nth-child(5),
    #driver-table th:nth-child(4),
    #driver-table th:nth-child(5) { text-align: left; }
    #driver-table td:nth-child(1) { text-align: center; }

    .staff-table td:nth-child(2),
    .staff-table th:nth-child(2) { text-align: left; }
    .staff-table td:nth-child(3),
    .staff-table th:nth-child(3) { text-align: right; }

    .team-cell {
      font-size: 0.82rem;
      color: var(--text-secondary);
    }
    .rating-cell {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 0.92rem;
      color: var(--text-primary);
    }

/* ══════════════════════════════════════════════════════════════════════════
   TEAM HUBS (pages/hub-*.html)
   ══════════════════════════════════════════════════════════════════════════ */
/* ── LOCK SCREEN ── */
    #lock-screen {
      position: fixed; inset: 0; z-index: 999;
      background: var(--navy-deepest);
      display: flex; align-items: center; justify-content: center;
    }
    .lock-box {
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-top: 3px solid var(--hub-color, var(--blue-accent));
      border-radius: var(--radius-lg);
      padding: 2.5rem 2rem;
      width: 340px; text-align: center;
    }
    .lock-logo { width: 80px; height: 50px; object-fit: contain; margin-bottom: 1rem; opacity: 0.9; }
    .lock-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; }
    .lock-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 1.5rem; }
    .lock-input {
      width: 100%; background: var(--navy-light);
      border: 1px solid var(--blue-border); border-radius: var(--radius);
      padding: 10px 14px; color: var(--text-primary);
      font-family: var(--font-body); font-size: 15px;
      margin-bottom: 10px; text-align: center; letter-spacing: 3px;
    }
    .lock-input:focus { border-color: var(--hub-color, var(--blue-accent)); outline: none; }
    .lock-btn {
      width: 100%; background: var(--hub-color, var(--blue-accent)); border: none;
      color: #fff; font-family: var(--font-display); font-size: 14px;
      font-weight: 700; padding: 12px; border-radius: var(--radius);
      cursor: pointer; letter-spacing: 0.5px; transition: opacity 0.15s;
    }
    .lock-btn:hover { opacity: 0.85; }
    .lock-error { color: #f06060; font-size: 13px; margin-top: 8px; min-height: 20px; }
    .lock-back {
      display: inline-block; margin-top: 1.25rem;
      font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
      letter-spacing: 0.06em; text-transform: uppercase;
      color: var(--text-muted); text-decoration: none; transition: color 0.15s;
    }
    .lock-back:hover { color: var(--text-primary); }

    /* ── HUB HERO (team-coloured tint) ── */
    .hub-hero {
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--hub-color, var(--blue-accent)) 18%, transparent) 0%, transparent 60%),
        linear-gradient(180deg, #3f444b 0%, #383c43 100%);
      border-bottom: 2px solid var(--hub-color, var(--blue-accent));
      padding: 1.75rem 1.5rem 1.4rem;
      position: relative; overflow: hidden;
    }
    .hub-hero::before {
      content: "";
      position: absolute; inset: 0;
      background: repeating-linear-gradient(135deg, rgba(255,255,255,0.018) 0 8px, rgba(255,255,255,0) 8px 16px);
      pointer-events: none;
    }
    .hub-hero-inner { display: flex; align-items: center; gap: 1.25rem; position: relative; z-index: 2; }
    .hub-hero-logo { width: 80px; height: 52px; object-fit: contain; flex-shrink: 0; }
    .hub-hero-eyebrow {
      font-family: var(--font-display); font-size: 0.7rem; font-weight: 800;
      letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--hub-color, var(--blue-accent)); margin-bottom: 3px; opacity: 0.9;
    }
    .hub-hero-title {
      font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2.2rem);
      font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em;
      color: #fff; line-height: 1; margin-bottom: 4px;
    }
    .hub-hero-sub { font-size: 0.82rem; color: var(--text-secondary); }

    /* ── HUB LAYOUT ── */
    #hub-content .hub-grid {
      display: grid;
      grid-template-columns: 1fr 300px;
      gap: 1.5rem;
      align-items: start;
    }
    @media (max-width: 900px) {
      #hub-content .hub-grid { grid-template-columns: 1fr; }
      .hub-sidebar { position: static !important; }
    }
    .hub-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1rem; }

    /* ── WCC POSITION BADGE ── */
    .wcc-block { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
    .wcc-pos-badge {
      display: flex; flex-direction: column; align-items: center;
      justify-content: center;
      width: 72px; height: 72px; border-radius: var(--radius-lg);
      background: rgba(255,255,255,0.05);
      border: 2px solid var(--hub-color, var(--blue-accent));
      font-family: var(--font-display);
    }
    .wcc-pos-badge .pos-num {
      font-size: 1.8rem; font-weight: 800; line-height: 1;
      color: var(--hub-color, var(--blue-accent));
    }
    .wcc-pos-badge .pos-lbl {
      font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--text-muted); margin-top: 2px;
    }
    .wcc-stats { display: flex; gap: 1.25rem; flex-wrap: wrap; }
    .wcc-stat { }
    .wcc-stat .s-val {
      font-family: var(--font-display); font-size: 1.4rem; font-weight: 800;
      color: var(--text-primary); line-height: 1;
    }
    .wcc-stat .s-lbl {
      font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase;
      letter-spacing: 0.05em; margin-top: 3px;
    }
    .driver-standings-strip { margin-top: 1rem; display: flex; flex-direction: column; gap: 4px; }
    .driver-strip-row {
      display: flex; align-items: center; gap: 10px;
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 8px 12px; font-size: 0.84rem;
    }
    .driver-strip-pos {
      font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
      color: var(--text-muted); width: 20px; text-align: center;
    }
    .driver-strip-name { flex: 1; color: var(--text-primary); font-weight: 600; }
    .driver-strip-pts {
      font-family: var(--font-display); font-weight: 800;
      color: var(--hub-color, var(--blue-accent)); font-size: 0.9rem;
    }

    /* ── ROSTER ── */
    .roster-section { margin-bottom: 1.25rem; }
    .roster-section:last-child { margin-bottom: 0; }
    .roster-section-label {
      font-family: var(--font-display); font-size: 0.68rem; font-weight: 800;
      letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--text-muted); margin-bottom: 8px;
      padding-bottom: 6px; border-bottom: 1px solid var(--blue-border);
    }
    .roster-row {
      display: flex; align-items: center; gap: 8px;
      padding: 7px 0; border-bottom: 1px solid rgba(97,104,116,0.15);
      font-size: 0.84rem;
    }
    .roster-row:last-child { border-bottom: none; }
    .roster-role {
      font-family: var(--font-display); font-size: 0.58rem; font-weight: 700;
      letter-spacing: 0.05em; text-transform: uppercase;
      color: var(--text-muted); width: 78px; flex-shrink: 0;
    }
    .roster-flag  { width: 22px; flex-shrink: 0; text-align: center; font-size: 15px; }
    .roster-name  { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .roster-stat  {
      font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
      color: var(--text-primary); width: 40px; text-align: right; flex-shrink: 0;
    }
    .roster-mv    {
      font-size: 0.72rem; color: var(--text-muted);
      width: 58px; text-align: right; flex-shrink: 0; white-space: nowrap;
    }
    .roster-muted { color: var(--text-muted); font-style: italic; font-weight: 400; }

    /* ── ACADEMY ── */
    .academy-meta {
      display: flex; gap: 1rem; margin-top: 0.75rem;
      padding-top: 0.75rem; border-top: 1px solid var(--blue-border);
    }
    .academy-meta-item .am-val {
      font-family: var(--font-display); font-size: 1rem; font-weight: 800;
      color: var(--text-primary);
    }
    .academy-meta-item .am-lbl {
      font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    /* ── FINANCES CARD ── */
    .fin-header {
      display: flex; align-items: center; gap: 8px; margin-bottom: 1rem;
    }
    .fin-confidential {
      font-family: var(--font-display); font-size: 0.6rem; font-weight: 800;
      letter-spacing: 0.06em; text-transform: uppercase;
      background: rgba(240,100,60,0.12); color: #f09060;
      border: 1px solid rgba(240,100,60,0.3);
      padding: 2px 7px; border-radius: 4px;
    }
    .fin-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 8px 0; border-bottom: 1px solid rgba(97,104,116,0.15);
      font-size: 0.84rem;
    }
    .fin-row:last-child { border-bottom: none; }
    .fin-row-label { color: var(--text-muted); }
    .fin-row-value { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); }
    .fin-row-value.positive { color: #40c878; }
    .fin-row-value.negative { color: #f06060; }
    .fin-row-value.warning  { color: #ff9060; }

    /* ── TIER PILLS (reuse from market) ── */
    .tier-pill {
      display: inline-block; font-family: var(--font-display); font-size: 0.6rem;
      font-weight: 800; letter-spacing: 0.04em; padding: 2px 7px;
      border-radius: 10px; white-space: nowrap; text-transform: uppercase;
    }
    .tier-7 { background: rgba(249,219,85,0.22); color: #f9db55; border: 1px solid rgba(249,219,85,0.45); }
    .tier-6 { background: rgba(255,148,40,0.18); color: #ff9428; border: 1px solid rgba(255,148,40,0.40); }
    .tier-5 { background: rgba(48,200,130,0.15); color: #3bc88c; border: 1px solid rgba(48,200,130,0.35); }
    .tier-4 { background: rgba(59,141,224,0.16); color: #63b1ff; border: 1px solid rgba(59,141,224,0.38); }
    .tier-3 { background: rgba(168,100,220,0.16); color: #c080f4; border: 1px solid rgba(168,100,220,0.35); }
    .tier-2 { background: rgba(118,140,180,0.14); color: #8aaacb; border: 1px solid rgba(118,140,180,0.30); }
    .tier-1 { background: rgba(100,110,130,0.12); color: #7a8999; border: 1px solid rgba(100,110,130,0.28); }
    .fin-pill {
      display: inline-block; font-family: var(--font-display); font-size: 0.63rem;
      font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px;
      border-radius: 10px; white-space: nowrap; text-transform: uppercase;
    }
    .fin-warchest { background: rgba(48,200,90,0.18);   color: #40e878; border: 1px solid rgba(48,200,90,0.4); }
    .fin-strong   { background: rgba(90,200,80,0.15);   color: #80cc60; border: 1px solid rgba(90,200,80,0.35); }
    .fin-stable   { background: rgba(120,160,200,0.14); color: #8aaacb; border: 1px solid rgba(120,160,200,0.3); }
    .fin-tight    { background: rgba(240,130,70,0.16);  color: #ff9060; border: 1px solid rgba(240,130,70,0.35); }
    .fin-debt     { background: rgba(220,50,50,0.18);   color: #f06060; border: 1px solid rgba(220,50,50,0.4); }

    /* ── SECRET MEETINGS ── */
    .meeting-row {
      display: flex; align-items: center; justify-content: space-between;
      gap: 10px; padding: 8px 0;
      border-bottom: 1px solid rgba(97,104,116,0.15);
    }
    .meeting-row:last-child { border-bottom: none; }
    .meeting-player {
      display: flex; align-items: center; gap: 7px;
      font-size: 0.84rem; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0;
    }
    .meeting-player-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .meeting-bars { display: flex; gap: 4px; flex-shrink: 0; }
    .stage-bar {
      width: 32px; height: 22px; border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-display); font-size: 0.6rem; font-weight: 800;
      letter-spacing: 0.02em; text-transform: uppercase;
    }
    .bar-unconfirmed { background: rgba(142,154,170,0.12); color: var(--text-muted); border: 1px solid rgba(142,154,170,0.22); }
    .bar-accepted    { background: rgba(48,168,90,0.18);   color: #40c878; border: 1px solid rgba(48,168,90,0.38); }
    .bar-rejected    { background: rgba(220,50,50,0.16);   color: #f06060; border: 1px solid rgba(220,50,50,0.32); }
    .nego-empty {
      text-align: center; padding: 1rem 0;
      font-size: 0.78rem; color: var(--text-muted); font-style: italic;
    }

    /* ── LOADING ── */
    .hub-loading {
      text-align: center; padding: 3rem 1rem;
      color: var(--text-muted); font-family: var(--font-display); font-size: 0.82rem;
    }
    .spinner {
      display: inline-block; width: 22px; height: 22px;
      border: 2px solid var(--blue-border); border-top-color: var(--hub-color, var(--blue-accent));
      border-radius: 50%; animation: spin 0.75s linear infinite; margin-bottom: 10px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN (pages/admin.html)
   ══════════════════════════════════════════════════════════════════════════ */
/* ── LOCK SCREEN ── */
    #lock-screen {
      position: fixed; inset: 0; z-index: 999;
      background: var(--navy-deepest);
      display: flex; align-items: center; justify-content: center;
    }
    .lock-box {
      background: var(--navy-mid);
      border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg);
      padding: 2.5rem 2rem;
      width: 340px; text-align: center;
    }
    .lock-icon { font-size: 36px; margin-bottom: 1rem; }
    .lock-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
    .lock-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 1.5rem; }
    .lock-input {
      width: 100%; background: var(--navy-light);
      border: 1px solid var(--blue-border); border-radius: var(--radius);
      padding: 10px 14px; color: var(--text-primary);
      font-family: var(--font-body); font-size: 15px;
      margin-bottom: 10px; text-align: center; letter-spacing: 3px;
    }
    .lock-input:focus { border-color: var(--blue-accent); outline: none; }
    .lock-input:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }
    .lock-error { color: #f06060; font-size: 13px; margin-top: 8px; min-height: 20px; }

    /* ── ADMIN LAYOUT ── */
    .admin-grid { display: grid; grid-template-columns: 1fr 400px; gap: 1.5rem; }
    @media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

    /* ── FORM STYLES ── */
    .form-section { margin-bottom: 1.5rem; }
    .form-section-title {
      font-family: var(--font-display); font-size: 13px; font-weight: 600;
      letter-spacing: 1px; text-transform: uppercase;
      color: var(--text-secondary); margin-bottom: 0.75rem;
      padding-bottom: 6px; border-bottom: 1px solid var(--blue-border);
    }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
    .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
    .form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
    .form-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .form-input, .form-select, .form-textarea {
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 8px 12px;
      color: var(--text-primary); font-family: var(--font-body); font-size: 14px;
      transition: border-color 0.15s; width: 100%;
    }
    .form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--blue-accent); outline: none; }
    .form-input:focus-visible, .form-select:focus-visible, .form-textarea:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }
    .form-select option { background: var(--navy-mid); }
    .form-textarea { resize: vertical; min-height: 80px; }

    /* ── RESULT ROWS ── */
    .result-entry-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
    .result-entry-row {
      display: grid; grid-template-columns: 36px 1fr 1fr 60px 40px 36px;
      gap: 6px; align-items: center;
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 6px 10px;
    }
    .pos-label {
      font-family: var(--font-display); font-size: 14px; font-weight: 700;
      color: var(--text-muted); text-align: center;
    }
    .pos-label.p1 { color: var(--gold); }
    .pos-label.p2 { color: var(--silver); }
    .pos-label.p3 { color: var(--bronze); }
    .fl-check { display: flex; align-items: center; justify-content: center; }
    .fl-check input[type=checkbox] { width: 16px; height: 16px; accent-color: #a040c8; cursor: pointer; }
    .del-btn {
      background: none; border: none; color: var(--text-muted);
      cursor: pointer; font-size: 16px; padding: 0; transition: color 0.15s;
      display: flex; align-items: center; justify-content: center;
    }
    .del-btn:hover { color: #f06060; }
    .add-row-btn {
      background: var(--blue-dim); border: 1px dashed var(--blue-border);
      border-radius: var(--radius); color: var(--blue-bright);
      font-family: var(--font-display); font-size: 13px; font-weight: 500;
      padding: 8px; width: 100%; cursor: pointer; transition: all 0.15s;
    }
    .add-row-btn:hover { background: rgba(59,141,224,0.2); border-color: var(--blue-accent); }

    /* ── OUTPUT PANEL ── */
    .output-panel { position: sticky; top: 72px; }
    .output-box {
      background: var(--navy-deepest); border: 1px solid var(--blue-border);
      border-radius: var(--radius-lg); padding: 1rem;
      font-family: var(--font-mono); font-size: 12px;
      color: var(--text-secondary); line-height: 1.6;
      max-height: 500px; overflow-y: auto;
      white-space: pre; word-break: break-all;
    }
    .copy-btn {
      width: 100%; margin-top: 8px;
      background: var(--blue-accent); border: none; color: #fff;
      font-family: var(--font-display); font-size: 13px; font-weight: 600;
      padding: 10px; border-radius: var(--radius); cursor: pointer;
      transition: background 0.15s; letter-spacing: 0.5px;
    }
    .copy-btn:hover { background: var(--blue-bright); }
    .copy-btn.copied { background: #30a860; }

    /* ── TABS ── */
    .admin-tabs { display: flex; gap: 4px; margin-bottom: 1.5rem; }
    .admin-tab {
      font-family: var(--font-display); font-size: 13px; font-weight: 600;
      padding: 8px 16px; border-radius: var(--radius);
      border: 1px solid var(--blue-border);
      background: none; color: var(--text-muted); cursor: pointer; transition: all 0.15s;
    }
    .admin-tab:hover { color: var(--text-secondary); background: var(--blue-dim); }
    .admin-tab.active { background: var(--blue-accent); color: #fff; border-color: var(--blue-accent); }
    .admin-panel { display: none; }
    .admin-panel.active { display: block; }

    /* ── INSTRUCTIONS ── */
    .instruction-steps { counter-reset: step; }
    .step {
      display: flex; gap: 12px; align-items: flex-start;
      padding: 10px 0; border-bottom: 1px solid rgba(59,141,224,0.08);
      font-size: 13px; color: var(--text-secondary); line-height: 1.5;
    }
    .step:last-child { border-bottom: none; }
    .step-num {
      counter-increment: step;
      content: counter(step);
      width: 24px; height: 24px; border-radius: 50%;
      background: var(--blue-accent); color: #fff;
      font-family: var(--font-display); font-size: 13px; font-weight: 700;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; margin-top: 1px;
    }
    .step-text strong { color: var(--text-primary); }
    code { background: var(--navy-deepest); padding: 1px 5px; border-radius: 3px; font-family: var(--font-mono); font-size: 12px; color: var(--blue-bright); }

    /* ── STANDINGS UPDATER ── */
    .standings-row {
      display: grid; grid-template-columns: 36px 1fr 80px 60px 60px 70px;
      gap: 6px; align-items: center;
      background: var(--navy-light); border: 1px solid var(--blue-border);
      border-radius: var(--radius); padding: 6px 10px; margin-bottom: 6px; font-size: 13px;
    }
    .standings-row .driver-label { color: var(--text-primary); font-weight: 500; }
    .warn-badge {
      display: inline-block; background: rgba(200,168,40,0.15);
      border: 1px solid rgba(200,168,40,0.3); color: var(--gold);
      font-size: 11px; padding: 2px 8px; border-radius: 4px;
    }


/* ── CHAMPIONSHIP TROPHY ICONS (WDC & WCC) ── */
.trophy-icon {
  height: 16px;
  width: auto;
  vertical-align: -2px;
  display: inline-block;
  margin-left: 4px;
  object-fit: contain;
}
.trophy-icon.no-margin {
  margin-left: 0;
  margin-right: 4px;
}
.trophy-icon.sm {
  height: 13px;
  vertical-align: -1px;
}
.trophy-icon.lg {
  height: 22px;
  vertical-align: -4px;
}
.trophy-icon.f2-trophy {
  filter: drop-shadow(0 0 2px rgba(0, 144, 208, 0.8));
}


/* ── TEAM PARTNERS & SPONSOR SHOWCASE (CARDEMIR STYLE) ── */
.team-tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--blue-border);
  padding-bottom: 12px;
  overflow-x: auto;
}
.team-tab-btn {
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.team-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--blue-bright);
}
.team-tab-btn.active {
  background: var(--blue-accent);
  color: #fff;
  border-color: var(--blue-accent);
  box-shadow: 0 2px 8px rgba(59, 141, 224, 0.35);
}

.partners-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--blue-border);
}
.partners-hero-banner {
  background: linear-gradient(135deg, rgba(0, 90, 255, 0.15) 0%, rgba(100, 196, 255, 0.05) 100%), var(--navy-light);
  border: 1px solid rgba(100, 196, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.partners-hero-banner::after {
  content: "PARTNERS";
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-family: 'Orbitron', var(--font-display);
  font-size: 80px;
  font-weight: 900;
  opacity: 0.04;
  pointer-events: none;
}
.partners-hero-eyebrow {
  font-size: 11px;
  font-family: var(--font-display);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--team-color, #64C4FF);
  margin-bottom: 6px;
  font-weight: 700;
}
.partners-hero-title {
  font-family: 'Orbitron', var(--font-display);
  font-size: 26px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.partners-hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
}

.partners-subheading {
  font-family: 'Orbitron', var(--font-display);
  font-size: 18px;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.partners-subheading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(100, 196, 255, 0.4), transparent);
}

/* Major featured cards */
.featured-partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.featured-partner-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.35s ease;
}
.featured-partner-card:hover {
  transform: translateY(-6px);
  border-color: #64C4FF;
  box-shadow: 0 0 35px rgba(100, 196, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.featured-partner-card img {
  max-width: 190px;
  max-height: 75px;
  object-fit: contain;
  margin-bottom: 20px;
  transition: transform 0.35s ease;
}
.featured-partner-card:hover img {
  transform: scale(1.06);
}
.featured-partner-card .partner-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Official partners 18-box grid */
.official-partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.partner-box {
  height: 120px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.partner-box:hover {
  transform: translateY(-4px);
  border-color: #64C4FF;
  box-shadow: 0 0 25px rgba(100, 196, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}
.partner-box img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  opacity: 0.9;
  transition: all 0.3s ease;
}
.partner-box:hover img {
  transform: scale(1.08);
  opacity: 1;
}
.partner-box::after {
  content: "VISIT PARTNER ↗";
  position: absolute;
  bottom: 8px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #64C4FF;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: var(--font-display);
  font-weight: 700;
}
.partner-box:hover::after {
  opacity: 0.85;
}

/* Category columns */
.partner-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.partner-category-card {
  border-radius: var(--radius-md);
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.partner-category-card h4 {
  font-family: 'Orbitron', var(--font-display);
  font-size: 14px;
  color: var(--team-color, #64C4FF);
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.partner-category-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.partner-category-card li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.partner-category-card li:last-child {
  border-bottom: none;
}
.partner-category-card li::before {
  content: "•";
  color: var(--team-color, #64C4FF);
}


/* ── F2 SIDE THEME STYLING (Venera & Titillium Web) ── */
body.f2-theme,
.f2-theme,
.f2-scope,
[data-series="f2"] {
  --font-display: var(--font-f2-display);
  --font-wide: var(--font-f2-wide);
  --font-body: var(--font-f2-body);
  font-family: var(--font-f2-body);
}

body.f2-theme h1,
body.f2-theme h2,
body.f2-theme h3,
body.f2-theme h4,
body.f2-theme .hero-title,
body.f2-theme .hero-eyebrow,
body.f2-theme .section-title,
body.f2-theme .standings-title,
body.f2-theme .race-title,
body.f2-theme .race-header-name,
body.f2-theme .pos-badge,
body.f2-theme .stat-card .s-val,
body.f2-theme .hero-stat .val,
body.f2-theme .val,
body.f2-theme .pts-cell,
body.f2-theme .tab-btn,
body.f2-theme th,
.f2-scope h1,
.f2-scope h2,
.f2-scope h3,
.f2-scope h4,
.f2-scope .section-title,
.f2-scope .season-year-badge,
.f2-scope .team-tile-name,
.f2-scope .ts-val,
.f2-scope .sidebar-title,
.f2-scope th,
.f2-title {
  font-family: var(--font-f2-display);
  letter-spacing: 0.5px;
}

body.f2-theme .driver-name-link,
body.f2-theme p,
body.f2-theme td,
body.f2-theme .stat-card .s-label,
body.f2-theme .hero-stat .lbl,
body.f2-theme .lbl,
.f2-scope p,
.f2-scope td,
.f2-scope .season-card-info,
.f2-scope .team-tile-drivers,
.f2-scope .ts-lbl {
  font-family: var(--font-f2-body);
}

.tag-f2,
.series-tag.tag-f2,
.elo-pool-badge.f2,
.badge-f2 {
  font-family: var(--font-f2-display) !important;
  letter-spacing: 0.5px;
  font-weight: 700;
}


/* ── TEAMS SERIES TOGGLE & SPLIT PAGE ── */
.team-series-toggle {
  display: inline-flex;
  background: var(--navy-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.series-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.series-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.series-btn.active#btn-series-f1 {
  background: #eb2d2a;
  color: #fff;
  box-shadow: 0 2px 10px rgba(235, 45, 42, 0.35);
}
.series-btn.active#btn-series-f2 {
  background: #0090D0;
  color: #fff;
  font-family: 'Venera', var(--font-display);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 144, 208, 0.35);
}
