:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #181b20;
  --panel-2: #20242b;
  --text: #f4f5f7;
  --muted: #9ba3af;
  --line: #333946;
  --red: #e10600;
  --cyan: #3dd6d0;
  --gold: #f7c948;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(225, 6, 0, 0.24), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(61, 214, 208, 0.18), transparent 24rem),
    var(--bg);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 32px;
}

.hero {
  min-height: 210px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--line);
}

.eyebrow, .stamp, small, .panelHead span, footer {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 9vw, 108px);
  line-height: .9;
}

h2 {
  margin: 0;
  font-size: 18px;
}

.stamp { margin: 16px 0 0; }

.heroStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  width: min(560px, 100%);
}

.heroStats div, .metrics article, .panel {
  background: rgba(24, 27, 32, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.heroStats div {
  padding: 14px;
}

.heroStats span, .metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.heroStats strong {
  display: block;
  font-size: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metrics {
  margin: 18px 0 12px;
}

.metrics article {
  padding: 18px;
}

.metrics strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lower {
  margin-top: 12px;
}

.panel {
  overflow: hidden;
}

.panelHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 42px 1fr 72px;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(51, 57, 70, 0.65);
}

.row:last-child { border-bottom: 0; }

.pos {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.name {
  min-width: 0;
}

.name strong {
  display: block;
  overflow-wrap: anywhere;
}

.name span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.points {
  text-align: right;
  font-weight: 900;
}

.bar {
  grid-column: 2 / 4;
  height: 5px;
  background: #2b3039;
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.raceList {
  display: grid;
}

.race {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(51, 57, 70, 0.65);
}

.race:last-child { border-bottom: 0; }

.race time {
  color: var(--cyan);
  font-weight: 800;
}

.race strong, .race span {
  display: block;
}

.race span, .insights p {
  color: var(--muted);
}

.insights {
  padding: 16px 18px 6px;
}

.insights p {
  margin: 0 0 13px;
  line-height: 1.45;
}

.nextRace {
  margin: 8px 18px 18px;
  padding: 16px;
  border-left: 4px solid var(--red);
  background: var(--panel-2);
  border-radius: 6px;
}

.nextRace span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

footer {
  padding: 18px 0 0;
  font-size: 13px;
}

@media (max-width: 860px) {
  .hero {
    align-items: stretch;
    flex-direction: column;
  }

  .heroStats, .grid, .twoCol {
    grid-template-columns: 1fr;
  }
}
