:root {
  --red: #e10600;
  --red-bright: #ff2a23;
  --red-dark: #850400;
  --black: #070707;
  --ink: #0d0d0e;
  --panel: #121214;
  --panel-2: #18181b;
  --white: #f5f5f2;
  --muted: #aaa9a6;
  --line: rgba(255, 255, 255, 0.11);
  --content: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 5%, rgba(225, 6, 0, 0.17), transparent 28rem),
    linear-gradient(180deg, #080808 0%, #0d0d0f 48%, #070707 100%);
  font-family: "Inter", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 9999;
  background: var(--white);
  color: var(--black);
  padding: .75rem 1rem;
  border-radius: 4px;
}

.skip-link:focus { top: 1rem; }

.site-header,
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner,
.nav-inner {
  width: min(calc(100% - 40px), var(--content));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font: 900 1rem/1 "Orbitron", sans-serif;
  letter-spacing: .12em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: white;
  transform: skew(-8deg);
  box-shadow: 6px 0 0 rgba(225, 6, 0, .25);
  font-size: .8rem;
}

.brand span { color: var(--red-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  border: 0;
  border-radius: 3px;
  padding: 10px 12px;
  color: #d3d3d0;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: white; background: rgba(225, 6, 0, .2); }

.nav-links .discord-link { margin-left: 8px; background: var(--red); color: white; }
.nav-links .discord-link:hover { background: var(--red-bright); }

.page-shell { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--red-bright);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.eyebrow::before { content: ""; display: inline-block; width: 30px; height: 2px; margin: 0 10px 3px 0; background: currentColor; }

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  align-content: center;
  padding: 72px 0 88px;
  overflow: hidden;
}

.hero::after {
  content: "01";
  position: absolute;
  right: -24px;
  top: 18px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.08);
  font: 900 clamp(11rem, 28vw, 25rem)/.8 "Orbitron", sans-serif;
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; max-width: 900px; }

