:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors */
  --bg: #05070d;
  --panel: rgba(15, 18, 30, 0.9);
  --card: rgba(18, 20, 33, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #7df9ff;
  --accent-strong: #00c4ff;
  --text: #f9fafb;
  --muted: #9ca3af;

  /* FX */
  --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.28);
  --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.35);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 24px;
  --radius-pill: 999px;

  /* Layout */
  --space-page-x: clamp(1.5rem, 4vw, 3rem);
}

/* Reset / base */

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #0d1120 0%, #05070d 60%);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Skip link */

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #020617;
  color: var(--accent);
  border: 1px solid var(--accent-strong);
  font-size: 0.9rem;
  z-index: 50;
}

.skip-link:focus-visible {
  left: 16px;
}

/* Page shell & ambient glow */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--space-page-x) 80px;
}

body::after {
  display: none;
}


/* Typography */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.9rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.section-lead {
  color: var(--muted);
  max-width: 640px;
}

/* Header / navigation */

.site-header {
  position: sticky;
  top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(5, 5, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-soft);
  z-index: 10;
  overflow: hidden;
  will-change: transform;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0.05) 45%,
      rgba(77, 205, 255, 0.18) 100%
    ),
    rgba(8, 10, 18, 0.35);
  opacity: 0.9;
  z-index: -1;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.site-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.site-title {
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
  justify-content: center;
  flex: 1;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    text-shadow 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-shadow: 0 0 6px rgba(125, 249, 255, 0.6);
}

.site-header nav a.active {
  color: var(--text);
}

.site-header.nav-collapsed {
  overflow: visible;
}

.site-header.nav-collapsed .nav-toggle {
  display: block;
  position: absolute;
  opacity: 0;
}

.site-header.nav-collapsed .nav-toggle-btn {
  display: flex;
}

.site-header.nav-collapsed .site-nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 24px;
  left: 24px;
  flex-direction: column;
  font-size: 0.95rem;
  background: #080b12;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 12px;
  gap: 4px;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s linear 0.18s;
}

.site-header.nav-collapsed .nav-toggle:checked ~ .site-nav {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s;
}

