/* Midnight & Ice: colour layer only. Existing layouts and race data are intact. */
:root {
  --ers-red: #9fcafa;
  --ers-red-dark: #6d9fce;
  --ers-black: #0c1423;
  --ers-panel: #122239;
  --ers-panel-2: #182c45;
  --ers-line: #2c4561;
  --ers-text: #edf5fc;
  --ers-muted: #a7b8cc;
  --ers-green: #93c7b4;
  --ers-amber: #e4be82;
  --bg: #0c1423;
  --text: #edf5fc;
  --muted: #a7b8cc;
  --accent: #365fd1;
  --accent2: #9fcafa;
  --line-soft: #2c4561;
  --line: #2c4561;
}
html { background: #0c1423 !important; }
body {
  color: #edf5fc !important;
  background: radial-gradient(circle at 78% -5%, rgba(159,202,250,.08), transparent 32%), #0c1423 !important;
}
body:before {
  background-image: linear-gradient(rgba(159,202,250,.035) 1px, transparent 1px), linear-gradient(90deg,rgba(159,202,250,.035) 1px,transparent 1px);
}
.ers-season-ribbon {
  color: #dcebf9;
  background: linear-gradient(90deg,#122239,#1c3551 45%,#122239);
}
.ers-season-ribbon a, .ers-season-ribbon .ers-home-link { color: #edf5fc; }
.ers-global-header { border-bottom-color: #2c4561 !important; background: rgba(12,20,35,.96) !important; }
.ers-global-brand, .ers-global-brand span { color: #edf5fc; border-color: #2c4561; }
.ers-global-nav a { color: #c5d5e6 !important; }
.ers-global-nav a:hover, .ers-global-nav a.active { color: #edf5fc !important; }
.ers-global-nav .join { color: #edf5fc !important; background: #365fd1 !important; }
.ers-global-nav .join:hover { background: #426dda !important; }
.ers-global-nav .ers-nav-home, .ers-mobile-home-link {
  color: #edf5fc !important;
  background: #182c45 !important;
  border-color: #436384;
  box-shadow: 0 0 0 1px rgba(159,202,250,.12),0 5px 18px rgba(12,20,35,.28);
}
@keyframes ersHomeGlow {
  0%,100% { background: #182c45; box-shadow: 0 0 0 1px rgba(159,202,250,.12),0 5px 16px rgba(12,20,35,.2),0 0 0 rgba(159,202,250,0); }
  50% { background: #1e3652; box-shadow: 0 0 0 1px rgba(159,202,250,.2),0 7px 22px rgba(12,20,35,.3),0 0 18px rgba(159,202,250,.05); }
}
.ers-global-menu-toggle { color: #edf5fc !important; border-color: #2c4561 !important; background: #122239 !important; }
body>header:not(.ers-global-header), body>header.hero:not(.ers-global-header) {
  border-bottom-color: #2c4561 !important;
  background: linear-gradient(90deg,#0c1423 5%,rgba(12,20,35,.82) 58%,rgba(12,20,35,.94)),url('https://ersracingleague.com/track-photos/silverstone.webp') center/cover !important;
}
body>header:not(.ers-global-header):before { background: linear-gradient(180deg,transparent,#0c1423); }
.ers-overview-hero {
  border-color: #2c4561;
  background: linear-gradient(90deg,#0c1423 5%,rgba(12,20,35,.7),#0c1423),var(--overview-track-image,url('https://ersracingleague.com/track-photos/silverstone.webp')) center/cover;
}
.ers-overview-hero:after { background: linear-gradient(180deg,transparent,#0c1423); }
body>header h1, body>header .header-content h1, body>header.hero h1, .ers-overview-hero h1 {
  color: #edf5fc !important;
  text-shadow: 0 8px 24px rgba(12,20,35,.72) !important;
}
body>header p.desc, body>header.hero p, .ers-overview-hero p { color: #c5d5e6 !important; }
.ers-game-edition, .ers-game-edition span { color: #edf5fc; text-shadow: 0 1px 10px rgba(159,202,250,.1); }
.ers-game-edition:after { background: #9fcafa; box-shadow: 0 0 7px rgba(159,202,250,.24),0 0 16px rgba(159,202,250,.1),0 0 28px rgba(159,202,250,.04); }
.pill, .badge { color: #c5d5e6 !important; border-color: #2c4561 !important; background: #122239 !important; }
.pill:nth-child(2) { border-color: rgba(147,199,180,.4) !important; color: #93c7b4 !important; }
.ers-live { color: #93c7b4; }
.ers-live i { background: #93c7b4; box-shadow: 0 0 12px rgba(147,199,180,.3); }
.current-tier-label, .tier-label { color: #a7b8cc !important; background-color: #0c1423 !important; }
.current-tier-link, .tier-link, .current-tier-nav .tier-link, .ers-selector a {
  color: #c5d5e6 !important;
  border-color: #2c4561 !important;
  background: transparent !important;
}
.current-tier-link:hover, .current-tier-link.active, .tier-link:hover, .tier-link.active,
.ers-selector a:hover, .ers-selector a.active {
  color: #edf5fc !important;
  border-color: #9fcafa !important;
  background: #1b324d !important;
}
.ers-selector { border-color: #2c4561; }
.ers-selector span { color: #a7b8cc; }
.ers-standings-navigation .current-tier-group.group-season-13 { border-color: #2c4561 !important; border-top-color: #9fcafa !important; background: rgba(18,34,57,.94) !important; }
.ers-standings-navigation .current-tier-label { color: #edf5fc !important; background: transparent !important; }
.ers-standings-navigation.current-tier-nav .tier-link { color: #edf5fc !important; border-color: #385572 !important; background: #182c45 !important; }
.ers-standings-navigation.current-tier-nav .tier-link:hover { border-color: #9fcafa !important; background: #203b58 !important; }
.ers-standings-navigation.current-tier-nav .tier-link.active { border-color: #9fcafa !important; background: #294e74 !important; }
.ers-standings-navigation .ers-division-name, .ers-standings-navigation .ers-division-help { color: #c5d5e6; }
.ers-standings-navigation .ers-division-selected { color: #edf5fc; }
form.filters, .filters, .filter, .search-bar { border-color: #2c4561 !important; background: #122239 !important; }
form.filters label, .filter label { color: #a7b8cc !important; }
select, input[type=text], input[type=search] { color: #edf5fc !important; border-color: #436384 !important; background: #162a43 !important; }
button, input[type=submit] { color: #edf5fc !important; border-color: #5279dd !important; background: #365fd1 !important; }
.table-wrapper, .card, .tile, .stat, .cards .card, .grid .tile { border-color: #2c4561 !important; background: linear-gradient(145deg,#162a43,#101d31) !important; }
table { color: #edf5fc !important; background: #101d31 !important; }
th { color: #b7cee4 !important; border-bottom-color: #365371 !important; background: #182c45 !important; }
td { color: #edf5fc !important; border-bottom-color: #253c55 !important; }
tbody tr:hover { background: #1b324d !important; }
.points, .pts-cell, .points-strong, .stat-number { color: #b8d9fa !important; }
.is-fl { color: #c6b0e7 !important; }
.pen { color: #172136 !important; background: #e4be82 !important; }
.export-header { border-color: #2c4561 !important; background: linear-gradient(90deg,#182c45,#101d31) !important; }
.export-subtitle, .empty-state, .empty, .section-heading p, .tile p, .grid .tile p { color: #a7b8cc !important; }
.ers-rounds-heading h2, .section-heading h2 { color: #edf5fc !important; }
.ers-rounds-heading span { color: #a7b8cc; }
.ers-round-card { border-color: #2c4561; color: #edf5fc; background: #122239; }
.ers-round-card:hover, .ers-round-card.active { border-color: #9fcafa; }
.ers-round-card:after { background: linear-gradient(180deg,rgba(12,20,35,.05),rgba(12,20,35,.55)); }
.ers-round-card .round { color: #edf5fc; background: rgba(12,20,35,.86); }
.ers-rounds-controls button { color: #edf5fc !important; border-color: #436384 !important; background: #182c45 !important; }
.ers-rounds-controls button:hover { border-color: #9fcafa !important; background: #294e74 !important; }
.ers-dashboard-card { border-color: #2c4561; background: #122239; }
.ers-dashboard-card>header { border-color: #2c4561; background: #182c45; }
.ers-dashboard-card>header a { color: #b8d9fa; }
.ers-leader { background: linear-gradient(90deg,#122239 35%,rgba(18,34,57,.62)),var(--leader-track-image,url('https://ersracingleague.com/track-photos/monza.webp')) center/cover; }
.ers-leader-empty { background: linear-gradient(90deg,#122239 35%,rgba(18,34,57,.8)),var(--leader-track-image) center/cover; }
.ers-leader p, .ers-event p { color: #c5d5e6; }
.ers-leader-stats span, .ers-empty-note, .ers-overview-stats span { color: #a7b8cc; }
.ers-leader-stats, .ers-leader-stats div { border-color: #2c4561; }
.ers-overview-stats div { border-color: #2c4561; background: #122239; }
.ers-site-footer { border-color: #2c4561 !important; background: linear-gradient(90deg,#122239,#1a314d,#122239) !important; }
.ers-site-footer p { color: #c5d5e6 !important; }
.calendar-control { border-color: #2c4561; background: linear-gradient(135deg,#182c45,#122239); }
.calendar-eyebrow, .calendar-kpis strong, .calendar-event-date, .calendar-past summary:after { color: #9fcafa; }
.calendar-control h2, .calendar-section-head h2, .calendar-next-copy h2, .calendar-next-date, .calendar-event h3, .calendar-past summary { color: #edf5fc; }
.calendar-control p, .calendar-filter-form label, .calendar-kpis small, .calendar-section-head p, .calendar-past summary span { color: #a7b8cc; }
.calendar-filter-form select:focus { border-color: #9fcafa !important; box-shadow: 0 0 0 2px rgba(159,202,250,.16) !important; }
.calendar-kpis article, .calendar-next, .calendar-event { border-color: #2c4561; background: #122239; }
.calendar-kpis span { color: #dcebf9; }
.calendar-next-visual, .calendar-event-visual { background: #182c45; }
.calendar-next-visual:after, .calendar-event-visual:after { background: linear-gradient(180deg,rgba(12,20,35,.06),rgba(12,20,35,.58)); }
.calendar-round, .calendar-status { color: #edf5fc; background: rgba(12,20,35,.86); }
.calendar-status { color: #93c7b4; }
.calendar-status:before { box-shadow: 0 0 9px rgba(147,199,180,.3); }
.calendar-meta span { color: #c5d5e6; border-color: #2c4561; background: #182c45; }
.calendar-meta .tier { color: #edf5fc; border-color: #6d9fce; }
.calendar-section-head, .calendar-past { border-color: #2c4561; }
.calendar-event:hover { border-color: #6d9fce; }
.calendar-event.completed .calendar-status { color: #b1c3d5; }
.calendar-actions p { color: #c5d5e6; }
.calendar-action { color: #edf5fc; border-color: #5279dd; background: #365fd1; }
.calendar-event-actions a { color: #b8d9fa; }
.ers-division-notice { color: #e6c997; border-color: #7c694a; background: #26303a; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .ers-standings-navigation .tier-link:focus-visible { outline-color: #b8d9fa; }
@media(max-width:720px) {
  .ers-global-nav { border-top-color: #2c4561; }
  .ers-global-nav a { background: #122239 !important; }
  .ers-global-nav .ers-nav-home { background: #182c45 !important; }
  .ers-global-nav .join { background: #365fd1 !important; }
  .table-scroll { scrollbar-color: #6d9fce #122239; }
}
