:root {
  --bg: #080a0f;
  --bg-elev: #0e121a;
  --surface: #131823;
  --surface-2: #1a2130;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --ink: #f4f6fb;
  --muted: #9aa5b8;
  --dim: #667085;
  --red: #ff2a1f;
  --red-glow: rgba(255, 42, 31, 0.32);
  --cyan: #00e5ff;
  --cyan-glow: rgba(0, 229, 255, 0.25);
  --amber: #ffb800;
  --green: #16d98e;
  --font-sans: "SF Pro Display", "Avenir Next", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Menlo", "Consolas", ui-monospace, monospace;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 42, 31, 0.09), transparent 60%),
    radial-gradient(900px 500px at 10% 25%, rgba(0, 229, 255, 0.06), transparent 55%),
    var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Scroll Telemetry Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--cyan));
  z-index: 1000;
  transition: width 0.08s linear;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.08rem;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--red), #b80f07);
  display: grid;
  place-items: center;
  position: relative;
  transform: skewX(-14deg);
  box-shadow: 0 0 18px var(--red-glow);
}

.brand-mark span {
  transform: skewX(14deg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.nav-cta {
  background: rgba(255, 42, 31, 0.14);
  color: #ff7a73;
  border: 1px solid rgba(255, 42, 31, 0.35);
}

.nav-links a.nav-cta:hover {
  background: var(--red);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 54px 0 42px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  opacity: 0.42;
  filter: saturate(1.12) contrast(1.06);
  transform: scale(1.03);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from { transform: scale(1.02) translateX(0); }
  to { transform: scale(1.07) translateX(-1.2%); }
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.96) 0%, rgba(8, 10, 15, 0.82) 52%, rgba(8, 10, 15, 0.58) 100%),
    linear-gradient(180deg, rgba(8, 10, 15, 0.3) 0%, var(--bg) 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.dateline-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 42, 31, 0.12);
  border: 1px solid rgba(255, 42, 31, 0.4);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ff8e88;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 850;
}

.hero h1 em {
  font-style: italic;
  color: var(--red);
  text-shadow: 0 0 32px var(--red-glow);
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 1.08rem;
  color: #cdd5e3;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 24px var(--red-glow);
}

.btn-primary:hover {
  background: #ff4036;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.quick-stat span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.quick-stat strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

/* Pit Wall Live Card in Hero */
.pitwall-card {
  background: rgba(15, 19, 28, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.pitwall-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--cyan));
}

.pitwall-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}

.pitwall-head h2 {
  margin: 0;
  font-size: 0.86rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.countdown-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.countdown-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.countdown-timer {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.session-mini-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.session-mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.session-mini-list li span:first-child {
  font-weight: 700;
  color: var(--ink);
}

.session-mini-list li span:last-child {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  text-align: right;
}

.champ-banner {
  background: linear-gradient(90deg, rgba(0, 210, 190, 0.14), rgba(0, 210, 190, 0.03));
  border: 1px solid rgba(0, 210, 190, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.82rem;
  color: #d6fff9;
}

/* Telemetry Ticker */
.ticker-wrap {
  background: #0c0f16;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
}

.ticker-track {
  display: inline-flex;
  gap: 40px;
  animation: tickerScroll 42s linear infinite;
}

.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ticker-item strong {
  color: var(--ink);
}

.ticker-tag {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 42, 31, 0.16);
  color: #ff8e88;
  font-weight: 700;
  font-size: 0.7rem;
}

/* Sections */
.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--border);
}

.section-alt {
  background: rgba(14, 18, 26, 0.55);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 34px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-sub {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 64ch;
  font-size: 0.98rem;
}

.dateline-note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Segmented Tabs & Pills */
.tab-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 12px;
}

.tab-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  background: var(--red);
  color: #fff;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pill-btn:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.35);
}

.pill-btn.active {
  background: rgba(0, 229, 255, 0.14);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Standings & Season Section */
.season-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.88rem;
  min-width: 240px;
  outline: none;
}

