/* ==========================================================================
   RaceFace — site styles
   One file. No build step. Edit freely.
   Palette carried over from the original build.
   ========================================================================== */

:root {
  --bg:            #070708;
  --elevated:      #0f0f12;
  --charcoal:      #141418;
  --panel:         #1a1a20;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(189, 95, 255, 0.35);
  --text:          #f5f5f7;
  --muted:         #a1a1aa;
  --muted-dim:     #71717a;
  --accent:        #bd5fff;
  --accent-bright: #d493ff;
  --accent-soft:   rgba(189, 95, 255, 0.15);
  --accent-glow:   rgba(189, 95, 255, 0.45);
  --amber:         #f99c00;
  --green:         #3ecf8e;

  --maxw: 1140px;
  --gutter: 20px;
  --radius: 16px;
  --radius-lg: 22px;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------- reset -- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  font-size: 14px;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }
.section { padding-block: clamp(48px, 7vw, 84px); }
.section--tight { padding-block: clamp(32px, 4vw, 48px); }

.eyebrow {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.section-head { max-width: 640px; margin-bottom: 30px; }
.section-head h2 {
  font-size: clamp(25px, 3.4vw, 34px);
  font-weight: 800;
}
.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
}

.rule {
  width: 52px;
  height: 3px;
  border-radius: 3px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.grid { display: grid; gap: 18px; }
@media (min-width: 720px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------------------------------------- card -- */

.card {
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}
.card--hover:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  background: linear-gradient(160deg, rgba(189,95,255,0.07), rgba(255,255,255,0.02));
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.card p { color: var(--muted); font-size: 15px; line-height: 1.68; }
.card .card-cta { margin-top: 18px; }

.card--flow { display: flex; flex-direction: column; }
.card--flow p { flex: 1; }

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.18s ease, border-color 0.18s ease,
              background 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 26px rgba(189, 95, 255, 0.32);
}
.btn--primary:hover { filter: brightness(1.12); }

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.btn--block { width: 100%; }
.btn--sm { padding: 8px 16px; font-size: 13.5px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 11px; }

/* --------------------------------------------------------------- pill -- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
}
.pill--accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-bright);
}
.pill--live {
  background: rgba(62, 207, 142, 0.14);
  border-color: transparent;
  color: var(--green);
}
.pill--done { color: var(--muted-dim); }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.pill--live .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ------------------------------------------------------------- header -- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(7, 7, 8, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }

.nav { display: none; margin-left: auto; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease, background 0.16s ease;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.header-cta { display: none; margin-left: 8px; }

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 15px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle svg { width: 16px; height: 16px; }

@media (min-width: 1180px) {
  .nav, .header-cta { display: flex; }
  .nav-toggle { display: none; }
}
@media (min-width: 1180px) and (max-width: 1320px) {
  .nav a { padding: 8px 8px; font-size: 13.5px; }
}

.mobile-nav {
  position: fixed;
  inset: 64px 0 auto 0;
  z-index: 99;
  background: var(--elevated);
  border-bottom: 1px solid var(--border);
  padding: 14px var(--gutter) 22px;
  display: none;
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-size: 16px;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a[aria-current="page"] { color: var(--accent-bright); font-weight: 600; }
.mobile-nav .btn { margin-top: 18px; }

main { padding-top: 64px; }

/* --------------------------------------------------------------- hero -- */

.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
  opacity: 0.72;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 78% 8%, rgba(189,95,255,0.22), transparent 55%),
    linear-gradient(105deg, rgba(7,7,8,0.94) 0%, rgba(7,7,8,0.72) 42%, rgba(7,7,8,0.4) 70%),
    linear-gradient(to bottom, transparent 0%, rgba(7,7,8,0.35) 62%, var(--bg) 100%);
}
.hero .wrap { position: relative; }

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: clamp(46px, 7vw, 80px) clamp(52px, 8vw, 96px);
}
@media (min-width: 1000px) {
  .hero-inner { flex-direction: row; align-items: center; gap: 48px; }
  .hero-copy { flex: 1; }
  .hero-aside { width: 396px; flex-shrink: 0; }
}

