@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* =====================================================
   RESET
===================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  background: #080808;

  color: #f5f5f5;

  font-family: "Inter", Arial, sans-serif;
}

/* =====================================================
   VARIABLES
===================================================== */

:root {
  --red: #e10600;

  --black: #080808;

  --surface: #111111;

  --surface-2: #151515;

  --border: #272727;

  --white: #f5f5f5;

  --muted: #858585;

  --dim: #4c4c4c;

  --mercedes: #00a19c;

  --ferrari: #e10600;

  --redbull: #3671c6;

  --mclaren: #ff8700;
}

/* =====================================================
   NAVBAR
===================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 76px;

  padding: 0 6%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  border-bottom: 1px solid var(--border);

  background: #080808;
}

.brand {
  display: flex;

  align-items: center;

  gap: 18px;
}

.f1-logo {
  color: var(--red);
  font-size: 29px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -3px;
  transform: none;
}

.logo-year {
  color: #ffffff;

  padding-left: 5px;
}

.brand-divider {
  width: 1px;

  height: 17px;

  background: #303030;
}

.brand-title {
  color: #8a8a8a;

  font-size: 9px;

  font-weight: 600;

  letter-spacing: 2px;
}

.season {
  color: #777;
  font-size: 9px;
  letter-spacing: 2px;
}

.season-selector-label {
  display: flex;
  align-items: center;
  position: relative;
  white-space: nowrap;
}

.season-selector-label::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 9px;
  border-right: 1px solid #8b8b8b;
  border-bottom: 1px solid #8b8b8b;
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}

.season-select {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #8b8b8b;
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px 2px;
}

.season-select:hover,
.season-select:focus-visible {
  color: #f5f5f5;
}

.season-select option {
  background: #111;
  color: #f5f5f5;
  letter-spacing: normal;
}

.mobile-season-selector-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #777;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  border-bottom: 1px solid #272727;
}

.mobile-season-selector-label .season-select {
  color: #f5f5f5;
  font-size: 10px;
}

/* =====================================================
   MAIN
===================================================== */

main {
  width: 88%;

  max-width: 1400px;

  margin: auto;
}

/* =====================================================
   RACE NAVIGATION
===================================================== */

.race-navigation {
  padding: 35px 0 28px;

  border-bottom: 1px solid var(--border);
}

.navigation-header {
  display: flex;

  align-items: end;

  justify-content: space-between;

  margin-bottom: 20px;
}

.navigation-header h2 {
  font-size: 25px;

  letter-spacing: -1px;
}

.navigation-controls {
  display: flex;

  gap: 6px;
}

.nav-button {
  width: 38px;

  height: 34px;

  border: 1px solid #303030;

  background: #111111;

  color: #888888;

  font-size: 15px;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-button:hover {
  border-color: #555555;

  background: #171717;

  color: #ffffff;
}

/* =====================================================
   RACE TRACK
===================================================== */

.race-track-wrapper {
  width: 100%;

  overflow: hidden;
}

.race-track {
  display: flex;

  gap: 7px;

  overflow-x: auto;

  overflow-y: hidden;

  scroll-behavior: smooth;

  scrollbar-width: none;

  cursor: none !important;

  padding-bottom: 2px;
}

.race-track::-webkit-scrollbar {
  display: none;
}

.race-track.dragging {
  cursor: none !important;

  scroll-behavior: auto;
}

/* =====================================================
   RACE BUTTON
===================================================== */

.race-button {
  flex: 0 0 auto;

  width: 116px;

  height: 54px;

  padding: 0 15px;

  position: relative;

  border: 1px solid #282828;

  background: #101010;

  color: #777777;

  text-align: left;

  font-family: inherit;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.race-button:hover {
  background: #171717;

  border-color: #444444;

  color: #ffffff;
}

.race-button.completed {
  background: #101010;
  border-color: #282828;
  color: #777777;
}

.race-button.completed .race-state {
  background: #3b3b3b;
}

.race-button.ongoing {
  background: #0d1913;
  border-color: #28583e;
  color: #8bcba5;
}

.race-button.ongoing .race-number {
  color: #55a878;
}

.race-button.ongoing .race-state {
  background: #35c979;
  box-shadow: 0 0 8px rgba(53, 201, 121, 0.45);
}

.race-button.ongoing.active {
  background: #16834a;
  border-color: #16834a;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(22, 131, 74, 0.4);
}

.race-button.ongoing.active .race-number {
  color: #ffffff;
}

.race-button.ongoing.active .race-state {
  background: #ffffff;
  box-shadow: none;
}

.race-button.ongoing.active:hover {
  background: #16834a;
  border-color: #16834a;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(22, 131, 74, 0.5);
}

.race-button.upcoming {
  background: #0d151e;
  border-color: #263746;
  color: #8197aa;
}

.race-button.upcoming .race-number {
  color: #61788b;
}

.race-button.upcoming .race-state {
  background: #5d8db5;
  box-shadow: 0 0 7px rgba(93, 141, 181, 0.35);
}

.race-button.completed:hover {
  background: #171717;
  border-color: #444444;
  color: #ffffff;
}

.race-button.upcoming:hover {
  background: #111d29;
  border-color: #355064;
  color: #ffffff;
}

.race-button.completed.active {
  background: #e10600;
  border-color: #e10600;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.4);
}

.race-button.upcoming.active {
  background: #1677ff;
  border-color: #1677ff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(22, 119, 255, 0.4);
}

.race-button.completed.active:hover {
  background: #e10600;
  border-color: #e10600;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(225, 6, 0, 0.5);
}

.race-button.upcoming.active:hover {
  background: #1677ff;
  border-color: #1677ff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(22, 119, 255, 0.5);
}

.race-button.live {
  border-color: #555555;
}

.race-button.live .race-state {
  background: var(--red);

  box-shadow: 0 0 8px rgba(225, 6, 0, 0.65);
}

.race-number {
  display: block;

  margin-bottom: 5px;

  color: #555555;

  font-size: 8px;

  letter-spacing: 1.5px;
}

.race-button.active .race-number {
  color: rgba(255, 255, 255, 0.75);
}

.race-name {
  display: block;

  white-space: nowrap;

  font-size: 10px;

  font-weight: 600;
}

.race-state {
  position: absolute;

  top: 7px;

  right: 7px;

  width: 5px;

  height: 5px;

  border-radius: 50%;

  background: #3b3b3b;
}

.race-button.active .race-state {
  background: #ffffff;
}

/* =====================================================
   EMPTY STATE
===================================================== */

.empty-state {
  min-height: 620px;

  position: relative;

  display: flex;

  align-items: center;
}

.empty-line {
  position: absolute;

  top: 0;

  left: 0;

  width: 1px;

  height: 100%;

  background: #151515;
}

.empty-content {
  margin-left: 40px;
}

.empty-state h1 {
  margin-bottom: 25px;

  font-size: clamp(55px, 7vw, 95px);

  line-height: 0.88;

  letter-spacing: -6px;
}

.empty-state p {
  max-width: 350px;

  color: #666666;

  font-size: 13px;

  line-height: 1.7;
}

.empty-state[hidden] {
  display: none;
}

/* =====================================================
   EYEBROW
===================================================== */

.eyebrow {
  display: block;

  margin-bottom: 10px;

  color: var(--red);

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 2.5px;
}

/* =====================================================
   RACE VIEW
===================================================== */

.race-view[hidden] {
  display: none;
}

/* =====================================================
   HERO
===================================================== */

.hero {
  min-height: 470px;

  display: grid;

  grid-template-columns: 0.82fr 1.18fr;

  border-bottom: 1px solid var(--border);
}

.hero-content {
  display: flex;

  flex-direction: column;

  justify-content: center;

  padding-right: 50px;
}

.hero h1 {
  max-width: 600px;

  margin-bottom: 20px;

  font-size: clamp(48px, 5vw, 76px);

  line-height: 0.91;

  letter-spacing: -5px;
}

.hero-content > p {
  color: #777777;

  font-size: 13px;
}

.race-meta {
  display: flex;

  gap: 42px;

  margin-top: 55px;
}

.race-meta div {
  display: flex;

  flex-direction: column;

  gap: 7px;
}

.race-meta span {
  color: #555555;

  font-size: 8px;

  letter-spacing: 2px;
}

.race-meta strong {
  color: #d4d4d4;

  font-size: 11px;
}

#raceStatus.upcoming-status {
  color: var(--red);
}

#raceStatus.ongoing-status {
  color: #35c979;
}

/* =====================================================
   TRACK IMAGE
===================================================== */

.track-image {
  min-height: 470px;

  position: relative;

  display: flex;

  align-items: center;

  justify-content: center;

  overflow: hidden;

  background: #080808;
}

.track-image img {
  width: 100%;

  height: 100%;

  display: block;

  object-fit: contain;

  object-position: center;

  opacity: 1;

  transition: opacity 0.25s ease;
}

/* No blur or edge gradient */

.track-image-label {
  position: absolute;

  left: 18px;

  bottom: 18px;

  padding: 7px 10px;

  background: rgba(8, 8, 8, 0.9);

  border-left: 2px solid var(--red);
}

.track-image-label span {
  color: #dddddd;

  font-size: 8px;

  font-weight: 800;

  letter-spacing: 3px;
}

/* =====================================================
   SECTIONS
===================================================== */

.section {
  padding: 75px 0;

  border-bottom: 1px solid var(--border);
}

.section-heading {
  margin-bottom: 30px;
}

.section h2 {
  font-size: 28px;

  letter-spacing: -1.5px;
}

/* =====================================================
   PODIUM
===================================================== */

.podium {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 8px;

  align-items: end;
}

.podium-card {
  min-height: 175px;

  position: relative;

  padding: 25px;

  background: var(--surface);

  border: 1px solid var(--border);

  overflow: hidden;
}

.podium-card.first {
  min-height: 205px;

  border: 1px solid var(--border);
}

.position {
  position: absolute;

  top: 7px;

  right: 18px;

  color: #292929;

  font-size: 50px;

  font-weight: 900;

  line-height: 1;
}

.driver-info {
  position: absolute;

  bottom: 24px;

  left: 25px;

  z-index: 4;
}

.driver-number {
  color: #555555;

  font-family: monospace;

  font-size: 9px;
}

.driver-info h3 {
  margin: 5px 0;

  color: #eeeeee;

  font-size: 16px;

  letter-spacing: -0.4px;
}

.driver-info p {
  color: #666666;

  font-size: 10px;
}

.team-color {
  position: absolute;

  bottom: 0;

  left: 0;

  width: 100%;

  height: 3px;

  background: #333333;

  z-index: 5;
}

.team-color.mercedes {
  background: var(--mercedes);
}

.team-color.ferrari {
  background: var(--ferrari);
}

.team-color.redbull {
  background: var(--redbull);
}

.team-color.mclaren {
  background: var(--mclaren);
}

/* =====================================================
   FULL PODIUM DRIVER IMAGES
===================================================== */

.driver-image {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  object-position: center top;

  z-index: 1;

  pointer-events: none;

  user-select: none;

  -webkit-user-drag: none;
}

.driver-image-fade {
  position: absolute;

  inset: 0;

  z-index: 2;

  pointer-events: none;

  background: linear-gradient(
    90deg,
    rgba(17, 17, 17, 0.95) 0%,
    rgba(17, 17, 17, 0.72) 25%,
    rgba(17, 17, 17, 0.2) 55%,
    transparent 80%
  );
}

.podium-card .position {
  z-index: 3;
}

.podium-card .driver-info {
  z-index: 4;
}

.podium-card .team-color {
  z-index: 5;
}

/* =====================================================
   FASTEST LAP FEATURE
===================================================== */

.fastest-lap-card {
  position: relative;

  min-height: 275px;

  display: grid;

  grid-template-columns: 1fr 0.85fr;

  overflow: hidden;

  background: #111111;

  border: 1px solid var(--border);
}

.fastest-lap-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;

  width: 4px;
  height: 100%;

  background: var(--red);

  z-index: 8;
}

.fastest-lap-main {
  position: relative;

  z-index: 5;

  padding: 38px 42px;

  display: flex;

  flex-direction: column;

  justify-content: center;

  background: linear-gradient(
    90deg,
    #111111 0%,
    rgba(17, 17, 17, 0.98) 55%,
    rgba(17, 17, 17, 0.78) 100%
  );
}

.fastest-lap-label {
  margin-bottom: 15px;

  color: #555555;

  font-size: 8px;

  font-weight: 800;

  letter-spacing: 2.5px;
}

.fastest-lap-time {
  color: #f5f5f5;

  font-family: monospace;

  font-size: clamp(44px, 5vw, 70px);

  font-weight: 700;

  line-height: 0.95;

  letter-spacing: -4px;
}

.fastest-lap-driver {
  margin-top: 22px;

  color: #eeeeee;

  font-size: 19px;

  font-weight: 700;

  letter-spacing: -0.5px;
}

.fastest-lap-team {
  margin-top: 5px;

  color: #666666;

  font-size: 11px;
}

.fastest-lap-visual {
  position: relative;

  min-width: 0;

  overflow: hidden;

  background: #0d0d0d;
}

.fastest-lap-driver-image {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position: center 15%;

  opacity: 0.95;

  z-index: 1;

  pointer-events: none;

  user-select: none;

  -webkit-user-drag: none;
}

.fastest-lap-image-fade {
  position: absolute;

  inset: 0;

  z-index: 2;

  pointer-events: none;

  background: linear-gradient(
    90deg,
    #111111 0%,
    rgba(17, 17, 17, 0.55) 18%,
    rgba(17, 17, 17, 0.08) 58%,
    rgba(17, 17, 17, 0.15) 100%
  );
}

.fastest-lap-stats {
  position: absolute;

  right: 28px;
  bottom: 25px;

  z-index: 4;

  display: flex;

  gap: 28px;

  padding: 13px 16px;

  background: rgba(8, 8, 8, 0.88);

  border: 1px solid rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(8px);
}

.fastest-lap-stats div {
  display: flex;

  flex-direction: column;

  gap: 5px;
}

.fastest-lap-stats span {
  color: #555555;

  font-size: 7px;

  font-weight: 800;

  letter-spacing: 1.7px;
}

.fastest-lap-stats strong {
  color: #eeeeee;

  font-family: monospace;

  font-size: 17px;
}

.fastest-lap-visual-placeholder {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  color: #333333;

  font-size: 60px;

  font-weight: 800;
}

.fastest-lap-card.empty .fastest-lap-time {
  color: #333333;
}

.fastest-lap-card.empty .fastest-lap-driver {
  color: #444444;
}

.fastest-lap-card.empty .fastest-lap-team {
  color: #444444;
}

/* =====================================================
   FASTEST LAP RESPONSIVE
===================================================== */

@media (max-width: 700px) {
  .replay-data-panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .replay-driver-list {
    max-height: 420px;
  }

  .fastest-lap-card {
    grid-template-columns: 1fr;

    min-height: 440px;
  }

  .fastest-lap-main {
    min-height: 255px;

    padding: 30px;
  }

  .fastest-lap-visual {
    min-height: 185px;
  }

  .fastest-lap-driver-image {
    object-position: center 30%;
  }

  .fastest-lap-stats {
    right: 20px;
    bottom: 18px;

    gap: 20px;
  }

  .fastest-lap-time {
    font-size: 44px;

    letter-spacing: -3px;
  }
}

/* =====================================================
   FUTURE RACE
===================================================== */

.upcoming-card {
  border-top-color: #242424 !important;
}

.upcoming-driver {
  color: #444444 !important;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  width: 88%;

  max-width: 1400px;

  height: 100px;

  margin: auto;

  display: flex;

  align-items: center;

  justify-content: space-between;
}

.footer-logo {
  color: var(--red);

  font-size: 24px;

  font-weight: 900;

  font-style: italic;
}

.footer-logo span {
  color: #ffffff;

  font-size: inherit;
}

footer p {
  color: #7d7d7d;

  font-size: 9px;

  letter-spacing: 1px;
}

footer > span {
  color: #7d7d7d;

  font-size: 9px;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (min-width: 1024px) {
  .hero {
    margin-top: 20px;
    padding-bottom: 20px;
  }
}

@media (max-width: 900px) {
  main {
    width: 90%;
  }

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

  .hero-content {
    min-height: 330px;

    padding: 60px 0 40px;
  }

  .track-image {
    min-height: 350px;
  }

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

  .podium-card,
  .podium-card.first {
    min-height: 160px;
  }

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

  .podium-card[data-position="1"] {
    order: 1;
  }

  .podium-card[data-position="2"] {
    order: 2;
  }

  .podium-card[data-position="3"] {
    order: 3;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 0 5%;
  }

  .season-selector-label {
    display: none;
  }

  .brand-divider,
  .brand-title {
    display: none;
  }

  main {
    width: 90%;
  }

  .race-navigation {
    padding-top: 25px;
  }

  .navigation-header {
    align-items: flex-start;

    gap: 15px;
  }

  .navigation-header h2 {
    font-size: 22px;
  }

  .race-button {
    width: 105px;
  }

  .empty-state {
    min-height: 500px;
  }

  .empty-state h1 {
    font-size: 58px;

    letter-spacing: -4px;
  }

  .hero h1 {
    font-size: 48px;

    letter-spacing: -4px;
  }

  .race-meta {
    gap: 25px;

    flex-wrap: wrap;

    margin-top: 40px;
  }

  .track-image {
    min-height: 270px;
  }

  .section {
    padding: 55px 0;
  }

  footer {
    padding-bottom: 30px;
    width: 90%;
  }
}

/* =====================================================
   RED SCROLLBAR
===================================================== */

html {
  scrollbar-width: thin;

  scrollbar-color: #e10600 #080808;
}

::-webkit-scrollbar {
  width: 6px;

  height: 6px;
}

::-webkit-scrollbar-track {
  background: #080808;
}

::-webkit-scrollbar-thumb {
  background: #e10600;

  border-radius: 0;

  box-shadow:
    0 0 4px rgba(225, 6, 0, 0.9),
    0 0 10px rgba(225, 6, 0, 0.55),
    0 0 20px rgba(225, 6, 0, 0.25);
}

::-webkit-scrollbar-thumb:hover {
  background: #ff1a14;

  box-shadow:
    0 0 5px rgba(225, 6, 0, 1),
    0 0 12px rgba(225, 6, 0, 0.8),
    0 0 25px rgba(225, 6, 0, 0.4);
}

::-webkit-scrollbar-button {
  display: none;
}

/* =====================================================
   LASER CURSOR
===================================================== */

html,
body,
button,
a,
input,
select,
textarea,
[role="button"] {
  cursor: none !important;
}

.laser-cursor {
  position: fixed;

  width: 7px;

  height: 7px;

  border-radius: 50%;

  background: #ff1a14;

  box-shadow:
    0 0 4px #e10600,
    0 0 10px #e10600,
    0 0 20px rgba(225, 6, 0, 0.8);

  pointer-events: none;

  z-index: 99999;

  transform: translate(-50%, -50%);

  transition:
    width 0.15s ease,
    height 0.15s ease,
    box-shadow 0.15s ease;
}

.laser-trail {
  position: fixed;

  width: 55px;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(225, 6, 0, 0.2),
    rgba(225, 6, 0, 0.8)
  );

  box-shadow: 0 0 5px rgba(225, 6, 0, 0.7);

  pointer-events: none;

  z-index: 99998;

  transform-origin: right center;
}

.laser-cursor::before,
.laser-cursor::after {
  content: "";

  position: absolute;

  background: rgba(225, 6, 0, 0.7);
}

.laser-cursor::before {
  width: 18px;

  height: 1px;

  left: -5px;

  top: 3px;
}

.laser-cursor::after {
  width: 1px;

  height: 18px;

  left: 3px;

  top: -5px;
}

/* =====================================================
   NEVER SHOW NATIVE CURSOR ON RACE SELECTOR
===================================================== */

.race-track,
.race-track *,
.race-button,
.race-button * {
  cursor: none !important;
}

/* =====================================================
   LASER HOVER
===================================================== */

body.cursor-hover .laser-cursor {
  width: 11px;

  height: 11px;

  box-shadow:
    0 0 5px #e10600,
    0 0 14px #e10600,
    0 0 30px rgba(225, 6, 0, 0.8);
}

/* =====================================================
   TOUCH DEVICES
   Completely remove fake cursor.
===================================================== */

@media (hover: none) and (pointer: coarse) {
  .laser-cursor,
  .laser-trail {
    display: none !important;
  }

  html,
  body,
  button,
  a,
  input,
  select,
  textarea,
  [role="button"],
  .race-track,
  .race-track *,
  .race-button,
  .race-button * {
    cursor: auto !important;
  }
}

/* =====================================================
   INITIAL ASSET LOADER
===================================================== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080808;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content {
  width: min(420px, 78vw);
}
.loader-logo #loaderLogoYear::before {
  content: var(--initial-loader-year, "26");
}

.loader-logo {
  margin-bottom: 2px;
  color: var(--red);
  font-size: 170px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -6px;
  transform: none;
}
.loader-label {
  margin-bottom: 12px;
  color: #777777;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2.5px;
}
.loader-progress {
  position: relative;
  top: 28px;
  width: 100%;
  height: 3px;
  background: #202020;
}
.loader-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  height: 100%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(225, 6, 0, 0.7);
  transition: width 0.18s ease;
}
.loader-car {
  --loader-car-width: clamp(129px, 13.5vw, 174px);
  position: absolute;
  z-index: 2;
  top: calc(50% - 15px);
  left: calc(var(--loader-car-width) * -0.161);
  width: var(--loader-car-width);
  height: 45px;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 5px rgba(225, 6, 0, 0.42));
  pointer-events: none;
  transition: left 0.18s linear;
  will-change: left;
}
.loader-car img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.loader-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 38px;
  color: #444444;
  font-family: monospace;
  font-size: 8px;
  letter-spacing: 1px;
}
#loaderPercentage {
  color: #888888;
}
@media (max-width: 600px) {
  .loader-progress {
    top: 30px;
  }
  .loader-content {
    width: 80vw;
  }
  .loader-logo {
    font-size: 115px;
  }
  .loader-car {
    --loader-car-width: 90px;
    left: 0px;
    height: 45px;
  }
}

.dashboard-panel {
  display: none;
}
.dashboard-panel.active {
  display: block;
}

/* =====================================================
   PHASE 2 DASHBOARD
===================================================== */

.navbar-dashboard {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
  margin: 0 34px;
}
.dashboard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  height: 76px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dashboard-nav::-webkit-scrollbar {
  display: none;
}
.dashboard-tab {
  position: relative;
  flex: 0 0 auto;
  height: 76px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #555;
  font-family: inherit;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: none;
  transition: color 0.2s ease;
}
.dashboard-tab:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.dashboard-tab:hover,
.dashboard-tab.active {
  color: #fff;
}
.dashboard-tab.active:after {
  transform: scaleX(1);
}

