.drive-panel--speed .section__head { margin-bottom: clamp(20px, 3.4vh, 36px); }
/* The panel is as tall as the Range panel (shared grid cell); any extra height opens up above the launch race. */
.drive-panel--speed { display: flex; flex-direction: column; }
.speed { display: flex; flex: 1; flex-direction: column; }

/* ---------- One column per car: name, chips, then 0–60 beside its power gauge ---------- */
.speed-cars { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 58px); }
.speed-car { min-width: 0; }
.speed-car__title { display: flex; align-items: baseline; gap: 14px; font-size: clamp(19px, 1.8vw, 27px); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.speed-car__title .vname { flex: 0 0 auto; font-size: 32px; line-height: 1; }
.speed-car__picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.speed .chip { min-height: 44px; padding-inline: 12px; }
/* Fixed proportions so both cars' gauges come out the same size whatever their qualifier text says. */
.speed-car__stats { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr); align-items: end; gap: clamp(14px, 2vw, 32px); margin-top: clamp(10px, 1.6vh, 22px); }
.speed-reading { padding-bottom: 4px; }
.speed-reading__value { display: flex; align-items: baseline; gap: 8px; line-height: 0.9; }
.speed-reading__value > .num { color: var(--c-glow); font-size: clamp(56px, 6.6vw, 120px); font-weight: 800; letter-spacing: -0.065em; }
.speed-unit { font-size: clamp(20px, 1.9vw, 30px); font-weight: 650; letter-spacing: -0.04em; }
.speed-reading__condition { max-width: 15em; margin-top: 12px; color: var(--on-dark-2); font-size: 13px; line-height: 1.45; }

/* The gauge sizes its text to its own width (container units), so it can sit beside the 0–60 figure. */
.speed-gauge { position: relative; width: 100%; max-width: 360px; justify-self: end; container-type: inline-size; }
.speed-gauge svg { display: block; width: 100%; overflow: visible; }
.speed-gauge__track, .speed-gauge__arc { fill: none; stroke-width: 16px; stroke-linecap: butt; }
.speed-gauge__track { stroke: rgb(255 255 255 / 9%); }
.speed-gauge__arc { stroke: var(--c-glow); }
.speed-gauge__cap { stroke: rgb(255 255 255 / 45%); stroke-width: 2px; }
.speed-gauge__reading { position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; }
.speed-gauge__number { display: flex; justify-content: center; align-items: baseline; gap: 1.6cqi; line-height: 1; }
.speed-gauge__number strong { color: var(--c-glow); font-size: clamp(30px, 16cqi, 76px); font-weight: 800; letter-spacing: -0.065em; }
.speed-gauge__number > span:first-of-type { font-size: clamp(14px, 5cqi, 26px); font-weight: 650; letter-spacing: -0.035em; }
.speed-gauge__torque { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin-top: 1.4cqi; }
.speed-gauge__torque > strong { font-size: clamp(15px, 5.4cqi, 26px); font-weight: 700; letter-spacing: -0.035em; }
.speed-gauge__torque > span { color: var(--on-dark-2); font-size: 12px; }
.speed-gauge__scale { position: absolute; left: 9.6%; right: 9.6%; bottom: -4px; display: flex; justify-content: space-between; color: var(--on-dark-2); font-size: 12px; font-variant-numeric: tabular-nums; transform: translateY(100%); }

/* ---------- Launch race (both cars) ---------- */
.speed-launch { margin-top: auto; padding-top: clamp(28px, 4.6vh, 52px); }
.speed-launch__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: clamp(10px, 1.4vh, 18px); }
.speed .speed-launch__button { --bg: var(--on-dark); --fg: var(--ink); min-height: 50px; padding-inline: 24px 21px; font-size: 18px; font-weight: 750; gap: 20px; box-shadow: 0 9px 28px -18px rgb(244 245 251 / 80%); }
.speed .speed-launch__button svg { width: 24px; height: 24px; }
.speed .speed-launch__button:disabled { opacity: 0.6; }
.speed-result { font-size: clamp(19px, 2.3vw, 33px); font-weight: 650; letter-spacing: -0.035em; text-align: right; }
.speed-lanes { display: grid; gap: 10px; }
.speed-lane { display: grid; grid-template-columns: 88px minmax(0, 1fr) 114px; align-items: center; gap: 22px; }
.speed-lane__label { display: flex; align-items: center; gap: 13px; }
.speed-lane__label .vname { font-size: 24px; }
.speed-lane__order { color: var(--on-dark-2); font-size: 13px; font-weight: 600; }
.speed-lane__track { position: relative; height: clamp(36px, 4.6vh, 46px); background: rgb(255 255 255 / 6%); border-left: 2px solid rgb(255 255 255 / 45%); border-radius: 0 6px 6px 0; }
.speed-lane__fill { position: absolute; inset: 0; transform-origin: left; border-radius: 0 6px 6px 0; will-change: transform; }
.speed-lane__finish { position: absolute; top: -5px; bottom: -5px; right: 0; border-right: 2px dashed rgb(255 255 255 / 65%); }
.speed-lane[data-race-state='finished'] .speed-lane__track { box-shadow: 0 0 22px -14px var(--c-glow); }
.speed-lane__mph { display: flex; align-items: baseline; gap: 7px; justify-content: flex-end; }
.speed-lane__mph strong { font-size: clamp(30px, 2.8vw, 41px); line-height: 1; letter-spacing: -0.05em; font-weight: 750; }
.speed-lane__mph > span { font-size: 13px; color: var(--on-dark-2); }
.speed-ramp-note { margin: 10px 136px 0 110px; color: var(--on-dark-2); font-size: 13px; }

@media (max-width: 1200px) {
  .speed-car__title { font-size: 20px; }
  .speed-car__title .vname { font-size: 28px; }
  .speed .chip { padding-inline: 10px; font-size: 14px; }
}
@media (max-width: 900px) {
  .speed-car__title { display: block; }
  .speed-car__title .vname { display: block; margin-bottom: 7px; }
  .speed .chip { padding-inline: 10px; font-size: 13px; }
  .speed-lane { grid-template-columns: 74px minmax(0, 1fr) 96px; gap: 14px; }
  .speed-lane__label { gap: 6px; }
  .speed-ramp-note { margin-inline: 88px 0; }
}
@media (prefers-reduced-motion: reduce) { .speed-lane__fill { will-change: auto; } }