.site-header.nav-collapsed .site-nav a {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.site-header.nav-collapsed {
  flex-wrap: wrap;
  gap: 10px;
  border-radius: 18px;
}

.site-header.nav-collapsed .next-event-pill {
  order: 3;
  width: 100%;
  text-align: center;
  border-radius: 18px;
}

.next-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-left: 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: linear-gradient(120deg, #00c4ff, #7df9ff);
  font-weight: 700;
  color: #041018;
  min-width: 240px;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow:
    0 10px 24px rgba(0, 196, 255, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.next-event-pill[hidden] {
  display: none !important;
}

.next-event-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(4, 16, 24, 0.18);
  background: rgba(4, 16, 24, 0.16);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #041018;
}

.next-event-tag--swc {
  border-color: rgba(125, 249, 255, 0.6);
  background: rgba(125, 249, 255, 0.2);
  color: #022431;
}

.next-event-tag--junior {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.22);
  color: #360808;
}

.next-event-title {
  color: #041018;
}

.next-event-countdown {
  color: #041018;
  font-weight: 800;
  white-space: nowrap;
}

/* Nav toggle (mobile) */

.nav-toggle {
  display: none;
}

.nav-toggle-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.nav-toggle-btn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle:checked + .nav-toggle-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-btn span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked + .nav-toggle-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */

.btn {
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    text-shadow 0.18s ease;
}

.btn-primary {
  background: linear-gradient(120deg, #00c4ff, #7df9ff);
  color: #05070d;
}

.btn-primary:hover {
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  text-shadow: 0 0 6px rgba(125, 249, 255, 0.45);
}

.btn-link {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:hover {
  text-shadow: 0 0 6px rgba(125, 249, 255, 0.6);
}

/* Main layout */

main {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--accent);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(
      140deg,
      rgba(5, 7, 14, 0.88),
      rgba(0, 0, 0, 0.18)
    ),
    url("https://www.schwarzwald-cup.de/.cm4all/uproc.php/0/Junior%20SHM%20NEC%2018.03.2023/.20230318_103606.jpg/picture-1600?_=18704316230")
      center/cover no-repeat;
  min-height: 80vh;
  padding: clamp(2rem, 4vw, 4rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  box-shadow: var(--shadow-strong);
  will-change: transform;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.72), transparent 60%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.25;
}

.hero-content {
  max-width: 620px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 0;
}

.hero-stats > div {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
}

.hero-stats dt {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Metrics / mitfahren */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.metrics-grid article {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border);
}

.metric {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-strong);
}

/* Serien */

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.series-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.series-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Timeline / Termine */

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.timeline-date {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.badge {
  align-self: center;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.badge-next {
  border-color: rgba(74, 222, 128, 0.7);
  color: #bbf7d0;
}

.badge-muted {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.badge-swc {
  border-color: rgba(125, 249, 255, 0.6);
  color: var(--accent);
}

.badge-junior {
  border-color: rgba(239, 68, 68, 0.6);
  color: #fecaca;
}

/* FAQ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  box-shadow: var(--shadow-soft);
  width: 100%;
  display: block;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  width: 100%;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "⌄";
  font-size: 1rem;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.faq-item[open] summary::after {
  transform: rotate(-180deg);
}

.faq-answer {
  padding: 0 18px 16px;
  color: var(--muted);
}

/* News */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.news-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 24px;
  background: rgba(9, 12, 24, 0.9);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(125, 249, 255, 0.22);
  pointer-events: none;
}

.news-card::after {
  content: "";
  position: absolute;
  height: 4px;
  width: 60%;
  top: 0;
  left: 20%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(0, 196, 255, 0.6), transparent);
  opacity: 0.9;
}

.news-card h3 {
  margin: 0;
}

.news-date {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.news-meta a {
  color: var(--accent);
  font-weight: 600;
}

.tag {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(125, 249, 255, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-status {
  color: var(--muted);
  font-size: 0.9rem;
}

/* CTA */

.cta-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vw, 3rem);
  background: linear-gradient(
    140deg,
    rgba(10, 12, 25, 0.95),
    rgba(13, 18, 40, 0.8)
  );
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  will-change: transform;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Breadcrumbs (series pages) */

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.breadcrumbs a {
  color: var(--accent);
}

/* Series pages */

.series-page main {
  margin-top: 32px;
  gap: 60px;
}

.series-hero {
  border-radius: 32px;
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 4vw, 3rem);
  min-height: 70vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  background-size: cover;
  background-position: center;
  background-clip: padding-box;
  position: relative;
  overflow: hidden;
}

.series-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1));
  border-radius: inherit;
}

.series-hero > * {
  position: relative;
  z-index: 1;
}

.series-hero .kicker {
  letter-spacing: 0.2em;
  font-size: 0.7rem;
}

.series-hero h1 {
  margin-bottom: 8px;
}

.series-hero .lead {
  max-width: 520px;
}

.series-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.series-meta article {
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
}

/* Tables & rules */

.results-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.results-table thead {
  background: rgba(255, 255, 255, 0.08);
}

.results-table th,
.results-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.95rem;
}

.results-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.rules-grid article {
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
}

/* Gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-grid figure {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.gallery-grid figcaption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Timeline stack (alt layout) */

.timeline-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-stack article {
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
}

/* Series CTA */

.series-cta {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vw, 3rem);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(
    140deg,
    rgba(6, 9, 18, 0.95),
    rgba(12, 17, 30, 0.8)
  );
}

.series-cta .btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-tracks {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.partner-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.partner-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.partner-logo:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 249, 255, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(125, 249, 255, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.25);
}