/* PHASE 2 / OPEN EDITORIAL LAYOUT */
.dashboard-panel:not(#dashboardRace) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 65px 0 100px;
  box-sizing: border-box;
}
.dashboard-panel:not(#dashboardRace) .dashboard-heading {
  width: min(1600px, 89%);
  margin: 0 auto 42px;
  padding-top: 20px;
  box-sizing: border-box;
}
.dashboard-panel:not(#dashboardRace) .dashboard-heading h1 {
  font-size: clamp(55px, 6vw, 90px);
  letter-spacing: -6px;
}
.dashboard-panel:not(#dashboardRace) .dashboard-heading p {
  max-width: none !important;
  white-space: nowrap;
  color: #858585;
}
#overviewContent,
#driversContent,
#teamsContent,
#championshipContent {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: block !important;
}
.rev-eyebrow {
  font-size: 9px;
  letter-spacing: 2.6px;
  color: #e10600;
  font-weight: 900;
}
.rev-cover {
  position: relative;
  min-height: 600px;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 78% 50%,
    #182523 0%,
    #101515 25%,
    #080808 68%
  );
}
.rev-cover-text {
  position: relative;
  z-index: 3;
  padding: 75px 0 40px;
  max-width: 65%;
}
.rev-cover h2,
.rev-teams-intro h2,
.rev-title-race h2 {
  font-size: clamp(68px, 8.5vw, 145px);
  letter-spacing: -0.095em;
  line-height: 0.84;
  margin: 24px 0;
}
.rev-cover h2 i,
.rev-teams-intro h2 i,
.rev-title-race h2 i {
  font-style: normal;
  color: #e10600;
}
.rev-cover-text > p,
.rev-teams-intro > p {
  color: #a0a0a0;
  font-size: 13px;
  margin: 30px 0;
}
.rev-cover-person {
  position: absolute;
  z-index: 2;
  right: -2%;
  bottom: 0;
  width: 60%;
  height: 106%;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(-35px 0 70px #000);
}
.rev-giant {
  position: absolute;
  right: 2%;
  top: 0;
  font-size: 380px;
  font-weight: 900;
  line-height: 1;
  color: #ffffff07;
  z-index: 0;
}
.rev-cover-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 15px;
  margin-top: 100px;
}
.rev-cover-bottom span {
  width: 100%;
  color: #aaa;
  font-size: 9px;
  letter-spacing: 2px;
}
.rev-cover-bottom strong {
  font-size: clamp(26px, 3vw, 48px);
  letter-spacing: -2px;
}
.rev-cover-bottom b {
  font-size: 30px;
  color: #e10600;
}
.rev-cover-bottom small {
  font-size: 10px;
}
.rev-races {
  display: flex;
  gap: 7%;
  margin: 110px 0 90px;
  align-items: stretch;
}
.rev-race {
  position: relative;
  flex: 1;
  min-height: 330px;
  overflow: hidden;
  padding: 0 0 40px;
}
.rev-race h3 {
  font-size: clamp(42px, 5vw, 80px);
  letter-spacing: -5px;
  line-height: 0.92;
  max-width: 570px;
  margin: 25px 0 15px;
  position: relative;
  z-index: 2;
}
.rev-race p {
  color: #888;
  font-size: 12px;
  position: relative;
  z-index: 2;
}
.rev-race img {
  position: absolute;
  width: 65%;
  height: 100%;
  right: -5%;
  top: 0;
  object-fit: contain;
  opacity: 0.5;
  z-index: 0;
}
.rev-race .rev-eyebrow {
  position: relative;
  z-index: 2;
}
.rev-next {
  padding-left: 25px;
}
.rev-arrow {
  font-size: 80px;
  color: #e10600;
  display: block;
  margin-top: 30px;
}
.rev-progress {
  display: flex;
  gap: 10%;
  padding: 32px 0;
  margin: 30px 0 110px;
  border-top: 1px solid #252525;
}
.rev-progress > div {
  min-width: 0;
}
.rev-progress span {
  display: block;
  color: #777;
  font-size: 9px;
  letter-spacing: 2px;
  margin-bottom: 15px;
}
.rev-progress strong {
  font-size: clamp(22px, 3vw, 43px);
  letter-spacing: -2px;
}
.rev-progress em {
  font-style: normal;
  color: #777;
  font-size: 18px;
}
.rev-league {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10%;
  margin: 100px 0;
}
.rev-league-title h3,
.rev-section-heading h3,
.rev-championship-list h3 {
  font-size: clamp(46px, 5vw, 78px);
  line-height: 0.9;
  letter-spacing: -5px;
  margin: 25px 0;
}
.rev-standing {
  display: grid;
  grid-template-columns: 45px 1.5fr 1fr 70px;
  gap: 12px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #242424;
}
.rev-pos {
  font: 12px monospace;
  color: #777;
}
.rev-standing strong {
  font-size: 14px;
}
.rev-standing .rev-team {
  color: #777;
  font-size: 11px;
}
.rev-standing b {
  text-align: right;
  font: 700 15px monospace;
}
.rev-driver-feature {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(ellipse at 72% 65%, #152622, #090909 70%);
}
.rev-driver-head {
  position: absolute;
  left: 0;
  bottom: 70px;
  z-index: 3;
  max-width: 60%;
}
.rev-driver-head h2 {
  font-size: clamp(68px, 9vw, 145px);
  letter-spacing: -0.09em;
  line-height: 0.8;
  margin: 25px 0;
}
.rev-driver-head p {
  color: #999;
  font-size: 14px;
}
.rev-driver-feature > img {
  position: absolute;
  right: 2%;
  bottom: 0;
  width: 60%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  z-index: 2;
}
.rev-watermark {
  position: absolute;
  right: 5%;
  top: -60px;
  font-size: 400px;
  font-weight: 900;
  color: #ffffff07;
}
.rev-section-heading {
  margin: 110px 0 35px;
}
.rev-section-heading p {
  color: #777;
  font-size: 12px;
}
.rev-driver-roster {
  display: flex;
  flex-direction: column;
}
.rev-roster-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 125px;
  border-bottom: 1px solid #222;
  overflow: hidden;
}
.rev-roster-item:hover {
  background: linear-gradient(90deg, #171717, transparent);
}
.rev-roster-item > img {
  width: 105px;
  height: 120px;
  object-fit: contain;
  object-position: bottom;
}
.rev-roster-item > div {
  flex: 1;
}
.rev-roster-item h4 {
  font-size: clamp(23px, 3vw, 44px);
  letter-spacing: -2px;
  margin-top: 8px;
}
.rev-roster-item > strong {
  font-size: clamp(23px, 3vw, 40px);
  letter-spacing: -2px;
}
.rev-roster-item small {
  font-size: 9px;
  color: #888;
  letter-spacing: 1px;
}
.rev-teams-intro {
  min-height: 460px;
  padding: 50px 0 90px;
  background: radial-gradient(ellipse at 90% 30%, #211111, transparent 45%);
}
.rev-teams-intro h2 {
  max-width: 1000px;
}
.rev-team-feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 25px;
  min-height: 290px;
  padding: 45px 0;
  border-bottom: 1px solid #242424;
  overflow: hidden;
}
.rev-team-feature .rev-pos {
  align-self: flex-start;
  margin-top: 12px;
}
.rev-team-title {
  flex: 1;
  position: relative;
  z-index: 2;
}
.rev-team-title h3 {
  font-size: clamp(38px, 5vw, 78px);
  line-height: 1;
  letter-spacing: -5px;
  margin: 18px 0;
}
.rev-team-pair {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}
.rev-team-pair span {
  color: #999;
  font-size: 11px;
}
.rev-team-pair b {
  color: white;
  margin-left: 8px;
}
.rev-team-visual {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 35%;
  height: 245px;
  position: relative;
  z-index: 1;
}
.rev-team-visual img {
  width: 55%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  margin-left: -15%;
  filter: drop-shadow(0 0 20px #000);
}
.rev-team-score {
  font-size: clamp(35px, 5vw, 70px);
  letter-spacing: -4px;
  min-width: 150px;
  text-align: right;
  z-index: 3;
}
.rev-team-score small {
  display: block;
  font-size: 10px;
  color: #777;
  letter-spacing: 2px;
}
.rev-team-feature.mercedes .rev-team-title h3 {
  color: #8be2d9;
}
.rev-team-feature.ferrari .rev-team-title h3 {
  color: #f05555;
}
.rev-team-feature.mclaren .rev-team-title h3 {
  color: #ff9b38;
}
.rev-team-feature.redbull .rev-team-title h3 {
  color: #6193ec;
}
.rev-title-race {
  position: relative;
  min-height: 670px;
  overflow: hidden;
  background: radial-gradient(ellipse at 75% 50%, #1b2522, #080808 70%);
  padding: 60px 0;
}
.rev-title-race h2 {
  position: relative;
  z-index: 2;
}
.rev-title-race > img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  z-index: 1;
}
.rev-title-leader {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 50px;
}
.rev-title-leader span {
  color: #e10600;
  font-size: 9px;
  letter-spacing: 2px;
}
.rev-title-leader strong {
  font-size: 30px;
}
.rev-title-leader b {
  font-size: 25px;
}
.rev-championship-list {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10%;
  margin: 120px 0 0;
}
.rev-championship-list > div {
  min-width: 0;
}
.rev-championship-list .rev-standing {
  grid-template-columns: 35px 1.4fr 0.8fr 50px;
}
.rev-championship-list > div:nth-child(2) .rev-standing {
  grid-template-columns: 35px 1fr 0 55px;
}
@media (max-width: 900px) {
  .rev-cover-text {
    max-width: 90%;
  }
  .rev-cover-person {
    opacity: 0.35;
    width: 85%;
  }
  .rev-races,
  .rev-league,
  .rev-championship-list {
    display: block;
  }
  .rev-race {
    margin-bottom: 35px;
  }
  .rev-league .rev-standings {
    margin-top: 35px;
  }
  .rev-driver-feature > img {
    opacity: 0.45;
    width: 85%;
  }
  .rev-driver-head {
    max-width: 95%;
  }
  .rev-team-visual {
    display: none;
  }
  .rev-team-feature {
    min-height: 220px;
  }
  .rev-championship-list > div {
    margin-bottom: 70px;
  }
  .rev-title-race > img {
    opacity: 0.3;
    width: 85%;
  }
}
@media (max-width: 600px) {
  .dashboard-panel:not(#dashboardRace) {
    padding: 35px 0 65px;
  }
  .rev-cover {
    min-height: 530px;
  }
  .rev-cover h2,
  .rev-title-race h2,
  .rev-teams-intro h2 {
    font-size: 64px;
  }
  .rev-cover-bottom {
    margin-top: 65px;
  }
  .rev-progress {
    gap: 20px;
    flex-wrap: wrap;
  }
  .rev-standing {
    grid-template-columns: 25px 1fr 65px;
  }
  .rev-standing .rev-team {
    display: none;
  }
  .rev-roster-item {
    gap: 10px;
    min-height: 100px;
  }
  .rev-roster-item > img {
    width: 65px;
    height: 90px;
  }
  .rev-roster-item h4 {
    font-size: 24px;
  }
  .rev-team-feature {
    gap: 10px;
  }
  .rev-team-title h3 {
    font-size: 38px;
    letter-spacing: -2px;
  }
  .rev-team-score {
    font-size: 34px;
    min-width: 75px;
  }
  .rev-team-pair {
    gap: 8px;
  }
  .rev-title-race {
    min-height: 550px;
  }
  .rev-championship-list .rev-standing {
    grid-template-columns: 25px 1fr 0 45px;
  }
}

/* =====================================================
   OVERVIEW ENHANCEMENT
===================================================== */
#dashboardOverview .dashboard-heading {
  margin-bottom: 42px;
}
#dashboardOverview .dashboard-heading h1 {
  max-width: 900px;
}
#dashboardOverview .overview-hero-new {
  position: relative;
  min-height: 555px;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 72% 58%,
    #172622 0%,
    #0d1110 30%,
    #080808 72%
  );
  isolation: isolate;
}
#dashboardOverview .overview-hero-copy {
  position: relative;
  z-index: 3;
  width: 68%;
  padding: 58px 0 48px;
}
#dashboardOverview .overview-eyebrow {
  display: block;
  color: #e10600;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.8px;
}
#dashboardOverview .overview-hero-copy h2 {
  font-size: clamp(70px, 8.4vw, 142px);
  line-height: 0.82;
  letter-spacing: -0.09em;
  margin: 23px 0 22px;
}
#dashboardOverview .overview-hero-copy h2 i,
#dashboardOverview .overview-section-intro h3 i {
  font-style: normal;
  color: #e10600;
}
#dashboardOverview .overview-hero-description {
  max-width: 360px;
  color: #858585;
  font-size: 13px;
  line-height: 1.7;
}
#dashboardOverview .overview-leader-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  margin-top: 76px;
  max-width: 760px;
  padding-top: 19px;
  border-top: 1px solid #292929;
}
#dashboardOverview .overview-leader-line span {
  grid-column: 1/-1;
  color: #777;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2.2px;
}
#dashboardOverview .overview-leader-line strong {
  font-size: clamp(28px, 3vw, 47px);
  letter-spacing: -2.5px;
}
#dashboardOverview .overview-leader-line b {
  font-size: clamp(30px, 3.4vw, 52px);
  letter-spacing: -3px;
  color: #f5f5f5;
}
#dashboardOverview .overview-leader-line small {
  font-size: 9px;
  color: #777;
  letter-spacing: 1px;
}
#dashboardOverview .overview-hero-number {
  position: absolute;
  right: -2%;
  top: -4px;
  z-index: 0;
  font-size: clamp(300px, 31vw, 510px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.1em;
  color: #ffffff05;
  white-space: nowrap;
  pointer-events: none;
}
#dashboardOverview .overview-hero-team {
  position: absolute;
  right: 4%;
  bottom: 23px;
  z-index: 4;
  color: #aaa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.5px;
}
#dashboardOverview .overview-metrics {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr 1fr;
  margin: 0 0 105px;
  border-top: 1px solid #292929;
  border-bottom: 1px solid #292929;
}
#dashboardOverview .overview-metrics > div {
  padding: 24px 25px 27px 0;
  margin-right: 30px;
}
#dashboardOverview .overview-metrics > div + div {
  padding-left: 30px;
  border-left: 1px solid #292929;
}
#dashboardOverview .overview-metrics span {
  display: block;
  color: #666;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 13px;
}
#dashboardOverview .overview-metrics strong {
  font-size: clamp(25px, 2.8vw, 43px);
  letter-spacing: -2px;
}
#dashboardOverview .overview-metrics em {
  font-style: normal;
  color: #666;
  font-size: 15px;
  letter-spacing: 0;
}
#dashboardOverview .overview-race-pulse {
  display: grid;
  grid-template-columns: 0.72fr 1.45fr 0.95fr;
  gap: 42px;
  align-items: stretch;
  margin-bottom: 112px;
}
#dashboardOverview .overview-section-intro {
  padding-top: 8px;
}
#dashboardOverview .overview-section-intro h3 {
  font-size: clamp(48px, 5vw, 84px);
  line-height: 0.87;
  letter-spacing: -0.07em;
  margin: 22px 0;
}
#dashboardOverview .overview-section-intro p {
  max-width: 250px;
  color: #777;
  font-size: 12px;
  line-height: 1.7;
}
#dashboardOverview .overview-race-story {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}
#dashboardOverview .overview-race-story:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #e10600;
}
#dashboardOverview .overview-race-story img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.42;
  filter: brightness(0.75);
  transition:
    transform 0.6s ease,
    opacity 0.6s ease;
}
#dashboardOverview .overview-race-last:hover img {
  transform: scale(1.04);
  opacity: 0.58;
}
#dashboardOverview .overview-race-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 20%,
    rgba(8, 8, 8, 0.12) 45%,
    #080808 100%
  );
}
#dashboardOverview .overview-race-copy {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 24px;
}
#dashboardOverview .overview-race-copy > span {
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
}
#dashboardOverview .overview-race-copy h4 {
  font-size: clamp(32px, 3.6vw, 58px);
  line-height: 0.9;
  letter-spacing: -3px;
  margin: 14px 0 10px;
}
#dashboardOverview .overview-race-copy p {
  color: #888;
  font-size: 10px;
  letter-spacing: 0.5px;
}
#dashboardOverview .overview-next {
  background: linear-gradient(135deg, #111 0%, #0b0b0b 65%);
}
#dashboardOverview .overview-next-number {
  position: absolute;
  right: -12px;
  top: -35px;
  font-size: 240px;
  font-weight: 900;
  line-height: 1;
  color: #ffffff05;
}
#dashboardOverview .overview-next .overview-race-copy {
  bottom: 26px;
  left: 28px;
  right: 28px;
}
#dashboardOverview .overview-next-arrow {
  position: absolute;
  right: 24px;
  bottom: 20px;
  color: #e10600;
  font-size: 46px;
  line-height: 1;
}
#dashboardOverview .overview-championship {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr;
  gap: 55px;
  margin-bottom: 100px;
}
#dashboardOverview .overview-column-label {
  display: block;
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.5px;
  margin-bottom: 18px;
}
#dashboardOverview .overview-standings {
  display: flex;
  flex-direction: column;
}
#dashboardOverview .overview-standing {
  display: grid;
  grid-template-columns: 35px 1fr 60px;
  gap: 15px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid #252525;
}
#dashboardOverview .overview-standing > span {
  font: 10px monospace;
  color: #555;
}
#dashboardOverview .overview-standing div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
#dashboardOverview .overview-standing strong {
  font-size: 12px;
  line-height: 1.1;
}
#dashboardOverview .overview-standing small {
  color: #666;
  font-size: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}
#dashboardOverview .overview-standing b {
  text-align: right;
  font: 700 14px monospace;
  color: #eee;
}
#dashboardOverview .overview-teams .overview-standing {
  grid-template-columns: 35px 1fr 60px;
}

@media (max-width: 1000px) {
  #dashboardOverview .overview-hero-copy {
    width: 75%;
  }
  #dashboardOverview .overview-race-pulse {
    grid-template-columns: 1fr 1.3fr 1fr;
    gap: 25px;
  }
  #dashboardOverview .overview-championship {
    grid-template-columns: 1fr 1fr;
  }
  #dashboardOverview .overview-championship .overview-section-intro {
    grid-column: 1/-1;
  }
}
@media (max-width: 700px) {
  #dashboardOverview .dashboard-heading {
    margin-bottom: 38px;
  }
  #dashboardOverview .overview-hero-new {
    min-height: 535px;
  }
  #dashboardOverview .overview-hero-copy {
    width: 100%;
    padding-top: 38px;
  }
  #dashboardOverview .overview-hero-copy h2 {
    font-size: 64px;
  }
  #dashboardOverview .overview-hero-description {
    max-width: 260px;
  }
  #dashboardOverview .overview-hero-number {
    font-size: 220px;
    top: 100px;
    right: -18px;
  }
  #dashboardOverview .overview-leader-line {
    grid-template-columns: 1fr auto;
    margin-top: 72px;
    position: relative;
    z-index: 5;
  }
  #dashboardOverview .overview-leader-line strong {
    font-size: 28px;
  }
  #dashboardOverview .overview-leader-line b {
    font-size: 30px;
  }
  #dashboardOverview .overview-metrics {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 75px;
  }
  #dashboardOverview .overview-metrics > div {
    padding: 19px 15px 21px 0;
    margin: 0;
  }
  #dashboardOverview .overview-metrics > div + div {
    padding-left: 15px;
  }
  #dashboardOverview .overview-race-pulse {
    display: block;
    margin-bottom: 82px;
  }
  #dashboardOverview .overview-section-intro {
    margin-bottom: 32px;
  }
  #dashboardOverview .overview-race-story {
    min-height: 290px;
    margin-bottom: 42px;
  }
  #dashboardOverview .overview-championship {
    display: block;
    margin-bottom: 70px;
  }
  #dashboardOverview .overview-column {
    margin-top: 42px;
  }
}

/* =====================================================
   OVERVIEW FULL-VIEWPORT COMPOSITION FIX
===================================================== */
html,
body {
  overflow-x: hidden;
}
main.overview-fullscreen {
  width: 100%;
  max-width: none;
  margin: 0;
}
main.overview-fullscreen #dashboardOverview .overview-hero-new {
  width: 100%;
}
main.overview-fullscreen #dashboardOverview .overview-hero-copy {
  padding-left: 5.5%;
  padding-right: 5.5%;
  box-sizing: border-box;
}
main.overview-fullscreen #dashboardOverview .overview-metrics {
  padding-left: 5.5%;
  padding-right: 5.5%;
  box-sizing: border-box;
}
main.overview-fullscreen #dashboardOverview .overview-race-pulse {
  padding-left: 5.5%;
  padding-right: 5.5%;
  box-sizing: border-box;
}
main.overview-fullscreen #dashboardOverview .overview-championship {
  padding-left: 5.5%;
  padding-right: 5.5%;
  box-sizing: border-box;
}
#dashboardOverview .overview-hero-number {
  right: 0;
  top: 0;
  font-size: clamp(300px, 30vw, 510px);
  line-height: 0.92;
}
@media (max-width: 700px) {
  main.overview-fullscreen #dashboardOverview .overview-hero-copy {
    padding-left: 5%;
    padding-right: 5%;
  }
  main.overview-fullscreen #dashboardOverview .overview-metrics {
    padding-left: 5%;
    padding-right: 5%;
  }
  main.overview-fullscreen #dashboardOverview .overview-race-pulse {
    padding-left: 5%;
    padding-right: 5%;
  }
  main.overview-fullscreen #dashboardOverview .overview-championship {
    padding-left: 5%;
    padding-right: 5%;
  }
  #dashboardOverview .overview-hero-number {
    right: 0;
    top: 0;
    font-size: 220px;
  }
}

/* FINAL OVERVIEW VIEWPORT FIX */
html,
body {
  overflow-x: hidden !important;
}
main.overview-fullscreen {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
main.overview-fullscreen #dashboardOverview {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 65px 0 100px !important;
  box-sizing: border-box !important;
}
main.overview-fullscreen #dashboardOverview .overview-hero-copy,
main.overview-fullscreen #dashboardOverview .overview-metrics,
main.overview-fullscreen #dashboardOverview .overview-race-pulse,
main.overview-fullscreen #dashboardOverview .overview-championship {
  padding-left: 5.5%;
  padding-right: 5.5%;
  box-sizing: border-box;
}
main.overview-fullscreen #dashboardOverview .overview-hero-new {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  overflow: hidden;
}
main.overview-fullscreen #dashboardOverview .overview-hero-number {
  left: 20%;
  right: auto;
  top: 0;
  font-size: clamp(220px, 28vw, 460px);
  line-height: 0.9;
  letter-spacing: -0.075em;
  white-space: nowrap;
  transform: none;
  max-width: none;
}
main.overview-fullscreen #dashboardOverview .overview-hero-copy {
  position: relative;
  z-index: 3;
}
@media (max-width: 900px) {
  main.overview-fullscreen #dashboardOverview {
    padding-top: 35px !important;
  }
  main.overview-fullscreen #dashboardOverview .overview-hero-copy,
  main.overview-fullscreen #dashboardOverview .overview-metrics,
  main.overview-fullscreen #dashboardOverview .overview-race-pulse,
  main.overview-fullscreen #dashboardOverview .overview-championship {
    padding-left: 5%;
    padding-right: 5%;
  }
  main.overview-fullscreen #dashboardOverview .overview-hero-number {
    left: 8%;
    top: 0;
    font-size: 210px;
  }
}
@media (max-width: 600px) {
  main.overview-fullscreen #dashboardOverview .overview-hero-number {
    left: 3%;
    font-size: 150px;
  }
}

/* =====================================================
   DRIVERS PAGE — FULL VIEWPORT EDITORIAL REVAMP
===================================================== */
#dashboardDrivers {
  width: 100%;
  max-width: none !important;
  padding: 65px 0 110px !important;
  overflow: hidden;
}
#dashboardDrivers .dashboard-heading {
  width: min(1600px, 89%);
  margin: 0 auto 42px !important;
  padding-top: 20px;
}
#dashboardDrivers .dashboard-heading p {
  color: #777;
}
#driversContent {
  width: 100% !important;
  max-width: none !important;
  overflow: hidden;
}
.drivers-hero {
  position: relative;
  width: 100%;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(
      ellipse at 72% 62%,
      color-mix(in srgb, var(--driver-accent) 12%, transparent) 0%,
      transparent 35%
    ),
    radial-gradient(ellipse at 58% 65%, #152622 0%, #0b100f 32%, #080808 72%);
}
.drivers-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 8, 8, 0.1),
    transparent 48%,
    rgba(8, 8, 8, 0.35)
  );
  z-index: 1;
  pointer-events: none;
}
.drivers-hero-copy {
  position: relative;
  z-index: 4;
  width: min(1600px, 89%);
  margin: 0 auto;
  padding-top: 150px;
}
.drivers-hero-copy h2 {
  max-width: 850px;
  font-size: clamp(90px, 11vw, 190px);
  line-height: 0.76;
  letter-spacing: -0.095em;
  margin: 25px 0 28px;
  text-transform: uppercase;
}
.drivers-hero-copy p {
  font-size: 13px;
  color: #999;
  letter-spacing: 0.5px;
}
.drivers-hero > img {
  position: absolute;
  z-index: 3;
  right: 4%;
  bottom: -2%;
  width: min(58vw, 900px);
  height: 96%;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(-30px 10px 60px rgba(0, 0, 0, 0.55));
}
.drivers-hero-watermark {
  position: absolute;
  z-index: 0;
  right: 2%;
  top: 0;
  font-size: clamp(300px, 34vw, 540px);
  line-height: 0.82;
  letter-spacing: -0.12em;
  font-weight: 900;
  color: #ffffff06;
  pointer-events: none;
}
.drivers-featured,
.drivers-grid-section {
  width: min(1600px, 89%);
  margin: 0 auto;
}
.drivers-featured {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 2fr);
  gap: 7%;
  padding: 120px 0 80px;
}
.drivers-section-intro {
  padding-top: 8px;
}
.drivers-section-intro h3 {
  font-size: clamp(48px, 5vw, 82px);
  line-height: 0.86;
  letter-spacing: -0.075em;
  margin: 24px 0 25px;
}
.drivers-section-intro h3 i {
  font-style: normal;
  color: #e10600;
}
.drivers-section-intro p {
  max-width: 230px;
  color: #777;
  font-size: 12px;
  line-height: 1.65;
}
.drivers-feature-list {
  display: flex;
  flex-direction: column;
}
.drivers-feature-row {
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid #222;
  isolation: isolate;
}
.drivers-feature-row:last-child {
  border-bottom: 1px solid #222;
}
.drivers-feature-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 72% 50%,
    color-mix(in srgb, var(--driver-accent) 15%, transparent),
    transparent 45%
  );
  opacity: 0.75;
  z-index: -1;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.drivers-feature-row:hover::before {
  opacity: 1;
  transform: scale(1.04);
}
.drivers-feature-pos {
  align-self: flex-start;
  padding-top: 20px;
  width: 52px;
  flex: none;
  color: #555;
  font: 11px monospace;
}
.drivers-feature-copy {
  position: relative;
  z-index: 4;
  padding: 35px 0;
  max-width: 58%;
}
.drivers-feature-copy h3 {
  font-size: clamp(38px, 4.5vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.07em;
  margin: 16px 0 12px;
  text-transform: uppercase;
}
.drivers-feature-copy p {
  color: #999;
  font-size: 11px;
  letter-spacing: 1px;
}
.drivers-feature-row > img {
  position: absolute;
  z-index: 3;
  right: 9%;
  bottom: 0;
  width: 330px;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.drivers-feature-row:hover > img {
  transform: translateY(-7px) scale(1.035);
}
.drivers-feature-points {
  position: absolute;
  right: 2%;
  top: 57.3%;
  transform: translateY(-50%);
  z-index: 4;
  font-size: clamp(38px, 4.5vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.07em;
  text-align: right;
}
.drivers-feature-points small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  color: #777;
  text-align: right;
}
.drivers-grid-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 2fr);
  gap: 7%;
  padding: 100px 0 80px;
}
.drivers-roster {
  display: flex;
  flex-direction: column;
}
.drivers-roster-row {
  position: relative;
  min-height: 105px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 90px 95px;
  gap: 18px;
  align-items: center;
  border-top: 1px solid #1e1e1e;
  transition:
    padding 0.25s ease,
    background 0.25s ease;
}
.drivers-roster-row:last-child {
  border-bottom: 1px solid #1e1e1e;
}
.drivers-roster-row:hover {
  padding-left: 12px;
  background: linear-gradient(90deg, #101212, transparent 72%);
}
.drivers-roster-pos {
  font: 10px monospace;
  color: #555;
}
.drivers-roster-driver > span {
  display: block;
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.drivers-roster-driver h4 {
  font-size: clamp(21px, 2vw, 31px);
  line-height: 1;
  letter-spacing: -1.5px;
  text-transform: uppercase;
}
.drivers-roster-number {
  color: #555;
  font: 10px monospace;
  text-align: right;
}
.drivers-roster-row > strong {
  text-align: right;
  font-size: 25px;
  letter-spacing: -1.5px;
}
.drivers-roster-row > strong small {
  font-size: 7px;
  color: #777;
  letter-spacing: 1.5px;
}

@media (max-width: 900px) {
  #dashboardDrivers .dashboard-heading {
    width: 90%;
  }
  .drivers-hero-copy {
    width: 90%;
    padding-top: 100px;
  }
  .drivers-hero {
    min-height: 560px;
  }
  .drivers-hero > img {
    width: 70vw;
    right: -7%;
    opacity: 0.8;
  }
  .drivers-hero-copy h2 {
    font-size: clamp(72px, 13vw, 130px);
    max-width: 75%;
  }
  .drivers-featured,
  .drivers-grid-section {
    width: 90%;
    display: block;
    padding-top: 80px;
  }
  .drivers-section-intro {
    margin-bottom: 45px;
  }
  .drivers-feature-row {
    min-height: 240px;
  }
  .drivers-feature-row > img {
    right: 3%;
    width: 260px;
    opacity: 0.85;
  }
}
@media (max-width: 600px) {
  #dashboardDrivers {
    padding-top: 35px !important;
  }
  #dashboardDrivers .dashboard-heading {
    margin-bottom: 45px !important;
  }
  .drivers-hero {
    min-height: 530px;
  }
  .drivers-hero-copy {
    padding-top: 75px;
  }
  .drivers-hero-copy h2 {
    font-size: clamp(58px, 17vw, 92px);
    max-width: 90%;
  }
  .drivers-hero > img {
    width: 78vw;
    right: -14%;
    opacity: 0.62;
  }
  .drivers-hero-watermark {
    font-size: 250px;
    right: -2%;
    top: 10px;
  }
  .drivers-featured,
  .drivers-grid-section {
    width: 90%;
    padding: 70px 0 45px;
  }
  .drivers-feature-row {
    min-height: 205px;
  }
  .drivers-feature-pos {
    width: 35px;
  }
  .drivers-feature-copy {
    max-width: 75%;
    padding: 30px 0;
  }
  .drivers-feature-copy h3 {
    font-size: 36px;
  }
  .drivers-feature-row > img {
    width: 190px;
    right: -6%;
    opacity: 0.65;
  }
  .drivers-feature-points {
    font-size: 36px;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .drivers-roster-row {
    grid-template-columns: 32px minmax(0, 1fr) 70px;
    gap: 10px;
    min-height: 92px;
  }
  .drivers-roster-number {
    display: none;
  }
  .drivers-roster-row > strong {
    font-size: 22px;
  }
  .drivers-roster-driver h4 {
    font-size: 21px;
  }
}