.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.battle-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.battle-card {
  background: linear-gradient(145deg, var(--surface), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
}

.battle-card h4 {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.battle-card p {
  margin: 0;
  font-size: 0.88rem;
  color: #d6dce8;
}

.standings-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.standings-table th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.standings-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.pos-cell {
  font-family: var(--font-mono);
  font-weight: 800;
  width: 44px;
}

.team-swatch {
  display: inline-block;
  width: 4px;
  height: 20px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 10px;
}

.driver-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  margin-right: 8px;
}

.champ-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 210, 190, 0.18);
  color: #4ef7e6;
  margin-left: 8px;
  text-transform: uppercase;
}

.pts-bar-cell {
  min-width: 170px;
}

.pts-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pts-track {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}

.pts-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Teams Grid */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.team-accent-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.team-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.team-head h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.pu-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--cyan);
  white-space: nowrap;
}

.team-drivers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.driver-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.team-story {
  margin: 0 0 10px;
  font-size: 0.87rem;
  color: #c2cad8;
}

.team-base {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
}

/* Calendar Status Chips */
.cal-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
}

.cal-done { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.cal-next { background: rgba(255, 42, 31, 0.22); color: #ff8e88; border: 1px solid rgba(255, 42, 31, 0.45); }
.cal-upcoming { background: rgba(0, 229, 255, 0.14); color: var(--cyan); }
.cal-cancelled { background: rgba(255, 184, 0, 0.14); color: var(--amber); }

.sprint-chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 184, 0, 0.16);
  color: var(--amber);
  margin-left: 6px;
}

/* Interactive 2026 Rules & Active Aero Lab */
.aero-lab {
  background: linear-gradient(160deg, #101622, #0b0e15);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 26px;
}

.aero-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.aero-stage {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #080b11;
  background-size: 28px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  overflow: hidden;
}

.aero-svg {
  width: 100%;
  height: auto;
  max-height: 280px;
  display: block;
}

.airflow-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-dasharray: 12 10;
  animation: flowDash 1.1s linear infinite;
  opacity: 0.85;
}

.aero-svg[data-mode="straight"] .airflow-line {
  animation-duration: 0.55s;
}

.aero-svg[data-mode="overtake"] .airflow-line {
  stroke: #ff5d54;
  animation-duration: 0.42s;
}

.aero-svg[data-mode="wet"] .airflow-line {
  stroke: #4da6ff;
  animation-duration: 0.9s;
}

@keyframes flowDash {
  from { stroke-dashoffset: 44; }
  to { stroke-dashoffset: 0; }
}

.wing-flap-front,
.wing-flap-rear {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-box: fill-box;
  transform-origin: left center;
}

.aero-svg[data-mode="straight"] .wing-flap-front,
.aero-svg[data-mode="overtake"] .wing-flap-front {
  transform: rotate(-18deg) translateY(-3px);
}

.aero-svg[data-mode="straight"] .wing-flap-rear,
.aero-svg[data-mode="overtake"] .wing-flap-rear {
  transform: rotate(-28deg) translateY(-5px);
}

.aero-svg[data-mode="wet"] .wing-flap-front {
  transform: rotate(-14deg) translateY(-2px);
}

.aero-svg[data-mode="wet"] .wing-flap-rear {
  transform: rotate(0deg);
}

.energy-pulse {
  transition: opacity 0.3s ease;
}

.aero-readout-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.readout-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.readout-tile span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.readout-tile strong {
  font-size: 1.02rem;
  color: var(--ink);
}

.rule-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  gap: 9px;
}

.rule-card p {
  margin: 0 0 10px;
  color: #c7cfdd;
  font-size: 0.92rem;
}

.rule-stat {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
}

/* Race Weekend & Tyres */
.weekend-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.day-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.session-block {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--red);
  margin-bottom: 10px;
}

