/* ==========================================================================
   TopWing Racing - design system
   Dark, aggressive, sanctioning-body look. One accent: TWR red.
   Sharp corners everywhere. Skewed buttons. Anton display, Rajdhani body.
   ========================================================================== */

:root {
  --red: #e31e24;
  --red-dark: #b91519;
  --red-tint: rgba(227, 30, 36, 0.12);
  --bg: #0a0a0c;
  --surface: #121215;
  --raised: #1a1a1f;
  --line: #26262c;
  --line-strong: #34343c;
  --white: #f4f4f2;
  --muted: #9b9ba4;
  --font-display: "Anton", "Arial Black", sans-serif;
  --font-body: "Rajdhani", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden must always win over class display rules (.connect, .link-flow, etc.) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, .kicker, .btn, .stat-value, .link-code, .event-day, .site-footer strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
}

h1, h2 { font-style: italic; line-height: 1.06; padding-bottom: 0.08em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: 0.03em; }

.red { color: var(--red); }

a { color: inherit; }

::selection { background: var(--red); color: var(--white); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 60;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 1.75rem;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 46px; width: 46px; object-fit: contain; }
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { color: var(--red); }
.nav-cta {
  background: var(--red);
  padding: 0.45rem 1.1rem;
  transform: skewX(-10deg);
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--red-dark); color: var(--white); }
.nav-cta > span { display: inline-block; transform: skewX(10deg); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 2rem;
  transform: skewX(-10deg);
  border: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, translate 0.1s;
  white-space: nowrap;
}
.btn > span { display: inline-block; transform: skewX(10deg); }
.btn:active { translate: 0 1px; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border: 2px solid var(--white); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-lg { font-size: 1.25rem; padding: 1rem 2.75rem; }
.btn-sm { font-size: 0.9rem; padding: 0.5rem 1.2rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 72% 40%, rgba(227, 30, 36, 0.16), transparent 70%),
    var(--bg);
}
.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.75rem 4rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2rem;
}
.hero-copy { max-width: 640px; }
.hero h1 { font-size: clamp(3rem, 7.5vw, 6rem); margin: 0.6rem 0 1rem; }
.hero-sub { color: var(--muted); font-size: 1.2rem; max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.hero-art img {
  width: min(400px, 100%);
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55));
}
.hero-stripe {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 14px;
  background: repeating-linear-gradient(-55deg, var(--red) 0 28px, var(--bg) 28px 56px);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 5.5rem 1.75rem; max-width: 1200px; margin: 0 auto; }
.section-dark {
  max-width: none;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 2.25rem; }
.kicker {
  display: inline-block;
  color: var(--red);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}
.lead { max-width: 68ch; color: var(--muted); font-size: 1.15rem; margin-bottom: 2.5rem; }

/* --------------------------------------------------------------------------
   Next event panel
   -------------------------------------------------------------------------- */
.event-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  padding: 2rem 2.25rem;
  position: relative;
  overflow: hidden;
}
.event-panel::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 180px; height: 100%;
  background: repeating-linear-gradient(-55deg, var(--red-tint) 0 22px, transparent 22px 44px);
  pointer-events: none;
}
.event-date {
  text-align: center;
  background: var(--red);
  color: var(--white);
  padding: 1rem 1.5rem;
  transform: skewX(-6deg);
  min-width: 120px;
}
.event-date > * { transform: skewX(6deg); }
.event-dow { display: block; font-weight: 700; letter-spacing: 0.2em; font-size: 0.85rem; text-transform: uppercase; }
.event-day { display: block; font-size: 3rem; line-height: 1; }
.event-month { display: block; font-weight: 700; letter-spacing: 0.2em; font-size: 0.85rem; text-transform: uppercase; }
.event-info h3 { font-size: 1.7rem; margin-bottom: 0.35rem; }
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
}
.event-meta strong { color: var(--white); font-weight: 700; }
.event-desc { color: var(--muted); margin-top: 0.6rem; max-width: 60ch; }
.event-side { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-end; z-index: 1; }