/* =====================================================
   DASHBOARD VIEWPORT SYSTEM
===================================================== */
html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
}
main.dashboard-mode {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}
main.dashboard-mode .dashboard-panel:not(#dashboardRace) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}
main.dashboard-mode .dashboard-panel:not(#dashboardRace) .dashboard-heading,
main.dashboard-mode #dashboardOverview .overview-hero-copy,
main.dashboard-mode #dashboardOverview .overview-metrics,
main.dashboard-mode #dashboardOverview .overview-race-pulse,
main.dashboard-mode #dashboardOverview .overview-championship,
main.dashboard-mode .drivers-hero-copy,
main.dashboard-mode .drivers-featured,
main.dashboard-mode .drivers-grid-section,
main.dashboard-mode .rev-cover,
main.dashboard-mode .rev-races,
main.dashboard-mode .rev-progress,
main.dashboard-mode .rev-league,
main.dashboard-mode .rev-driver-feature,
main.dashboard-mode .rev-section-heading,
main.dashboard-mode .rev-driver-roster,
main.dashboard-mode .rev-teams-intro,
main.dashboard-mode .rev-teams-roster,
main.dashboard-mode .rev-title-race,
main.dashboard-mode .rev-championship-list {
  width: min(1600px, 89vw) !important;
  max-width: 1600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}
main.dashboard-mode #dashboardOverview .overview-hero-new,
main.dashboard-mode .drivers-hero,
main.dashboard-mode .rev-title-race,
main.dashboard-mode .rev-teams-intro {
  width: 100% !important;
  max-width: none !important;
}
main.dashboard-mode #dashboardOverview .overview-hero-number {
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  overflow: visible !important;
}
main.dashboard-mode .drivers-hero-watermark {
  top: 0 !important;
  right: 0 !important;
  overflow: visible !important;
}
main.dashboard-mode .drivers-hero > img {
  display: none !important;
}

/* Drivers follows the Overview rhythm instead of adding extra vertical air. */
main.dashboard-mode .drivers-hero {
  min-height: 555px !important;
}
main.dashboard-mode .drivers-hero-copy {
  padding-top: 110px !important;
}
main.dashboard-mode .drivers-featured {
  padding-top: 85px !important;
  padding-bottom: 70px !important;
}
main.dashboard-mode .drivers-feature-row {
  min-height: 215px !important;
}
main.dashboard-mode .drivers-grid-section {
  padding-top: 75px !important;
  padding-bottom: 65px !important;
}
main.dashboard-mode .drivers-roster-row {
  min-height: 92px !important;
}

@media (max-width: 900px) {
  main.dashboard-mode {
    width: 100% !important;
  }
  main.dashboard-mode .dashboard-panel:not(#dashboardRace) {
    width: 100% !important;
  }
  main.dashboard-mode .dashboard-panel:not(#dashboardRace) .dashboard-heading,
  main.dashboard-mode .drivers-hero-copy,
  main.dashboard-mode .drivers-featured,
  main.dashboard-mode .drivers-grid-section,
  main.dashboard-mode .rev-races,
  main.dashboard-mode .rev-progress,
  main.dashboard-mode .rev-league,
  main.dashboard-mode .rev-championship-list {
    width: 90% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* FINAL SHARED EDITORIAL GRID */
@media (min-width: 901px) {
  main.dashboard-mode #dashboardOverview .overview-hero-copy,
  main.dashboard-mode #dashboardOverview .overview-metrics,
  main.dashboard-mode #dashboardOverview .overview-race-pulse,
  main.dashboard-mode #dashboardOverview .overview-championship {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  main.dashboard-mode #dashboardOverview .overview-hero-copy {
    padding-top: 58px !important;
  }
  main.dashboard-mode #dashboardDrivers .dashboard-heading {
    margin-bottom: 42px !important;
  }
  main.dashboard-mode .drivers-hero-copy {
    padding-top: 58px !important;
  }
}

/* FINAL DASHBOARD HEADING / HERO RHYTHM */
@media (min-width: 901px) {
  main.dashboard-mode #dashboardOverview .overview-hero-copy,
  main.dashboard-mode .drivers-hero-copy,
  main.dashboard-mode .rev-teams-intro,
  main.dashboard-mode .championship-hero-copy {
    padding-top: 58px !important;
  }

  main.dashboard-mode #dashboardOverview .overview-hero-copy h2,
  main.dashboard-mode .drivers-hero-copy h2,
  main.dashboard-mode .rev-teams-intro h2,
  main.dashboard-mode .championship-hero h2 {
    margin-top: 24px !important;
  }
}

/* DRIVER VIEWPORT ISOLATION — keep Overview untouched */
@media (min-width: 901px) {
  main.dashboard-mode #dashboardDrivers .drivers-hero {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    box-sizing: border-box !important;
  }
  main.dashboard-mode #dashboardDrivers .drivers-hero-copy {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 5.5% !important;
    padding-right: 5.5% !important;
    box-sizing: border-box !important;
  }
  main.dashboard-mode #dashboardDrivers .drivers-hero-watermark {
    right: 5% !important;
    top: 0 !important;
    white-space: nowrap !important;
  }
}

/* =====================================================
   TEAMS / FULL-WIDTH EDITORIAL ROSTER
   Scoped only to the Teams dashboard.
===================================================== */
#dashboardTeams .dashboard-heading {
  width: 89vw !important;
  max-width: 1600px !important;
  margin: 0 auto 42px !important;
}

#dashboardTeams #teamsContent {
  width: 100%;
  overflow: visible;
}

#dashboardTeams .rev-teams-intro {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  min-height: 405px;
  padding: 58px 5.5vw 72px;
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 86% 46%,
      rgba(255, 128, 0, 0.09),
      transparent 32%
    ),
    linear-gradient(180deg, #080808 0%, #090909 100%);
}

#dashboardTeams .rev-teams-intro:after {
  content: "11";
  position: absolute;
  right: 4vw;
  top: -42px;
  font-size: clamp(280px, 31vw, 520px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.1em;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

#dashboardTeams .rev-teams-intro h2 {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 22px 0 0;
  font-size: clamp(64px, 8.5vw, 145px);
  line-height: 0.84;
  letter-spacing: -0.095em;
}

#dashboardTeams .rev-teams-intro > p {
  position: relative;
  z-index: 2;
  margin: 28px 0 0;
  color: #777;
}

#dashboardTeams .rev-teams-roster {
  width: 89vw !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
}

#dashboardTeams .rev-team-visual {
  display: none !important;
}

#dashboardTeams .rev-team-feature {
  --team-accent: #aaa;
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(180px, 220px);
  align-items: center;
  gap: 28px;
  min-height: 188px;
  padding: 34px 0;
  box-sizing: border-box;
  border-bottom: 0;
  overflow: hidden;
  isolation: isolate;
}

#dashboardTeams .rev-team-feature:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--team-accent),
    rgba(255, 255, 255, 0.06) 22%,
    transparent 80%
  );
  opacity: 0.7;
}

#dashboardTeams .rev-team-feature:after {
  content: "";
  position: absolute;
  right: 0;
  top: 5%;
  width: 48%;
  height: 90%;
  background: radial-gradient(
    ellipse at 75% 50%,
    color-mix(in srgb, var(--team-accent) 13%, transparent),
    transparent 68%
  );
  z-index: -1;
  pointer-events: none;
}

#dashboardTeams .rev-team-feature .rev-pos {
  align-self: start;
  margin-top: 8px;
  color: #555;
  font-size: 9px;
  letter-spacing: 2px;
}

#dashboardTeams .rev-team-title {
  min-width: 0;
}

#dashboardTeams .rev-team-title .rev-eyebrow {
  color: var(--team-accent);
}

#dashboardTeams .rev-team-title h3 {
  margin: 12px 0 12px;
  color: var(--team-accent);
  font-size: clamp(38px, 4.4vw, 70px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

#dashboardTeams .rev-team-pair {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

#dashboardTeams .rev-team-pair span {
  color: #777;
  font-size: 10px;
  letter-spacing: 0.5px;
}

#dashboardTeams .rev-team-pair b {
  color: #ddd;
  margin-left: 7px;
  font-size: 10px;
}

#dashboardTeams .rev-team-score {
  min-width: 0;
  padding-right: 24px;
  box-sizing: border-box;
  text-align: right;
  color: #f5f5f5;
  font-size: clamp(48px, 5vw, 76px);
  line-height: 0.85;
  letter-spacing: -0.07em;
}

#dashboardTeams .rev-team-score small {
  margin-top: 9px;
  color: #555;
  font-size: 8px;
  letter-spacing: 2px;
}

#dashboardTeams .rev-team-feature.mercedes {
  --team-accent: #27f4d2;
}
#dashboardTeams .rev-team-feature.ferrari {
  --team-accent: #e80020;
}
#dashboardTeams .rev-team-feature.mclaren {
  --team-accent: #ff8000;
}
#dashboardTeams .rev-team-feature.redbull {
  --team-accent: #3671c6;
}
#dashboardTeams .rev-team-feature.racingbulls {
  --team-accent: #6692ff;
}
#dashboardTeams .rev-team-feature.alpine {
  --team-accent: #2293d1;
}
#dashboardTeams .rev-team-feature.haas {
  --team-accent: #b6babd;
}
#dashboardTeams .rev-team-feature.audi {
  --team-accent: #e3002b;
}
#dashboardTeams .rev-team-feature.williams {
  --team-accent: #1868db;
}
#dashboardTeams .rev-team-feature.astonmartin {
  --team-accent: #229971;
}
#dashboardTeams .rev-team-feature.cadillac {
  --team-accent: #d6b36a;
}
#dashboardTeams .rev-team-feature.unknown {
  --team-accent: #999;
}

#dashboardTeams .rev-team-feature:hover:before {
  opacity: 1;
}

@media (max-width: 900px) {
  #dashboardTeams .dashboard-heading {
    width: 90vw !important;
  }
  #dashboardTeams .rev-teams-intro {
    padding-left: 5vw;
    padding-right: 5vw;
    min-height: 370px;
  }
  #dashboardTeams .rev-teams-roster {
    width: 90vw !important;
  }
  #dashboardTeams .rev-team-feature {
    grid-template-columns: 38px minmax(0, 1fr) 110px;
    gap: 14px;
    min-height: 160px;
    padding: 28px 0;
  }
  #dashboardTeams .rev-team-title h3 {
    font-size: clamp(34px, 7vw, 58px);
  }
  #dashboardTeams .rev-team-pair {
    gap: 14px;
  }
  #dashboardTeams .rev-team-score {
    font-size: 46px;
    padding-right: 18px;
  }
}

@media (max-width: 600px) {
  #dashboardTeams .rev-teams-intro {
    min-height: 330px;
    padding-top: 42px;
    padding-bottom: 55px;
  }
  #dashboardTeams .rev-teams-intro h2 {
    font-size: 58px;
  }
  #dashboardTeams .rev-team-feature {
    grid-template-columns: 25px minmax(0, 1fr) 75px;
    min-height: 135px;
    gap: 9px;
    padding: 23px 0;
  }
  #dashboardTeams .rev-team-title h3 {
    font-size: 32px;
    letter-spacing: -0.06em;
  }
  #dashboardTeams .rev-team-pair {
    gap: 9px;
  }
  #dashboardTeams .rev-team-pair span {
    font-size: 8px;
  }
  #dashboardTeams .rev-team-score {
    font-size: 34px;
    padding-right: 10px;
  }
}

/* =====================================================
   CHAMPIONSHIP / STANDINGS REDESIGN
   Scoped only to the Championship dashboard.
===================================================== */
#dashboardChampionship .dashboard-heading {
  width: 89vw !important;
  max-width: 1600px !important;
  margin: 0 auto 42px !important;
}

#dashboardChampionship #championshipContent {
  width: 100% !important;
  overflow: visible !important;
}

#dashboardChampionship .championship-hero {
  position: relative;
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(
      ellipse at 73% 54%,
      rgba(39, 244, 210, 0.1),
      transparent 31%
    ),
    linear-gradient(180deg, #080808 0%, #090909 100%);
}

#dashboardChampionship .championship-hero:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    #e10600,
    rgba(225, 6, 0, 0.18) 55%,
    transparent
  );
}

#dashboardChampionship .championship-hero-watermark {
  position: absolute;
  right: 4vw;
  top: 50%;
  transform: translateY(-52%);
  font-size: clamp(240px, 30vw, 520px);
  line-height: 0.78;
  font-weight: 900;
  letter-spacing: -0.11em;
  color: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}

#dashboardChampionship .championship-hero-copy {
  position: relative;
  z-index: 2;
  width: 89vw;
  max-width: 1600px;
  margin: 0 auto;
  padding: 58px 0 70px;
  box-sizing: border-box;
}

#dashboardChampionship .championship-hero h2 {
  margin: 25px 0 0;
  max-width: 850px;
  font-size: clamp(70px, 8.5vw, 145px);
  line-height: 0.82;
  letter-spacing: -0.095em;
}

#dashboardChampionship .championship-hero h2 i,
#dashboardChampionship .championship-column h3 i {
  color: #e10600;
  font-style: normal;
}

#dashboardChampionship .championship-hero-copy > p {
  margin: 30px 0 0;
  max-width: 390px;
  color: #777;
  font-size: 12px;
  line-height: 1.55;
}

#dashboardChampionship .championship-leader {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  column-gap: 50px;
  width: min(760px, 100%);
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid #222;
}

#dashboardChampionship .championship-leader span {
  grid-column: 1/-1;
  margin-bottom: 18px;
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.4px;
}

#dashboardChampionship .championship-leader strong {
  font-size: clamp(30px, 3vw, 52px);
  line-height: 1;
  letter-spacing: -2.5px;
}

#dashboardChampionship .championship-leader b {
  font-size: clamp(30px, 3.5vw, 58px);
  line-height: 0.9;
  letter-spacing: -3px;
  white-space: nowrap;
}

#dashboardChampionship .championship-leader small {
  color: #666;
  font-size: 8px;
  letter-spacing: 2px;
  margin-left: 5px;
}

#dashboardChampionship .championship-history {
  width: 89vw;
  max-width: 1600px;
  margin: 92px auto 0;
  box-sizing: border-box;
  border-top: 1px solid #1c1c1c;
  padding-top: 34px;
}

#dashboardChampionship .championship-history-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: end;
  gap: 40px;
}

#dashboardChampionship .championship-history-heading h3 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 4.5vw, 72px);
  line-height: 0.86;
  letter-spacing: -0.085em;
}

#dashboardChampionship .championship-history-heading h3 i {
  color: #e10600;
  font-style: normal;
}

#dashboardChampionship .championship-history-heading p {
  max-width: 620px;
  margin: 0;
  color: #666;
  font-size: 11px;
  line-height: 1.6;
}

#dashboardChampionship .championship-driver-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

#dashboardChampionship .championship-driver-control span {
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.2px;
}

#dashboardChampionship .championship-driver-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid #292929;
  border-radius: 0;
  outline: none;
  background: #0d0d0d;
  color: #f5f5f5;
  font: 700 10px/1 inherit;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

#dashboardChampionship .championship-driver-control select:focus {
  border-color: #e10600;
}

#dashboardChampionship .championship-history-content {
  margin-top: 34px;
  min-height: 420px;
}

#dashboardChampionship .position-history-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1c1c1c;
}

#dashboardChampionship .position-history-header h3 {
  margin: 12px 0 8px;
  font-size: clamp(25px, 2.3vw, 38px);
  line-height: 1;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

#dashboardChampionship .position-history-header p {
  margin: 0;
  color: #666;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

#dashboardChampionship .position-history-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 30px;
}

#dashboardChampionship .position-history-stats div {
  min-width: 82px;
}

#dashboardChampionship .position-history-stats span {
  display: block;
  margin-bottom: 7px;
  color: #555;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.7px;
}

#dashboardChampionship .position-history-stats strong {
  display: block;
  color: #f5f5f5;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -1px;
}

#dashboardChampionship .position-history-chart-wrap {
  width: 100%;
  margin-top: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a0a 0%, #080808 100%);
  border-top: 1px solid #151515;
  border-bottom: 1px solid #151515;
}

#dashboardChampionship .position-history-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 360px;
}

#dashboardChampionship .history-grid-line {
  stroke: #1c1c1c;
  stroke-width: 1;
}

#dashboardChampionship .history-axis-label,
#dashboardChampionship .history-round-label {
  fill: #555;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

#dashboardChampionship .history-line {
  fill: none;
  stroke: #e10600;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

#dashboardChampionship .history-point {
  fill: #f5f5f5;
  stroke: #e10600;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

#dashboardChampionship .history-dnf-line {
  stroke: #2a2a2a;
  stroke-dasharray: 4 5;
}

#dashboardChampionship .history-dnf-label {
  fill: #777;
  font-size: 9px;
}

#dashboardChampionship .history-status-point {
  fill: #111;
  stroke: #777;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

#dashboardChampionship .position-history-note {
  margin-top: 12px;
  color: #555;
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

#dashboardChampionship .position-history-loading {
  display: flex;
  align-items: center;
  min-height: 180px;
  color: #555;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
}

#dashboardChampionship .championship-standings {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 4%;
  width: 89vw;
  max-width: 1600px;
  margin: 105px auto 0;
  box-sizing: border-box;
}

#dashboardChampionship .championship-column {
  min-width: 0;
}

#dashboardChampionship .championship-column h3 {
  margin: 22px 0 48px;
  font-size: clamp(48px, 5vw, 78px);
  line-height: 0.86;
  letter-spacing: -0.085em;
}

#dashboardChampionship .championship-standing-list {
  width: 100%;
}

#dashboardChampionship .championship-standing-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  border-top: 1px solid #1c1c1c;
  box-sizing: border-box;
}

#dashboardChampionship .championship-standing-row:last-child {
  border-bottom: 1px solid #1c1c1c;
}

#dashboardChampionship .championship-standing-pos {
  color: #555;
  font: 9px monospace;
  letter-spacing: 1.5px;
}

#dashboardChampionship .championship-standing-driver {
  min-width: 0;
}

#dashboardChampionship .championship-standing-driver strong {
  display: block;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

#dashboardChampionship .championship-standing-driver span {
  display: block;
  margin-top: 5px;
  color: #555;
  font-size: 8px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

#dashboardChampionship .championship-standing-row > b {
  text-align: right;
  font-size: 19px;
  line-height: 1;
  letter-spacing: -1px;
  white-space: nowrap;
}

#dashboardChampionship .championship-standing-row > b small {
  margin-left: 5px;
  color: #555;
  font-size: 7px;
  letter-spacing: 1.4px;
}

#dashboardChampionship .championship-standing-row {
  position: relative;
}

#dashboardChampionship .championship-standing-row:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--team-color, #555);
  opacity: 0.9;
}

#dashboardChampionship .championship-standing-driver strong {
  color: var(--team-color, #f5f5f5);
}

#dashboardChampionship .team-mercedes {
  --team-color: #27f4d2;
}
#dashboardChampionship .team-ferrari {
  --team-color: #e10600;
}
#dashboardChampionship .team-mclaren {
  --team-color: #ff8700;
}
#dashboardChampionship .team-redbull {
  --team-color: #3674d9;
}
#dashboardChampionship .team-red-bull-racing {
  --team-color: #3674d9;
}
#dashboardChampionship .team-racingbulls {
  --team-color: #4b8df8;
}
#dashboardChampionship .team-racing-bulls {
  --team-color: #4b8df8;
}
#dashboardChampionship .team-alpine {
  --team-color: #4fa3ff;
}
#dashboardChampionship .team-haas {
  --team-color: #b8b8b8;
}
#dashboardChampionship .team-haas-f1-team {
  --team-color: #b8b8b8;
}
#dashboardChampionship .team-audi {
  --team-color: #e31b23;
}
#dashboardChampionship .team-williams {
  --team-color: #4f8cff;
}
#dashboardChampionship .team-astonmartin {
  --team-color: #22966f;
}
#dashboardChampionship .team-aston-martin {
  --team-color: #22966f;
}
#dashboardChampionship .team-cadillac {
  --team-color: #c6a15b;
}
#dashboardChampionship .team-unknown {
  --team-color: #777;
}

@media (max-width: 900px) {
  #dashboardChampionship .championship-history {
    width: 90vw;
    margin-top: 75px;
  }

  #dashboardChampionship .championship-history-heading {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  #dashboardChampionship .championship-driver-control {
    max-width: 320px;
  }

  #dashboardChampionship .position-history-header {
    align-items: flex-start;
    flex-direction: column;
  }

  #dashboardChampionship .position-history-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  #dashboardChampionship .championship-history {
    width: 90vw;
    margin-top: 60px;
  }

  #dashboardChampionship .championship-history-heading h3 {
    font-size: 43px;
  }

  #dashboardChampionship .championship-history-content {
    min-height: 0;
  }

  #dashboardChampionship .position-history-stats {
    width: 100%;
    gap: 18px;
  }

  #dashboardChampionship .position-history-stats div {
    min-width: 68px;
  }

  #dashboardChampionship .position-history-stats strong {
    font-size: 21px;
  }

  #dashboardChampionship .position-history-chart-wrap {
    overflow-x: auto;
  }

  #dashboardChampionship .position-history-chart {
    width: 900px;
    max-width: none;
    min-height: 300px;
  }
}

@media (max-width: 900px) {
  #dashboardChampionship .dashboard-heading,
  #dashboardChampionship .championship-hero-copy,
  #dashboardChampionship .championship-standings {
    width: 90vw !important;
  }
  #dashboardChampionship .championship-hero {
    min-height: 540px;
  }
  #dashboardChampionship .championship-hero-watermark {
    right: 0;
  }
  #dashboardChampionship .championship-standings {
    display: block;
    margin-top: 80px;
  }
  #dashboardChampionship .championship-column {
    margin-bottom: 80px;
  }
}

@media (max-width: 600px) {
  #dashboardChampionship .championship-hero-copy {
    padding-top: 50px;
    padding-bottom: 55px;
  }
  #dashboardChampionship .championship-hero {
    min-height: 520px;
  }
  #dashboardChampionship .championship-hero h2 {
    font-size: 64px;
  }
  #dashboardChampionship .championship-hero-watermark {
    top: 36%;
    font-size: 210px;
  }
  #dashboardChampionship .championship-leader {
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-top: 55px;
  }
  #dashboardChampionship .championship-leader strong {
    font-size: 28px;
  }
  #dashboardChampionship .championship-leader b {
    font-size: 32px;
  }
  #dashboardChampionship .championship-standings {
    margin-top: 65px;
  }
  #dashboardChampionship .championship-column h3 {
    font-size: 48px;
    margin-bottom: 35px;
  }
  #dashboardChampionship .championship-standing-row {
    grid-template-columns: 30px minmax(0, 1fr) 65px;
    min-height: 70px;
    gap: 10px;
  }
  #dashboardChampionship .championship-standing-row > b {
    font-size: 17px;
  }
}

/* =====================================================
   CHAMPIONSHIP ROW ACCENT REFINEMENT
   Scoped only to the Championship dashboard.
===================================================== */
#dashboardChampionship .championship-hero:after {
  display: none;
}

#dashboardChampionship .championship-standing-row:before {
  left: 60px;
  width: 5px;
  border-radius: 3px;
  opacity: 1;
}

#dashboardChampionship .championship-standing-pos {
  padding-right: 0;
}

@media (max-width: 600px) {
  #dashboardChampionship .championship-standing-row:before {
    left: 40px;
    width: 4px;
    border-radius: 2px;
  }
}

/* =====================================================
   CHAMPIONSHIP STANDING COLUMN ORDER / SPACING
   Accent bar -> position -> driver/team -> points
===================================================== */
#dashboardChampionship .championship-standing-row {
  grid-template-columns: 6px 32px minmax(0, 1fr) 78px;
  column-gap: 8px;
}

#dashboardChampionship .championship-standing-row:before {
  display: none;
}

#dashboardChampionship .championship-standing-accent {
  display: block;
  width: 6px;
  height: 54px;
  border-radius: 3px;
  background: var(--team-color, #555);
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

#dashboardChampionship .championship-standing-pos {
  grid-column: 2;
  grid-row: 1;
}

#dashboardChampionship .championship-standing-driver {
  grid-column: 3;
  grid-row: 1;
}

#dashboardChampionship .championship-standing-row > b {
  grid-column: 4;
  grid-row: 1;
}

@media (max-width: 600px) {
  #dashboardChampionship .championship-standing-row {
    grid-template-columns: 5px 27px minmax(0, 1fr) 65px;
    column-gap: 6px;
  }

  #dashboardChampionship .championship-standing-accent {
    width: 5px;
    height: 48px;
    border-radius: 2px;
  }
}

#dashboardChampionship .championship-standings {
  column-gap: 2.5%;
}

/* =====================================================
   RACE CLASSIFICATION + QUALIFYING
===================================================== */

#raceClassificationSection,
#qualifyingSection {
  position: relative;
}

.classification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.classification-card {
  position: relative;
  min-height: 145px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #111111;
  border: 1px solid var(--border);
}

.classification-card::before,
.qualifying-card::before,
.qualifying-row::before,
.classification-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--team-color, #333333);
}

.classification-card.team-mercedes::before,
.qualifying-card.team-mercedes::before,
.qualifying-row.team-mercedes::before,
.classification-row.team-mercedes::before {
  background: var(--mercedes);
}

.classification-card.team-ferrari::before,
.qualifying-card.team-ferrari::before,
.qualifying-row.team-ferrari::before,
.classification-row.team-ferrari::before {
  background: var(--ferrari);
}

.classification-card.team-redbull::before,
.qualifying-card.team-redbull::before,
.qualifying-row.team-redbull::before,
.classification-row.team-redbull::before {
  background: var(--redbull);
}

.classification-card.team-mclaren::before,
.qualifying-card.team-mclaren::before,
.qualifying-row.team-mclaren::before,
.classification-row.team-mclaren::before {
  background: var(--mclaren);
}

.classification-position {
  position: absolute;
  top: 14px;
  right: 20px;
  color: #292929;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.classification-driver {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.classification-driver span {
  color: #555555;
  font: 9px monospace;
}

.classification-driver strong {
  color: #eeeeee;
  font-size: 16px;
  letter-spacing: -0.4px;
}

.classification-driver small {
  color: #666666;
  font-size: 9px;
}

.classification-status {
  position: absolute;
  top: 18px;
  left: 24px;
  color: #555555;
  font: 8px monospace;
  letter-spacing: 1px;
}

.classification-remaining,
.qualifying-remaining {
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.classification-row {
  position: relative;
  min-height: 68px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid var(--border);
  background: #0d0d0d;
}

.classification-row-position {
  color: #555555;
  font: 9px monospace;
  letter-spacing: 1.5px;
}

.classification-row div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.classification-row strong {
  color: #eeeeee;
  font-size: 13px;
}

.classification-row div span {
  color: #555555;
  font-size: 8px;
  letter-spacing: 1px;
}

.classification-row > span:last-child {
  color: #888888;
  font: 10px monospace;
  text-align: right;
}

.data-more-button {
  display: block;
  margin: 22px auto 0;
  min-width: 120px;
  padding: 11px 18px;
  border: 1px solid #303030;
  background: #111111;
  color: #888888;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.data-more-button:hover {
  background: #181818;
  border-color: #555555;
  color: #ffffff;
}

#polePositionCard {
  margin-bottom: 10px;
}

