:root {
  --standings-behind: #ff6b73;
  --standings-rank: #a9b4c0;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090c10;
  color: #f4f7fa;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 5%, rgb(43 107 70 / 18%), transparent 30rem),
    #090c10;
}

main {
  width: min(100% - 2rem, 90rem);
  margin: 0 auto;
  padding: 0 0 clamp(2.5rem, 8vw, 6rem);
}

.standings-content {
  width: 100%;
}

.standings-intro {
  display: grid;
  grid-template-columns: minmax(14rem, 0.65fr) minmax(30rem, 1.35fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
}

.standings-intro .page-intro {
  margin: 0;
}

.standings-primary {
  min-width: 0;
}

.app-header {
  display: flex;
  min-height: 3.75rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #202933;
}

.app-brand {
  overflow: hidden;
  color: #f4f7fa;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-brand:focus-visible {
  border-radius: 0.2rem;
  outline: 2px solid #66d18f;
  outline-offset: 0.25rem;
}

.primary-nav {
  display: flex;
  flex: 0 0 auto;
  align-self: stretch;
  gap: 0.85rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.15rem 0.25rem;
  border-bottom: 2px solid transparent;
  color: #8f9ba7;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 120ms ease, color 120ms ease;
}

.nav-link:hover {
  color: #dbe3ea;
}

.nav-link:focus-visible {
  outline: 2px solid #66d18f;
  outline-offset: 2px;
}

.nav-link--current {
  border-bottom-color: #66d18f;
  color: #f4f7fa;
}

.page-intro {
  max-width: 48rem;
  margin: clamp(1.15rem, 2.5vw, 1.75rem) 0 clamp(1.25rem, 3vw, 1.75rem);
}

.page-context {
  min-height: 1em;
  margin: 0 0 0.35rem;
  overflow: hidden;
  color: #66d18f;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page-description {
  margin: 0.5rem 0 0;
  color: #a9b4c0;
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #66d18f;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 2rem);
  letter-spacing: -0.025em;
}

.status {
  margin: 0 0 0.75rem;
  color: #a9b4c0;
  font-size: 0.85rem;
}

.status--warning {
  color: #f2c46d;
}

.status--error {
  color: #ff8d8d;
}

.standings {
  overflow: hidden;
  border: 1px solid #25303b;
  border-radius: 0.85rem;
  background: rgb(17 22 28 / 92%);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 24%);
}

.standings-header,
.standings-row {
  display: grid;
  grid-template-columns: minmax(2.75rem, 0.42fr) minmax(8rem, 2fr) minmax(5.5rem, 0.75fr);
  gap: 0.75rem;
  align-items: center;
}

.standings-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #25303b;
  color: #7f8b97;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.standings-row {
  min-height: 4.5rem;
  padding: 0.8rem 1rem;
}

.standings-row + .standings-row {
  border-top: 1px solid #202933;
}

