:root {
  color-scheme: dark;
  --bg: #09090a;
  --bg-soft: #0f1012;
  --panel: #151619;
  --panel-2: #1b1c20;
  --panel-3: #232429;
  --line: rgba(255, 255, 255, 0.09);
  --line-gold: rgba(255, 199, 0, 0.34);
  --text: #f6f6f7;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --gold: #ffc700;
  --gold-bright: #ffda45;
  --gold-dark: #8a6900;
  --green: #34d879;
  --red: #ef4444;
  --discord: #5865f2;
  --content: 1280px;
  --radius: 5px;
  --header-height: 78px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.contact-discovery { display:flex; flex-wrap:wrap; gap:24px; padding-top:16px; padding-bottom:24px; font-size:13px; color:#ffc700; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 0%, rgba(255, 199, 0, 0.055), transparent 26rem),
    var(--bg);
  font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
.button,
.main-nav,
.brand-name {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

::selection {
  color: #171100;
  background: var(--gold);
}

.container {
  width: min(calc(100% - 48px), var(--content));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #111;
  background: var(--gold);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  background: rgba(11, 11, 12, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  opacity: 0.65;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.header-inner {
  width: min(calc(100% - 40px), var(--content));
  height: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 42px;
  margin-right: 9px;
  object-fit: cover;
  object-position: 50% 50%;
  mix-blend-mode: screen;
}

.brand-name {
  color: var(--gold);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.brand-name b {
  color: var(--text);
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;
}

.main-nav a {
  position: relative;
  padding: 10px 9px;
  color: #c2c2c7;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 5px;
  left: 9px;
  height: 2px;
  background: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.online-chip,
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.online-chip {
  padding: 7px 9px;
  background: rgba(52, 216, 121, 0.06);
  border: 1px solid rgba(52, 216, 121, 0.18);
  border-radius: 4px;
}

.online-chip i,
.live-badge i,
.footer-status i {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.header-discord,
.account-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.header-discord {
  padding: 0 14px;
  color: #171100;
  background: var(--gold);
}

.header-discord:hover,
.header-discord:focus-visible {
  background: var(--gold-bright);
}

.account-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.account-button {
  max-width: 118px;
  min-width: 36px;
  padding: 0 10px;
  overflow: hidden;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--line);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-button:hover,
.account-button:focus-visible {
  color: var(--gold);
  border-color: var(--line-gold);
}

.account-button.logout {
  max-width: none;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-lines::before { top: -6px; }
.menu-toggle-lines::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after { transform: translateY(-6px) rotate(-45deg); }

.hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 72px) 0 104px;
  overflow: hidden;
  background: #08090a;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("hero-maca-racing-large.jpg");
  background-size: cover;
  background-position: center 52%;
  transform: scale(1.015);
  filter: saturate(0.9) contrast(1.07);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.97) 0%, rgba(5, 5, 6, 0.82) 36%, rgba(5, 5, 6, 0.3) 70%, rgba(5, 5, 6, 0.38) 100%),
    linear-gradient(180deg, rgba(8, 8, 9, 0.28) 0%, transparent 35%, rgba(8, 8, 9, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.stat-label,
.status-pill,
.race-tag,
.news-tag,
.calendar-state {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(52, 216, 121, 0.9);
}

.hero h1 {
  color: var(--gold);
  margin-bottom: 12px;
  font-size: clamp(58px, 8vw, 104px);
  line-height: 0.86;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  text-shadow: 0 5px 36px rgba(0, 0, 0, 0.55);
}

.hero h1 span {
  color: var(--text);
}

.hero-lead {
  max-width: 690px;
  margin-bottom: 12px;
  color: #f0f0f2;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(18px, 2.1vw, 27px);
  font-weight: 600;
  line-height: 1.35;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 28px;
  color: #b9b9bf;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: #151000;
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(255, 199, 0, 0.12);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--gold-bright);
}

.button.secondary {
  color: var(--text);
  background: rgba(30, 31, 35, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  color: var(--gold);
  background: var(--panel-3);
  border-color: var(--line-gold);
}

.button.full {
  width: 100%;
}

.stats-strip {
  position: relative;
  z-index: 3;
  margin-top: -72px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(18, 19, 21, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.stat-card {
  position: relative;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 21px 26px;
  border-right: 1px solid var(--line);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 2px;
  opacity: 0;
  background: var(--gold);
}

.stat-card:hover::before,
.stat-card.accent-stat::before {
  opacity: 1;
}

.stat-label {
  margin-bottom: 3px;
  color: var(--subtle);
  font-size: 9px;
}

.stat-value {
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.accent-stat .stat-value {
  color: var(--green);
}

.stat-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.section {
  padding: 78px 0;
}

.section-dark {
  background: var(--bg);
}

.section-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent),
    var(--panel);
  border-block: 1px solid rgba(255, 255, 255, 0.045);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  position: relative;
  margin-bottom: 7px;
  padding-left: 13px;
  color: var(--gold);
  font-size: 9px;
}

.section-kicker::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: translateY(-50%);
}

.section-heading h2,
.community-intro h2 {
  margin-bottom: 0;
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.section-heading > div::after {
  content: "";
  width: min(520px, 100%);
  height: 3px;
  display: block;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--gold), rgba(255, 199, 0, 0.15), transparent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  color: var(--gold);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  color: var(--gold);
  background: rgba(255, 199, 0, 0.06);
  border: 1px solid rgba(255, 199, 0, 0.25);
  border-radius: 3px;
  font-size: 8px;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 6px;
  background: currentColor;
  border-radius: 50%;
}

.status-pill.closed {
  color: var(--red);
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.25);
}

.next-race-shell {
  min-height: 350px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.next-race-grid {
  min-height: 350px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.85fr);
}

.next-race-main {
  position: relative;
  overflow: hidden;
  padding: 38px;
  background:
    linear-gradient(90deg, rgba(18, 19, 21, 0.98) 0%, rgba(18, 19, 21, 0.94) 44%, rgba(18, 19, 21, 0.74) 100%),
    var(--race-image, none) center / cover no-repeat;
}

.next-race-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 2px solid var(--gold);
  opacity: 0.75;
}

.race-tag {
  display: inline-flex;
  margin-bottom: 17px;
  padding: 5px 8px;
  color: var(--green);
  background: rgba(52, 216, 121, 0.07);
  border: 1px solid rgba(52, 216, 121, 0.2);
  border-radius: 3px;
  font-size: 8px;
}

.next-race-main h3 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(31px, 4vw, 55px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.next-race-main .race-summary {
  max-width: 700px;
  margin-bottom: 28px;
  color: #bbbcc2;
  font-size: 14px;
}

.race-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: rgba(6, 6, 7, 0.58);
}

.race-specs li {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.race-specs li:last-child { border-right: 0; }

.race-specs span {
  display: block;
  margin-bottom: 4px;
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-specs strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-progress {
  max-width: 730px;
}

.registration-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.registration-progress-head strong {
  color: var(--gold);
}

.registration-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
}

.progress-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  background: #080809;
  border: 1px solid var(--line);
}

.progress-track span {
  height: 100%;
  display: block;
  width: var(--registration-progress, 0%);
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 0.5s ease;
}

.progress-track i {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: var(--minimum-marker, 47%);
  width: 2px;
  background: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
  transform: translateX(-1px);
}

.next-race-side {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 199, 0, 0.08), transparent 45%),
    #1a1a1d;
  border-left: 1px solid var(--line);
}

.side-label {
  margin-bottom: 15px;
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}

.countdown-cell {
  min-width: 0;
  padding: 13px 5px 10px;
  text-align: center;
  background: rgba(7, 7, 8, 0.63);
  border: 1px solid var(--line);
}

.countdown-cell strong {
  display: block;
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(18px, 2vw, 27px);
  letter-spacing: -0.06em;
}

.countdown-cell span {
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.registration-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  background: rgba(7, 7, 8, 0.55);
  border: 1px solid var(--line);
}

.registration-count span {
  color: var(--muted);
  font-size: 11px;
}

.registration-count strong {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
}

.registration-note {
  margin-bottom: 17px;
  color: var(--subtle);
  font-size: 10px;
}

.podium-grid {
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
  padding-top: 22px;
}

.podium-card {
  position: relative;
  min-height: 196px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 50%), var(--bg-soft);
  border: 1px solid var(--line);
}

.podium-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--podium-color, var(--subtle));
}

.podium-card.position-1 {
  min-height: 226px;
  border-color: rgba(255, 199, 0, 0.28);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  transform: translateY(-16px);
  --podium-color: var(--gold);
}

.podium-card.position-2 { --podium-color: #cbd0d7; }
.podium-card.position-3 { --podium-color: #c47a42; }

.podium-position {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--podium-color);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.podium-position b {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #101011;
  background: var(--podium-color);
  font-size: 16px;
}

.podium-card h3 {
  margin-bottom: 5px;
  font-size: clamp(20px, 2.5vw, 29px);
  line-height: 1.08;
}

.podium-card h3 a {
  text-decoration: none;
}

.podium-card h3 a:hover,
.podium-card h3 a:focus-visible {
  color: var(--gold);
}

.podium-team {
  color: var(--muted);
  font-size: 11px;
}

.podium-numbers {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  margin-top: 23px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.podium-numbers span,
.podium-numbers small {
  display: block;
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.podium-numbers strong {
  color: var(--podium-color);
  font-family: "JetBrains Mono", monospace;
  font-size: 25px;
}

.podium-numbers b {
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
}

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

.calendar-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.calendar-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 199, 0, 0.27);
}

.calendar-image {
  position: relative;
  height: 164px;
  overflow: hidden;
  background: #0d0d0f;
}

.calendar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.calendar-card:hover .calendar-image img {
  transform: scale(1.045);
}

.calendar-state {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 7px;
  color: var(--text);
  background: rgba(11, 11, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 7px;
  backdrop-filter: blur(8px);
}

.calendar-state.next {
  color: #171100;
  background: var(--gold);
  border-color: var(--gold);
}

.calendar-state.done {
  color: var(--green);
}

.calendar-state.cancelled {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.calendar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.calendar-meta {
  margin-bottom: 8px;
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.calendar-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.08;
  text-transform: uppercase;
}

.calendar-card p {
  display: -webkit-box;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.calendar-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.calendar-type {
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.calendar-card-footer a {
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.calendar-card-footer a:hover,
.calendar-card-footer a:focus-visible {
  text-decoration: underline;
}

.results-card {
  min-height: 280px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.results-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  background: #0d0e10;
  border-bottom: 1px solid var(--line);
}

.results-titlebar strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  text-transform: uppercase;
}

.results-titlebar span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

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

.results-table th {
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.018);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results-table td {
  color: #c9c9cd;
  font-size: 12px;
}

.results-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.results-table .position {
  width: 64px;
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.results-table .driver-name {
  color: var(--text);
  font-weight: 600;
}

.results-table a.driver-name {
  text-decoration: none;
}

.results-table a.driver-name:hover,
.results-table a.driver-name:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

.results-table .mono {
  font-family: "JetBrains Mono", monospace;
}

.results-table .points {
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.results-footnote {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 20px;
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

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

.news-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 199, 0, 0.28);
}

.news-image {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #0c0c0d;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.04);
}

.news-tag {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 5px 7px;
  color: #171100;
  background: var(--gold);
  font-size: 7px;
}

.news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.news-date {
  margin-bottom: 10px;
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.news-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.14;
}

.news-card h3 a {
  text-decoration: none;
}

.news-card h3 a:hover,
.news-card h3 a:focus-visible {
  color: var(--gold);
}

.news-card p {
  display: -webkit-box;
  margin-bottom: 20px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card .text-link {
  margin-top: auto;
}

.news-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.race-recording-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.race-recording-link:hover,
.race-recording-link:focus-visible {
  color: var(--gold);
  border-color: var(--line-gold);
}

.feed-page-info {
  margin: 0;
  color: var(--subtle);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
}

.feed-pagination {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.pagination-links {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.feed-pagination a,
.feed-pagination span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-decoration: none;
}

.feed-pagination a:hover,
.feed-pagination a:focus-visible {
  color: var(--gold);
  border-color: var(--line-gold);
}

.feed-pagination .active,
.feed-pagination [aria-current="page"] {
  color: #171100;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}

.section-community {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 50%, rgba(88, 101, 242, 0.08), transparent 32rem),
    radial-gradient(circle at 82% 50%, rgba(239, 68, 68, 0.06), transparent 30rem),
    var(--panel);
  border-top: 1px solid var(--line);
}

.community-intro {
  max-width: 720px;
  margin: 0 auto 35px;
  text-align: center;
}

.community-intro .section-kicker {
  display: inline-block;
}

.community-intro p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.community-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: rgba(13, 14, 16, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.2);
}

.discord-card { border-top: 2px solid var(--discord); }
.youtube-card { border-top: 2px solid var(--red); }

.community-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.community-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: var(--panel-3);
  border: 1px solid var(--line);
}

.youtube-live {
  color: var(--red);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.community-card h3 {
  margin-bottom: 11px;
  font-size: 23px;
  text-transform: uppercase;
}

.community-card > p {
  color: var(--muted);
  font-size: 12px;
}

.community-card ul {
  margin: 7px 0 25px;
  padding: 0;
  list-style: none;
  color: #c7c7cc;
  font-size: 11px;
}

.community-card li {
  position: relative;
  margin: 8px 0;
  padding-left: 19px;
}

.community-card li::before {
  content: "◆";
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--gold);
  font-size: 8px;
}

.community-card .button {
  margin-top: auto;
}

.site-footer {
  color: var(--muted);
  background: #0c0d0f;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 42px;
  padding-top: 52px;
  padding-bottom: 42px;
}

.footer-brand p {
  max-width: 330px;
  margin: 17px 0 0;
  font-size: 11px;
}

.footer-grid h3 {
  margin-bottom: 14px;
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-grid > div:not(.footer-brand) > a {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: var(--text);
}

.footer-status {
  padding: 17px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.footer-status p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
}

.footer-status strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
}

.footer-status b {
  max-width: 160px;
  overflow: hidden;
  color: var(--text);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-bottom {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom p:last-child span {
  color: var(--gold);
}

.back-to-top {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  color: #171100;
  background: var(--gold);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.loading-panel,
.empty-panel,
.error-panel {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--subtle);
  background:
    linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.025) 42%, transparent 59%) 0 0 / 250% 100%,
    var(--panel);
  border: 1px dashed var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-align: center;
  animation: loading-shimmer 2.2s linear infinite;
}

.empty-panel,
.error-panel {
  animation: none;
}

.error-panel {
  color: #f1a3a3;
  border-color: rgba(239, 68, 68, 0.25);
}

@keyframes loading-shimmer {
  to { background-position: -250% 0; }
}

.main-nav a.nav-support{background:var(--gold);color:#111;border:1px solid var(--gold);padding:10px 12px;margin-left:8px;white-space:nowrap}
.main-nav a.nav-support:hover,.main-nav a.nav-support:focus-visible{background:var(--gold-bright);color:#111;outline:2px solid var(--gold);outline-offset:3px}
@media (max-width: 1450px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .menu-toggle {
    display: inline-flex;
    order: 3;
    justify-self: end;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    min-height: calc(100vh - var(--header-height));
    display: none;
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
    justify-items: end;
    gap: 3px;
    padding: 25px 24px 50px;
    overflow-y: auto;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: blur(18px);
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a {
    width: max-content;
    max-width: 100%;
    padding: 15px 0;
    text-align: right;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a.active::after {
    inset: 12px -12px 12px auto;
    width: 3px;
    height: auto;
  }

  .header-actions {
    justify-self: end;
  }

  .menu-toggle {
    margin-left: -12px;
  }

  .online-chip span {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(2, 1fr);
  }

  .footer-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .stats-grid,
  .race-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card:nth-child(2) {
    border-right: 0;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .next-race-grid {
    grid-template-columns: 1fr;
  }

  .next-race-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .podium-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .podium-card.position-1 {
    order: -1;
    min-height: 196px;
    transform: none;
  }

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

  .news-card {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  }

  .news-image {
    height: 100%;
    min-height: 240px;
  }

  .community-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --header-height: 68px;
  }

  .container {
    width: min(calc(100% - 30px), var(--content));
  }

  .header-inner {
    width: calc(100% - 24px);
    grid-template-columns: auto 1fr auto;
    gap: 9px;
  }

  .brand-logo {
    width: 39px;
    height: 35px;
    margin-right: 7px;
  }

  .brand-name {
    font-size: 13px;
  }

  .header-actions {
    margin-left: auto;
  }

  .online-chip,
  .header-discord {
    display: none;
  }

  .account-button {
    max-width: 88px;
    min-height: 34px;
    padding-inline: 9px;
    font-size: 9px;
  }

  .account-button.logout {
    display: none;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
    margin-left: 0;
  }

  .hero {
    min-height: 610px;
    align-items: flex-end;
    padding: calc(var(--header-height) + 65px) 0 108px;
  }

  .hero-media {
    background-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 5, 6, 0.92), rgba(5, 5, 6, 0.46)),
      linear-gradient(180deg, rgba(5, 5, 6, 0.2), rgba(5, 5, 6, 0.92));
  }

  .hero h1 {
    font-size: clamp(49px, 17vw, 78px);
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-copy {
    font-size: 13px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .stats-strip {
    margin-top: -70px;
  }

  .stat-card {
    min-height: 109px;
    padding: 17px;
  }

  .section {
    padding: 58px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .section-heading h2,
  .community-intro h2 {
    font-size: 31px;
  }

  .next-race-main,
  .next-race-side,
  .community-card {
    padding: 22px;
  }

  .next-race-main h3 {
    font-size: 34px;
  }

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

  .race-specs li:nth-child(2) {
    border-right: 0;
  }

  .race-specs li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .countdown-grid {
    gap: 4px;
  }

  .countdown-cell {
    padding-inline: 2px;
  }

  .countdown-cell strong {
    font-size: 18px;
  }

  .race-grid {
    grid-template-columns: 1fr;
  }

  .calendar-image {
    height: 210px;
  }

  .news-card {
    display: flex;
  }

  .news-image {
    min-height: 0;
    height: 210px;
  }

  .results-titlebar,
  .results-footnote {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-pagination {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-status {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 20px;
  }
}

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