.pole-position-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  background: #111111;
  border: 1px solid var(--border);
}

.pole-position-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  opacity: 0.92;
  pointer-events: none;
  user-select: none;
}

.pole-position-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #111111 0%,
    rgba(17, 17, 17, 0.96) 35%,
    rgba(17, 17, 17, 0.38) 70%,
    rgba(17, 17, 17, 0.08) 100%
  );
}

.pole-position-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #333333;
  z-index: 4;
}

.pole-position-card.team-mercedes::before {
  background: var(--mercedes);
}
.pole-position-card.team-ferrari::before {
  background: var(--ferrari);
}
.pole-position-card.team-redbull::before {
  background: var(--redbull);
}
.pole-position-card.team-mclaren::before {
  background: var(--mclaren);
}

.pole-position-content {
  position: absolute;
  left: 38px;
  bottom: 30px;
  z-index: 5;
}

.pole-position-label {
  color: #555555;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
}

.pole-position-content h3 {
  margin: 9px 0 4px;
  color: #f1f1f1;
  font-size: 28px;
  letter-spacing: -1px;
}

.pole-position-content p {
  color: #666666;
  font-size: 10px;
}

.pole-position-time {
  position: absolute;
  right: 34px;
  bottom: 28px;
  z-index: 5;
  color: #f5f5f5;
  font: 700 clamp(30px, 4vw, 52px) monospace;
  letter-spacing: -2px;
}

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

.qualifying-card {
  position: relative;
  min-height: 105px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: #111111;
  border: 1px solid var(--border);
}

.qualifying-position {
  color: #555555;
  font: 9px monospace;
  letter-spacing: 1.5px;
}

.qualifying-card div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qualifying-card strong {
  color: #eeeeee;
  font-size: 14px;
}

.qualifying-card small {
  color: #666666;
  font-size: 9px;
}

.qualifying-card b {
  color: #eeeeee;
  font: 700 16px monospace;
}

.qualifying-remaining {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qualifying-row {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 130px;
  align-items: center;
  gap: 12px;
  padding: 0 18px 0 20px;
  background: #0d0d0d;
  border-bottom: 1px solid var(--border);
}

.qualifying-row > span:first-child {
  color: #555555;
  font: 9px monospace;
  letter-spacing: 1.5px;
}

.qualifying-row div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.qualifying-row strong {
  color: #eeeeee;
  font-size: 12px;
}

.qualifying-row small {
  color: #555555;
  font-size: 8px;
}

.qualifying-row > span:not(:first-child) {
  color: #888888;
  font: 9px monospace;
  text-align: right;
}

.upcoming-classification,
.upcoming-qualifying {
  opacity: 0.7;
}

@media (max-width: 700px) {
  .classification-grid,
  .qualifying-visible {
    grid-template-columns: 1fr;
  }

  .classification-row {
    grid-template-columns: 42px minmax(0, 1fr) 90px;
    gap: 10px;
  }

  .qualifying-row {
    grid-template-columns: 36px minmax(0, 1fr) 88px;
    gap: 8px;
  }

  .pole-position-card {
    min-height: 220px;
  }

  .pole-position-content {
    left: 28px;
    bottom: 24px;
  }

  .pole-position-content h3 {
    font-size: 23px;
  }

  .pole-position-time {
    right: 20px;
    bottom: 22px;
    font-size: 28px;
  }
}

/* =====================================================
   RACE CENTER RESULT / QUALIFYING VISIBILITY FIX
===================================================== */
#raceClassificationRemaining[hidden],
#qualifyingRemaining[hidden] {
  display: none !important;
}

#raceClassificationSection .classification-grid {
  margin-top: 10px;
}

#raceClassificationSection .data-more-button {
  margin-top: 22px;
}

#qualifyingSection .data-more-button {
  margin-top: 22px;
}

/* =====================================================
   RACE RESULT / QUALIFYING FINAL REFINEMENT
===================================================== */
#raceClassificationSection .race-visible-positions {
  margin-top: 10px;
}

#raceClassificationSection
  .race-visible-positions
  .classification-row:first-child {
  border-top: 1px solid var(--border);
}

#raceClassificationSection .race-visible-positions,
#raceClassificationSection .classification-remaining {
  display: flex;
  flex-direction: column;
}

#raceClassificationSection .classification-card {
  display: none;
}

/* Pole-position image uses the same split visual treatment as Fastest Lap. */
#polePositionCard {
  margin-bottom: 10px;
}

#polePositionCard .pole-position-card {
  position: relative;
  min-height: 275px;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  overflow: hidden;
  background: #111111;
  border: 1px solid var(--border);
}

#polePositionCard .pole-position-card > img {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  opacity: 0.95;
  z-index: 1;
}

#polePositionCard .pole-position-fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #111111 0%,
    rgba(17, 17, 17, 0.98) 42%,
    rgba(17, 17, 17, 0.55) 62%,
    rgba(17, 17, 17, 0.08) 100%
  );
}

#polePositionCard .pole-position-content {
  position: absolute;
  left: 42px;
  bottom: 38px;
  z-index: 5;
}

#polePositionCard .pole-position-time {
  position: absolute;
  right: 34px;
  bottom: 28px;
  z-index: 5;
  color: #f5f5f5;
  font: 700 clamp(30px, 4vw, 52px) monospace;
  letter-spacing: -2px;
}

@media (max-width: 700px) {
  #polePositionCard .pole-position-card {
    grid-template-columns: 1fr;
    min-height: 440px;
  }

  #polePositionCard .pole-position-card > img {
    left: 0;
    top: 45%;
    width: 100%;
    height: 55%;
    object-position: center 30%;
  }

  #polePositionCard .pole-position-fade {
    background: linear-gradient(
      180deg,
      #111111 0%,
      rgba(17, 17, 17, 0.72) 48%,
      rgba(17, 17, 17, 0.08) 100%
    );
  }

  #polePositionCard .pole-position-content {
    left: 28px;
    bottom: auto;
    top: 28px;
  }

  #polePositionCard .pole-position-time {
    right: 20px;
    bottom: 22px;
    font-size: 28px;
  }
}

/* =====================================================
   RACE / QUALIFYING TEAM COLOR SYSTEM
   Uses OpenF1 team_colour when available, with class fallbacks.
===================================================== */
.classification-card::before,
.classification-row::before,
.qualifying-card::before,
.qualifying-row::before,
.pole-position-card::before {
  background: var(--team-color, #333333);
}

.classification-card.team-mercedes::before,
.classification-row.team-mercedes::before,
.qualifying-card.team-mercedes::before,
.qualifying-row.team-mercedes::before,
.pole-position-card.team-mercedes::before {
  background: var(--mercedes);
}
.classification-card.team-ferrari::before,
.classification-row.team-ferrari::before,
.qualifying-card.team-ferrari::before,
.qualifying-row.team-ferrari::before,
.pole-position-card.team-ferrari::before {
  background: var(--ferrari);
}
.classification-card.team-redbull::before,
.classification-row.team-redbull::before,
.qualifying-card.team-redbull::before,
.qualifying-row.team-redbull::before,
.pole-position-card.team-redbull::before {
  background: var(--redbull);
}
.classification-card.team-mclaren::before,
.classification-row.team-mclaren::before,
.qualifying-card.team-mclaren::before,
.qualifying-row.team-mclaren::before,
.pole-position-card.team-mclaren::before {
  background: var(--mclaren);
}

/* Pole-position visual matches the Fastest Lap transition. */
#polePositionCard .pole-position-card {
  grid-template-columns: 1fr 0.85fr;
}

#polePositionCard .pole-position-card > img {
  left: 50%;
  width: 50%;
  object-position: center 15%;
  opacity: 0.95;
}

#polePositionCard .pole-position-fade {
  background: linear-gradient(
    90deg,
    #111111 0%,
    rgba(17, 17, 17, 0.55) 18%,
    rgba(17, 17, 17, 0.08) 58%,
    rgba(17, 17, 17, 0.15) 100%
  );
}

#polePositionCard .pole-position-time-box {
  position: absolute;
  right: 28px;
  bottom: 25px;
  z-index: 6;
  display: flex;
  align-items: center;
  padding: 13px 16px;
  background: rgba(8, 8, 8, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

#polePositionCard .pole-position-time {
  position: static;
  color: #f5f5f5;
  font: 700 clamp(30px, 4vw, 52px) monospace;
  letter-spacing: -2px;
}

@media (max-width: 700px) {
  #polePositionCard .pole-position-card > img {
    left: 0;
    width: 100%;
    object-position: center 30%;
  }

  #polePositionCard .pole-position-fade {
    background: linear-gradient(
      180deg,
      #111111 0%,
      rgba(17, 17, 17, 0.72) 48%,
      rgba(17, 17, 17, 0.08) 100%
    );
  }

  #polePositionCard .pole-position-time-box {
    right: 20px;
    bottom: 22px;
    padding: 10px 12px;
  }

  #polePositionCard .pole-position-time {
    font-size: 28px;
  }
}

/* =====================================================
   POLE POSITION / FASTEST LAP VISUAL MATCH
   Keep the pole-position image on the right half and use
   the same dark-to-image transition used by Fastest Lap.
===================================================== */
#polePositionCard .pole-position-card {
  grid-template-columns: 1fr 1fr;
  background: #111111;
}

#polePositionCard .pole-position-card > img {
  left: 50%;
  right: auto;
  top: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  opacity: 0.95;
}

#polePositionCard .pole-position-fade {
  left: 50%;
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    #111111 0%,
    rgba(17, 17, 17, 0.55) 18%,
    rgba(17, 17, 17, 0.08) 58%,
    rgba(17, 17, 17, 0.15) 100%
  );
}

#polePositionCard .pole-position-content {
  left: 42px;
  bottom: 38px;
  z-index: 5;
}

#polePositionCard .pole-position-time-box {
  right: 28px;
  bottom: 25px;
  z-index: 6;
}

@media (max-width: 700px) {
  #polePositionCard .pole-position-card {
    grid-template-columns: 1fr;
    min-height: 440px;
  }

  #polePositionCard .pole-position-card > img {
    left: 0;
    top: 45%;
    width: 100%;
    height: 55%;
    object-position: center 30%;
  }

  #polePositionCard .pole-position-fade {
    left: 0;
    right: 0;
    top: 45%;
    bottom: 0;
    background: linear-gradient(
      180deg,
      #111111 0%,
      rgba(17, 17, 17, 0.55) 25%,
      rgba(17, 17, 17, 0.08) 70%,
      rgba(17, 17, 17, 0.15) 100%
    );
  }
}

/* =====================================================
   STARTING GRID VS FINISH
===================================================== */

#gridFinishSection {
  position: relative;
}

.grid-finish-table {
  border-top: 1px solid var(--border);
  background: #0d0d0d;
}

.grid-finish-head,
.grid-finish-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 55px 80px 100px;
  align-items: center;
  gap: 12px;
}

.grid-finish-head {
  min-height: 38px;
  padding: 0 20px;
  color: #4d4d4d;
  font: 8px monospace;
  letter-spacing: 1.8px;
  border-bottom: 1px solid var(--border);
}

.grid-finish-row {
  position: relative;
  min-height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: #0d0d0d;
}

.grid-finish-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--team-color, #333);
}

.grid-finish-row.team-mercedes::before {
  background: var(--mercedes);
}
.grid-finish-row.team-ferrari::before {
  background: var(--ferrari);
}
.grid-finish-row.team-redbull::before {
  background: var(--redbull);
}
.grid-finish-row.team-mclaren::before {
  background: var(--mclaren);
}

.grid-finish-position {
  color: #666;
  font: 700 11px monospace;
}

.grid-finish-position.finish {
  color: #eee;
}

.grid-finish-driver {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.grid-finish-driver strong {
  color: #eee;
  font-size: 13px;
}

.grid-finish-driver span {
  color: #555;
  font-size: 8px;
  letter-spacing: 1px;
}

.grid-finish-arrow {
  color: #444;
  font-size: 13px;
  text-align: center;
}

.grid-move {
  justify-self: end;
  min-width: 48px;
  text-align: right;
  font: 700 10px monospace;
}

.grid-move.gain {
  color: #9bbf9b;
}

.grid-move.loss {
  color: #c47b7b;
}

.grid-move.neutral,
.grid-move.status {
  color: #666;
}

#gridFinishRemaining[hidden] {
  display: none !important;
}

.grid-finish-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
}

.grid-finish-highlight {
  min-height: 112px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #111;
  border: 1px solid var(--border);
}

.grid-finish-highlight span {
  color: #555;
  font: 800 8px monospace;
  letter-spacing: 2px;
}

.grid-finish-highlight strong {
  margin-top: 9px;
  color: #eee;
  font-size: 17px;
}

.grid-finish-highlight small {
  margin-top: 5px;
  color: #666;
  font: 9px monospace;
}

.grid-finish-highlight.loss strong {
  color: #d0a0a0;
}

/* =====================================================
   BACK TO TOP
===================================================== */

/* =====================================================
   OVERVIEW SEASON CALENDAR MODAL
   ===================================================== */

html.calendar-modal-open,
body.calendar-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

#dashboardOverview .overview-next-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

#dashboardOverview .overview-next-heading > span {
  min-width: 0;
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
}

#dashboardOverview .overview-calendar-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid #303030;
  background: #101010;
  color: #bdbdbd;
  padding: 8px 11px;
  font:
    800 8px/1 Arial,
    sans-serif;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

#dashboardOverview .overview-calendar-button span:first-child {
  color: #e10600;
  font-size: 13px;
  line-height: 0.8;
}

#dashboardOverview .overview-calendar-button:hover,
#dashboardOverview .overview-calendar-button:focus-visible {
  border-color: #e10600;
  color: #fff;
  background: #151515;
  outline: none;
}

.calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.calendar-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.calendar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.calendar-modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(820px, calc(100vh - 64px));
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: #e10600 #080808;
  background: #0b0b0b;
  border: 1px solid #292929;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.calendar-modal-panel::-webkit-scrollbar {
  width: 6px;
}

.calendar-modal-panel::-webkit-scrollbar-track {
  background: #080808;
}

.calendar-modal-panel::-webkit-scrollbar-thumb {
  background: #e10600;
  box-shadow:
    0 0 4px rgba(225, 6, 0, 0.9),
    0 0 10px rgba(225, 6, 0, 0.55);
}

.calendar-modal.open .calendar-modal-panel {
  transform: translateY(0);
}

.calendar-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 38px 26px;
  border-bottom: 1px solid #222;
}

.calendar-modal-header .eyebrow {
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.5px;
}

.calendar-modal-header h2 {
  margin: 10px 0 9px;
  color: #f1f1f1;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 0.86;
  letter-spacing: -2.8px;
}

.calendar-modal-header h2 i {
  color: #e10600;
  font-style: italic;
}

.calendar-modal-header p {
  margin: 0;
  color: #666;
  font-size: 10px;
  letter-spacing: 0.2px;
}

.calendar-modal-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #303030;
  background: #101010;
  color: #aaa;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.calendar-modal-close:hover,
.calendar-modal-close:focus-visible {
  border-color: #e10600;
  color: #fff;
  outline: none;
}

.calendar-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #222;
}

.calendar-modal-summary > div {
  padding: 15px 38px;
  border-right: 1px solid #222;
}

.calendar-modal-summary > div:last-child {
  border-right: 0;
}

.calendar-modal-summary span,
.calendar-modal-section-heading span {
  display: block;
  color: #555;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.8px;
}

.calendar-modal-summary strong {
  display: block;
  margin-top: 5px;
  color: #eee;
  font: 700 17px/1 monospace;
}

.calendar-modal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.calendar-modal-section {
  min-width: 0;
  max-height: 470px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.calendar-modal-section + .calendar-modal-section {
  border-left: 1px solid #222;
}

.calendar-modal-section-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 24px 13px;
  background: #0b0b0b;
  border-bottom: 1px solid #222;
}

.calendar-modal-section-heading span {
  color: #e10600;
}

.calendar-modal-section-heading strong {
  color: #555;
  font: 700 11px/1 monospace;
}

.calendar-modal-list {
  padding: 0 24px 24px;
}

.calendar-modal-race {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid #1d1d1d;
}

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

.calendar-modal-race-round {
  color: #454545;
  font: 700 11px/1 monospace;
  padding-top: 3px;
}

.calendar-modal-race-main {
  min-width: 0;
}

.calendar-modal-race-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.calendar-modal-race-topline span {
  color: #555;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.calendar-modal-race.upcoming .calendar-modal-race-topline span {
  color: #e10600;
}

.calendar-modal-race-topline strong {
  color: #777;
  font: 700 8px/1 monospace;
  white-space: nowrap;
}

.calendar-modal-race h3 {
  margin: 0 0 5px;
  color: #ddd;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.calendar-modal-race p {
  margin: 0;
  color: #555;
  font-size: 8px;
  letter-spacing: 0.5px;
}

.calendar-modal-empty {
  padding: 35px 0;
  color: #555;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

@media (max-width: 700px) {
  .calendar-modal {
    align-items: flex-end;
    padding: 0;
  }

  .calendar-modal-panel {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .calendar-modal-header {
    padding: 24px 20px 19px;
    gap: 15px;
  }

  .calendar-modal-header h2 {
    font-size: clamp(35px, 11vw, 48px);
    letter-spacing: -2.2px;
  }

  .calendar-modal-header p {
    max-width: 240px;
    line-height: 1.4;
  }

  .calendar-modal-close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10002;
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .calendar-modal-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .calendar-modal-summary > div {
    padding: 12px 15px;
  }

  .calendar-modal-columns {
    display: block;
  }

  .calendar-modal-section {
    max-height: none;
    overflow: visible;
  }

  .calendar-modal-section + .calendar-modal-section {
    border-left: 0;
    border-top: 1px solid #222;
  }

  .calendar-modal-section-heading {
    padding: 15px 20px 11px;
  }

  .calendar-modal-list {
    padding: 0 20px 18px;
  }

  .calendar-modal-race {
    grid-template-columns: 30px 1fr;
    gap: 10px;
    padding: 15px 0;
  }

  .calendar-modal-race-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .calendar-modal-race-topline strong {
    font-size: 7px;
  }

  .calendar-modal-race h3 {
    font-size: 14px;
  }

  #dashboardOverview .overview-next-heading {
    position: relative;
    display: block;
    min-height: 38px;
    padding-right: 42px;
  }

  #dashboardOverview .overview-next-heading > span {
    display: block;
    padding-top: 3px;
  }

  #dashboardOverview .overview-calendar-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    justify-content: center;
    padding: 0;
    gap: 0;
    font-size: 0;
    letter-spacing: 0;
  }

  #dashboardOverview .overview-calendar-button span:first-child {
    font-size: 14px;
    line-height: 1;
  }

  #dashboardOverview .overview-next .overview-race-copy h4 {
    padding-right: 0;
  }
}

@media (max-width: 380px) {
  #dashboardOverview .overview-calendar-button span:last-child {
    display: none;
  }

  #dashboardOverview .overview-calendar-button {
    width: 30px;
    justify-content: center;
    padding: 7px 0;
  }

  .calendar-modal-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .calendar-modal-summary > div {
    padding-left: 11px;
    padding-right: 11px;
  }

  .calendar-modal-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .calendar-modal-section-heading {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3a3a3a;
  background: #111111;
  color: #ffffff;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

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

.back-to-top:hover {
  background: #e10600;
  border-color: #e10600;
  color: #ffffff;
}

@media (max-width: 600px) {
  .back-to-top {
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    font-size: 17px;
  }
}

/* FINAL DASHBOARD ALIGNMENT — DESKTOP ONLY */
@media (min-width: 901px) {
  main.dashboard-mode .dashboard-panel:not(#dashboardRace) .dashboard-heading {
    width: min(1600px, 89vw) !important;
    max-width: 1600px !important;
    margin: 0 auto 42px !important;
    padding-top: 20px !important;
    box-sizing: border-box !important;
  }

  main.dashboard-mode #dashboardOverview .overview-hero-new,
  main.dashboard-mode #dashboardDrivers .drivers-hero,
  main.dashboard-mode #dashboardTeams .rev-teams-intro,
  main.dashboard-mode #dashboardChampionship .championship-hero {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  main.dashboard-mode #dashboardOverview .overview-hero-copy,
  main.dashboard-mode #dashboardDrivers .drivers-hero-copy,
  main.dashboard-mode #dashboardTeams .rev-teams-intro,
  main.dashboard-mode #dashboardChampionship .championship-hero-copy {
    width: min(1600px, 89vw) !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 58px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  main.dashboard-mode #dashboardOverview .overview-hero-copy h2,
  main.dashboard-mode #dashboardDrivers .drivers-hero-copy h2,
  main.dashboard-mode #dashboardTeams .rev-teams-intro h2,
  main.dashboard-mode #dashboardChampionship .championship-hero h2 {
    margin-top: 24px !important;
  }
}

@media (min-width: 901px) {
  main.dashboard-mode #dashboardOverview .overview-hero-copy {
    padding-top: 64px !important;
  }
}
/* =====================================================
   FINAL RESPONSIVE OVERRIDES
   Desktop (901px+) is intentionally untouched.
===================================================== */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    min-height: 60px;
    padding: 0 18px;
    gap: 14px;
    box-sizing: border-box;
  }

  .brand {
    flex: 0 0 auto;
    height: 60px;
    gap: 10px;
  }

  .navbar-dashboard {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
  }

  .dashboard-nav {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-nav::-webkit-scrollbar {
    display: none;
  }

  .dashboard-tab {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 11px;
    border: 1px solid #292929;
    border-radius: 3px;
    background: #0c0c0c;
    color: #666;
    font-size: 7px;
    letter-spacing: 1.25px;
    white-space: nowrap;
  }

  .dashboard-tab:after {
    display: none;
  }

  .dashboard-tab.active {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
  }

  main.dashboard-mode {
    width: 100% !important;
    max-width: none !important;
  }

  main.dashboard-mode .dashboard-panel:not(#dashboardRace) {
    width: 100% !important;
  }

  main.dashboard-mode .dashboard-panel:not(#dashboardRace) .dashboard-heading,
  main.dashboard-mode .drivers-hero-copy,
  main.dashboard-mode .drivers-featured,
  main.dashboard-mode .drivers-grid-section,
  main.dashboard-mode .rev-races,
  main.dashboard-mode .rev-progress,
  main.dashboard-mode .rev-league,
  main.dashboard-mode .rev-championship-list {
    width: 90% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Teams hero: fit the complete composition inside the viewport. */
  #dashboardTeams .rev-teams-intro {
    width: 100% !important;
    max-width: none !important;
    min-height: 0;
    height: auto;
    padding: 30px 5% 28px;
    overflow: hidden;
    box-sizing: border-box;
  }

  #dashboardTeams .rev-teams-intro:after {
    right: 1%;
    top: 24px;
    font-size: clamp(145px, 25vw, 235px);
    line-height: 0.8;
    letter-spacing: -0.08em;
    white-space: nowrap;
  }

  #dashboardTeams .rev-teams-intro h2 {
    max-width: 76%;
    margin: 15px 0 0;
    font-size: clamp(47px, 9vw, 80px);
    line-height: 0.87;
  }

  #dashboardTeams .rev-teams-intro > p {
    max-width: 310px;
    margin: 14px 0 0;
    font-size: 11px;
    line-height: 1.4;
  }

  #dashboardTeams .rev-teams-roster {
    width: 90% !important;
    max-width: none !important;
    margin: 0 auto !important;
  }

  #dashboardTeams .rev-team-feature {
    grid-template-columns: 28px minmax(0, 1fr) minmax(76px, 92px);
    gap: 10px;
    min-height: 0;
    padding: 20px 0;
    overflow: visible;
  }

  #dashboardTeams .rev-team-title h3 {
    margin: 7px 0 8px;
    font-size: clamp(29px, 6.5vw, 48px);
    line-height: 0.92;
  }

  #dashboardTeams .rev-team-pair {
    gap: 6px 12px;
  }

  #dashboardTeams .rev-team-pair span,
  #dashboardTeams .rev-team-pair b {
    font-size: 8px;
  }

  #dashboardTeams .rev-team-score {
    min-width: 0;
    padding-right: 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 0.9;
    white-space: nowrap;
  }

  #dashboardTeams .rev-team-score small {
    display: block;
    margin-top: 5px;
    font-size: 7px;
  }

  /* Keep every other long section inside its own width. */
  #dashboardTeams #teamsContent,
  #dashboardTeams .rev-teams-roster,
  #dashboardChampionship .championship-hero,
  #dashboardChampionship .championship-standings,
  .rev-championship-list,
  .championship-history {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 600px) {
  .navbar {
    height: 56px;
    min-height: 56px;
    padding: 0 12px;
    gap: 8px;
  }

  .brand {
    height: 56px;
  }

  .f1-logo {
    font-size: 25px;
    margin-right: 9px;
  }

  .brand-divider,
  .brand-title,
  .season-selector-label {
    display: none;
  }

  .navbar-dashboard,
  .dashboard-nav {
    height: 56px;
  }

  .dashboard-nav {
    gap: 5px;
  }

  .dashboard-tab {
    height: 29px;
    padding: 0 9px;
    font-size: 6.5px;
    letter-spacing: 1px;
  }

  .dashboard-panel:not(#dashboardRace) {
    padding: 24px 0 44px;
  }

  .dashboard-panel:not(#dashboardRace) .dashboard-heading {
    margin-bottom: 18px;
  }

  .dashboard-panel:not(#dashboardRace) .dashboard-heading h1 {
    font-size: clamp(44px, 14vw, 62px);
    line-height: 0.9;
    letter-spacing: -3px;
  }

  .dashboard-panel:not(#dashboardRace) .dashboard-heading p {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.35;
  }

  /* Teams phone layout: no oversized empty hero and no cropped watermark. */
  #dashboardTeams .rev-teams-intro {
    padding: 22px 5% 24px;
  }

  #dashboardTeams .rev-teams-intro:after {
    right: 1%;
    top: 34px;
    font-size: clamp(118px, 33vw, 175px);
    line-height: 0.76;
  }

  #dashboardTeams .rev-teams-intro h2 {
    max-width: 84%;
    margin-top: 12px;
    font-size: clamp(42px, 13.5vw, 60px);
    line-height: 0.86;
  }

  #dashboardTeams .rev-teams-intro > p {
    max-width: 235px;
    margin-top: 11px;
    font-size: 10px;
  }

  #dashboardTeams .rev-team-feature {
    grid-template-columns: 22px minmax(0, 1fr) 68px;
    gap: 8px;
    padding: 16px 0;
  }

  #dashboardTeams .rev-team-feature .rev-pos {
    margin-top: 3px;
    font-size: 7px;
  }

  #dashboardTeams .rev-team-title h3 {
    margin: 5px 0 7px;
    font-size: clamp(24px, 8vw, 34px);
    letter-spacing: -0.055em;
  }

  #dashboardTeams .rev-team-pair {
    gap: 5px 9px;
  }

  #dashboardTeams .rev-team-pair span,
  #dashboardTeams .rev-team-pair b {
    font-size: 7px;
  }

  #dashboardTeams .rev-team-score {
    font-size: clamp(27px, 8vw, 34px);
  }

  #dashboardTeams .rev-team-score small {
    font-size: 6px;
    letter-spacing: 1.5px;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
  }
}