.session-block:last-child {
  margin-bottom: 0;
}

.session-block strong {
  display: block;
  font-size: 0.94rem;
  margin-bottom: 3px;
}

.session-block p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
}

.tyre-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.tyre-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  text-align: center;
}

.tyre-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: #181c24;
  border: 6px solid #2b313d;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 4px var(--ring-color, #ff2a1f);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
}

.tyre-card h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.tyre-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Interactive Pit Wall Arcade */
.arcade-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 22px;
  margin-bottom: 24px;
}

/* Lights Out Game */
.gantry-wrap {
  background: #07090d;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 22px 16px;
  margin: 16px 0;
  text-align: center;
}

.gantry-lights {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.light-pod {
  width: 44px;
  height: 76px;
  background: #151922;
  border: 2px solid #282f3f;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.bulb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #231417;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.06s ease, box-shadow 0.06s ease;
}

.light-pod.on .bulb-active {
  background: #ff261b;
  box-shadow: 0 0 18px #ff261b, 0 0 36px rgba(255, 38, 27, 0.7);
}

.light-pod.green .bulb-top {
  background: #16d98e;
  box-shadow: 0 0 16px #16d98e;
}

.reaction-pad {
  width: 100%;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.08s ease;
}

.reaction-pad:hover {
  background: #222b3d;
}

.reaction-pad.ready-go {
  background: rgba(22, 217, 142, 0.16);
  border-color: var(--green);
  color: #b8ffe3;
}

.reaction-pad.false-start {
  background: rgba(255, 184, 0, 0.16);
  border-color: var(--amber);
  color: #ffe59e;
}

.reaction-result {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.reaction-ms {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cyan);
}

.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.history-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* Circuit Explorer */
.circuit-svg-box {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.05), transparent 70%),
    #090c12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin: 14px 0;
}

.circuit-svg {
  width: 100%;
  height: auto;
  max-height: 260px;
}

.track-base {
  fill: none;
  stroke: #2c3547;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-surface {
  fill: none;
  stroke: #8d9bb3;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.straight-zone {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 6.5;
  stroke-linecap: round;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

.circuit-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.circuit-spec {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.circuit-spec span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--muted);
  text-transform: uppercase;
}

.circuit-spec strong {
  font-size: 0.9rem;
}

.corner-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.corner-note {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
}

.corner-note strong {
  display: block;
  color: var(--amber);
  margin-bottom: 3px;
}

/* Team Quiz */
.quiz-box {
  background: linear-gradient(155deg, #131926, #0d111a);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.quiz-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 20px;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--cyan));
  transition: width 0.3s ease;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quiz-opt {
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.quiz-opt:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.09);
  transform: translateY(-2px);
}

.quiz-result-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
}

.team-shield {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* Eras Timeline */
.eras-showcase {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  align-items: center;
}

.era-poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.5);
}

.era-poster img {
  width: 100%;
  height: auto;
}

.era-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.era-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.era-meta div {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
}

.era-meta span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 3px;
}

/* Curated Resources / Links Directory */
.resources-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: #161d2b;
}

.resource-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.res-badge {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
}

.res-ext {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.resource-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--ink);
}

.resource-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.resource-domain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
}

/* Footer */
.site-footer {
  padding: 42px 0 54px;
  background: #06080c;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.disclaimer-box {
  max-width: 68ch;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #cdd5e3;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid,
  .arcade-grid,
  .eras-showcase {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .aero-readout-grid,
  .circuit-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3,
  .resource-grid,
  .battle-strip,
  .weekend-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tyre-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(11, 14, 21, 0.98);
    border-bottom: 1px solid var(--border-strong);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 24px 20px;
  }

  .nav-links.open {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .resource-grid,
  .battle-strip,
  .weekend-timeline,
  .corner-notes,
  .quiz-options,
  .era-meta,
  .quiz-result-card {
    grid-template-columns: 1fr;
  }

  .tyre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 54px 0;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