.partner-logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(125, 249, 255, 0.24), rgba(0, 196, 255, 0.12));
  border: 1px solid rgba(125, 249, 255, 0.4);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.partner-logo__name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 0.85rem;
}

.legal {
  font-size: 0.85rem;
}

/* Responsive */

@media (min-width: 1200px) {
  .hero,
  .series-hero {
    --hero-edge-gap: clamp(32px, 4vw, 80px);
    width: calc(100vw - var(--hero-edge-gap) * 2);
    max-width: none;
    margin-left: calc((100% - 100vw) / 2 + var(--hero-edge-gap));
    margin-right: calc((100% - 100vw) / 2 + var(--hero-edge-gap));
    padding-left: calc(
      (100vw - 1200px) / 2 - var(--hero-edge-gap) + var(--space-page-x)
    );
    padding-right: calc(
      (100vw - 1200px) / 2 - var(--hero-edge-gap) + var(--space-page-x)
    );
  }
}

@media (max-width: 1024px) {
  .site-header {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    max-width: 100%;
  }

  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .series-hero {
    min-height: 60vh;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px 16px 60px;
  }

  .site-header {
    top: 12px;
    border-radius: 24px;
    padding: 16px;
    flex-direction: row;
    z-index: 20;
    overflow: visible;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    opacity: 0;
  }

  .nav-toggle-btn {
    display: flex;
  }

  .site-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 12px);
    right: 16px;
    left: 16px;
    font-size: 0.95rem;
    background: #080b12;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px;
    gap: 4px;
    box-shadow: var(--shadow-strong);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0s linear 0.18s;
  }

  .nav-toggle:checked ~ .site-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0s;
  }

  .site-nav a {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .metrics,
  .metrics-grid,
  .series-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .timeline-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions {
    width: 100%;
    flex-direction: column;
  }

  footer {
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .grid-overlay {
    background-size: 40px 40px;
    opacity: 0.18;
  }
}

/* Leaderboard */

.leaderboard-card {
  background: linear-gradient(145deg, rgba(8, 12, 24, 0.94), rgba(12, 18, 34, 0.86));
  border: 1px solid rgba(125, 249, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(125, 249, 255, 0.08);
  overflow-x: auto;
}

.leaderboard-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
  justify-content: flex-end;
}

.leaderboard-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 160px;
}

.leaderboard-control select {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
}

.leaderboard-controls .leaderboard-updated {
  margin: 0;
  align-self: flex-end;
}

.leaderboard-updated {
  color: var(--muted);
  font-size: 0.9rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.leaderboard-table th,
.leaderboard-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-table thead th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.leaderboard-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.06);
}

.leaderboard-table tbody tr:hover {
  background: rgba(125, 249, 255, 0.08);
}

.leaderboard-table td:nth-child(1),
.leaderboard-table th:nth-child(1) {
  width: 40px;
  text-align: center;
}

.leaderboard-table td:nth-child(4),
.leaderboard-table td:nth-child(5),
.leaderboard-table th:nth-child(4),
.leaderboard-table th:nth-child(5) {
  text-align: right;
}

@media (max-width: 640px) {
  .leaderboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .leaderboard-controls {
    justify-content: flex-start;
  }
}

/* Admin UI helpers */

.admin-nav {
  display: flex;
  gap: 12px;
}

.admin-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
}

.admin-nav a.active {
  color: var(--text);
  border-color: var(--border);
}

.admin-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  font: inherit;
}

.score-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.score-upload input[type="file"] {
  flex: 1;
}

.admin-trigger {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 14, 24, 0.55);
  opacity: 0.55;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease, border 0.2s ease;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text);
}