/* Teams: let the visual field breathe to the viewport edge. */
@media (min-width: 901px) {
  #dashboardTeams .rev-teams-intro:after {
    right: 0;
  }

  #dashboardTeams .rev-team-feature {
    overflow: visible;
  }

  #dashboardTeams .rev-team-feature:after {
    right: -5.5vw;
    width: 70vw;
    height: 100%;
    top: 0;
    background: radial-gradient(
      ellipse at 78% 50%,
      color-mix(in srgb, var(--team-accent) 15%, transparent),
      transparent 70%
    );
  }
}

@media (max-width: 900px) {
  #dashboardTeams .rev-teams-roster {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
  }

  #dashboardTeams .rev-team-feature {
    padding-left: 5vw;
    padding-right: 5vw;
  }

  #dashboardTeams .rev-team-feature:after {
    right: -5vw;
    width: 72vw;
    top: 0;
    height: 100%;
    background: radial-gradient(
      ellipse at 78% 50%,
      color-mix(in srgb, var(--team-accent) 14%, transparent),
      transparent 70%
    );
  }
}

/* Final Teams watermark correction: keep the full mark visible while letting it touch the viewport edge. */
@media (max-width: 900px) {
  #dashboardTeams .rev-teams-intro:after {
    right: 0;
    top: 10px;
    font-size: clamp(135px, 35vw, 205px);
    line-height: 0.82;
    letter-spacing: -0.08em;
  }
}

/* Teams desktop watermark: full-viewport hero so the watermark is not constrained by the 89vw content rail. */
@media (min-width: 901px) {
  main.dashboard-mode #dashboardTeams .rev-teams-intro {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  main.dashboard-mode #dashboardTeams .rev-teams-intro:after {
    right: 0 !important;
  }
}

/* =====================================================
   TEAMS DESKTOP COMPOSITION FIX
   Keep the hero full-bleed like the other dashboard heroes,
   while keeping its content on the shared 89vw editorial rail.
===================================================== */
@media (min-width: 901px) {
  main.dashboard-mode #dashboardTeams .rev-teams-intro {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: max(5.5vw, calc((100vw - 1600px) / 2)) !important;
    padding-right: max(5.5vw, calc((100vw - 1600px) / 2)) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  main.dashboard-mode #dashboardTeams .rev-teams-intro h2,
  main.dashboard-mode #dashboardTeams .rev-teams-intro > p,
  main.dashboard-mode #dashboardTeams .rev-teams-intro > .rev-eyebrow {
    position: relative;
    z-index: 2;
  }

  main.dashboard-mode #dashboardTeams .rev-teams-intro:after {
    right: 0 !important;
    top: -42px !important;
    overflow: visible !important;
  }
}

/* =====================================================
   MOBILE NAVIGATION
   Desktop navbar remains unchanged above 700px.
===================================================== */
.mobile-nav-toggle,
.mobile-dashboard-menu {
  display: none;
}

@media (max-width: 700px) {
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .navbar-dashboard,
  .navbar .season-selector-label {
    display: none;
  }

  .navbar .brand-title {
    display: block;
    font-size: 7px;
    letter-spacing: 1.6px;
    white-space: nowrap;
  }

  .navbar .brand-divider {
    display: block;
    height: 15px;
  }

  .navbar .brand {
    min-width: 0;
  }

  .mobile-nav-toggle {
    display: flex;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    border: 1px solid #292929;
    border-radius: 3px;
    background: #0c0c0c;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 15px;
    height: 1px;
    background: #d8d8d8;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  .navbar.mobile-nav-open .mobile-nav-toggle {
    border-color: var(--red);
  }

  .navbar.mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .navbar.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .navbar.mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-dashboard-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    border-top: 1px solid #202020;
    border-bottom: 1px solid #292929;
    background: rgba(8, 8, 8, 0.98);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }

  .navbar.mobile-nav-open .mobile-dashboard-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-dashboard-menu-inner {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 18px 14px;
  }

  .mobile-dashboard-menu-label {
    margin: 2px 0 7px;
    color: #555;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 2px;
  }

  .mobile-dashboard-menu nav {
    display: flex;
    flex-direction: column;
  }

  .mobile-dashboard-tab {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 0 8px 0 0;
    border: 0;
    border-bottom: 1px solid #181818;
    background: transparent;
    color: #737373;
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-dashboard-tab:last-child {
    border-bottom: 0;
  }

  .mobile-dashboard-tab::after {
    content: "";
    position: absolute;
    left: -18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--red);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.18s ease;
  }

  .mobile-dashboard-tab.active {
    color: #fff;
  }

  .mobile-dashboard-tab.active::after {
    transform: scaleY(1);
  }

  .mobile-dashboard-index {
    color: #444;
    font-size: 7px;
    letter-spacing: 1px;
  }

  .mobile-dashboard-tab.active .mobile-dashboard-index {
    color: var(--red);
  }
}

/* STICKY NAVBAR — keep the document on one viewport scroll container */
html {
  overflow-x: clip !important;
}

body {
  overflow-x: visible !important;
}

.navbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 10000 !important;
}

@media (max-width: 900px) {
  .navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
  }
}

/* =====================================================
   OVERVIEW — MOBILE COMPOSITION ONLY
   Desktop (701px+) remains unchanged.
===================================================== */
@media (max-width: 700px) {
  #dashboardOverview .dashboard-heading {
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 18px;
  }

  #dashboardOverview .dashboard-heading p {
    width: 100%;
    max-width: 330px !important;
    margin-top: 8px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.45;
  }

  main.overview-fullscreen #dashboardOverview .overview-hero-copy,
  main.overview-fullscreen #dashboardOverview .overview-metrics,
  main.overview-fullscreen #dashboardOverview .overview-race-pulse,
  main.overview-fullscreen #dashboardOverview .overview-championship {
    padding-left: 5%;
    padding-right: 5%;
  }

  #dashboardOverview .overview-hero-new {
    min-height: 535px;
  }

  #dashboardOverview .overview-hero-copy {
    width: 100%;
    padding-top: 38px;
  }

  #dashboardOverview .overview-hero-description {
    width: 100%;
    max-width: 300px;
    overflow-wrap: normal;
  }

  #dashboardOverview .overview-metrics {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 54px;
  }

  #dashboardOverview .overview-metrics > div,
  #dashboardOverview .overview-metrics > div + div {
    margin: 0;
    padding: 19px 14px 21px 0;
    border-left: 0;
  }

  #dashboardOverview .overview-metrics > div:nth-child(even) {
    padding-left: 18px;
    border-left: 1px solid #292929;
  }

  #dashboardOverview .overview-metrics > div:nth-child(n + 3) {
    border-top: 1px solid #292929;
  }

  #dashboardOverview .overview-metrics strong {
    font-size: clamp(24px, 7vw, 32px);
    letter-spacing: -1.5px;
  }

  #dashboardOverview .overview-race-pulse {
    display: block;
    margin-bottom: 48px;
  }

  #dashboardOverview .overview-section-intro {
    margin-bottom: 26px;
  }

  #dashboardOverview .overview-race-story {
    min-height: 260px;
    margin-bottom: 26px;
  }

  #dashboardOverview .overview-race-next {
    min-height: 175px;
    margin-bottom: 0;
  }

  #dashboardOverview .overview-next-number {
    display: none;
  }

  #dashboardOverview .overview-next .overview-race-copy {
    left: 0;
    right: 0;
    bottom: 20px;
  }

  #dashboardOverview .overview-next-arrow {
    right: 4px;
    bottom: 15px;
    font-size: 34px;
  }
}

/* =====================================================
   OVERVIEW MOBILE REFINEMENT — LEADER + NEXT ROUND
   Desktop remains unchanged except for removal of leader team label in markup.
===================================================== */
@media (max-width: 700px) {
  #dashboardOverview .overview-leader-line {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: end;
  }

  #dashboardOverview .overview-leader-line strong {
    min-width: 0;
    white-space: nowrap;
    font-size: clamp(25px, 7vw, 30px);
    letter-spacing: -1.8px;
  }

  #dashboardOverview .overview-leader-line b {
    white-space: nowrap;
    font-size: clamp(27px, 7.5vw, 31px);
    letter-spacing: -2px;
  }

  #dashboardOverview .overview-leader-line small {
    font-size: 8px;
  }

  #dashboardOverview .overview-race-pulse {
    margin-bottom: 58px;
  }

  #dashboardOverview .overview-race-story.overview-race-last {
    min-height: 255px;
    margin-bottom: 20px;
  }

  #dashboardOverview .overview-race-story.overview-race-next {
    min-height: 0;
    height: auto;
    margin-bottom: 0;
    background: transparent;
    overflow: visible;
  }

  #dashboardOverview .overview-next-number {
    display: none;
  }

  #dashboardOverview .overview-next .overview-race-copy {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 26px 0 30px;
  }

  #dashboardOverview .overview-next .overview-race-copy h4 {
    font-size: clamp(32px, 9.2vw, 40px);
    line-height: 0.95;
    letter-spacing: -2px;
    margin: 11px 42px 9px 0;
  }

  #dashboardOverview .overview-next .overview-race-copy p {
    margin: 0;
  }

  #dashboardOverview .overview-next-arrow {
    right: 0;
    bottom: 30px;
    font-size: 34px;
  }
}

/* =====================================================
   OVERVIEW MOBILE CALENDAR FINAL COMPOSITION
   Mobile only. Desktop remains unchanged.
===================================================== */
@media (max-width: 700px) {
  #dashboardOverview .overview-race-pulse {
    margin-bottom: 42px;
  }

  #dashboardOverview .overview-race-story.overview-race-last {
    min-height: 290px;
    margin-bottom: 18px;
    overflow: hidden;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy {
    left: 0;
    right: 0;
    bottom: 18px;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy
    h4 {
    font-size: clamp(31px, 8.2vw, 36px);
    line-height: 0.94;
    letter-spacing: -2.2px;
    margin: 10px 0 8px;
    white-space: nowrap;
  }

  #dashboardOverview .overview-race-story.overview-race-next {
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  #dashboardOverview .overview-next .overview-race-copy {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 18px 0 24px;
  }

  #dashboardOverview .overview-next .overview-race-copy > span {
    display: block;
    margin-bottom: 8px;
  }

  #dashboardOverview .overview-next .overview-race-copy h4 {
    font-size: clamp(29px, 8vw, 34px);
    line-height: 0.96;
    letter-spacing: -2px;
    margin: 0 34px 8px 0;
    white-space: nowrap;
  }

  #dashboardOverview .overview-next .overview-race-copy p {
    margin: 0;
  }

  #dashboardOverview .overview-next-arrow {
    right: 0;
    bottom: 27px;
    font-size: 30px;
  }
}

/* =====================================================
   OVERVIEW MOBILE CALENDAR — CLEAN STACK
   Mobile only. Desktop remains untouched.
===================================================== */
@media (max-width: 700px) {
  #dashboardOverview .overview-race-pulse {
    display: block !important;
    margin-bottom: 42px !important;
  }

  #dashboardOverview .overview-section-intro {
    margin-bottom: 18px !important;
  }

  #dashboardOverview .overview-race-story.overview-race-last {
    position: relative !important;
    display: block !important;
    height: 330px !important;
    min-height: 330px !important;
    margin: 0 0 0 !important;
    overflow: hidden !important;
  }

  #dashboardOverview .overview-race-story.overview-race-last img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center 38% !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-overlay {
    position: absolute !important;
    inset: 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 14px !important;
    z-index: 3 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy
    > span {
    display: block !important;
    margin-bottom: 9px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy
    h4 {
    margin: 0 0 8px !important;
    font-size: clamp(30px, 8vw, 36px) !important;
    line-height: 0.94 !important;
    letter-spacing: -2.1px !important;
    white-space: nowrap !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy
    p {
    margin: 0 !important;
  }

  #dashboardOverview .overview-race-story.overview-race-next {
    position: relative !important;
    display: block !important;
    height: 112px !important;
    min-height: 112px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    border-top: 1px solid #e10600 !important;
    border-bottom: 1px solid #e10600 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy {
    position: absolute !important;
    left: 0 !important;
    right: 42px !important;
    bottom: 13px !important;
    padding: 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy
    > span {
    display: block !important;
    margin-bottom: 7px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy
    h4 {
    margin: 0 0 6px !important;
    font-size: clamp(28px, 7.7vw, 34px) !important;
    line-height: 0.95 !important;
    letter-spacing: -2px !important;
    white-space: nowrap !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy
    p {
    margin: 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-next-arrow {
    position: absolute !important;
    right: 0 !important;
    bottom: 18px !important;
    font-size: 29px !important;
    line-height: 1 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-next-number {
    display: none !important;
  }
}

/* =====================================================
   OVERVIEW MOBILE SPACING — FINAL TUNING
   Mobile only. Desktop remains unchanged.
===================================================== */
@media (max-width: 700px) {
  main.overview-fullscreen #dashboardOverview {
    padding-bottom: 24px !important;
  }

  #dashboardOverview .overview-race-pulse {
    margin-bottom: 58px !important;
  }
}

/* =====================================================
   DRIVERS — MOBILE SPACING / SCALE REFINEMENT
   Mobile only. Desktop remains completely untouched.
===================================================== */
@media (max-width: 600px) {
  #dashboardDrivers {
    padding-top: 38px !important;
    padding-bottom: 28px !important;
  }

  #dashboardDrivers .dashboard-heading {
    width: 90% !important;
    margin-bottom: 18px !important;
  }

  #dashboardDrivers .dashboard-heading p {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px !important;
    font-size: 10px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #dashboardDrivers .drivers-hero {
    min-height: 300px !important;
    height: 300px !important;
  }

  #dashboardDrivers .drivers-hero-copy {
    width: 90% !important;
    padding-top: 38px !important;
  }

  #dashboardDrivers .drivers-hero-copy h2 {
    max-width: 100% !important;
    margin: 14px 0 18px !important;
    font-size: clamp(48px, 13vw, 64px) !important;
    line-height: 0.79 !important;
    letter-spacing: -0.09em !important;
  }

  #dashboardDrivers .drivers-hero-copy p {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  #dashboardDrivers .drivers-hero-watermark {
    font-size: 220px !important;
    right: -3% !important;
    top: -8px !important;
  }

  #dashboardDrivers .drivers-featured {
    width: 90% !important;
    padding: 34px 0 28px !important;
  }

  #dashboardDrivers .drivers-section-intro {
    padding-top: 0 !important;
    margin-bottom: 22px !important;
  }

  #dashboardDrivers .drivers-section-intro h3 {
    font-size: clamp(38px, 11vw, 50px) !important;
    line-height: 0.84 !important;
    letter-spacing: -0.075em !important;
    margin: 13px 0 17px !important;
  }

  #dashboardDrivers .drivers-section-intro p {
    max-width: 290px !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
  }

  #dashboardDrivers .drivers-feature-list {
    width: 100% !important;
  }

  #dashboardDrivers .drivers-feature-row {
    min-height: 145px !important;
    height: 145px !important;
    padding: 0 !important;
  }

  #dashboardDrivers .drivers-feature-pos {
    width: 24px !important;
    padding-top: 14px !important;
    font-size: 8px !important;
  }

  #dashboardDrivers .drivers-feature-copy {
    max-width: 67% !important;
    padding: 22px 0 !important;
  }

  #dashboardDrivers .drivers-feature-copy .rev-eyebrow {
    font-size: 7px !important;
    letter-spacing: 1.5px !important;
    white-space: nowrap !important;
  }

  #dashboardDrivers .drivers-feature-copy h3 {
    max-width: 100% !important;
    font-size: clamp(29px, 8vw, 36px) !important;
    line-height: 0.86 !important;
    letter-spacing: -0.065em !important;
    margin: 10px 0 0 !important;
  }

  #dashboardDrivers .drivers-feature-row > img {
    width: 135px !important;
    right: -12% !important;
    opacity: 0.48 !important;
  }

  #dashboardDrivers .drivers-feature-points {
    right: 0 !important;
    top: 50% !important;
    font-size: clamp(31px, 8vw, 37px) !important;
    line-height: 0.88 !important;
    letter-spacing: -0.065em !important;
  }

  #dashboardDrivers .drivers-feature-points small {
    font-size: 6px !important;
    letter-spacing: 1.5px !important;
  }

  #dashboardDrivers .drivers-grid-section {
    width: 90% !important;
    padding: 30px 0 24px !important;
  }

  #dashboardDrivers .drivers-grid-section .drivers-section-intro {
    margin-bottom: 18px !important;
  }

  #dashboardDrivers .drivers-roster-row {
    grid-template-columns: 24px minmax(0, 1fr) 62px !important;
    gap: 8px !important;
    min-height: 68px !important;
    height: 68px !important;
  }

  #dashboardDrivers .drivers-roster-pos {
    display: block !important;
    font-size: 8px !important;
  }

  #dashboardDrivers .drivers-roster-driver > span {
    font-size: 7px !important;
    letter-spacing: 1.4px !important;
    margin-bottom: 4px !important;
  }

  #dashboardDrivers .drivers-roster-driver h4 {
    font-size: 17px !important;
    line-height: 0.95 !important;
    letter-spacing: -1px !important;
  }

  #dashboardDrivers .drivers-roster-number {
    display: none !important;
  }

  #dashboardDrivers .drivers-roster-row > strong {
    font-size: 19px !important;
    letter-spacing: -1px !important;
    white-space: nowrap !important;
  }

  #dashboardDrivers .drivers-roster-row > strong small {
    font-size: 6px !important;
    letter-spacing: 1.2px !important;
  }
}

/* =====================================================
   DRIVERS MOBILE — MATCH OVERVIEW HORIZONTAL RAIL
   Mobile only. Desktop remains completely untouched.
===================================================== */
@media (max-width: 600px) {
  #dashboardDrivers .dashboard-heading {
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #dashboardDrivers .drivers-hero-copy,
  #dashboardDrivers .drivers-featured,
  #dashboardDrivers .drivers-grid-section {
    width: 90% !important;
    box-sizing: border-box !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
  }

  #dashboardDrivers .drivers-hero {
    min-height: 235px !important;
    height: 235px !important;
  }

  #dashboardDrivers .drivers-hero-copy {
    padding-top: 38px !important;
  }

  #dashboardDrivers .drivers-featured {
    padding-top: 24px !important;
    padding-bottom: 28px !important;
  }

  #dashboardDrivers .drivers-grid-section {
    padding-top: 30px !important;
    padding-bottom: 24px !important;
  }
}

/* =====================================================
   TEAMS — MOBILE INWARD CONTENT RAIL
   Mobile only. Desktop remains untouched.
===================================================== */
@media (max-width: 600px) {
  #dashboardTeams .rev-teams-intro {
    padding-left: 10% !important;
    padding-right: 10% !important;
  }

  #dashboardTeams .rev-team-feature {
    padding-left: 10vw !important;
    padding-right: 10vw !important;
  }
}

/* =====================================================
   TEAMS MOBILE — VIEWPORT FIT / SHARED TOP SPACING
   Mobile only. Desktop remains completely untouched.
===================================================== */
@media (max-width: 600px) {
  #dashboardTeams {
    padding-top: 37px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
  }

  #dashboardTeams .dashboard-heading,
  #dashboardTeams .rev-teams-intro,
  #dashboardTeams .rev-teams-roster {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #dashboardTeams .rev-teams-intro {
    width: 100% !important;
    padding-top: 38px !important;
    overflow-x: clip !important;
  }

  #dashboardTeams .rev-teams-intro h2,
  #dashboardTeams .rev-teams-intro > p,
  #dashboardTeams .rev-teams-intro > .rev-eyebrow {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #dashboardTeams .rev-team-feature {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  #dashboardTeams .rev-team-feature > *,
  #dashboardTeams .rev-team-title,
  #dashboardTeams .rev-team-pair,
  #dashboardTeams .rev-team-score {
    min-width: 0 !important;
  }

  #dashboardTeams .rev-team-title h3 {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  #dashboardTeams .rev-team-pair {
    max-width: 100% !important;
    flex-wrap: wrap !important;
  }

  #dashboardTeams .rev-team-score {
    padding-right: 0 !important;
    white-space: nowrap !important;
  }
}

/* =====================================================
   CHAMPIONSHIP — MOBILE INWARD CONTENT RAIL
   Mobile only. Desktop remains untouched.
===================================================== */
@media (max-width: 600px) {
  #dashboardChampionship .championship-hero-copy,
  #dashboardChampionship .championship-history,
  #dashboardChampionship .championship-standings {
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
  }
}

@media (max-width: 600px) {
  #dashboardDrivers {
    padding-top: 38px !important;
    padding-bottom: 28px !important;
  }

  #dashboardTeams .rev-team-feature {
    padding-top: 26px !important;
  }
}

/* CHAMPIONSHIP MOBILE — prevent long section headings from creating horizontal overflow. */
@media (max-width: 600px) {
  #dashboardChampionship .championship-column {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #dashboardChampionship .championship-column h3 {
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: clamp(40px, 10.5vw, 44px) !important;
    line-height: 0.88 !important;
    letter-spacing: -0.07em !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}

/*CHAMPIONSHIP MOBILE - reduce space after initial heading
    to match the other dashboard heroes. */
@media (max-width: 600px) {
  #dashboardChampionship .dashboard-heading {
    margin-bottom: 18px !important;
  }
}

/* CHAMPIONSHIP MOBILE - reduce space after current leader */
@media (max-width: 600px) {
  #dashboardChampionship .championship-hero-copy {
    margin-bottom: 0px !important;
  }
}

/* CHAMPIONSHIP MOBILE - add a bit more space at the start of the page so the hero doesn't feel cramped. */
@media (max-width: 600px) {
  #dashboardChampionship .dashboard-heading {
    margin-top: 12px !important;
  }
}

/* RACE CENTER - table overflow fix for mobile */
@media (max-width: 600px) {
  #gridFinishSection .grid-finish-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  #gridFinishSection .grid-finish-head,
  #gridFinishSection .grid-finish-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: 32px minmax(0, 1fr) 28px 38px 52px;
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  #gridFinishSection .grid-finish-driver {
    min-width: 0;
  }

  #gridFinishSection .grid-finish-driver strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #gridFinishSection .grid-move {
    min-width: 0;
    white-space: nowrap;
  }
}

/* =====================================================
   NEXT RACE COUNTDOWN
   Countdown is part of the next-round card itself.
===================================================== */
#dashboardOverview .overview-next-countdown {
  display: block;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #292929;
}

#dashboardOverview .overview-countdown-label {
  display: block;
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

#dashboardOverview .overview-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

#dashboardOverview .overview-countdown-unit {
  min-width: 0;
  padding: 0 12px;
  border-left: 1px solid #292929;
}

#dashboardOverview .overview-countdown-unit:first-child {
  padding-left: 0;
  border-left: 0;
}

#dashboardOverview .overview-countdown-unit strong {
  display: block;
  color: #e10600;
  font:
    900 clamp(32px, 3.1vw, 48px)/0.86 "Courier New",
    monospace;
  font-style: normal;
  letter-spacing: -2px;
  white-space: nowrap;
}

#dashboardOverview .overview-countdown-unit span {
  display: block;
  margin-top: 7px;
  color: #777;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

#dashboardOverview .overview-next-countdown.complete .overview-countdown-grid {
  display: block;
}

#dashboardOverview
  .overview-next-countdown.complete
  .overview-countdown-grid
  strong {
  color: #777;
}