.pill {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.pill-open { border-color: var(--red); color: var(--red); }

/* --------------------------------------------------------------------------
   League grid (asymmetric)
   -------------------------------------------------------------------------- */
.league-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.25rem;
}
.league-main {
  background:
    linear-gradient(rgba(10, 10, 12, 0.82), rgba(10, 10, 12, 0.92)),
    repeating-linear-gradient(-55deg, var(--red) 0 30px, #7d1013 30px 60px);
  border: 1px solid var(--line);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
}
.league-main h3 { font-size: 1.8rem; }
.league-main p { color: #cfcfd4; max-width: 48ch; }
.league-stack { display: grid; gap: 1.25rem; }
.league-card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.league-card p { color: var(--muted); font-size: 1rem; }

/* --------------------------------------------------------------------------
   Race night program
   -------------------------------------------------------------------------- */
.flow { list-style: none; counter-reset: none; }
.flow li {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.flow li:last-child { border-bottom: none; }
.flow-num {
  font-family: var(--font-display);
  color: var(--red);
  font-size: 2.4rem;
  font-style: italic;
  line-height: 1;
  min-width: 3.6rem;
}
.flow h3 { margin-bottom: 0.25rem; }
.flow p { color: var(--muted); max-width: 62ch; }

/* --------------------------------------------------------------------------
   Championships split
   -------------------------------------------------------------------------- */
.champ-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}
.champ-types { display: grid; }
.champ-type { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.champ-type:last-child { border-bottom: 1px solid var(--line); }
.champ-type h3 { color: var(--white); margin-bottom: 0.2rem; }
.champ-type p { color: var(--muted); font-size: 1rem; }
.standings-link { margin-top: 1.5rem; display: inline-block; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--red);
  white-space: nowrap;
}
.table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  white-space: nowrap;
}
.table tr:last-child td { border-bottom: none; }
.table .pos {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
  width: 3rem;
}
.table .pos.top { color: var(--red); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .driver { color: var(--white); }

/* --------------------------------------------------------------------------
   Race control
   -------------------------------------------------------------------------- */
.rc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.tick-list { list-style: none; }
.tick-list li {
  padding: 0.8rem 0 0.8rem 2.2rem;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.tick-list li:last-child { border-bottom: none; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15rem;
  width: 14px; height: 14px;
  background: var(--red);
  transform: skewX(-12deg);
}
.rc-process {
  background: var(--raised);
  border: 1px solid var(--line);
  padding: 2rem;
}
.rc-process ol { list-style: none; display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.rc-process li { display: flex; gap: 1rem; align-items: baseline; }
.rc-step {
  font-family: var(--font-display);
  color: var(--red);
  font-style: italic;
  font-size: 1.3rem;
  min-width: 1.8rem;
}
.rc-process p { color: var(--muted); font-size: 1rem; }
.rc-process strong { color: var(--white); display: block; font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Join
   -------------------------------------------------------------------------- */
.join { text-align: center; position: relative; overflow: hidden; }
.join::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 60% at 50% 45%, rgba(227, 30, 36, 0.14), transparent 70%);
  pointer-events: none;
}
.join > * { position: relative; }
.join-logo { width: 150px; margin: 0 auto 1.25rem; }
.join h2 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.join .lead { margin-left: auto; margin-right: auto; }
.join-note { margin-top: 1.5rem; color: var(--muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg);
  border-top: 3px solid var(--red);
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}
.site-footer strong { color: var(--white); letter-spacing: 0.1em; font-weight: 400; }
.site-footer a { color: var(--muted); text-decoration: none; text-transform: uppercase; font-weight: 600; margin-left: 1.4rem; }
.site-footer a:hover { color: var(--red); }

/* --------------------------------------------------------------------------
   Empty / error / loading states
   -------------------------------------------------------------------------- */
.empty-state {
  border: 1px dashed var(--line-strong);
  border-top: 4px solid var(--red);
  background: var(--surface);
  padding: 2.5rem 2rem;
  text-align: center;
}
.empty-state h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.empty-state p { color: var(--muted); max-width: 52ch; margin: 0 auto; }
.empty-state .text-link { margin-top: 0.5rem; }

.text-link {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
  display: inline-block;
}
.text-link:hover { color: var(--white); border-color: var(--white); }

.skeleton { display: grid; gap: 0.8rem; }
.skeleton-bar {
  height: 18px;
  background: linear-gradient(90deg, var(--raised) 25%, var(--line) 50%, var(--raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton-bar.w-40 { width: 40%; }
.skeleton-bar.w-70 { width: 70%; }
.skeleton-bar.w-25 { width: 25%; height: 40px; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Reveal on scroll + hero load-in
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  .reveal.in { opacity: 1; transform: none; }

  .hero-copy > *, .hero-art {
    animation: rise 0.8s var(--ease-out) both;
  }
  .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
  .hero-art { animation-delay: 0.2s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
  }
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.dash { max-width: 1200px; margin: 0 auto; padding: 3.5rem 1.75rem 5rem; }

/* Connect view */
.connect { display: flex; justify-content: center; padding: 3rem 0 4rem; }
.connect-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  padding: 3rem 2.75rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
}
.connect-card .brand-mark { width: 110px; margin: 0 auto 1.25rem; }
.connect-card h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.connect-card > p { color: var(--muted); margin-bottom: 1.75rem; }
.link-flow { margin-top: 2rem; display: grid; gap: 1rem; justify-items: center; }
.link-code {
  font-size: clamp(2.6rem, 8vw, 4rem);
  letter-spacing: 0.22em;
  color: var(--red);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 0.9rem 1.5rem 0.7rem 1.9rem;
  width: 100%;
}
.link-instructions { color: var(--white); font-weight: 600; font-size: 1.1rem; }
.link-instructions code {
  font-family: var(--font-body);
  background: var(--raised);
  border: 1px solid var(--line-strong);
  padding: 0.1rem 0.5rem;
  color: var(--red);
  font-weight: 700;
}
.link-status { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; font-weight: 700; }
.link-status::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: dots 1.2s steps(4) infinite;
}
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.link-expiry { color: var(--muted); font-size: 0.9rem; }
.connect-card.linked .link-code { animation: linked-pop 0.5s var(--ease-out); }
@keyframes linked-pop {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* App view layout */
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }

/* Sidebar tabs */
.dash-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.dash-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}
.dash-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  color: var(--muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.dash-tab:hover { color: var(--white); border-color: var(--line-strong); }
.dash-tab.active {
  color: var(--white);
  background: var(--raised);
  border-left-color: var(--red);
}
.dash-tab .tab-count {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--red);
  border: 1px solid var(--line-strong);
  padding: 0 0.45rem;
  min-width: 1.6rem;
  text-align: center;
}
.dash-tab.active .tab-count { border-color: var(--red); }
.dash-pane { min-width: 0; }

/* Leaderboard page: tabs run horizontally under the page head */
.lb-tabs {
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.lb-tabs .dash-tab { white-space: nowrap; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.panel-title { font-family: var(--font-display); text-transform: uppercase; font-style: italic; font-size: 1.35rem; letter-spacing: 0.03em; }
.panel-note { color: var(--muted); font-size: 0.9rem; }

/* Driver header */
.driver-panel { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.avatar {
  width: 84px; height: 84px;
  flex-shrink: 0;
  background: var(--raised);
  border: 2px solid var(--red);
  object-fit: cover;
}
.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--red);
}
.driver-id h2 { font-size: 1.9rem; padding-bottom: 0; }
.driver-tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tag {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  padding: 0.2rem 0.7rem;
}
.tag-red { color: var(--red); border-color: var(--red); }
.driver-stats { margin-left: auto; display: flex; gap: 2.25rem; }
.stat { text-align: center; }
.stat-value { font-size: 2rem; font-style: italic; color: var(--white); display: block; line-height: 1.1; }
.stat-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 1.25rem; align-items: end; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--white);
}
.field input {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.65rem 0.9rem;
  width: 100%;
}
.field input::placeholder { color: #5d5d66; }
.field input:focus { outline: none; border-color: var(--red); }
.field .helper { color: var(--muted); font-size: 0.85rem; }
.form-msg { margin-top: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem; }
.form-msg.error { color: var(--red); }
.form-msg.ok { color: var(--white); }
.panel.attention { animation: attention-pulse 1.6s var(--ease-out) 2; }
@keyframes attention-pulse {
  0%, 100% { border-color: var(--line); }
  50% { border-color: var(--red); }
}

/* Event rows */
.event-list { display: grid; }
.event-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.event-row:last-child { border-bottom: none; }
.event-row h3 { margin-bottom: 0.3rem; }
.event-row .event-desc { margin-top: 0.4rem; }
.event-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.7rem; }
.entry-note { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* Results rows */
.result-list { display: grid; }
.result-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.result-row:last-child { border-bottom: none; }
.result-pos { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--muted); }
.result-pos.top { color: var(--red); }
.result-row h3 { font-size: 1.05rem; }
.result-row .result-meta { color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.result-pts { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Toasts */
#toasts {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: grid;
  gap: 0.6rem;
  z-index: 70;
  max-width: min(380px, calc(100vw - 3rem));
}
.toast {
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--red);
  color: var(--white);
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  animation: toast-in 0.3s var(--ease-out);
}
.toast.out { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; gap: 2.5rem; }
  .hero-art { justify-content: flex-start; }
  .hero-art img { width: min(300px, 70vw); }
  .champ-split, .rc-split { grid-template-columns: 1fr; }
  .league-grid { grid-template-columns: 1fr; }
  .league-main { min-height: 240px; }
  .event-panel { grid-template-columns: 1fr; gap: 1.5rem; }
  .event-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .form-grid { grid-template-columns: 1fr; }
  .driver-stats { margin-left: 0; width: 100%; justify-content: flex-start; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
  .dash-tab { white-space: nowrap; border-left: 1px solid var(--line); border-bottom: 4px solid transparent; }
  .dash-tab.active { border-bottom-color: var(--red); border-left-color: var(--line); }
}

@media (max-width: 760px) {
  .site-nav a:not(.nav-cta):not(.nav-dash) { display: none; }
  .site-nav { gap: 1rem; }
  .section { padding: 3.75rem 1.25rem; }
  .dash { padding: 2.5rem 1.25rem 4rem; }
  .panel { padding: 1.4rem 1.25rem; }
  .event-row { grid-template-columns: 1fr; }
  .event-row-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .flow li { gap: 1.1rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-actions .btn > span { width: 100%; }
  .connect-card { padding: 2.25rem 1.5rem; }
}