.hero h1 {
  font-size: clamp(42px, 7.6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-top: 8px;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent-bright), var(--accent) 55%, #8b3fd6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  margin-top: 20px;
  max-width: 34em;
  font-size: clamp(16.5px, 2vw, 18.5px);
  line-height: 1.68;
  color: #c8c8d0;
}
.hero .btn-row { margin-top: 28px; }
.hero-sponsor {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}
.hero-sponsor a { color: var(--text); font-weight: 600; text-decoration: none; }
.hero-sponsor a:hover { color: var(--accent-bright); }

/* ---------------------------------------------------------- race card -- */

.racecard {
  background: linear-gradient(155deg, rgba(189,95,255,0.1), rgba(255,255,255,0.025));
  border: 1px solid rgba(189, 95, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.racecard::before {
  content: "";
  position: absolute;
  top: -70px; right: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(189, 95, 255, 0.22);
  filter: blur(52px);
  pointer-events: none;
}
.racecard > * { position: relative; }
.racecard-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.racecard h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.racecard-series { margin-top: 5px; font-size: 14px; color: var(--muted); }

.racecard-meta {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
@media (min-width: 420px) { .racecard-meta { grid-template-columns: 1fr 1fr; } }
.racecard-meta dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 4px;
}
.racecard-meta dd { margin: 0; font-weight: 650; font-size: 15px; }
.racecard-meta .sub { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.localtime {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--accent-bright);
  margin-top: 3px;
}

.countdown {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.countdown div {
  flex: 1;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 4px;
}
.countdown span {
  display: block;
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown small {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.countdown[hidden] { display: none; }

.racecard-note { margin-top: 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.racecard .btn-row { margin-top: 20px; }

/* ------------------------------------------------------- championship -- */

.champ { padding: 26px; }
.champ-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.champ h3 {
  font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 800;
  margin-bottom: 10px;
}
.champ-presented {
  font-size: 12px;
  color: var(--muted-dim);
  margin-left: auto;
}
.champ-presented a { color: var(--muted); text-decoration: none; }
.champ-presented a:hover { color: var(--accent-bright); }
.champ > p { color: var(--muted); font-size: 15.5px; line-height: 1.7; }

.rounds {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.rounds li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  flex-wrap: wrap;
}
.rounds .rn {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-dim);
  width: 30px;
  flex-shrink: 0;
}
.rounds .track { font-weight: 600; }
.rounds .when { color: var(--muted); font-size: 13.5px; }
.rounds .status { margin-left: auto; font-size: 11px; }
.rounds li.is-next { background: rgba(189, 95, 255, 0.07); border-radius: 8px; padding-inline: 8px; }

.champ-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

/* --------------------------------------------------------------- step -- */

.step { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: 0; }
.step-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  width: 34px;
  padding-top: 3px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 15px; line-height: 1.68; }
.step .btn, .step .codelink { margin-top: 14px; }

.codelink {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 6px 12px;
  text-decoration: none;
}
.codelink:hover { background: rgba(189, 95, 255, 0.25); }

/* ---------------------------------------------------------------- faq -- */

.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  padding: 17px 34px 17px 2px;
  font-size: 16.5px;
  font-weight: 650;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px; top: 25px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.72;
  padding: 0 34px 20px 2px;
}

/* ----------------------------------------------------------- cta band -- */

.cta-band {
  background: linear-gradient(140deg, rgba(189,95,255,0.14), rgba(255,255,255,0.02));
  border: 1px solid rgba(189, 95, 255, 0.24);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 42px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cta-band::before {
  content: "";
  position: absolute;
  left: -50px; top: -30px;
  width: 210px; height: 210px;
  border-radius: 50%;
  background: rgba(189, 95, 255, 0.26);
  filter: blur(60px);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(24px, 3.2vw, 31px); font-weight: 800; margin-top: 6px; }
.cta-band p { margin-top: 12px; color: var(--muted); max-width: 46em; line-height: 1.7; }
@media (min-width: 860px) {
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .cta-band .btn-row { flex-shrink: 0; }
}

/* ------------------------------------------------------------- footer -- */

.footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: var(--elevated);
}
.footer-grid {
  display: grid;
  gap: 32px;
  padding-block: 46px;
}
@media (min-width: 680px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

.footer img { height: 28px; width: auto; margin-bottom: 16px; }
.footer-about { font-size: 14.5px; color: var(--muted); line-height: 1.7; max-width: 32em; }
.footer-sponsor { margin-top: 12px; font-size: 13px; color: var(--muted-dim); }
.footer-sponsor a { color: var(--accent); text-decoration: none; }
.footer-sponsor a:hover { text-decoration: underline; }

.footer h4 {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--text);
}
.footer li { margin-bottom: 9px; }
.footer li a {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease;
}
.footer li a:hover { color: var(--text); }
.footer .handle { color: var(--muted-dim); }

.footer-base {
  border-top: 1px solid var(--border);
  padding-block: 20px;
  font-size: 13px;
  color: var(--muted-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

/* --------------------------------------------------------------- misc -- */

.page-head { padding-block: clamp(40px, 6vw, 68px) clamp(8px, 2vw, 20px); }
.page-head h1 {
  font-size: clamp(33px, 5.4vw, 50px);
  font-weight: 900;
  letter-spacing: -0.03em;
}
.page-head .lede {
  margin-top: 18px;
  max-width: 44em;
  font-size: clamp(16px, 2vw, 18px);
  color: var(--muted);
  line-height: 1.72;
}
.page-head .btn-row { margin-top: 26px; }

.prose p { color: var(--muted); font-size: 16.5px; line-height: 1.8; margin-bottom: 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--accent-bright); }

.contact-card { text-align: left; }
.contact-card .label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 8px;
}
.contact-card .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}
.contact-card .value:hover { color: var(--accent-bright); }
.contact-card p { margin-top: 8px; font-size: 14.5px; }

.benefits li {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}
.benefits li:last-child { border-bottom: 0; }
.benefits li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.notfound {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.notfound h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; }
.notfound p { color: var(--muted); max-width: 30em; }

/* ------------------------------------------------------------ motion -- */

.fade-up {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.d1 { animation-delay: 0.07s; }
.d2 { animation-delay: 0.14s; }
.d3 { animation-delay: 0.21s; }
.d4 { animation-delay: 0.28s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

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

@media print {
  .header, .mobile-nav, .hero-bg, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Standings
   ========================================================================== */

.stabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.stab {
  flex: 1 1 220px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.stab:hover { border-color: var(--border-strong); color: var(--text); }
.stab.is-on {
  border-color: rgba(189, 95, 255, 0.5);
  background: linear-gradient(150deg, rgba(189,95,255,0.16), rgba(255,255,255,0.02));
  color: var(--text);
}
.stab-name { display: block; font-size: 15.5px; font-weight: 700; }
.stab-meta {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.stab.is-on .stab-meta { color: var(--accent-bright); }

.schamp-head { margin-bottom: 22px; }
.schamp-head h2 {
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 800;
}
.schamp-blurb {
  margin-top: 10px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}
.schamp-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}
@media (min-width: 640px) { .schamp-meta { grid-template-columns: repeat(4, 1fr); } }
.schamp-meta dt {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.schamp-meta dd { margin: 4px 0 0; font-size: 15px; font-weight: 650; }

.scontrols {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.ssearch {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  font-size: 14.5px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.ssearch::placeholder { color: var(--muted-dim); }
.ssearch:focus { outline: none; border-color: var(--border-strong); }

.stoggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.stoggle button {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 15px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.stoggle button.is-on { background: var(--accent); color: #fff; }

.stable-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  -webkit-overflow-scrolling: touch;
}
.stable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 560px;
}
.stable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--elevated);
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
  font-weight: 650;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.stable tbody tr { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.stable tbody tr:last-child { border-bottom: 0; }
.stable tbody tr:hover { background: rgba(189, 95, 255, 0.06); }
.stable td { padding: 11px 10px; vertical-align: middle; }

.sc-pos { width: 52px; text-align: center; }
.stable thead .sc-pos { text-align: center; }
.spos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
tr.is-p1 .spos { background: rgba(255, 199, 64, 0.16); color: #ffc740; }
tr.is-p2 .spos { background: rgba(200, 210, 225, 0.16); color: #c8d2e1; }
tr.is-p3 .spos { background: rgba(214, 140, 78, 0.18); color: #d68c4e; }

.steam { display: flex; align-items: center; gap: 8px; }
.sflag { font-size: 15px; line-height: 1; }
.steam-name { font-weight: 650; color: var(--text); }
.steam-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted-dim);
}
.sno { font-family: var(--mono); }
.scar-inline { display: none; }

.stier {
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stier--platinum { background: rgba(155, 225, 235, 0.16); color: #9be1eb; }
.stier--gold     { background: rgba(255, 199, 64, 0.14);  color: #ffc740; }
.stier--silver   { background: rgba(200, 210, 225, 0.14); color: #c8d2e1; }
.stier--bronze   { background: rgba(214, 140, 78, 0.14);  color: #d68c4e; }
.stier--experienced-bronze { background: rgba(214, 140, 78, 0.14); color: #d68c4e; }
.stier--experienced-silver { background: rgba(200, 210, 225, 0.14); color: #c8d2e1; }

.sc-car { color: var(--muted); white-space: nowrap; font-size: 13.5px; }
.sc-r { width: 58px; text-align: center; font-family: var(--mono); font-size: 13.5px; }
.stable thead .sc-r { text-align: center; }
.sc-r-n { display: block; }
.sc-r-c {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--muted-dim);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stable thead .sc-r { padding-inline: 6px; }
.rr-win    { color: #ffc740; font-weight: 700; }
.rr-podium { color: var(--accent-bright); font-weight: 650; }
.rr-out    { color: #6b5560; font-size: 11px; }
.rr-none   { color: #3a3a42; }

.sc-pts {
  width: 62px;
  text-align: right;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
}
.stable thead .sc-pts { text-align: right; }

@media (max-width: 720px) {
  .sc-car { display: none; }
  .scar-inline { display: inline; }
  .stable { min-width: 460px; }
}

.sempty {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
}
.sempty-title { font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.sempty p { color: var(--muted); max-width: 52ch; margin-inline: auto; line-height: 1.7; }
.sempty .btn { margin-top: 18px; }
.sempty-note { margin-top: 16px; color: var(--muted); font-size: 14.5px; }

.sfoot { margin-top: 14px; font-size: 13.5px; color: var(--muted-dim); }
.sfoot a { color: var(--accent-bright); }

.sloading { color: var(--muted); padding: 40px 0; text-align: center; }
.sloading .btn { margin-top: 14px; }

.schamp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.schamp-champ {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255,199,64,0.12), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 199, 64, 0.25);
}
.schamp-champ-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffc740;
  font-weight: 700;
}
.schamp-champ-name { font-size: 17px; font-weight: 750; color: var(--text); }
.schamp-champ-pts { font-family: var(--mono); font-size: 13.5px; color: var(--muted); }

.schamp-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted-dim);
  font-style: italic;
}

.sclasses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.sclass {
  font: inherit;
  cursor: pointer;
  text-align: left;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.sclass:hover { border-color: var(--border-strong); color: var(--text); }
.sclass.is-on {
  border-color: rgba(189, 95, 255, 0.5);
  background: var(--accent-soft);
  color: var(--text);
}
.sclass-name { display: block; font-size: 14.5px; font-weight: 700; }
.sclass-n {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.sclass.is-on .sclass-n { color: var(--accent-bright); }

/* ==========================================================================
   Forms
   ========================================================================== */

.rfform { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 680px) {
  .field-row { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}

.field label {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--text);
}
.field .opt { font-weight: 400; color: var(--muted-dim); }

.field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="password"], .field input[type="number"], .field input[type="date"],
.field input[type="time"], .field select, .field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field textarea.mono { font-family: var(--mono); font-size: 13px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}
.field [aria-invalid="true"] { border-color: #ff6b6b; }
.field select { appearance: none; background-image: none; cursor: pointer; }
.field select option { background: var(--elevated); color: var(--text); }

.hint { font-size: 12.5px; color: var(--muted-dim); line-height: 1.5; }
.hint code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
.field-err { font-size: 12.5px; color: #ff8585; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 400;
  cursor: pointer;
}
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* Honeypot — hidden from people, visible to naive bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.formnote {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.03);
}
.formnote p + p { margin-top: 8px; color: var(--muted); }
.formnote--ok  { border-color: rgba(62, 207, 142, 0.4); background: rgba(62, 207, 142, 0.08); }
.formnote--bad { border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }

/* ==========================================================================
   Calendar
   ========================================================================== */

.calbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.calfilters { display: flex; flex-wrap: wrap; gap: 8px; }
.calchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.calchip:hover { color: var(--text); border-color: var(--border-strong); }
.calchip.is-on {
  background: var(--accent-soft);
  border-color: rgba(189, 95, 255, 0.5);
  color: var(--text);
}
.calchip-n {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 1px 7px;
}
.calchip.is-on .calchip-n { background: rgba(189, 95, 255, 0.35); color: #fff; }

.caltoggle a {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  padding: 6px 15px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.caltoggle a.is-on { background: var(--accent); color: #fff; }

.callist { margin-top: 22px; }
.calmonth {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.calmonth::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.callist > .calmonth:first-child { margin-top: 0; }

.calrow {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.calrow:hover { border-color: var(--border-strong); }
.calrow.is-next {
  border-color: rgba(189, 95, 255, 0.4);
  background: linear-gradient(140deg, rgba(189,95,255,0.1), rgba(255,255,255,0.02));
}
.calrow.is-done { opacity: 0.62; }
@media (min-width: 860px) {
  .calrow { grid-template-columns: 72px 1fr auto; align-items: center; }
}

.caldate {
  text-align: center;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  padding: 9px 4px;
  align-self: start;
}
.caldate-d {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}
.caldate-m {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.calrow.is-next .caldate {
  background: rgba(189, 95, 255, 0.18);
  border-color: transparent;
}

.calmain { min-width: 0; }
.caltags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.pill--fun { background: rgba(249, 156, 0, 0.16); border-color: transparent; color: var(--amber); }
.calmain h3 { font-size: 17.5px; font-weight: 700; }
.calmeta { margin-top: 5px; font-size: 14px; color: var(--muted); }
.calnote { margin-top: 7px; font-size: 14px; color: var(--muted-dim); line-height: 1.6; }

.calactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 859px) { .calactions { grid-column: 1 / -1; } }

.formwrap { max-width: 720px; }

/* ==========================================================================
   Next four race nights — the mini cards under the hero
   Mobile first: a tight single-column list. Two across from 720px, four
   across from 1000px, where they turn into proper little cards.
   ========================================================================== */

.section--nextup { padding-block: clamp(18px, 3vw, 30px); }

.nextfour-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.nextfour-head .eyebrow { margin: 0; }

.nextfour-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  white-space: nowrap;
}
.nextfour-more:hover { text-decoration: underline; }
.nextfour-more::after { content: " \2192"; }

.nextfour {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.minicard {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.minicard.is-next {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--elevated);
}

.minicard-date {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.minicard-date b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.minicard-date i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.minicard-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.minicard-league {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.minicard-round {
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-bright);
  margin-left: 6px;
}

.minicard-circuit {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.minicard-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-dim);
}
.minicard-sim {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.minicard .localtime {
  flex-basis: 100%;
  font-size: 10.5px;
}

.minicard-cd {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-bright);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.minicard-cd.is-live { color: var(--green); }

@media (min-width: 720px) {
  .nextfour { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .minicard {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 9px;
    padding: 14px 15px;
  }
  .minicard-date { flex-direction: row; align-items: baseline; gap: 6px; }
  .minicard-date b { font-size: 12.5px; }
  .minicard-cd {
    padding-top: 9px;
    border-top: 1px solid var(--border);
    font-size: 14px;
  }
}

@media (min-width: 1000px) {
  .nextfour { grid-template-columns: repeat(4, 1fr); }
  .minicard-league { font-size: 14px; }
}

/* Form feedback lands under the fixed header, not behind it. */
#form,
.rfform [aria-invalid="true"] { scroll-margin-top: 88px; }
.formnote:focus,
.formnote:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

/* ==========================================================================
   Title sponsor band
   The logo artwork is on white, so it gets a white plate rather than being
   recoloured — their brand stays their brand, and no JPEG box shows.
   ========================================================================== */

.sponsorband {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--elevated);
}

.sponsorband-plate {
  flex: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  line-height: 0;
}
.sponsorband-plate img {
  width: 230px;
  max-width: 100%;
  height: auto;
}

.sponsorband-copy .eyebrow { margin-bottom: 6px; }
.sponsorband-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
  max-width: 60ch;
}

@media (min-width: 720px) {
  .sponsorband {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 22px 26px;
  }
  .sponsorband-plate { padding: 14px 18px; }
  .sponsorband-plate img { width: 250px; }
}