@media (max-width: 700px) {
  #dashboardOverview .overview-race-story.overview-race-last {
    height: 230px !important;
    min-height: 230px !important;
    margin-bottom: 34px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy {
    top: 52% !important;
    bottom: auto !important;
    transform: translateY(-4%) !important;
    padding-right: 0 !important;
  }

  #dashboardOverview .overview-race-story.overview-race-next {
    height: 200px !important;
    min-height: 200px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top: 1px solid #e10600 !important;
    border-bottom: 1px solid #e10600 !important;
    overflow: visible !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: auto !important;
    padding: 24px 42px 22px 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy
    h4 {
    margin: 0 0 8px !important;
    font-size: clamp(29px, 8vw, 34px) !important;
    line-height: 0.96 !important;
    letter-spacing: -2px !important;
    white-space: nowrap !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-race-copy
    p {
    margin: 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-next-countdown {
    margin-top: 20px !important;
    padding-top: 16px !important;
    border-top: 1px solid #292929 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-label {
    font-size: 7px !important;
    letter-spacing: 1.8px !important;
    margin-bottom: 9px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit {
    padding: 0 7px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit:first-child {
    padding-left: 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit
    strong {
    font-size: clamp(21px, 6.4vw, 28px) !important;
    line-height: 0.9 !important;
    letter-spacing: -1.5px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit
    span {
    margin-top: 6px !important;
    font-size: 5px !important;
    letter-spacing: 1px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-next-arrow {
    position: absolute !important;
    right: 0 !important;
    bottom: 22px !important;
    font-size: 30px !important;
    line-height: 1 !important;
  }
}

@media (max-width: 400px) {
  #dashboardOverview .overview-race-story.overview-race-next {
    height: 292px !important;
    min-height: 292px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit {
    padding: 0 5px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit
    strong {
    color: #fff;
    font-size: 20px !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit
    span {
    font-size: 4.5px !important;
    letter-spacing: 0.8px !important;
  }
}

/* =====================================================
   V26 RACE PULSE SPACING / COUNTDOWN REFINEMENT
===================================================== */
@media (min-width: 701px) {
  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-next-arrow {
    top: 112px;
    right: 24px;
    bottom: auto;
    font-size: 34px;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-countdown-unit
    strong {
    font-size: clamp(29px, 2.7vw, 43px);
  }
}

@media (max-width: 700px) {
  #dashboardOverview .overview-race-story.overview-race-last {
    margin-bottom: 48px !important;
  }

  #dashboardOverview .overview-race-story.overview-race-next {
    height: 252px !important;
    min-height: 252px !important;
    border-top: 0 !important;
    margin-top: 0 !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-next
    .overview-next-arrow {
    right: 0 !important;
    bottom: 20px !important;
    font-size: 30px !important;
  }
}

@media (max-width: 400px) {
  #dashboardOverview .overview-race-story.overview-race-next {
    height: 248px !important;
    min-height: 248px !important;
  }
}

/* =====================================================
   TRUE SEASON CALENDAR GRID
   ===================================================== */
.calendar-modal-panel {
  display: flex;
  flex-direction: column;
}

.season-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 38px;
  border-bottom: 1px solid #222;
  background: #0d0d0d;
}

.season-calendar-legend-group,
.season-calendar-session-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #777;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.season-calendar-legend-group strong {
  color: #444;
  font: 700 8px/1 monospace;
  letter-spacing: 0;
}

.season-calendar-status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  flex: 0 0 7px;
}

.season-calendar-status-dot.completed {
  background: #777;
}

.season-calendar-status-dot.upcoming {
  background: #e10600;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}

.season-calendar-session-key {
  margin-left: auto;
  color: #555;
}

.season-calendar-session-key > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.season-calendar-session-key b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  width: auto;
  height: 15px;
  padding: 0 3px;
  margin-right: 4px;
  border: 1px solid #333;
  color: #aaa;
  font:
    800 7px/1 Arial,
    sans-serif;
}

.season-calendar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 30px 38px 38px;
  overflow-y: auto;
  max-height: 500px;
  scrollbar-width: thin;
  scrollbar-color: #e10600 #080808;
}

.season-calendar::-webkit-scrollbar {
  width: 6px;
}

.season-calendar::-webkit-scrollbar-track {
  background: #080808;
}

.season-calendar::-webkit-scrollbar-thumb {
  background: #e10600;
  box-shadow:
    0 0 4px rgba(225, 6, 0, 0.9),
    0 0 10px rgba(225, 6, 0, 0.55);
}

.season-calendar-month {
  min-width: 0;
}

.season-calendar-month-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #292929;
}

.season-calendar-month-header h3 {
  margin: 0;
  color: #eee;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.season-calendar-month-header span {
  color: #444;
  font: 700 8px/1 monospace;
}

.season-calendar-weekdays,
.season-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.season-calendar-weekdays {
  margin-bottom: 3px;
}

.season-calendar-weekdays span {
  color: #444;
  text-align: center;
  font:
    800 6px/1.2 Arial,
    sans-serif;
  letter-spacing: 0.7px;
}

.season-calendar-day {
  position: relative;
  min-width: 0;
  min-height: 58px;
  padding: 8px 4px 5px;
  border: 1px solid transparent;
  text-align: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.season-calendar-day:hover {
  background: #121212;
  border-color: #252525;
}

.season-calendar-day.today {
  border-color: #333;
}

.season-calendar-date {
  display: block;
  color: #777;
  font: 700 12px/1 monospace;
}

.season-calendar-day.has-completed .season-calendar-date {
  color: #bbb;
}

.season-calendar-day.has-upcoming .season-calendar-date {
  color: #fff;
}

.season-calendar-events {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}

.season-calendar-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 20px;
  font:
    900 9px/1 Arial,
    sans-serif;
  letter-spacing: 0.2px;
}

.season-calendar-event.completed {
  background: #2a2a2a;
  color: #aaa;
  border: 1px solid #3a3a3a;
}

.season-calendar-event.upcoming {
  background: #e10600;
  color: #fff;
  border: 1px solid #e10600;
}

.season-calendar-event.qualifying {
  border-radius: 2px;
}

.season-calendar-event.race {
  border-radius: 50%;
}

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

@media (max-width: 700px) {
  .season-calendar-legend {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 20px;
    gap: 10px 18px;
  }

  .season-calendar-session-key {
    width: 100%;
    margin-left: 0;
    padding-top: 2px;
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .season-calendar {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px 16px 28px;
    max-height: none;
    overflow: visible;
  }

  .season-calendar-month-header h3 {
    font-size: 15px;
  }

  .season-calendar-day {
    min-height: 66px;
    padding: 9px 3px 5px;
  }

  .season-calendar-date {
    font-size: 14px;
  }

  .season-calendar-event {
    width: 30px;
    height: 23px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .season-calendar-legend {
    padding-left: 16px;
    padding-right: 16px;
  }

  .season-calendar {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =====================================================
   MOBILE CALENDAR UX FIXES — DO NOT AFFECT DESKTOP
===================================================== */
@media (max-width: 700px) {
  /* Keep the calendar control compact and aligned with the round label. */
  #dashboardOverview .overview-next-heading {
    min-height: 32px;
    padding-right: 38px;
  }

  #dashboardOverview .overview-calendar-button,
  #dashboardOverview .overview-calendar-button:focus-visible {
    top: -2px;
    right: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: 2px;
  }

  #dashboardOverview .overview-calendar-button span:first-child {
    font-size: 13px;
  }

  /* The panel's desktop entrance transform creates a containing block for
     position:fixed. Remove it on mobile so the close button is truly viewport-fixed. */
  .calendar-modal-panel,
  .calendar-modal.open .calendar-modal-panel {
    transform: none !important;
  }

  .calendar-modal-close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10002;
    width: 36px;
    height: 36px;
    margin: 0;
  }
}

@media (max-width: 380px) {
  #dashboardOverview .overview-next-heading {
    padding-right: 36px;
  }

  #dashboardOverview .overview-calendar-button,
  #dashboardOverview .overview-calendar-button:focus-visible {
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    min-width: 30px;
  }
}

/* =====================================================
   MOBILE NEXT-ROUND CALENDAR BUTTON — TOP RIGHT OF CARD
   Mobile only. Desktop remains untouched.
===================================================== */
@media (max-width: 700px) {
  #dashboardOverview .overview-race-story.overview-race-next {
    position: relative !important;
  }

  #dashboardOverview .overview-next-heading {
    position: static !important;
    min-height: 0 !important;
    padding-right: 0 !important;
  }

  #dashboardOverview .overview-calendar-button,
  #dashboardOverview .overview-calendar-button:focus-visible {
    position: absolute !important;
    top: -20px !important;
    right: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* =====================================================
   CALENDAR EVENT TIMES — HOVER / MOBILE TAP
   ===================================================== */
.season-calendar-day.has-event-details {
  z-index: 1;
}

.season-calendar-day.has-event-details:hover,
.season-calendar-day.has-event-details:focus-within,
.season-calendar-day.has-event-details.is-open {
  z-index: 100;
}

.season-calendar-day.has-event-details:focus-visible {
  outline: 1px solid #555;
  outline-offset: -1px;
}

/* Keep desktop time cards fully inside the calendar/modal bounds. */
@media (min-width: 701px) {
  .season-calendar-day.calendar-edge-left .season-calendar-time-details {
    left: 0;
    transform: none;
  }

  .season-calendar-day.calendar-edge-right .season-calendar-time-details {
    left: 100%;
    transform: translateX(-100%);
  }

  .season-calendar-day.calendar-edge-bottom .season-calendar-time-details {
    top: auto;
    bottom: calc(100% - 1px);
  }
}
.season-calendar-time-details {
  position: absolute;
  z-index: 200;
  top: calc(100% - 1px);
  left: 50%;
  width: 250px;
  min-width: 250px;
  max-width: 280px;
  padding: 12px 13px 11px;
  transform: translateX(-50%);
  box-sizing: border-box;
  background: #090909;
  border: 1px solid #444;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.72);
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease;
}

.season-calendar-day.has-event-details:hover .season-calendar-time-details,
.season-calendar-day.has-event-details:focus-within
  .season-calendar-time-details,
.season-calendar-day.has-event-details.is-open .season-calendar-time-details {
  opacity: 1;
  visibility: visible;
}

.season-calendar-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
  padding: 2px 0 8px;
  color: #eee;
  font: 700 10px/1.2 monospace;
  white-space: nowrap;
}

.season-calendar-time-row strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #ddd;
  font:
    800 10px/1.2 Arial,
    sans-serif;
  letter-spacing: 0.25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-calendar-time-row + .season-calendar-time-row {
  border-top: 1px solid #222;
}

.season-calendar-time-session {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 34px;
  max-width: 118px;
  min-height: 20px;
  height: auto;
  padding: 4px 6px;
  box-sizing: border-box;
  border: 1px solid #444;
  color: #fff;
  font:
    900 8px/1.1 Arial,
    sans-serif;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.season-calendar-time-zone-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 9px 0 8px;
  border-top: 1px solid #222;
  color: #eee;
  font: 800 13px/1.1 monospace;
}

.season-calendar-time-zone-row span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.season-calendar-time-zone-row b {
  color: #777;
  font:
    800 8px/1 Arial,
    sans-serif;
  letter-spacing: 0.8px;
}

.season-calendar-time-meta {
  margin-top: 1px;
  padding-top: 8px;
  border-top: 1px solid #222;
  color: #777;
  font:
    700 9px/1.3 Arial,
    sans-serif;
  letter-spacing: 0.2px;
  white-space: normal;
}

@media (max-width: 700px) {
  .season-calendar-day.has-event-details {
    cursor: pointer;
  }

  .season-calendar-day.has-event-details .season-calendar-time-details {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 9px;
    padding: 10px 9px 9px;
    transform: none;
    box-sizing: border-box;
    pointer-events: auto;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition:
      opacity 0.12s ease,
      max-height 0.12s ease,
      visibility 0.12s ease;
  }

  .season-calendar-day.has-event-details.is-open .season-calendar-time-details {
    opacity: 1;
    visibility: visible;
    max-height: 160px;
  }

  .season-calendar-day.has-event-details.is-open {
    background: #121212;
    border-color: #252525;
  }

  .season-calendar-time-row {
    padding-bottom: 9px;
    gap: 8px;
  }

  .season-calendar-time-row strong {
    font-size: 11px;
  }

  .season-calendar-time-zone-row {
    font-size: 14px;
  }

  .season-calendar-time-zone-row b {
    font-size: 8px;
  }

  .season-calendar-time-meta {
    font-size: 9px;
  }
}

/* =====================================================
   FINAL CALENDAR OVERFLOW + MOBILE EVENT DETAIL FIX
===================================================== */
@media (min-width: 701px) {
  /* The time card must never create a horizontal scroll track. */
  .season-calendar {
    overflow-x: hidden;
  }

  .season-calendar-time-details {
    max-width: min(250px, calc(100% - 8px));
  }
}

@media (max-width: 700px) {
  /* Mobile calendar stays a normal seven-column calendar. Event details
     expand as a full-width row anchored to the selected date instead of
     becoming a narrow card inside one calendar cell. */
  .season-calendar-day.has-event-details {
    z-index: 1;
  }

  .season-calendar-day.has-event-details.is-open {
    z-index: 20;
  }

  .season-calendar-day.has-event-details .season-calendar-time-details {
    position: absolute;
    top: calc(100% + 6px);
    left: var(--calendar-offset, 0%);
    width: 700%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 13px 14px 12px;
    box-sizing: border-box;
    transform: none;
    pointer-events: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.72);
    opacity: 0;
    visibility: hidden;
    max-height: none;
    overflow: visible;
  }

  .season-calendar-day.has-event-details.is-open .season-calendar-time-details {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .season-calendar-time-row {
    min-width: 0;
    padding-bottom: 10px;
  }

  .season-calendar-time-row strong {
    font-size: 12px;
  }

  .season-calendar-time-zone-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 11px 0 10px;
    font-size: 15px;
  }

  .season-calendar-time-zone-row b {
    font-size: 8px;
  }

  .season-calendar-time-meta {
    font-size: 10px;
  }
}

/* =====================================================
   FINAL CALENDAR EDGE + MULTI-SESSION DETAIL FIX
===================================================== */
@media (min-width: 701px) {
  .season-calendar-day.calendar-near-left .season-calendar-time-details {
    left: 0;
    transform: none;
  }

  .season-calendar-day.calendar-near-right .season-calendar-time-details {
    left: 100%;
    transform: translateX(-100%);
  }

  .season-calendar-day.calendar-near-left.calendar-edge-bottom
    .season-calendar-time-details,
  .season-calendar-day.calendar-near-right.calendar-edge-bottom
    .season-calendar-time-details {
    top: auto;
    bottom: calc(100% - 1px);
  }
}

.season-calendar-event-detail + .season-calendar-event-detail {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #3a3a3a;
}

@media (max-width: 700px) {
  .season-calendar-day.has-event-details .season-calendar-time-details {
    max-height: none !important;
    overflow: visible !important;
  }

  .season-calendar-event-detail + .season-calendar-event-detail {
    margin-top: 12px;
    padding-top: 12px;
  }

  .season-calendar-day.has-event-details.is-open .season-calendar-time-details {
    max-height: none !important;
  }
}

/* =====================================================
   RACE REPLAY
===================================================== */

#dashboardReplay {
  min-height: calc(100vh - 76px);
}

#dashboardReplay .replay-heading {
  margin-bottom: 30px;
}

#dashboardReplay .replay-heading p {
  white-space: normal;
  max-width: 760px !important;
}

.replay-shell {
  width: min(1600px, 89%);
  margin: 0 auto;
  padding-bottom: 90px;
}

.replay-toolbar {
  display: grid;
  grid-template-columns: minmax(360px, 390px) minmax(240px, 310px) 150px minmax(
      180px,
      1fr
    );
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.replay-race-select-wrap,
.replay-driver-select-wrap {
  min-width: 0;
}

.replay-control-label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
}

.replay-select {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--border);
  outline: none;
  border-radius: 0;
  background: #101010;
  color: #eee;
  font:
    800 10px/1 Arial,
    sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: none;
}

.replay-select:focus {
  border-color: #555;
}

.replay-load-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
  color: #666;
  font:
    800 8px/1 Arial,
    sans-serif;
  letter-spacing: 1.8px;
}

.replay-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
}

.replay-track-panel,
.replay-data-panel {
  background: #0d0d0d;
  border: 1px solid var(--border);
}

.replay-track-panel {
  min-width: 0;
}

.replay-panel-head {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.replay-panel-head h2 {
  margin: 7px 0 0;
  color: #eee;
  font-size: clamp(20px, 2.1vw, 30px);
  letter-spacing: -1.2px;
}

.replay-clock {
  flex: 0 0 auto;
  color: #eee;
  font: 700 clamp(19px, 2.1vw, 28px)/1 monospace;
  letter-spacing: -1px;
}

.replay-canvas-wrap {
  position: relative;
  min-height: 570px;
  height: min(62vw, 680px);
  overflow: hidden;
  background: #090909;
}

#replayCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.replay-canvas-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #4f4f4f;
  font:
    800 9px/1 Arial,
    sans-serif;
  letter-spacing: 2px;
  pointer-events: none;
}

.replay-canvas-empty[hidden] {
  display: none;
}

.replay-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.replay-legend-item {
  min-width: 0;
  display: grid;
  border-left: 2px solid var(--replay-color);
  grid-template-columns: 9px auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 13px 14px;
  border-right: 1px solid var(--border);
}

.replay-legend-item:last-child {
  border-right: 0;
}

.replay-legend-item i,
.replay-driver-row i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: var(--replay-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.replay-legend-item strong {
  color: #eee;
  font: 800 9px/1 monospace;
}

.replay-legend-item span {
  min-width: 0;
  overflow: hidden;
  color: #ccc;
  font:
    800 9px/1 Arial,
    sans-serif;
  letter-spacing: 0.8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-legend-item small {
  grid-column: 2 / 4;
  margin-top: 4px;
  overflow: hidden;
  color: #555;
  font:
    700 7px/1 Arial,
    sans-serif;
  letter-spacing: 0.7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-data-panel {
  padding: 22px;
  height: calc(min(62vw, 680px) + 92px + 72px);
  max-height: calc(min(62vw, 680px) + 92px + 72px);
  box-sizing: border-box;
  overflow: hidden;
}

.replay-data-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.replay-data-head strong {
  color: #eee;
  font: 800 10px/1 monospace;
  letter-spacing: 1px;
}

.replay-timing-driver {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: #ddd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.replay-timing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}

.replay-timing-grid div {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  box-sizing: border-box;
}

.replay-timing-grid div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.replay-timing-grid div:nth-child(-n + 2) {
  border-bottom: 1px solid var(--border);
}

.replay-timing-grid span,
.replay-position-card span {
  color: #555;
  font:
    800 7px/1 Arial,
    sans-serif;
  letter-spacing: 1.3px;
}

.replay-timing-grid strong {
  color: #eee;
  font: 700 14px/1 monospace;
}

.replay-position-card {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 0;
}

.replay-position-card strong {
  color: #eee;
  font: 800 28px/1 monospace;
}

.replay-driver-list {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.replay-driver-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 8px 0 6px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: #777;
  font:
    800 9px/1 Arial,
    sans-serif;
  letter-spacing: 0.8px;
  text-align: left;
  cursor: none;
}

.replay-driver-row:hover,
.replay-driver-row.active {
  color: #eee;
}

.replay-driver-row strong {
  color: #eee;
  font: 800 10px/1 monospace;
}

.replay-controls {
  display: grid;
  grid-template-columns: 120px 100px auto minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.replay-button,
.replay-speed {
  height: 48px;
  border: 1px solid var(--border);
  background: #101010;
  color: #777;
  font:
    800 8px/1 Arial,
    sans-serif;
  letter-spacing: 1.5px;
  cursor: none;
}

.replay-button:hover,
.replay-button:focus,
.replay-speed:hover,
.replay-speed.active {
  color: #eee;
  border-color: #444;
}

.replay-play {
  color: #eee;
  border-color: #444;
}

.replay-speed-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 48px;
}

.replay-speed + .replay-speed {
  border-left: 0;
}

.replay-progress-wrap {
  min-width: 0;
}

#replayProgress {
  width: 100%;
  height: 20px;
  margin: 0;
  accent-color: #e10600;
  cursor: ew-resize;
}

.replay-progress-meta {
  display: flex;
  justify-content: space-between;
  color: #555;
  font:
    800 7px/1 Arial,
    sans-serif;
  letter-spacing: 1px;
}

@media (max-width: 1100px) {
  .replay-main-grid {
    grid-template-columns: 1fr;
  }

  .replay-data-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.5fr);
    column-gap: 18px;
  }

  .replay-data-head,
  .replay-driver-list {
    grid-column: 1 / -1;
  }

  .replay-timing-driver {
    min-height: 100%;
  }
}

@media (max-width: 900px) {
  .replay-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .replay-load-button {
    grid-column: 1;
  }

  .replay-load-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .replay-canvas-wrap {
    min-height: 430px;
    height: 65vw;
  }

  .replay-legend {
    grid-template-columns: repeat(3, 1fr);
  }

  .replay-legend-item:nth-child(3) {
    border-right: 0;
  }

  .replay-controls {
    grid-template-columns: 100px 90px 170px 1fr;
  }
}

@media (max-width: 700px) {
  #dashboardReplay .dashboard-heading {
    width: 90%;
  }

  .replay-shell {
    width: 90%;
  }

  .replay-toolbar,
  .replay-data-panel,
  .replay-controls {
    grid-template-columns: 1fr;
  }

  .replay-load-button,
  .replay-load-status {
    grid-column: auto;
  }

  .replay-canvas-wrap {
    min-height: 330px;
    height: 75vw;
  }

  .replay-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .replay-clock {
    align-self: flex-end;
  }

  .replay-legend {
    grid-template-columns: 1fr 1fr;
  }

  .replay-legend-item:nth-child(3) {
    border-right: 1px solid var(--border);
  }

  .replay-legend-item:nth-child(even) {
    border-right: 0;
  }

  .replay-controls > * {
    width: 100%;
  }

  .replay-progress-wrap {
    order: -1;
  }
}

.replay-driver-picker {
  position: relative;
}

.replay-driver-picker-button {
  width: 100%;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-driver-picker-button::after {
  content: "▾";
  margin-left: 12px;
  color: #777;
  flex: 0 0 auto;
}

.replay-driver-picker-button[aria-expanded="true"] {
  border-color: #555;
}

.replay-driver-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid #333;
  background: #0d0d0d;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.replay-driver-menu[hidden] {
  display: none;
}

.replay-driver-option {
  min-height: 42px;
  display: grid;
  grid-template-columns: 16px 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #202020;
  color: #888;
  font:
    800 9px/1 Arial,
    sans-serif;
  letter-spacing: 0.7px;
  cursor: pointer;
}

.replay-driver-option:last-child {
  border-bottom: 0;
}

.replay-driver-option:hover,
.replay-driver-option.checked {
  background: #151515;
  color: #eee;
}

.replay-driver-option input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: #e10600;
}

.replay-driver-option i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--replay-color);
}

.replay-driver-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-driver-option small {
  color: #555;
  font: 800 8px/1 monospace;
}

.replay-driver-row.selected {
  color: #eee;
  background: color-mix(in srgb, var(--replay-color) 8%, transparent);
}

.replay-driver-row {
  border-left: 2px solid transparent;
}

.replay-driver-row:hover,
.replay-driver-row.active,
.replay-driver-row.selected {
  border-left-color: var(--replay-color);
}

.replay-driver-row span b {
  display: inline-block;
  min-width: 24px;
  color: #eee;
  font-family: monospace;
}

.replay-finish-state {
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid #5b1717;
  color: #e10600;
  font:
    800 8px/1 Arial,
    sans-serif;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .replay-driver-menu {
    max-height: 280px;
  }

  .replay-finish-state {
    display: none;
  }
}

/* Race Replay responsive layout */
@media (max-width: 1100px) {
  .replay-shell {
    width: min(92%, 900px);
  }

  .replay-main-grid {
    grid-template-columns: 1fr;
  }

  .replay-data-panel {
    height: auto;
    max-height: none;
    min-height: 0;
    display: block;
    overflow: visible;
    padding: 18px;
  }

  .replay-data-head {
    margin-bottom: 0;
  }

  .replay-timing-driver {
    min-height: 54px;
  }

  .replay-driver-list {
    max-height: 280px;
    overflow-y: auto;
  }
}

@media (max-width: 900px) {
  .replay-shell {
    width: 90%;
  }

  .replay-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .replay-load-status {
    grid-column: 1 / -1;
    min-height: 34px;
    justify-content: flex-start;
    padding: 0;
  }

  .replay-canvas-wrap {
    min-height: 420px;
    height: min(72vw, 560px);
  }

  .replay-controls {
    grid-template-columns: 100px 90px 170px minmax(0, 1fr);
  }

  .replay-driver-list {
    max-height: 300px;
  }
}

@media (max-width: 700px) {
  #dashboardReplay .dashboard-heading {
    width: 90%;
    margin-bottom: 22px;
  }

  #dashboardReplay .dashboard-heading h1 {
    font-size: clamp(42px, 13vw, 66px);
    line-height: 0.92;
  }

  #dashboardReplay .dashboard-heading p {
    font-size: 11px;
    line-height: 1.6;
  }

  .replay-shell {
    width: 90%;
    padding-bottom: 55px;
  }

  .replay-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .replay-load-status {
    grid-column: auto;
    min-height: 30px;
    font-size: 7px;
    justify-content: flex-start;
  }

  .replay-select {
    height: 46px;
    font-size: 9px;
  }

  .replay-canvas-wrap {
    min-height: 300px;
    height: 92vw;
    max-height: 500px;
  }

  .replay-panel-head {
    min-height: 0;
    padding: 16px;
    gap: 10px;
  }

  .replay-panel-head h2 {
    font-size: clamp(18px, 6vw, 24px);
    margin-top: 5px;
  }

  .replay-clock {
    align-self: flex-start;
    font-size: 18px;
  }

  .replay-legend {
    grid-template-columns: 1fr 1fr;
  }

  .replay-legend-item {
    min-height: 54px;
    padding: 10px 9px;
  }

  .replay-data-panel {
    padding: 14px;
  }

  .replay-data-head {
    padding-bottom: 14px;
  }

  .replay-timing-grid div {
    min-height: 68px;
    padding: 11px;
  }

  .replay-position-card {
    min-height: 76px;
    padding: 12px;
  }

  .replay-position-card strong {
    font-size: 24px;
  }

  .replay-driver-list {
    max-height: 260px;
    margin-top: 12px;
  }

  .replay-driver-row {
    min-height: 44px;
    font-size: 8px;
  }

  .replay-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
  }

  .replay-button,
  .replay-speed {
    height: 44px;
  }

  .replay-speed-group {
    grid-column: 1 / -1;
    height: 40px;
  }

  .replay-progress-wrap {
    grid-column: 1 / -1;
    order: -1;
  }

  #replayProgress {
    height: 24px;
  }

  .replay-progress-meta {
    font-size: 6px;
  }

  .replay-finish-state {
    display: none;
  }
}

@media (max-width: 420px) {
  .replay-shell,
  #dashboardReplay .dashboard-heading {
    width: 92%;
  }

  .replay-canvas-wrap {
    height: 96vw;
    min-height: 280px;
  }

  .replay-legend {
    grid-template-columns: 1fr;
  }

  .replay-legend-item,
  .replay-legend-item:nth-child(even),
  .replay-legend-item:nth-child(3) {
    border-right: 0;
  }

  .replay-controls {
    grid-template-columns: 1fr;
  }

  .replay-speed-group,
  .replay-progress-wrap {
    grid-column: auto;
  }

  .replay-progress-wrap {
    order: -1;
  }
}

/* Race Replay mobile text containment */
@media (max-width: 700px) {
  #dashboardReplay .dashboard-heading {
    width: 90%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  #dashboardReplay .dashboard-heading h1 {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
  }

  #dashboardReplay .dashboard-heading p {
    width: 100%;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    box-sizing: border-box;
    margin-right: 0;
  }

  #dashboardReplay .replay-shell {
    width: 90%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #dashboardReplay .replay-toolbar,
  #dashboardReplay .replay-main-grid,
  #dashboardReplay .replay-controls {
    min-width: 0;
    max-width: 100%;
  }

  #dashboardReplay .replay-track-panel,
  #dashboardReplay .replay-data-panel,
  #dashboardReplay .replay-canvas-wrap {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #dashboardReplay #replayCanvas {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  #dashboardReplay .dashboard-heading,
  #dashboardReplay .replay-shell {
    width: 92%;
  }

  #dashboardReplay .dashboard-heading p {
    font-size: 10px;
    line-height: 1.5;
  }
}

/* Race Replay mobile order: track -> controls -> timing/leaderboard */
@media (max-width: 700px) {
  #dashboardReplay .replay-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-items: start;
  }

  #dashboardReplay .replay-toolbar {
    grid-column: 1;
    grid-row: 1;
  }

  #dashboardReplay .replay-main-grid {
    display: contents;
  }

  #dashboardReplay .replay-track-panel {
    grid-column: 1;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
  }

  #dashboardReplay .replay-data-panel {
    grid-column: 1;
    grid-row: 4;
    width: 100%;
  }
}

/* =====================================================
   RACE / SPRINT SESSION SELECTOR
===================================================== */

.session-selector[hidden] {
  display: none !important;
}

.session-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: -5px 0 42px;
}

.session-selector-button {
  min-width: 112px;
  height: 38px;
  padding: 0 22px;
  border: 1px solid #303030;
  background: #101010;
  color: #666666;
  font-family: inherit;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.session-selector-button + .session-selector-button {
  border-left: 0;
}

.session-selector-button:hover {
  background: #171717;
  border-color: #444444;
  color: #ffffff;
}

.session-selector-button.active {
  background: #e10600;
  border-color: #e10600;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.28);
}

.session-selector-button.active + .session-selector-button {
  border-left: 1px solid #303030;
}

@media (max-width: 600px) {
  .session-selector {
    margin-bottom: 34px;
  }

  .session-selector-button {
    min-width: 96px;
    height: 36px;
    padding: 0 17px;
  }
}

/* =====================================================
   SPRINT EVENTS IN SEASON CALENDAR
===================================================== */

.season-calendar-event.sprint-qualifying {
  border-radius: 2px;
  font-size: 8px;
}

.season-calendar-event.sprint {
  border-radius: 50%;
  border-style: dashed;
}

/* Graceful fallback when championship data is not available yet. */
.dashboard-empty-state {
  width: min(100% - 2rem, 760px);
  margin: clamp(2rem, 6vw, 5rem) auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.012)
  );
}
.dashboard-empty-kicker {
  display: block;
  margin-bottom: 1rem;
  color: #f20d0d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.dashboard-empty-state h2 {
  margin: 0 0 0.8rem;
  color: #f4f4f4;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.05;
}
.dashboard-empty-state p {
  max-width: 56ch;
  margin: 0.5rem 0;
  color: #a6a6a6;
  line-height: 1.65;
}
.dashboard-empty-state .dashboard-empty-note {
  margin-top: 1rem;
  font-size: 0.88rem;
}
.dashboard-empty-retry {
  margin-top: 1.5rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid #f20d0d;
  background: #f20d0d;
  color: #fff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  cursor: pointer;
}
.dashboard-empty-retry:disabled {
  opacity: 0.65;
  cursor: wait;
}