.admin-trigger:hover,
.admin-trigger:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(125, 249, 255, 0.6);
  outline: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.admin-card {
  background: rgba(7, 10, 20, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-card .btn {
  align-self: flex-start;
}

.admin-card--disabled {
  opacity: 0.6;
}

.admin-card--disabled .btn {
  cursor: not-allowed;
}

.admin-toolbar {
  margin: 32px 0 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(2, 6, 23, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-toolbar__field {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-toolbar__field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-toolbar__field select {
  min-width: 220px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  font: inherit;
}

.admin-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.finish-button {
  padding: 8px 12px;
}

.finish-button--active {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-toolbar__status {
  flex: 1;
  min-width: 200px;
}

.admin-toolbar__status .news-status {
  margin-top: 4px;
}

.season-panel {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px dashed rgba(125, 249, 255, 0.6);
  border-radius: var(--radius-md);
  background: rgba(2, 6, 23, 0.85);
}

.season-panel[hidden] {
  display: none;
}

.season-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.season-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.admin-list {
  margin-top: 16px;
}

.leaderboard-scroll {
  overflow-x: auto;
}

.driver-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.driver-info span,
.small-muted {
  font-size: 0.8rem;
  color: var(--muted);
}

.score-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.score-main {
  font-weight: 600;
}

.score-bonus {
  font-size: 0.75rem;
  color: var(--accent);
}

.score-cell--dropped {
  opacity: 0.35;
}

.leaderboard-table input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  font: inherit;
}

.leaderboard-entries {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaderboard-entry {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(9, 12, 20, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-entry__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.leaderboard-entry__rank {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: rgba(125, 249, 255, 0.08);
  border: 1px solid rgba(125, 249, 255, 0.35);
}

.leaderboard-entry__rank--gold {
  background: linear-gradient(135deg, #f5d46b, #b8860b);
  border-color: #ffd54f;
  color: #1f1a09;
}

.leaderboard-entry__rank--silver {
  background: linear-gradient(135deg, #d9d9d9, #9e9e9e);
  border-color: #eceff1;
  color: #1c1c1c;
}

.leaderboard-entry__rank--bronze {
  background: linear-gradient(135deg, #e1a35d, #8d5524);
  border-color: #f0ad69;
  color: #2f1604;
}

.leaderboard-entry__driver {
  flex: 1 1 220px;
  min-width: 160px;
}

.leaderboard-entry__driver strong {
  font-size: 1.15rem;
  font-weight: 800;
}

.leaderboard-entry__driver span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2px;
}
.leaderboard-entry__totals {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.leaderboard-entry__totals div {
  text-align: right;
  min-width: 80px;
  white-space: nowrap;
}

.leaderboard-entry__totals span {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
}

.leaderboard-entry__totals strong {
  font-size: 1.05rem;
}

.leaderboard-entry__totals div:last-child strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 680px) {
  .leaderboard-entry__totals {
    flex-wrap: wrap;
  }
}

.leaderboard-entry__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  transition: transform 150ms ease, border-color 150ms ease;
}

.leaderboard-entry.is-expanded .leaderboard-entry__chevron {
  transform: rotate(-135deg);
  border-color: rgba(125, 249, 255, 0.9);
}

.leaderboard-entry__row:focus-visible {
  outline: 2px solid rgba(125, 249, 255, 0.5);
  border-radius: 12px;
}

.leaderboard-entry__details {
  margin-top: 6px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(7, 10, 18, 0.9), rgba(10, 14, 24, 0.75));
}

.leaderboard-entry__chips {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-chip {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 6, 12, 0.9);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
}

.score-chip__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-chip__label {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.score-chip__pos {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(125, 249, 255, 0.4);
  background: rgba(125, 249, 255, 0.12);
  color: #d9f6ff;
  font-weight: 700;
  font-size: 0.75rem;
}

.score-chip strong {
  font-size: 1.2rem;
  margin-left: auto;
}

.score-chip small {
  font-size: 0.75rem;
  color: var(--accent);
}

.score-chip--dropped {
  opacity: 0.4;
  border-style: dashed;
}

@media (max-width: 720px) {
  .leaderboard-entry__chips {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .score-chip {
    width: 100%;
    min-width: 0;
  }
}