.rank {
  color: var(--standings-rank);
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.participant {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.points {
  justify-self: end;
  color: #dbe3ea;
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.points--behind {
  color: var(--standings-behind);
}

.empty {
  padding: 2rem;
  border: 1px dashed #34404c;
  border-radius: 0.85rem;
  color: #a9b4c0;
  text-align: center;
}

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

.history-section {
  margin-top: clamp(2.5rem, 8vw, 4.5rem);
}

.standings-intro + .history-section {
  margin-top: clamp(3.5rem, 8vw, 6rem);
}

.section-heading {
  margin-bottom: 1rem;
}

.chart-shell {
  min-width: 0;
  min-height: 12rem;
  overflow: hidden;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  border: 1px solid #25303b;
  border-radius: 0.85rem;
  background: rgb(17 22 28 / 92%);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 18%);
}

.chart-status {
  margin: 0;
  color: #a9b4c0;
}

.chart-status--error {
  color: #ff8d8d;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0 0 0.4rem;
  padding: 0;
  list-style: none;
  color: #dbe3ea;
  font-size: 0.78rem;
}

.chart-legend li {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.chart-key {
  width: 1.6rem;
  border-top: 3px solid var(--series-color);
}

.points-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid line {
  stroke: #2b3642;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-grid text,
.chart-week,
.chart-axis-title {
  fill: #8f9ba7;
  font-family: inherit;
  font-size: 11px;
}

.chart-axis-title {
  font-weight: 700;
}

.chart-series {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.race-shell {
  min-width: 0;
  min-height: 15rem;
  overflow: hidden;
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid #25303b;
  border-radius: 0.85rem;
  background: rgb(17 22 28 / 92%);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 24%);
}

.race-message {
  margin: 0;
  color: #a9b4c0;
}

.race-message--error,
.race-stale {
  color: #ffad78;
}

.race-stale {
  margin: 0 0 1rem;
  font-size: 0.82rem;
}

.race-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.race-week,
.race-track {
  margin: 0;
  color: #a9b4c0;
}

.race-week {
  margin-bottom: 0.3rem;
  color: #66d18f;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.race-header h2 {
  overflow-wrap: anywhere;
}

.race-track {
  margin-top: 0.35rem;
  font-size: 0.86rem;
}

.race-badges {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.race-status,
.race-flag {
  flex: none;
  padding: 0.35rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-flag--green {
  color: #66d18f;
  background: rgb(102 209 143 / 12%);
}

.race-flag--yellow {
  color: #f2c46d;
  background: rgb(242 196 109 / 12%);
}

.race-flag--red {
  color: #ff6b73;
  background: rgb(255 107 115 / 12%);
}

.race-flag--white {
  color: #e7edf4;
  background: rgb(231 237 244 / 12%);
}

.race-flag--checkered {
  color: #e7edf4;
  background:
    linear-gradient(45deg, rgb(231 237 244 / 14%) 25%, transparent 25%) 0 0 / 0.5rem 0.5rem,
    linear-gradient(45deg, transparent 75%, rgb(231 237 244 / 14%) 75%) 0 0 / 0.5rem 0.5rem,
    #11161c;
}

.race-status--live {
  color: #ff6b73;
}

.race-status--upcoming {
  color: #f2c46d;
}

.race-status--final {
  color: #a9b4c0;
}

.race-status--finished {
  color: #f2c46d;
}

.race-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.race-facts div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #25303b;
  border-radius: 0.65rem;
  background: #0d1218;
}

.race-facts dt {
  color: #7f8b97;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-facts dd {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.race-progress-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  color: #7f8b97;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.rosters-section {
  margin-top: clamp(2.5rem, 7vw, 4rem);
}

.projected-history-section { margin-top: clamp(1.35rem, 4vw, 2.25rem); }
.projected-history-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.8rem; }
.projected-mode { display: inline-flex; max-width: 100%; padding: 0.2rem; border: 1px solid #334252; border-radius: 0.55rem; background: #0d1218; }
.projected-mode button { min-height: 2.15rem; padding: 0.3rem 0.65rem; border: 0; border-radius: 0.38rem; background: transparent; color: #aeb8c2; font: inherit; font-size: 0.73rem; font-weight: 750; }
.projected-mode button[aria-pressed="true"] { background: #26384a; color: #fff; box-shadow: inset 0 0 0 1px #60a5fa; }
.projected-history-shell { margin-top: 0.55rem; padding: 0.75rem; overflow: hidden; }
.projected-history-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 1rem; }
.projected-history-summary { flex: 1 1 20rem; margin: 0; color: #aeb8c2; font-size: 0.73rem; }
.projected-history-meta .chart-legend { flex: 0 1 auto; margin: 0; }
.projected-history-svg { display: block; width: 100%; height: auto; overflow: visible; }
.projected-detail-row { display: flex; align-items: center; gap: 0.65rem; margin-top: 0.25rem; }
.projected-lap-detail { display: flex; flex: 0 0 auto; gap: 0.4rem; align-items: center; color: #aeb8c2; font-size: 0.73rem; }
.projected-lap-detail select { min-height: 2rem; border: 1px solid #526273; border-radius: 0.4rem; background: #121922; color: #fff; }
[data-projected-detail] { flex: 1; margin: 0; padding: 0.45rem 0.55rem; border-radius: 0.4rem; background: #111923; color: #dbe3ea; font-size: 0.72rem; }
[data-projected-history][data-state="stale"] .projected-history-shell::before { content: "History may be stale"; display: block; margin-bottom: 0.5rem; color: #f2c46d; font-size: 0.75rem; font-weight: 750; }
[data-projected-history][data-state="upcoming"] .projected-mode { display: none; }
.projected-history-waiting { display: grid; gap: 0.3rem; min-height: 5rem; margin: 0; place-content: center; text-align: center; }
.projected-history-waiting strong { color: #f4f7fa; font-size: 0.9rem; }
.projected-history-waiting span { color: #aeb8c2; font-size: 0.75rem; }

.replay-controls {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px dashed #f2c46d;
  border-radius: 0.75rem;
  background: rgb(75 57 18 / 22%);
}

.replay-controls h2 {
  font-size: 1.1rem;
}

.replay-controls p {
  margin: 0;
  color: #dbe3ea;
  font-size: 0.78rem;
}

.replay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.replay-actions button,
.replay-actions select {
  min-height: 2.25rem;
  border: 1px solid #526273;
  border-radius: 0.4rem;
  background: #121922;
  color: #f4f7fa;
}

.lap-counter { margin-top: 0.7rem; }

.lap-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--pip-count), minmax(0, 1fr));
  align-items: center;
  gap: clamp(1px, 0.18vw, 3px);
  min-height: 2rem;
  padding-top: 0.8rem;
}

.lap-pip {
  position: relative;
  display: block;
  min-width: 0;
  height: 0.48rem;
  overflow: visible;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #39b86b var(--complete), #25313d var(--complete));
  transition: height 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.lap-pip.is-current {
  z-index: 3;
  height: 1rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #66d18f, 0 0 12px rgb(102 209 143 / 55%);
  transform: scaleX(1.35);
}

.lap-pip-caution {
  position: absolute;
  inset-block: 0;
  background: #f2c46d;
}

.lap-stage-marker {
  position: absolute;
  top: 0.45rem;
  z-index: 2;
  width: 2px;
  height: 1.15rem;
  background: #8ea0b2;
  transform: translateX(-1px);
}

.lap-stage-marker b {
  position: absolute;
  top: -0.45rem;
  right: 0.2rem;
  color: #aebbc7;
  font-size: 0.55rem;
  line-height: 1;
}

.lap-timeline--segmented-rail { gap: 1px; }
.lap-timeline--segmented-rail .lap-pip { height: 0.75rem; border-radius: 1px; }
.lap-timeline--segmented-rail .lap-pip.is-current { height: 1.35rem; transform: none; }

@media (max-width: 520px) {
  .lap-timeline { gap: 1px; }
  .lap-timeline--segmented-rail .lap-pip { min-width: 1px; }
  .lap-stage-marker b { display: none; }
}

.replay-actions label {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: #a9b4c0;
  font-size: 0.75rem;
}

.rosters-shell {
  min-width: 0;
}

.roster-message,
.roster-stale {
  margin: 0;
  color: #a9b4c0;
}

.roster-message--error,
.roster-stale {
  color: #ffad78;
}

.roster-stale {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.participant-projections {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid #25303b;
  border-radius: 0.85rem;
  background: rgb(17 22 28 / 94%);
}

.participant-projections-heading,
.projection-row-heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.participant-projections-heading h3,
.participant-projections-heading p,
.projection-row p {
  margin: 0;
}

.projection-rows {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.projection-row-heading {
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
}

.projection-row-heading strong {
  color: #dce5ec;
  font-variant-numeric: tabular-nums;
}

.projection-participant {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-track {
  width: 100%;
  height: 1.35rem;
  overflow: hidden;
  border-radius: 0.28rem;
  background: #202933;
}

.projection-fill {
  display: flex;
  width: var(--participant-width);
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.projection-segment {
  container-type: inline-size;
  display: flex;
  flex: var(--segment-points) 0 0;
  min-width: 0;
  align-items: center;
  justify-content: center;
  background: var(--segment-color);
  color: var(--segment-foreground);
}

.projection-segment + .projection-segment {
  box-shadow: inset 1px 0 rgb(8 12 16 / 55%);
}

.projection-segment--matchup {
  background: var(--segment-color);
}

.projection-label {
  display: block;
  max-width: calc(100% - 0.45rem);
  overflow: hidden;
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: clip;
  text-shadow: 0 1px 1px rgb(0 0 0 / 18%);
  white-space: nowrap;
}

.projection-label--compact {
  display: none;
}

@container (max-width: 6rem) {
  .projection-segment--driver .projection-label--full {
    display: none;
  }

  .projection-segment--driver .projection-label--compact {
    display: block;
  }
}

@container (max-width: 4rem) {
  .projection-segment--matchup .projection-label--full {
    display: none;
  }

  .projection-segment--matchup .projection-label--compact {
    display: block;
  }
}

@container (max-width: 1.75rem) {
  .projection-label--compact {
    display: none;
  }
}

.projection-row--incomplete {
  display: grid;
  grid-template-columns: minmax(0, 10rem) 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  background: rgb(255 173 120 / 8%);
  color: #ffad78;
  font-size: 0.72rem;
}

@media (max-width: 42rem) {
  .projection-label--full {
    display: none;
  }

  .projection-label--compact {
    display: block;
  }

  .projection-segment--matchup .projection-label--compact {
    max-width: calc(100% - 0.15rem);
    font-size: 0.5rem;
  }

}

.rosters-rail {
  display: grid;
  grid-auto-columns: minmax(20rem, 1fr);
  grid-auto-flow: column;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.8rem;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
}

.rosters-rail:focus-visible {
  outline: 2px solid #66d18f;
  outline-offset: 0.35rem;
}

.roster-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #25303b;
  border-radius: 0.85rem;
  background: rgb(17 22 28 / 94%);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 18%);
  scroll-snap-align: start;
}

.roster-card--unavailable {
  min-height: 12rem;
  padding: 1rem;
  color: #a9b4c0;
}

.roster-card h3,
.roster-card h4 {
  margin: 0;
}

.roster-card h4 {
  padding: 0.45rem 0.65rem;
  border-top: 1px solid #25303b;
  border-bottom: 1px solid #25303b;
  color: #8f9ba7;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.roster-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.65rem;
  background: #121922;
}

.roster-header h3 {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-total {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.roster-total > span {
  color: #a9b4c0;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.roster-total > strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

.roster-total-breakdown {
  display: flex;
  grid-column: 1 / -1;
  gap: 0.3rem;
  align-items: baseline;
  justify-content: flex-end;
  color: #7f8b97;
  font-size: 0.62rem;
}

.roster-summary {
  display: inline-flex;
  gap: 0.2rem;
  align-items: baseline;
}

.roster-summary--drivers {
  gap: 0.25rem;
}

.roster-summary-value--locked {
  color: #f4f7fa;
}

.roster-summary-value--projected {
  color: #8fc7d2;
  font-style: italic;
  text-decoration: underline dashed;
  text-underline-offset: 0.15rem;
}

.roster-summary--locked strong {
  color: #f4f7fa;
}

.roster-summary--projected strong {
  color: #8fc7d2;
  font-style: italic;
  text-decoration: underline dashed;
  text-underline-offset: 0.15rem;
}

.roster-summary--locked strong {
  color: #f4f7fa;
}

.roster-column-header,
.roster-score-grid {
  display: grid;
  grid-template-columns: minmax(7.25rem, 1fr) repeat(5, 2.25rem);
  gap: 0.25rem;
  align-items: center;
}

.roster-score-grid--no-stage {
  grid-template-columns: minmax(7.25rem, 1fr) repeat(4, 2.25rem);
}

.roster-column-header {
  padding: 0.35rem 0.65rem;
  border-bottom: 1px solid #25303b;
  color: #6f7d8a;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.roster-column-header span:not(:first-child) {
  text-align: right;
}

.roster-drivers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.roster-driver {
  min-height: 2.15rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
}

.roster-driver + .roster-driver {
  border-top: 1px solid #202933;
}

.driver-identity {
  display: flex;
  gap: 0.3rem;
  min-width: 0;
  align-items: baseline;
}

.driver-identity strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-car,
.driver-position {
  color: #8f9ba7;
  font-size: 0.66rem;
  font-weight: 750;
}

.driver-position,
.roster-point {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.roster-point {
  font-size: 0.7rem;
  font-weight: 650;
}

.roster-point--locked {
  color: #f4f7fa;
}

.roster-point--projected {
  color: #8fc7d2;
  font-style: italic;
  text-decoration: underline dashed;
  text-underline-offset: 0.15rem;
}

.roster-point--total {
  color: #dbe3ea;
  font-weight: 800;
}

.fastest-lap {
  display: inline-flex;
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  align-items: center;
  justify-content: center;
}

.fastest-lap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.fastest-lap--projected {
  color: #8fc7d2;
  filter: drop-shadow(0 0 0.12rem rgb(143 199 210 / 35%));
}

.fastest-lap--locked {
  color: #f4f7fa;
}

.roster-subtotal {
  min-height: 2.15rem;
  padding: 0.4rem 0.65rem;
  border-top: 1px solid #405063;
  background: #141b23;
  font-size: 0.64rem;
  text-transform: uppercase;
}

.roster-subtotal > strong {
  color: #a9b4c0;
  letter-spacing: 0.05em;
}

.garage-heading {
  color: #d7a94d !important;
}

.matchups-heading {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.8rem !important;
  align-items: center;
  color: #a9b4c0 !important;
}

.matchup-badge {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.36rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  vertical-align: 0.08rem;
}

.roster-summary .matchup-badge {
  width: 0.78rem;
  height: 0.78rem;
  font-size: 0.3rem;
}

.matchup-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.65rem;
  border-top: 1px solid #202933;
  font-size: 0.7rem;
}

.matchup-drivers { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matchup-vs, .matchup-positions { color: #8f9ba7; }
.matchup-row > :last-child {
  width: 3.5rem;
  justify-self: end;
  text-align: left;
}
.matchup-positions { display: inline-flex; gap: 0.2rem; align-items: baseline; justify-content: flex-start; font-variant-numeric: tabular-nums; font-weight: 750; }
.matchup-delta--ahead { color: #78d991; }
.matchup-delta--behind { color: #e59a9a; }
.matchup-row--winning { background: rgb(120 217 145 / 5%); }
.matchup-row--winning .matchup-drivers strong {
  color: #78d991;
  font-weight: 850;
}
.matchup-unavailable { margin: 0; padding: 0.65rem; color: #8f9ba7; font-size: 0.7rem; }

.roster-driver--garage {
  background: #0d1218;
}

.roster-driver--missing {
  min-height: 2.15rem;
  color: #8f9ba7;
}

.roster-card--concealed {
  overflow: hidden;
}

.roster-card--concealed .roster-concealed-detail {
  filter: blur(0.28rem);
  pointer-events: none;
  user-select: none;
}

.roster-card--concealed .driver-identity strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.roster-reveal-message {
  min-height: 2rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-top: 1px solid #25303b;
  border-bottom: 1px solid #25303b;
  color: #d7a94d;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-align: center;
}

@media (max-width: 56rem) {
  .standings-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 30rem) {
  main {
    width: min(100% - 1rem, 90rem);
  }

  .standings-header,
  .standings-row {
    grid-template-columns: 2.25rem minmax(6.5rem, 1fr) minmax(5rem, auto);
    gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .standings-header {
    font-size: 0.62rem;
  }

  .chart-shell {
    min-height: 10rem;
    padding: 0.65rem;
  }

  .chart-legend {
    gap: 0.45rem 0.75rem;
  }

  .projected-history-heading { align-items: stretch; }
  .projected-mode { width: 100%; }
  .projected-mode button { flex: 1; min-width: 0; }
  .projected-history-shell { padding: 0.55rem; }
  .projected-history-meta { align-items: flex-start; }
  .projected-history-meta .chart-legend { order: -1; }
  .projected-detail-row { align-items: stretch; flex-direction: column; gap: 0.35rem; }

  .app-header {
    min-height: 3.5rem;
    gap: 0.45rem;
  }

  .app-brand {
    font-size: 0.72rem;
  }

  .primary-nav {
    gap: 0.3rem;
  }

  .nav-link {
    min-height: 2.75rem;
    padding-inline: 0.2rem;
    font-size: 0.72rem;
  }

  .page-intro {
    margin-top: 1rem;
    margin-bottom: 1.15rem;
  }

  .standings-intro {
    margin-top: 1rem;
    gap: 1.15rem;
  }

  .race-shell {
    padding: 0.85rem;
  }

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

  .rosters-rail {
    display: flex;
    flex-direction: column;
    overflow-x: visible;
  }

  .roster-card {
    width: 100%;
  }
}