.api-status-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 30px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(2px, -1px);
}
.api-status-toggle:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}
.api-status-toggle .api-status-indicator {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.12);
}
.api-status-banner {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px clamp(16px, 3vw, 42px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b0b0b;
  color: #b8b8b8;
  font-size: 11px;
}
.api-status-banner[hidden] {
  display: none;
}
.api-status-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 12px;
  min-width: 0;
}
.api-status-copy strong {
  color: #d1d5db;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.api-status-copy span {
  color: #888;
  line-height: 1.45;
}
.api-status-toggle[data-state="operational"] .api-status-indicator {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.13);
}
.api-status-toggle[data-state="cached"] .api-status-indicator {
  background: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}
.api-status-banner[data-state="cached"] .api-status-copy strong {
  color: #facc15;
}
.api-status-toggle[data-state="unavailable"] .api-status-indicator {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}
.api-status-banner[data-state="unavailable"] .api-status-copy strong {
  color: #ef4444;
}
.api-status-toggle[data-state="checking"] .api-status-indicator {
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.12);
}
#apiStatusRetry {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #eee;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
}
#apiStatusRetry[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .api-status-toggle {
    margin-left: 0;
    transform: translate(1px, -1px) scale(0.75);
  }
  .api-status-banner {
    align-items: flex-start;
  }
  .api-status-copy {
    flex-direction: column;
    gap: 4px;
  }
}
.calendar-api-unavailable {
  width: min(100% - 2rem, 720px);
  margin: 24px auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
}
.calendar-api-unavailable h2 {
  margin: 0 0 10px;
  color: #f4f4f4;
  font-size: clamp(20px, 3vw, 30px);
}
.calendar-api-unavailable p {
  max-width: 58ch;
  color: #aaa;
  line-height: 1.65;
}
@media (max-width: 600px) {
  .api-status-banner {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .api-status-copy {
    flex-direction: column;
    gap: 3px;
  }
  .api-status-copy span {
    font-size: 10px;
  }
}

/* Hide race-calendar paging controls when no calendar is available. */
.navigation-controls[hidden] {
  display: none !important;
}

.overview-standing {
  position: relative;
  min-height: 0;
}

.overview-standing-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.overview-standing-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.overview-standing-name strong {
  overflow-wrap: anywhere;
}

.overview-standing-headshot {
  transform: translateY(14px);
  width: 36px;
  height: 36px;
  min-width: 36px;
  object-fit: cover;
  border-radius: 50%;
}

.overview-standing-team-logo {
  margin-top: 6px;
  transform: translateY(10px);
  width: 30px;
  height: 30px;
  min-width: 30px;
  object-fit: cover;
}

.overview-team-identity {
  gap: 14px;
}

.overview-standing-headshot[hidden],
.overview-standing-team-logo[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .overview-standing-headshot {
    transform: translateY(17px);
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .overview-standing-team-logo {
    margin-top: 10px;
    transform: translateY(8px);
    width: 34px;
    height: 28px;
    flex-basis: 34px;
  }

  .overview-standing-identity {
    gap: 8px;
  }
}

/* Overview standings: preserve compact row geometry with images */
#dashboardOverview .overview-standing {
  box-sizing: border-box;
  height: 66px;
  min-height: 66px;
  padding: 0;
  grid-template-columns: 35px minmax(0, 1fr) 60px;
  gap: 15px;
  align-items: center;
}
#dashboardOverview .overview-standing-identity {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
  height: 100%;
}
#dashboardOverview .overview-standing-name {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
}
#dashboardOverview .overview-standing-name strong {
  min-width: 0;
  overflow-wrap: normal;
  white-space: nowrap;
}
#dashboardOverview .overview-standing-name small {
  display: inline;
  margin: 0;
}
#dashboardOverview .overview-standing-headshot {
  display: block;
  position: static;
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  object-fit: cover;
  border-radius: 50%;
}
#dashboardOverview .overview-standing-team-logo {
  display: block;
  position: static;
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  object-fit: contain;
}
#dashboardOverview .overview-standing-score {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
#dashboardOverview .overview-standing-score b {
  white-space: nowrap;
}
@media (max-width: 600px) {
  #dashboardOverview .overview-standing {
    height: 66px;
    min-height: 66px;
    grid-template-columns: 25px minmax(0, 1fr) 54px;
    gap: 8px;
  }
  #dashboardOverview .overview-standing-identity {
    gap: 8px;
  }
  #dashboardOverview .overview-standing-headshot {
    flex-basis: 32px;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
  }
  #dashboardOverview .overview-standing-team-logo {
    flex-basis: 28px;
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
  }
  #dashboardOverview .overview-standing-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  #dashboardOverview .overview-standing-name strong {
    white-space: normal;
  }
}

.overview-hero-new {
  position: relative;
  isolation: isolate;
}

.overview-hero-championship-image {
  position: absolute;
  top: -400px;
  right: 0%;
  transform: none;
  width: clamp(220px, 28vw, 440px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 768px) {
  .overview-hero-championship-image {
    display: none;
  }
}

#dashboardOverview .overview-hero-new {
  overflow: visible !important;
}

.overview-hero-championship-image {
  transform: scale(0.73);
}

.drivers-feature-row img {
  height: 220px;
  width: 220px;
  transform: translateX(-50px);
}

.drivers-roster-row {
  position: relative;
}

.drivers-roster-headshot {
  position: absolute;
  left: 18px;
  top: 55%;
  transform: translateY(-50%);
  width: 90px;
  height: 90px;
  object-fit: contain;
  pointer-events: none;
}

.drivers-roster-driver {
  margin-left: 52px;
}

@media (max-width: 700px) {
  .drivers-feature-row img {
    height: 100px;
    width: 100px;
    transform: translateX(-40px);
  }

  .drivers-roster-headshot {
    width: 58px;
    height: 58px;
    left: 8px;
    top: 62%;
  }

  .drivers-roster-driver {
    margin-left: 38px;
  }
}

.drivers-feature-row:hover > img {
  transform: translateX(-50px) translateY(-7px) scale(1.035);
}

@media (max-width: 700px) {
  .drivers-feature-row:hover > img {
    transform: translateX(-40px) translateY(-7px) scale(1.035);
  }
}

#driversContent {
  position: relative;
  overflow: visible !important;
}

#dashboardDrivers {
  position: relative;
}

#driversContent > img.drivers-hero-championship-image {
  position: absolute;
  top: -330px;
  right: 0;
  width: clamp(220px, 28vw, 440px);
  height: auto;
  object-fit: contain;
  transform: scale(0.8);
  filter: none;
  pointer-events: none;
  z-index: 5;
}

#dashboardDrivers .drivers-hero {
  overflow: visible !important;
}

@media (max-width: 768px) {
  #driversContent > img.drivers-hero-championship-image {
    display: none !important;
  }
}

#dashboardTeams .rev-team-feature {
  position: relative;
}

#dashboardTeams .rev-team-hero-logo {
  position: absolute;
  top: 50%;
  right: 10%;
  width: clamp(180px, 22vw, 340px);
  height: clamp(100px, 13vw, 190px);
  object-fit: contain;
  object-position: center;
  transform: translateY(-50%);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

#dashboardTeams .rev-team-feature > .rev-pos,
#dashboardTeams .rev-team-feature > .rev-team-title,
#dashboardTeams .rev-team-feature > .rev-team-visual,
#dashboardTeams .rev-team-feature > .rev-team-score {
  position: relative;
  z-index: 1;
}

@media (max-width: 700px) {
  #dashboardTeams .rev-team-hero-logo {
    left: 45%;
    width: 130px;
    height: auto;
    opacity: 0.05;
  }
}

.rev-teams-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.rev-teams-intro > .rev-teams-hero-mercedes {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 35%;
  width: clamp(240px, 32vw, 480px);
  height: auto;
  object-fit: contain;
  transform: translateY(-65%) scale(0.9);
  opacity: 0.07;
  pointer-events: none;
}

.rev-teams-intro > .rev-eyebrow,
.rev-teams-intro > h2,
.rev-teams-intro > p {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .rev-teams-intro > .rev-teams-hero-mercedes {
    display: none;
  }
}

.championship-hero {
  position: relative;
  isolation: isolate;
  overflow: visible !important;
}

.championship-hero-trophy {
  position: absolute;
  z-index: 1;
  top: 20%;
  right: 0;
  width: clamp(260px, 34vw, 500px);
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.3;
}

.championship-hero-watermark {
  z-index: 0;
}

.championship-hero-copy {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .championship-hero-trophy {
    display: none !important;
  }
}

#dashboardChampionship .championship-standing-row {
  grid-template-columns: 2px 32px 48px minmax(0, 1fr) auto;
  gap: 14px;
}

#dashboardChampionship .championship-driver-headshot {
  display: block;
  width: 80px;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  align-self: end;
}

#dashboardChampionship .championship-team-logo {
  display: block;
  width: 70px;
  height: auto;
  object-fit: contain;
  object-position: center;
}

#dashboardChampionship .position-history-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

#dashboardChampionship .position-history-identity > div {
  min-width: 0;
}

#dashboardChampionship .position-history-headshot {
  display: block;
  flex: 0 0 auto;
  width: 100px;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
}

@media (max-width: 700px) {
  #dashboardChampionship .championship-standing-row {
    grid-template-columns: 2px 22px 32px minmax(0, 1fr) auto;
    gap: 8px;
  }

  #dashboardChampionship .championship-driver-headshot {
    width: 70px;
    height: auto;
  }

  #dashboardChampionship .championship-team-logo {
    width: 60px;
    height: auto;
  }

  #dashboardChampionship .championship-standing-row > b {
    font-size: 15px;
  }

  #dashboardChampionship .position-history-headshot {
    width: 90px;
    height: auto;
  }

  #dashboardChampionship .position-history-identity {
    gap: 10px;
  }
}

/* =====================================================
   HEAD-TO-HEAD
===================================================== */
.h2h-page {
  width: 89vw;
  max-width: 1600px;
  min-height: calc(100vh - 84px);
  margin: 0 auto;
  padding: 18px 0 70px;
  color: #f4f4f4;
  display: flex;
  flex-direction: column;
}
.h2h-page-heading {
  display: block;
  margin-bottom: 42px;
  border-bottom: 1px solid #222;
  padding-bottom: 30px;
}
.h2h-page-heading h1 {
  font-size: clamp(48px, 5.8vw, 96px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 18px 0 0;
  max-width: 1000px;
}
.h2h-page-heading h1 i {
  color: #e10600;
  font-style: normal;
}
.h2h-page-heading p {
  margin: 30px 0 0;
  max-width: 600px;
  color: #777;
  font-size: 14px;
  line-height: 1.55;
}
.h2h-instruction {
  font-size: 16px;
  line-height: 1.65;
}
.h2h-content {
  min-width: 0;
  flex: 1;
}
.h2h-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: end;
  gap: 20px;
  max-width: 1100px;
  margin: 42px auto 0;
}
.h2h-driver-select {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.h2h-driver-select > span {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #9b9b9b;
  font-weight: 700;
}
.h2h-driver-select select {
  appearance: none;
  width: 100%;
  min-height: 56px;
  background: #111;
  color: #f5f5f5;
  border: 1px solid #3a3a3a;
  border-radius: 0;
  padding: 0 42px 0 14px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #aaa 50%),
    linear-gradient(135deg, #aaa 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 24px,
    calc(100% - 12px) 24px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.h2h-driver-select select:focus-visible,
.h2h-popup-action:focus-visible,
.h2h-retry:focus-visible {
  outline: 2px solid #e10600;
  outline-offset: 3px;
}
.h2h-versus {
  display: grid;
  place-items: center;
  width: 54px;
  height: 50px;
  color: #e10600;
  border-top: 1px solid #343434;
  border-bottom: 1px solid #343434;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.h2h-instruction {
  text-align: center;
  margin: 22px auto 0;
}
.h2h-state {
  max-width: 650px;
  margin: 38px auto;
  padding: 24px;
  border-top: 1px solid #e10600;
  border-bottom: 1px solid #292929;
  text-align: center;
}
.h2h-state h2 {
  font-size: 16px;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}
.h2h-state p {
  font-size: 12px;
  color: #a5a5a5;
  line-height: 1.65;
  margin: 0;
}
.h2h-retry {
  margin-top: 18px;
  background: transparent;
  border: 1px solid #555;
  color: #f5f5f5;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.h2h-faceoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin: 38px 0 56px;
}
.h2h-driver-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  background: #101010;
  border: 1px solid #2a2a2a;
  padding: 20px;
  border-top: 2px solid var(--h2h-team, #777);
}
.h2h-driver-card:nth-child(3) {
  text-align: right;
  grid-template-columns: minmax(0, 1fr) 112px;
}
.h2h-driver-card:nth-child(3) .h2h-driver-card-copy {
  grid-column: 1;
  grid-row: 1;
}
.h2h-driver-card:nth-child(3) .h2h-faceoff-portrait {
  grid-column: 2;
  grid-row: 1;
}
.h2h-faceoff-portrait {
  width: 112px;
  height: 138px;
  object-fit: cover;
  object-position: center top;
  align-self: end;
  filter: saturate(0.9);
}
.h2h-driver-card-copy {
  min-width: 0;
}
.h2h-driver-card-copy .rev-eyebrow {
  display: block;
  margin-bottom: 8px;
}
.h2h-driver-card-copy h2 {
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1.05;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.h2h-driver-card-copy p {
  font-size: 11px;
  color: #aaa;
  margin: 0 0 18px;
}
.h2h-driver-statline {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.h2h-driver-card:nth-child(3) .h2h-driver-statline {
  justify-content: flex-end;
}
.h2h-driver-statline span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #999;
}
.h2h-driver-statline strong {
  font-size: 19px;
  letter-spacing: 0;
  color: #f5f5f5;
}
.h2h-faceoff-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #e10600;
}
.h2h-section {
  margin: 56px 0 0;
  min-width: 0;
}
.h2h-section-heading h2 {
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0;
}
.h2h-page-heading p {
  font-size: 15px;
  line-height: 1.65;
}
.h2h-section-heading p {
  font-size: 10px;
  color: #8f8f8f;
  margin: 0;
  text-align: right;
}
.h2h-metrics {
  border-top: 1px solid #292929;
}
.h2h-metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 1.3fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid #252525;
  padding: 8px 12px;
}
.h2h-metric-value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.h2h-metric-value:first-child {
  text-align: right;
}
.h2h-metric-value:last-child {
  text-align: left;
}
.h2h-metric-value.is-leading {
  color: #fff;
}
.h2h-metric-value.is-leading::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #e10600;
  margin: 0 7px 2px 0;
}
.h2h-metric-value:first-child.is-leading::before {
  display: none;
}
.h2h-metric-value:first-child.is-leading::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #e10600;
  margin: 0 0 2px 7px;
}
.h2h-metric-label {
  text-align: center;
  color: #aaa;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.h2h-metric-value.is-unavailable {
  color: #777;
  font-weight: 500;
}
.h2h-charts,
.h2h-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.h2h-charts > .h2h-chart-panel:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 10px);
}
.h2h-chart-panel {
  min-width: 0;
  background: #0d0d0d;
  border: 1px solid #303030;
  padding: 22px 20px 18px;
}
.h2h-chart-panel h3 {
  font-size: 16px;
  letter-spacing: 0.03em;
  margin: 0 0 10px;
}
.h2h-chart-panel p {
  font-size: 14px;
  color: #a0a0a0;
  margin: 0 0 16px;
  line-height: 1.6;
}
.h2h-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.h2h-chart-svg text {
  font-family: inherit;
  fill: #a5a5a5;
  font-size: 12px;
}
.h2h-chart-svg .h2h-grid {
  stroke: #292929;
  stroke-width: 1;
}
.h2h-chart-svg .h2h-zero {
  stroke: #777;
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}
.h2h-chart-svg .h2h-line-a {
  fill: none;
  stroke: #e10600;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.h2h-chart-svg .h2h-line-b {
  fill: none;
  stroke: #f2f2f2;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.h2h-chart-svg .h2h-gap-line {
  fill: none;
  stroke: #e10600;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.h2h-chart-svg .h2h-point-a {
  fill: #e10600;
  stroke: #0d0d0d;
  stroke-width: 1.5;
}
.h2h-chart-svg .h2h-point-b {
  fill: #f2f2f2;
  stroke: #0d0d0d;
  stroke-width: 1.5;
}
.h2h-chart-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: #c5c5c5;
}
.h2h-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.h2h-legend-mark {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: #e10600;
}
.h2h-legend-mark.b {
  background: #f2f2f2;
}
.h2h-round-gap-list {
  display: grid;
  gap: 0;
}
.h2h-round-gap-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 15px 14px;
  border-bottom: 1px solid #292929;
  font-size: 14px;
}
.h2h-round-gap-name {
  color: #aaa;
}
.h2h-round-gap-value {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.h2h-round-gap-value.a {
  color: #e10600;
}
.h2h-round-gap-value.b {
  color: #f1f1f1;
}
.h2h-round-gap-value.na {
  color: #777;
  font-weight: 500;
}
.h2h-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #303030;
  background: #090909;
  scrollbar-width: thin;
  scrollbar-color: #555 #111;
}
.h2h-results-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}
.h2h-results-table th {
  padding: 15px 14px;
  background: #111;
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.09em;
  font-weight: 800;
  color: #bdbdbd;
  border-bottom: 1px solid #3a3a3a;
  white-space: nowrap;
}
.h2h-results-table td {
  padding: 15px 14px;
  border-top: 1px solid #272727;
  color: #dedede;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.h2h-results-table tbody tr:hover {
  background: #111;
}
.h2h-results-table .h2h-table-round {
  color: #999;
}
.h2h-results-table .h2h-table-driver-a {
  color: #f4f4f4;
}
.h2h-results-table .h2h-table-driver-b {
  color: #f4f4f4;
}
.h2h-results-table .h2h-table-lead {
  color: #fff;
  font-weight: 800;
}
.h2h-results-table .h2h-table-muted {
  color: #777;
}
.h2h-data-note {
  font-size: 12px;
  color: #929292;
  line-height: 1.7;
  margin: 16px 0 0;
}
.h2h-score-section {
  padding-top: 4px;
}
.h2h-score-grid {
  margin-top: 18px;
}
.h2h-score-grid .h2h-chart-panel p {
  min-height: 4.5em;
}
.h2h-score-section > .h2h-data-note {
  max-width: 1100px;
}
.h2h-popup {
  position: fixed;
  z-index: 10050;
  width: 264px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  background: #101010;
  border: 1px solid #393939;
  border-top: 2px solid #e10600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  padding: 14px;
  color: #f5f5f5;
}
.h2h-popup[hidden] {
  display: none;
}
.h2h-popup-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.h2h-popup-portrait {
  width: 64px;
  height: 76px;
  object-fit: cover;
  object-position: center top;
  background: #191919;
}
.h2h-popup-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 5px;
}
.h2h-popup-team {
  font-size: 10px;
  color: #aaa;
  line-height: 1.4;
  margin: 0;
}
.h2h-popup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid #2a2a2a;
}
.h2h-popup-stats span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #999;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.h2h-popup-stats strong {
  color: #f4f4f4;
  font-size: 16px;
  letter-spacing: 0;
}
.h2h-popup-action {
  width: 100%;
  padding: 11px 12px;
  background: #e10600;
  color: white;
  border: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  cursor: pointer;
}
.h2h-popup-action:hover {
  background: #b80500;
}
[data-h2h-driver] {
  cursor: pointer;
}
[data-h2h-driver]:focus-visible {
  outline: 1px solid #e10600;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .h2h-page {
    width: calc(100% - 32px);
    padding: 32px 0 48px;
  }
  .h2h-page-heading {
    margin-bottom: 28px;
    padding-bottom: 22px;
  }
  .h2h-page-heading h1 {
    font-size: clamp(44px, 10vw, 70px);
    line-height: 0.9;
    letter-spacing: -0.07em;
    margin-top: 18px;
  }
  .h2h-page-heading p {
    margin-top: 18px;
    font-size: 13px;
  }
  .h2h-selectors {
    margin-top: 28px;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  }
  .h2h-versus {
    width: 34px;
    font-size: 9px;
  }
  .h2h-driver-select select {
    font-size: 12px;
    min-height: 48px;
    padding-left: 9px;
    padding-right: 24px;
  }
  .h2h-driver-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .h2h-driver-card:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) 74px;
  }
  .h2h-faceoff-portrait {
    width: 74px;
    height: 102px;
  }
  .h2h-driver-card-copy h2 {
    font-size: 17px;
  }
  .h2h-driver-card-copy p {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .h2h-driver-statline {
    gap: 12px;
  }
  .h2h-driver-statline strong {
    font-size: 16px;
  }
  .h2h-faceoff {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 28px 0 40px;
  }
  .h2h-faceoff-mid {
    font-size: 10px;
    min-height: 18px;
  }
  .h2h-driver-card {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 12px;
    gap: 12px;
  }
  .h2h-driver-card:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) 74px;
  }
  .h2h-faceoff-portrait {
    width: 74px;
    height: 100px;
  }
  .h2h-driver-card-copy h2 {
    font-size: clamp(16px, 4.5vw, 22px);
  }
  .h2h-driver-statline span {
    font-size: 9px;
  }
  .h2h-driver-statline strong {
    font-size: 16px;
  }
  .h2h-charts,
  .h2h-score-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .h2h-charts > .h2h-chart-panel:nth-child(3) {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }
  .h2h-section-heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
  .h2h-section-heading p {
    text-align: left;
  }
  .h2h-metric-row {
    grid-template-columns: minmax(0, 1fr) minmax(74px, 1fr) minmax(0, 1fr);
    gap: 6px;
    padding: 8px 5px;
  }
  .h2h-metric-value {
    font-size: 14px;
  }
  .h2h-metric-label {
    font-size: 12px;
  }
  .h2h-round-gap-row {
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 8px;
    padding: 12px 6px;
    font-size: 12px;
  }
  .h2h-chart-panel {
    padding: 16px 12px 14px;
  }
  .h2h-chart-panel h3 {
    font-size: 14px;
  }
  .h2h-chart-panel p {
    font-size: 13px;
    min-height: 0;
  }
  .h2h-chart-svg text {
    font-size: 12px;
  }
  .h2h-results-table {
    font-size: 13px;
  }
  .h2h-results-table th {
    font-size: 10px;
    padding: 12px 10px;
  }
  .h2h-results-table td {
    padding: 12px 10px;
  }
  .h2h-popup {
    width: min(264px, calc(100vw - 20px));
  }
}
@media (max-width: 390px) {
  .h2h-driver-card {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 9px;
    gap: 8px;
  }
  .h2h-driver-card:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) 56px;
  }
  .h2h-faceoff-portrait {
    width: 56px;
    height: 82px;
  }
  .h2h-driver-card-copy h2 {
    font-size: 16px;
  }
  .h2h-driver-statline {
    gap: 8px;
  }
  .h2h-driver-statline strong {
    font-size: 14px;
  }
  .h2h-driver-statline span {
    font-size: 8px;
  }
}

/* =====================================================
   TYRE STINTS AND PIT STRATEGY
===================================================== */