.display-title,
.page-title,
.section-title {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.display-title { max-width: 900px; font-size: clamp(3.2rem, 9vw, 7.7rem); line-height: .88; }
.display-title span { color: var(--red-bright); }

.hero-intro {
  max-width: 690px;
  margin: 26px 0 0;
  color: #c3c2bf;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.72;
}

.challenge-section { padding: 0 0 92px; }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.section-kicker::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.challenge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.challenge-card {
  position: relative;
  isolation: isolate;
  min-height: 360px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  background: linear-gradient(145deg, #171719, #0d0d0e 72%);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.challenge-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 180px;
  right: -115px;
  bottom: 32px;
  border: 42px solid rgba(225, 6, 0, .16);
  border-radius: 50%;
  transform: skewX(-18deg) rotate(-10deg);
}

.challenge-card::after {
  content: attr(data-number);
  position: absolute;
  z-index: -1;
  right: 18px;
  top: 16px;
  color: rgba(255,255,255,.045);
  font: 900 7rem/1 "Orbitron", sans-serif;
}

.challenge-card:hover,
.challenge-card:focus-visible { transform: translateY(-7px); border-color: var(--red); box-shadow: 0 28px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(225,6,0,.35); }

.card-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.card-meta span { border: 1px solid rgba(255,255,255,.17); border-radius: 999px; padding: 7px 10px; color: #c8c7c4; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.challenge-card h2 { max-width: 490px; margin: 0; font: 900 clamp(2rem, 4vw, 3.5rem)/.98 "Orbitron", sans-serif; letter-spacing: -.045em; text-transform: uppercase; }
.challenge-card p { max-width: 440px; margin: 14px 0 0; color: var(--muted); line-height: 1.6; }
.card-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; color: white; font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.card-link::after { content: "\2192"; color: var(--red-bright); font-size: 1.35rem; transition: transform .2s ease; }
.challenge-card:hover .card-link::after { transform: translateX(6px); }

.home-lower { padding: 0 0 92px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.info-panel { padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: rgba(18,18,20,.8); }
.info-panel h2 { margin: 0 0 12px; font: 900 1.55rem/1.1 "Orbitron", sans-serif; text-transform: uppercase; }
.info-panel p { margin: 0; color: var(--muted); line-height: 1.7; }
.text-link { display: inline-block; margin-top: 20px; color: var(--red-bright); font-weight: 900; text-decoration: none; text-transform: uppercase; letter-spacing: .09em; font-size: .76rem; }

.page-hero { padding: 88px 0 48px; border-bottom: 1px solid var(--line); }
.page-title { max-width: 950px; font-size: clamp(3rem, 8vw, 6.4rem); line-height: .92; }
.page-lede { max-width: 720px; margin: 20px 0 0; color: var(--muted); font-size: 1.08rem; line-height: 1.72; }

.news-grid { padding: 44px 0 90px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.news-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.news-card.featured { grid-column: 1 / -1; }
.news-stripe { height: 7px; background: linear-gradient(90deg, var(--red) 0 62%, #380100 62%); }
.news-body { padding: 28px; }
.news-date { color: var(--red-bright); font-size: .72rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.news-card h2 { margin: 13px 0 12px; font: 900 clamp(1.5rem, 3vw, 2.5rem)/1.05 "Orbitron", sans-serif; text-transform: uppercase; }
.news-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.news-card .tag { display: inline-block; margin-top: 22px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: #d0cfcc; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.editor-note { margin-top: 18px; padding: 20px; border-left: 3px solid var(--red); background: rgba(225,6,0,.08); color: #cbc9c6; line-height: 1.65; }
.race-report .news-body { padding: clamp(26px, 4vw, 46px); }
.race-report .report-lede { max-width: 800px; color: #d0cfcc; font-size: 1.08rem; }
.report-details { margin-top: 24px; border-top: 1px solid var(--line); }
.report-details summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px 0 0; color: white; cursor: pointer; list-style: none; }
.report-details summary::-webkit-details-marker { display: none; }
.report-details summary span { padding: 11px 14px; background: var(--red); font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.report-details summary small { color: var(--muted); font-size: .75rem; }
.report-details summary::after { content: "+"; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--red-bright); font: 800 1.25rem/1 "Inter", sans-serif; }
.report-details[open] summary::after { content: "−"; }
.report-details[open] .report-expanded { animation: fadeUp .28s ease; }
.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 30px 0 0; }
.report-stats div { padding: 18px 14px; border: 1px solid var(--line); background: #0b0b0c; }
.report-stats strong { display: block; color: var(--red-bright); font: 900 clamp(1.35rem, 3vw, 2rem)/1 "Orbitron", sans-serif; }
.report-stats span { display: block; margin-top: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.report-section { margin-top: 38px; padding-top: 34px; border-top: 1px solid var(--line); }
.report-label { color: var(--red-bright) !important; font-size: .68rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.race-report .report-section h3 { margin: 9px 0 20px; font: 900 clamp(1.35rem, 2.6vw, 2rem)/1.1 "Orbitron", sans-serif; text-transform: uppercase; }
.award-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.award { min-height: 145px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: linear-gradient(145deg, #19191b, #0e0e0f); }
.award span { display: block; color: var(--muted); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.award strong { display: block; margin: 16px 0 7px; font: 900 1.1rem/1 "Orbitron", sans-serif; text-transform: uppercase; }
.award small { color: #aaa9a6; line-height: 1.5; }
.winner-list { border-top: 1px solid var(--line); }
.winner-list div { display: grid; grid-template-columns: 1.25fr .85fr auto; align-items: center; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.winner-list span { color: #c9c8c5; }
.winner-list strong { font-family: "Orbitron", sans-serif; font-size: .78rem; text-transform: uppercase; }
.winner-list time { color: var(--red-bright); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; }
.report-story p + p { margin-top: 16px; }
.report-story strong { color: white; }
.report-story blockquote { margin: 24px 0 0; padding: 18px 20px; border-left: 3px solid var(--red); background: rgba(225,6,0,.08); color: white; font: 800 1rem/1.6 "Inter", sans-serif; }
.report-finish { margin-top: 34px; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(225,6,0,.4); background: linear-gradient(110deg, rgba(225,6,0,.18), rgba(225,6,0,.04)); }
.report-finish strong, .report-finish span { display: block; }
.report-finish strong { margin-bottom: 5px; font: 900 .82rem/1 "Orbitron", sans-serif; text-transform: uppercase; }
.report-finish span { color: var(--muted); font-size: .82rem; }
.report-button { flex: 0 0 auto; padding: 12px 15px; background: var(--red); color: white; text-decoration: none; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.leaderboard-wrap { padding: 44px 0 90px; }
.leaderboard-page body::before { opacity: .1; }

.site-footer,
.footer { border-top: 1px solid var(--line); color: #858582; }
.footer-inner { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; padding: 28px 0; display: flex; justify-content: space-between; gap: 20px; font-size: .8rem; }

/* Existing Tatuus leaderboard overrides */
.leaderboard-page::before { background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 64px 64px; }
.leaderboard-page .splash { display: none !important; }
.leaderboard-page .section { width: min(calc(100% - 40px), var(--content)); max-width: none; padding: 58px 0 90px; }
.leaderboard-page .leaderboard-head { margin: 0 0 28px; }
.leaderboard-page .section-title { font-size: clamp(2.7rem, 7vw, 5.7rem); color: white; }
.leaderboard-page .quick-status div,
.leaderboard-page .results,
.leaderboard-page .stat { background: var(--panel); }
.leaderboard-page .results { border-radius: 8px; }
.leaderboard-page .tab-button { background: #101012; border-radius: 3px; }
.leaderboard-page .tab-button:hover,
.leaderboard-page .tab-button.active { background: var(--red); color: white; box-shadow: 0 0 22px rgba(225,6,0,.25); }
.leaderboard-page .event { border-left-color: var(--red); border-radius: 4px; }
.leaderboard-page .quick-status b,
.leaderboard-page .stat b { color: var(--red-bright); }
.leaderboard-page .series-back { display: none; }

.results-shell { padding: 44px 0 90px; }
.results { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.result-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.month-tabs { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab-button { appearance: none; border: 1px solid var(--line); border-radius: 3px; padding: 11px 16px; color: white; background: #0c0c0d; font: 800 .78rem/1 "Inter", sans-serif; letter-spacing: .04em; cursor: pointer; }
.tab-button:hover, .tab-button.active { border-color: var(--red); background: var(--red); }
.month-panel, .week-panel { display: none; }
.month-panel.active, .week-panel.active { display: block; }
.week-title { margin: 0 0 10px; font: 900 clamp(1.5rem, 3vw, 2.3rem)/1.1 "Orbitron", sans-serif; text-transform: uppercase; }
.week-sub, .empty-week { color: var(--muted); line-height: 1.65; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0; }
.stats-six { grid-template-columns: repeat(6, 1fr); }
.stat { padding: 15px; border: 1px solid var(--line); background: #0d0d0f; text-align: center; }
.stat b { display: block; margin-bottom: 5px; color: var(--red-bright); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.event { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-left: 3px solid var(--red); background: rgba(255,255,255,.025); }
.event h3 { margin: 0; padding: 16px 18px 5px; font: 800 1rem/1.25 "Orbitron", sans-serif; }
.event small { display: block; padding: 0 18px 13px; color: var(--muted); }
.result { padding: 9px 18px; border-top: 1px solid rgba(255,255,255,.055); color: #e3e3df; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 850px) {
  .header-inner, .nav-inner { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .site-header, .navbar { position: relative; }
  .nav-links { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .nav-links a { white-space: nowrap; }
  .hero { min-height: auto; padding: 70px 0; }
  .challenge-grid, .home-lower, .news-grid { grid-template-columns: 1fr; }
  .report-stats { grid-template-columns: repeat(2, 1fr); }
  .report-details summary { grid-template-columns: 1fr auto; }
  .report-details summary small { display: none; }
  .award-grid { grid-template-columns: 1fr; }
  .winner-list div { grid-template-columns: 1fr auto; gap: 7px 12px; }
  .winner-list span { grid-column: 1 / -1; }
  .report-finish { align-items: flex-start; flex-direction: column; }
  .report-actions { width: 100%; justify-content: flex-start; }
  .challenge-card { min-height: 330px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-page .leaderboard-head { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
  .header-inner, .nav-inner, .page-shell, .footer-inner, .leaderboard-page .section { width: min(calc(100% - 28px), var(--content)); }
  .display-title { font-size: clamp(2.8rem, 16vw, 4.4rem); }
  .challenge-card { min-height: 310px; padding: 24px; }
  .nav-links .discord-link { margin-left: 0; }
  .page-hero { padding-top: 60px; }
  .results { padding: 15px; }
  .quick-status { grid-template-columns: 1fr 1fr; min-width: 0; }
}

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