.strategy-section[hidden] {
  display: none;
}
.strategy-heading {
  margin-bottom: 28px;
}
.strategy-heading h2 span {
  color: var(--red);
}
.strategy-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.race-strategy-content {
  display: grid;
  gap: 30px;
}
.strategy-loading,
.strategy-empty {
  padding: 28px 20px;
  border: 1px solid var(--border);
  background: #0d0d0d;
  color: #777;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.7;
}
.strategy-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.strategy-summary span {
  padding: 10px 12px;
  background: #111;
  border: 1px solid var(--border);
  color: #aaa;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}
.strategy-block {
  min-width: 0;
  border: 1px solid var(--border);
  background: #0d0d0d;
}
.strategy-block-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}
.strategy-block-heading .eyebrow {
  margin-bottom: 7px;
}
.strategy-block-heading h3 {
  font-size: 20px;
  letter-spacing: -0.7px;
}
.strategy-block-note {
  color: #777;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}
.stint-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.stint-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #999;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.stint-legend-item i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}
.stint-legend-item i.soft,
.stint-segment.soft {
  background: #e10600;
}
.stint-legend-item i.medium,
.stint-segment.medium {
  background: #f3d22f;
}
.stint-legend-item i.hard,
.stint-segment.hard {
  background: #e9e9e9;
}
.stint-legend-item i.intermediate,
.stint-segment.intermediate {
  background: #27a85a;
}
.stint-legend-item i.wet,
.stint-segment.wet {
  background: #287bd1;
}
.stint-lap-axis,
.stint-driver-row {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
}
.stint-lap-axis {
  padding: 12px 18px;
  color: #666;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.stint-lap-axis > div {
  display: flex;
  justify-content: space-between;
}
.stint-driver-row {
  padding: 8px 18px;
  border-top: 1px solid #1c1c1c;
}
.stint-mobile-details {
  display: none;
}
.stint-team-group {
  border-top: 1px solid #262626;
}
.stint-team-group:first-child {
  border-top: 0;
}
.stint-team-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px 10px;
  border-top: 2px solid var(--team-color, #555);
  background: #111;
}
.stint-team-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.stint-team-heading h4 {
  overflow: hidden;
  color: #eee;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stint-team-heading > span {
  color: #777;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.stint-team-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: #1c1c1c;
  color: #aaa;
  font-family: monospace;
  font-size: 10px;
}
.stint-driver-name {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  justify-content: start;
  gap: 3px 6px;
  min-width: 0;
}
.stint-driver-name strong {
  overflow: hidden;
  color: #ddd;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stint-driver-name span {
  color: #666;
  font-size: 8px;
}
.stint-driver-name .stint-driver-finish {
  color: #ddd;
  font-family: monospace;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.stint-driver-name span:last-child {
  grid-column: 1 / -1;
}
.stint-timeline {
  display: flex;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  height: 30px;
  overflow: hidden;
  background: #171717;
}
.stint-segment {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 2px 5px;
  overflow: hidden;
  color: #080808;
}
.stint-segment span {
  overflow: hidden;
  font-size: 7px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stint-segment b {
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}
.stint-segment.unknown {
  background: #555;
  color: #fff;
}
.stint-lap-total {
  color: #aaa;
  font-family: monospace;
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}
.pit-strategy-table {
  width: 100%;
}
.pit-strategy-head,
.pit-strategy-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 100px 125px;
  gap: 12px;
  align-items: center;
}
.pit-strategy-head {
  padding: 12px 22px;
  background: #111;
  color: #666;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.pit-strategy-row {
  padding: 13px 22px;
  border-top: 1px solid #1c1c1c;
}
.pit-lap {
  color: var(--red);
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
}
.pit-driver {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pit-driver strong {
  overflow: hidden;
  color: #ddd;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pit-driver span {
  color: #666;
  font-size: 8px;
}
.pit-duration,
.pit-tyre {
  color: #aaa;
  font-family: monospace;
  font-size: 10px;
}
.pit-tyre {
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.strategy-footnote {
  color: #666;
  font-size: 10px;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .strategy-block-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 14px;
  }
  .stint-legend {
    justify-content: flex-start;
  }
  .stint-lap-axis,
  .stint-driver-row {
    grid-template-columns: 65px minmax(0, 1fr) 34px;
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .stint-timeline {
    height: 34px;
    gap: 2px;
  }
  .stint-team-heading {
    padding: 11px 10px 8px;
  }
  .stint-team-heading h4 {
    font-size: 10px;
  }
  .stint-team-heading > span {
    font-size: 7px;
    letter-spacing: 0.3px;
  }
  .stint-segment {
    padding: 2px 3px;
  }
  .stint-segment span {
    font-size: 6px;
  }
  .stint-segment b {
    font-size: 7px;
  }
  .stint-driver-name {
    gap: 2px 4px;
  }
  .stint-driver-name strong {
    font-size: 9px;
  }
  .stint-driver-name .stint-driver-finish {
    font-size: 8px;
  }
  .pit-strategy-head,
  .pit-strategy-row {
    grid-template-columns: 40px minmax(0, 1fr) 55px 70px;
    gap: 7px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .pit-strategy-head {
    font-size: 7px;
    letter-spacing: 0.4px;
  }
  .pit-driver strong {
    font-size: 9px;
  }
  .pit-duration,
  .pit-tyre {
    font-size: 9px;
  }
}

@media (max-width: 700px) {
  .stint-driver-row {
    cursor: pointer;
  }
  .stint-driver-row:focus-visible {
    outline: 1px solid var(--team-color, var(--red));
    outline-offset: -1px;
  }
  .stint-segment span,
  .stint-segment b {
    display: none;
  }
  .stint-timeline {
    height: 34px;
  }
  .stint-mobile-details {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 9px 10px;
    margin-top: 3px;
    background: #151515;
    border-left: 2px solid var(--red);
  }
  .stint-driver-row.mobile-expanded .stint-mobile-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .stint-mobile-detail {
    display: grid;
    grid-template-columns: 8px 86px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 10px;
    line-height: 1.4;
  }
  .stint-mobile-detail i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
  }
  .stint-mobile-detail i.soft {
    background: #e10600;
  }
  .stint-mobile-detail i.medium {
    background: #f3d22f;
  }
  .stint-mobile-detail i.hard {
    background: #e9e9e9;
  }
  .stint-mobile-detail i.intermediate {
    background: #27a85a;
  }
  .stint-mobile-detail i.wet {
    background: #287bd1;
  }
  .stint-mobile-detail strong {
    color: #eee;
    font-size: 9px;
    letter-spacing: 0.3px;
  }
  .stint-mobile-detail > span {
    color: #999;
    text-align: right;
  }
}

/* Pit strategy overview and expandable lap-by-lap records */
.strategy-pit-overview {
  border: 1px solid var(--border);
  background: #0d0d0d;
}
.strategy-overview-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.strategy-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #252525;
  border-bottom: 1px solid #252525;
}
.strategy-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 18px 20px;
  background: #0d0d0d;
}
.strategy-stat-card > span {
  color: #777;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.strategy-stat-card > strong {
  color: #f2f2f2;
  font-family: monospace;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.15;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.strategy-stat-card > small {
  color: #888;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.strategy-insights {
  padding: 20px;
}
.strategy-subheading {
  margin-bottom: 13px;
}
.strategy-subheading .eyebrow {
  display: block;
  margin-bottom: 6px;
}
.strategy-subheading h4 {
  color: #eee;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.strategy-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.strategy-insight {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  background: #141414;
  border-left: 2px solid var(--red);
}
.strategy-insight-kicker {
  color: #777;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.strategy-insight strong {
  color: #e8e8e8;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.strategy-insight > span:last-child {
  color: #999;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pit-row-extra[hidden] {
  display: none;
}
.pit-view-more {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid #262626;
  background: #111;
  color: #ddd;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
.pit-view-more:hover,
.pit-view-more:focus-visible {
  background: #1a1a1a;
  color: #fff;
  outline: 1px solid var(--red);
  outline-offset: -1px;
}
@media (max-width: 900px) {
  .strategy-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strategy-insight-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .strategy-overview-heading {
    padding: 18px 14px;
  }
  .strategy-stat-card {
    padding: 14px 12px;
    gap: 7px;
  }
  .strategy-stat-card > span {
    font-size: 7px;
    letter-spacing: 0.6px;
  }
  .strategy-stat-card > strong {
    font-size: 23px;
  }
  .strategy-stat-card > small {
    font-size: 9px;
  }
  .strategy-insights {
    padding: 15px 12px;
  }
  .strategy-insight {
    padding: 12px;
  }
}

/* Keep the pit timeline visually connected to the four overview metrics */
.strategy-pit-overview > .pit-strategy-block {
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
}
.strategy-pit-overview > .pit-strategy-block .strategy-block-heading {
  background: #0d0d0d;
}

/* Keep the pit timeline visually connected to the four overview metrics */
.strategy-pit-overview > .pit-strategy-block {
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
}
.strategy-pit-overview > .pit-strategy-block .strategy-block-heading {
  background: #0d0d0d;
}

/* MOBILE OVERFLOW FIXES */
@media (max-width: 700px) {
  /* Last-round Grand Prix title */
  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #dashboardOverview
    .overview-race-story.overview-race-last
    .overview-race-copy
    h4 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(25px, 7.2vw, 34px) !important;
    line-height: 0.98 !important;
    letter-spacing: -1.5px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #dashboardDrivers .drivers-feature-copy {
    transform: translateX(-20px);
  }

  #dashboardDrivers .drivers-feature-row > img {
    transform: translateX(-50px);
  }

  #dashboardDrivers .drivers-feature-points {
    top: 85px !important;
    right: 5px !important;
  }

  /* RACE CENTER — MOBILE CONTENT WIDTH */
  #dashboardRace .race-view {
    width: 97%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  #dashboardRace .hero-content {
    min-height: auto;
    padding: 35px 0 0;
  }

  #dashboardRace .race-meta {
    margin-top: 30px;
  }
}

/* DESKTOP RACE REPLAY — STICKY TIMING PANEL */
@media (min-width: 1101px) {
  #dashboardReplay .replay-data-panel {
    position: sticky;
    top: 76px;
    align-self: start;
    height: calc(100vh - 96px);
    max-height: calc(100vh - 96px);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  #dashboardReplay .replay-data-head,
  #dashboardReplay .replay-timing-driver,
  #dashboardReplay .replay-timing-grid,
  #dashboardReplay .replay-position-card {
    flex-shrink: 0;
  }
}

/* =====================================================
   RACE REPLAY — INTEGRATED PLAYBACK BAR
===================================================== */

#dashboardReplay .replay-controls {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 112px 112px 156px minmax(260px, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  background: #0d0d0d;
  box-sizing: border-box;
}

#dashboardReplay .replay-controls .replay-button,
#dashboardReplay .replay-controls .replay-speed {
  height: 44px;
}

#dashboardReplay .replay-controls .replay-speed-group {
  height: 44px;
}

#dashboardReplay .replay-controls .replay-progress-wrap {
  min-width: 0;
  padding: 0 8px;
}

#dashboardReplay .replay-controls #replayProgress {
  display: block;
}

#dashboardReplay .replay-controls .replay-progress-meta {
  margin-top: 2px;
}

/* Tablet: preserve one compact playback row */
@media (min-width: 701px) and (max-width: 1100px) {
  #dashboardReplay .replay-controls {
    grid-template-columns: 100px 100px 144px minmax(180px, 1fr);
    gap: 8px;
    padding: 10px;
  }
}

/* Mobile: timeline first, playback actions underneath */
@media (max-width: 700px) {
  #dashboardReplay .replay-shell {
    padding-bottom: 0;
  }

  #dashboardReplay .replay-controls {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(108px, 1.15fr);
    grid-template-rows: auto auto;
    gap: 9px;
    width: 100%;
    margin: 10px 0 0;
    padding: 12px;
    background: #0d0d0d;
    border: 1px solid var(--border);
    box-sizing: border-box;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    order: 0;
    padding: 0 2px 5px;
  }

  #dashboardReplay .replay-controls .replay-button,
  #dashboardReplay .replay-controls .replay-speed-group {
    grid-column: auto;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  #dashboardReplay .replay-controls .replay-button {
    white-space: nowrap;
    letter-spacing: 1px;
  }

  #dashboardReplay .replay-controls .replay-speed {
    height: 44px;
    min-width: 0;
    padding: 0 4px;
    letter-spacing: 0;
  }

  #dashboardReplay .replay-controls #replayProgress {
    height: 24px;
  }

  #dashboardReplay .replay-controls .replay-progress-meta {
    font-size: 7px;
  }
}

@media (max-width: 380px) {
  #dashboardReplay .replay-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #dashboardReplay .replay-controls #replayRewind {
    grid-column: 1;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls #replayPlay {
    grid-column: 2;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls .replay-speed-group {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* =====================================================
   RACE REPLAY — INTEGRATED STICKY PLAYBACK STRIP
===================================================== */

#dashboardReplay .replay-controls {
  position: sticky;
  top: 88px;
  z-index: 90;
  grid-template-columns: 112px 112px 150px minmax(240px, 1fr);
  gap: 10px;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #303030;
  background: rgba(13, 13, 13, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

#dashboardReplay .replay-controls .replay-button,
#dashboardReplay .replay-controls .replay-speed-group {
  height: 44px;
}

#dashboardReplay .replay-controls .replay-progress-wrap {
  min-width: 0;
  padding: 0 8px;
}

#dashboardReplay .replay-controls #replayProgress {
  display: block;
}

#dashboardReplay .replay-legend-section {
  min-width: 0;
}

#dashboardReplay .replay-legend-toggle {
  display: none;
}

@media (min-width: 701px) and (max-width: 1100px) {
  #dashboardReplay .replay-controls {
    top: 78px;
    grid-template-columns: 100px 100px 132px minmax(180px, 1fr);
    gap: 8px;
  }
}

@media (max-width: 700px) {
  #dashboardReplay .replay-controls {
    position: relative;
    top: auto;
    z-index: 1;
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(96px, 1fr);
    grid-template-rows: auto auto;
    gap: 9px;
    margin: 10px 0 0;
    padding: 11px;
    box-shadow: none;
    backdrop-filter: none;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0 2px 4px;
  }

  #dashboardReplay .replay-controls .replay-button,
  #dashboardReplay .replay-controls .replay-speed-group {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  #dashboardReplay .replay-controls .replay-button {
    white-space: nowrap;
    letter-spacing: 1px;
  }

  #dashboardReplay .replay-controls .replay-speed {
    height: 44px;
    min-width: 0;
    padding: 0 4px;
  }

  #dashboardReplay .replay-legend-section {
    border-top: 1px solid var(--border);
  }

  #dashboardReplay .replay-legend-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border: 0;
    background: #0d0d0d;
    color: #aaa;
    font:
      800 9px/1 Arial,
      sans-serif;
    letter-spacing: 1.6px;
    text-align: left;
    cursor: pointer;
  }

  #dashboardReplay .replay-legend-toggle-icon {
    color: var(--red);
    font-size: 17px;
    transition: transform 0.2s ease;
  }

  #dashboardReplay
    .replay-legend-section.mobile-collapsed
    .replay-legend-toggle-icon {
    transform: rotate(45deg);
  }

  #dashboardReplay .replay-legend-section.mobile-collapsed .replay-legend {
    display: none;
  }

  #dashboardReplay
    .replay-legend-section:not(.mobile-collapsed)
    .replay-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  #dashboardReplay .replay-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #dashboardReplay .replay-controls #replayRewind {
    grid-column: 1;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls #replayPlay {
    grid-column: 2;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls .replay-speed-group {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

#dashboardReplay .replay-shell {
  padding-bottom: 42px;
}

@media (max-width: 700px) {
  #dashboardReplay .replay-shell {
    padding-bottom: 28px;
  }
}

/* =====================================================
   RACE REPLAY — CONTROLS OVERLAY THE CIRCUIT
   Controls are anchored inside the circuit canvas, not
   placed after the circuit/driver legend.
===================================================== */

#dashboardReplay .replay-canvas-wrap {
  position: relative;
  isolation: isolate;
}

#dashboardReplay .replay-controls {
  position: absolute !important;
  z-index: 20;
  left: 14px;
  right: 14px;
  bottom: 14px;
  top: auto;
  display: grid;
  grid-template-columns: 112px 112px 150px minmax(160px, 1fr);
  align-items: center;
  gap: 9px;
  width: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(100, 100, 100, 0.55);
  border-radius: 3px;
  background: rgba(8, 8, 8, 0.88);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
}

#dashboardReplay .replay-controls .replay-button,
#dashboardReplay .replay-controls .replay-speed-group {
  height: 42px;
  min-width: 0;
}

#dashboardReplay .replay-controls .replay-progress-wrap {
  min-width: 0;
  padding: 0 7px;
}

#dashboardReplay .replay-controls #replayProgress {
  display: block;
  width: 100%;
}

#dashboardReplay .replay-controls .replay-progress-meta {
  display: flex;
  justify-content: space-between;
}

/* Tablet: tighter controls while retaining the overlay */
@media (min-width: 701px) and (max-width: 1100px) {
  #dashboardReplay .replay-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 88px 88px 126px minmax(120px, 1fr);
    gap: 6px;
    padding: 8px;
  }

  #dashboardReplay .replay-controls .replay-button,
  #dashboardReplay .replay-controls .replay-speed-group {
    height: 38px;
  }
}

/* Mobile: timeline row + action row, still over the circuit */
@media (max-width: 700px) {
  #dashboardReplay .replay-controls {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(96px, 1.1fr);
    grid-template-rows: auto auto;
    gap: 7px;
    padding: 8px;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0 3px 3px;
  }

  #dashboardReplay .replay-controls .replay-button,
  #dashboardReplay .replay-controls .replay-speed-group {
    grid-row: 2;
    width: 100%;
    height: 38px;
  }

  #dashboardReplay .replay-controls .replay-button {
    padding-left: 5px;
    padding-right: 5px;
    font-size: 9px;
    white-space: nowrap;
  }

  #dashboardReplay .replay-controls .replay-speed {
    min-width: 0;
    height: 38px;
    padding: 0 3px;
    font-size: 9px;
  }

  #dashboardReplay .replay-controls #replayProgress {
    height: 22px;
  }

  #dashboardReplay .replay-controls .replay-progress-meta {
    font-size: 7px;
  }
}

@media (max-width: 380px) {
  #dashboardReplay .replay-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #dashboardReplay .replay-controls #replayRewind {
    grid-column: 1;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls #replayPlay {
    grid-column: 2;
    grid-row: 2;
  }

  #dashboardReplay .replay-controls .replay-speed-group {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* =====================================================
   REPLAY MOBILE REWORK
   Desktop retains the circuit overlay; mobile gets a
   separate circuit stage, lap badge and controls below.
===================================================== */

#dashboardReplay .replay-canvas-wrap {
  position: relative;
}

#dashboardReplay .replay-canvas-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
}

#dashboardReplay .replay-mobile-lap {
  display: none;
}

#dashboardReplay .replay-legend-heading {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid var(--border);
  background: #0d0d0d;
  color: #c9c9c9;
  font:
    800 9px/1 Arial,
    sans-serif;
  letter-spacing: 1.6px;
}

#dashboardReplay .replay-legend-count {
  color: #666;
  font-size: 8px;
  letter-spacing: 1px;
}

@media (max-width: 700px) {
  /* Keep the circuit clean: controls are below it, never over it. */
  #dashboardReplay .replay-canvas-wrap {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible;
    display: flex;
    flex-direction: column;
    background: transparent;
  }

  #dashboardReplay .replay-canvas-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 92vw;
    min-height: 300px;
    max-height: 430px;
    overflow: hidden;
    background: #090909;
  }

  #dashboardReplay #replayCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  #dashboardReplay .replay-canvas-empty {
    position: absolute;
    inset: 0;
  }

  #dashboardReplay .replay-mobile-lap {
    position: absolute;
    display: inline-flex;
    align-items: center;
    top: 12px;
    left: 12px;
    z-index: 5;
    min-height: 30px;
    padding: 0 11px;
    border-left: 2px solid var(--red);
    background: rgba(13, 13, 13, 0.92);
    color: #f5f5f5;
    font:
      800 10px/1 Arial,
      sans-serif;
    letter-spacing: 1.5px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  }

  #dashboardReplay .replay-controls {
    position: relative !important;
    inset: auto !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0;
    background: #0d0d0d;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #dashboardReplay .replay-controls .replay-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0 4px 4px;
  }

  #dashboardReplay .replay-controls #replayRewind {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 42px;
  }

  #dashboardReplay .replay-controls #replayPlay {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 42px;
  }

  #dashboardReplay .replay-controls .replay-speed-group {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    height: 40px;
  }

  #dashboardReplay .replay-controls .replay-speed {
    flex: 1 1 0;
    height: 40px;
  }

  /* Replace the old 22-car accordion with a clear, always-visible field list. */
  #dashboardReplay .replay-legend-toggle {
    display: none !important;
  }

  #dashboardReplay .replay-legend-section {
    border-bottom: 1px solid var(--border);
  }

  #dashboardReplay .replay-legend {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 8px 8px;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
  }

  #dashboardReplay .replay-legend-section.mobile-collapsed .replay-legend {
    display: grid !important;
  }

  #dashboardReplay .replay-legend-item {
    min-width: 0;
  }

  #dashboardReplay .replay-data-panel {
    margin-top: 12px;
  }
}

@media (max-width: 380px) {
  #dashboardReplay .replay-canvas-stage {
    height: 96vw;
    min-height: 280px;
  }

  #dashboardReplay .replay-legend {
    grid-template-columns: 1fr 1fr;
  }
}

.replay-race-select-wrap {
  position: relative;
}

#replayRaceSelect {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: none !important;
  padding-right: 38px !important;
}

.replay-race-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 15px;
  bottom: 15px;
  color: #777;
  font-size: 12px;
  pointer-events: none;
}

.champion-tribute-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
}

.champion-tribute-modal[hidden] {
  display: none;
}

.champion-tribute-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
}

.champion-tribute-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  width: min(1100px, 100%);
  max-height: min(720px, 90vh);
  overflow: hidden;
  background: #090b0e;
  border: 1px solid #30343a;
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.7);
}

.champion-tribute-image {
  min-height: 420px;
  overflow: hidden;
  background: #050505;
}

.champion-tribute-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.champion-tribute-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.champion-tribute-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 55px 42px;
}

.champion-tribute-eyebrow {
  color: #e10600;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.5px;
}

.champion-tribute-content h2 {
  margin: 18px 0 12px;
  color: #fff;
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: -4px;
}

.champion-tribute-content h2 i {
  color: #e10600;
  font-style: italic;
}

.champion-tribute-content h3 {
  margin: 18px 0 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
}

.champion-tribute-description {
  max-width: 390px;
  margin: 0;
  color: #a5a9af;
  font-size: 13px;
  line-height: 1.8;
}

.champion-tribute-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
  border-top: 1px solid #30343a;
  border-bottom: 1px solid #30343a;
}

.champion-tribute-stats > div {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 17px 10px 17px 0;
}

.champion-tribute-stats span {
  color: #777e87;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.champion-tribute-stats strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.champion-tribute-footer {
  margin-top: 25px;
  color: #e10600;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.champion-tribute-close {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid #555;
  font-size: 27px;
  cursor: pointer;
}

.champion-tribute-close:hover {
  color: #fff;
  background: #e10600;
  border-color: #e10600;
}

@media (max-width: 700px) {
  .champion-tribute-modal {
    padding: 40px;
  }

  .champion-tribute-panel {
    display: block;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }

  .champion-tribute-image {
    min-height: 0;
    aspect-ratio: 1.5;
  }

  .champion-tribute-content {
    padding: 30px 24px;
  }

  .champion-tribute-content h2 {
    font-size: 48px;
  }

  .champion-tribute-content h3 {
    font-size: 15px;
  }

  .champion-tribute-description {
    font-size: 12px;
  }

  .champion-tribute-stats {
    margin-top: 23px;
  }

  .champion-tribute-stats strong {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .champion-tribute-content {
    padding: 25px 18px;
  }

  .champion-tribute-content h2 {
    font-size: 46px;
  }

  .champion-tribute-stats span {
    font-size: 7px;
  }

  .champion-tribute-stats strong {
    font-size: 10px;
  }
}

.champion-tribute-trigger {
  position: fixed;
  left: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e10600;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    0 0 0 3px rgba(225, 6, 0, 0.18),
    0 0 14px rgba(225, 6, 0, 0.45),
    0 0 28px rgba(225, 6, 0, 0.18);
  animation: championTrophyGlow 2s ease-in-out infinite;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.champion-tribute-trigger:hover {
  background: #e10600;
  border-color: #ff3838;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow:
    0 0 0 4px rgba(225, 6, 0, 0.25),
    0 0 20px rgba(225, 6, 0, 0.75),
    0 0 38px rgba(225, 6, 0, 0.35);
  animation: none;
}

.champion-tribute-trigger:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

@keyframes championTrophyGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(225, 6, 0, 0.15),
      0 0 10px rgba(225, 6, 0, 0.35),
      0 0 20px rgba(225, 6, 0, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(225, 6, 0, 0.25),
      0 0 19px rgba(225, 6, 0, 0.7),
      0 0 34px rgba(225, 6, 0, 0.3);
  }
}

@media (max-width: 600px) {
  .champion-tribute-trigger {
    left: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
  }
}

.champion-confetti {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.champion-confetti-piece {
  position: absolute;
  top: -15px;
  width: 8px;
  height: 13px;
  opacity: 0;
  animation: championConfettiFall var(--fall-duration) ease-in forwards;
  animation-delay: var(--fall-delay);
}

@keyframes championConfettiFall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0) rotate(var(--rotation));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .champion-confetti-piece {
    animation: none;
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .champion-tribute-trigger {
    animation: none;
  }
}

.champion-tribute-trigger[hidden] {
  display: none !important;
}

/* =====================================================
   HISTORICAL RACE CENTER DISCLAIMER
===================================================== */

.historical-race-disclaimer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.historical-race-disclaimer[hidden] {
  display: none;
}

.historical-race-disclaimer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(9px);
}

.historical-race-disclaimer-panel {
  position: relative;
  width: min(100%, 540px);
  padding: 42px;
  border: 1px solid #303030;
  border-top: 3px solid #e10600;
  background: #101010;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.7);
}

.historical-race-disclaimer-eyebrow {
  color: #e10600;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.historical-race-disclaimer-panel h2 {
  margin: 22px 0;
  color: #f5f5f5;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.98;
  font-weight: 900;
}

.historical-race-disclaimer-panel h2 i {
  color: #e10600;
  font-style: normal;
}

.historical-race-disclaimer-panel p {
  color: #999;
  font-size: 14px;
  line-height: 1.8;
}

.historical-race-disclaimer-panel button {
  width: 100%;
  min-height: 48px;
  margin-top: 26px;
  border: 0;
  background: #e10600;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.historical-race-disclaimer-panel button:hover {
  background: #ff1e16;
}

/* =====================================================
   DESKTOP SEASON SELECTOR
===================================================== */

@media (min-width: 701px) {
  .navbar .season-selector-label {
    display: flex;
    position: relative;
    align-items: center;
    min-width: 190px;
    height: 46px;
    padding: 0;
    border: 1px solid #333;
    border-radius: 3px;
    background: linear-gradient(135deg, #151515, #0b0b0b);
    transition:
      border-color 0.2s ease,
      background 0.2s ease,
      box-shadow 0.2s ease;
  }

  .navbar .season-selector-label:hover,
  .navbar .season-selector-label:focus-within {
    border-color: #e10600;
    background: #151010;
    box-shadow: 0 0 16px rgba(225, 6, 0, 0.12);
  }

  .navbar .season-selector-label::after {
    position: absolute;
    right: 17px;
    margin: 0;
    pointer-events: none;
    z-index: 2;
  }

  .navbar .season-selector-label .season-select {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 46px;
    padding: 0 42px 0 16px;
    border: 0;
    outline: none;
    background: transparent;
    color: #f5f5f5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    cursor: pointer;
  }

  .navbar .season-selector-label .season-select option {
    padding: 12px;
    background: #111;
    color: #f5f5f5;
    font-size: 13px;
    letter-spacing: 1px;
  }
}

/* =====================================================
   RACE REPLAY DISCLAIMER
===================================================== */

.replay-disclaimer-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.replay-disclaimer-modal[hidden] {
  display: none;
}

.replay-disclaimer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(9px);
}

.replay-disclaimer-panel {
  position: relative;
  width: min(100%, 540px);
  padding: 42px;
  border: 1px solid #303030;
  border-top: 3px solid #e10600;
  background: #101010;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.7);
}

.replay-disclaimer-eyebrow {
  color: #e10600;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.replay-disclaimer-panel h2 {
  margin: 22px 0;
  color: #f5f5f5;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.98;
  font-weight: 900;
}

.replay-disclaimer-panel h2 i {
  color: #e10600;
  font-style: normal;
}

.replay-disclaimer-panel p {
  color: #999;
  font-size: 14px;
  line-height: 1.8;
}

.replay-disclaimer-panel button {
  width: 100%;
  min-height: 48px;
  margin-top: 26px;
  border: 0;
  background: #e10600;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.replay-disclaimer-panel button:hover {
  background: #ff1e16;
}

body.replay-disclaimer-open {
  overflow: hidden;
}

/* =====================================================
   SMOOTH IMAGE FADE-IN REVEAL
===================================================== */
img[data-fade-in] {
  opacity: 0;
  transition: opacity 0.35s ease;
}

img[data-fade-in].is-loaded {
  opacity: 1;
}

.overview-race-story img[data-fade-in].is-loaded {
  opacity: 0.42;
}
.overview-race-last:hover img[data-fade-in].is-loaded {
  opacity: 0.58;
}
.fastest-lap-driver-image[data-fade-in].is-loaded,
#polePositionCard .pole-position-card > img[data-fade-in].is-loaded {
  opacity: 0.95;
}
#dashboardTeams .rev-team-hero-logo[data-fade-in].is-loaded {
  opacity: 0.16;
}
.rev-teams-intro > .rev-teams-hero-mercedes[data-fade-in].is-loaded {
  opacity: 0.07;
}
.championship-hero-trophy[data-fade-in].is-loaded {
  opacity: 0.3;
}

@media (max-width: 700px) {
  #dashboardTeams .rev-team-hero-logo[data-fade-in].is-loaded {
    opacity: 0.05;
  }
}
