/* Swiss scale, instrument pacing: huge flush-left type, four measured columns, red only where the data looks. */
:root {
  --ink: #000; --paper: #fff; --red: #ff2a1f;
  --hair: rgba(255, 255, 255, .16); --dim: rgba(255, 255, 255, .62);
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, Menlo, monospace;
  --gutter: clamp(16px, 1.7vw, 24px);
}
* { box-sizing: border-box; }
html { background: var(--ink); -webkit-font-smoothing: antialiased; }
.js, .js body { height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
body { margin: 0; color: var(--paper); background: var(--ink); font-family: var(--sans); font-weight: 500; font-size: 18px; line-height: 1.35; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.mono { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.5; margin: 0; }

/* each page carries its own lines, behind everything on it */
.rules { position: absolute; inset: 0 var(--gutter); z-index: -1; display: flex; justify-content: space-between; pointer-events: none; }
.rules i { width: 1px; background: rgba(255, 255, 255, .3); }
.page.light .rules i { background: rgba(0, 0, 0, .2); }
#sources .rules i { background: rgba(0, 0, 0, .24); }
.stage { isolation: isolate; }

.top { position: fixed; z-index: 31; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: baseline; padding: 16px calc(var(--gutter) + 12px); mix-blend-mode: difference; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.top a { text-decoration: none; }
.top nav { display: flex; gap: 28px; }
.top nav a:hover, .mark:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Pages are stacked sheets. The director slides them; nothing here scrolls unless it has to. */
.js .page { position: fixed; inset: 0; height: 100vh; height: 100dvh; overflow: hidden; visibility: hidden; background: var(--ink); transform-origin: 50% 50%; }
.js #film { visibility: visible; z-index: 1; }
.js #years { z-index: 2; } .js #lap { z-index: 3; } .js #sources { z-index: 4; } .js #request { z-index: 5; }
.page.light { background: var(--paper); color: var(--ink); }
.dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 20; }
.js [data-in] { opacity: 0; visibility: hidden; }
.travel { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; }
.index { min-width: 15ch; text-align: right; white-space: nowrap; }
.ticks { display: flex; align-items: center; }
.ticks button { width: 13px; height: 28px; margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ticks i { display: block; width: 1.5px; height: 9px; background: currentColor; opacity: .6; transition: height .2s, opacity .2s; }
.ticks button:hover i { height: 15px; opacity: 1; }
.ticks button[aria-current="true"] i { width: 2.5px; height: 20px; opacity: 1; }
.stage { position: relative; height: 100%; overflow: hidden; background: var(--ink); }
#car { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; z-index: 1; }
#lead { z-index: 2; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; filter: drop-shadow(0 0 5px rgba(255, 42, 31, .9)); }
#lead line { stroke: #fff; stroke-width: 1.6; }
#lead circle { fill: #fff; }


.stop { z-index: 2; position: absolute; left: calc(var(--gutter) + 12px); bottom: 20px; right: var(--gutter); pointer-events: none; }
.stop::before { content: ""; position: absolute; z-index: -1; inset: -90px calc(-1 * var(--gutter)) -20px calc(-1 * var(--gutter) - 12px); background: linear-gradient(to top, #000 20%, rgba(0, 0, 0, .62) 42%, transparent 72%); opacity: 0; transition: opacity .5s; }
.stop.live::before { opacity: 1; }
.stop .tag { display: table; color: var(--ink); background: var(--red); padding: 4px 10px; margin-bottom: 14px; }
.big { margin: 0; font-weight: 600; font-size: clamp(76px, min(21vw, 33vh), 340px); line-height: .84; letter-spacing: -.055em; margin-left: -.04em; white-space: nowrap; }
.strip { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); margin: 16px 0 0 -12px; }
.cell { min-width: 0; padding: 0 12px; }
.rule { display: block; height: 1px; background: rgba(255, 255, 255, .34); margin-bottom: 9px; }
.rule i { display: block; height: 3px; width: 100%; margin-top: -1px; background: #fff; transform-origin: 0 50%; }
.strip[data-strip="brakes"] .rule i, .strip[data-strip="wing"] .rule i, .strip[data-strip="tyres"] .rule i, .strip[data-strip="cockpit"] .rule i { background: var(--red); }
.cell-value { margin: 0 0 0 -.03em; font-weight: 600; font-size: clamp(26px, min(3.4vw, 6vh), 60px); line-height: 1; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-value small { font-size: .42em; font-weight: 500; letter-spacing: -.01em; margin-left: .15em; }
.cell-value em { font-style: normal; font-weight: 500; font-size: .55em; margin: 0 .22em; color: var(--dim); }
.cell-label { margin: 5px 0 0; font-size: 14px; line-height: 1.25; color: var(--dim); }
.cell-label.mono { font-size: 10.5px; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-source { color: #fff; font-size: 10.5px; letter-spacing: .14em; margin-bottom: 12px; }
.cell.faint .cell-value { color: var(--dim); }
.big small { font-size: .24em; font-weight: 500; letter-spacing: -.02em; margin-left: .12em; }
.big em { font-style: normal; font-weight: 500; font-size: .5em; margin: 0 .16em; vertical-align: .22em; }
.stop.long .big { font-size: clamp(44px, min(11.6vw, 22vh), 200px); }
.cap { margin: 12px 0 0; font-size: clamp(16px, 1.6vw, 22px); color: var(--dim); }

.sticky { height: 100%; display: flex; flex-direction: column; padding: 52px calc(var(--gutter) + 12px) 18px; overflow: hidden; }
.yr-top { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }
.yr-head { margin: 0 0 0 -.03em; font-weight: 600; font-size: min(6.4vw, 12.6vh); line-height: .96; letter-spacing: -.045em; }
.yr-hint { margin-top: 12px; font-size: 11px; color: rgba(0, 0, 0, .62); }
.yr-left { display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-width: 0; }
.year { margin: 0 0 0 -.05em; font-weight: 600; font-size: min(21vw, 44vh); line-height: .8; letter-spacing: -.055em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yr-cells { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; margin-left: 4px; min-width: 0; min-height: 0; }
#years .cell { padding: 0 14px 0 16px; }
#years .rule { background: rgba(0, 0, 0, .4); }
#years .cell-value { font-size: clamp(20px, min(3vw, 5.8vh), 56px); line-height: 1.02; white-space: normal; letter-spacing: -.03em; min-height: 1.02em; }
#years .cell-label { color: rgba(0, 0, 0, .62); }
.yr-layers { display: flex; align-items: center; gap: 16px; margin-top: clamp(10px, 2.4vh, 24px); }
.yr-count { flex: none; font-size: 11px; letter-spacing: .12em; }
#yr-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid rgba(0, 0, 0, .28); color: rgba(0, 0, 0, .38); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.seasons { position: relative; cursor: ew-resize; flex: none; height: clamp(54px, 13vh, 150px); margin-top: 10px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1.5px solid var(--ink); touch-action: none; outline: none; }
.seasons i { flex: 1; background: rgba(0, 0, 0, .16); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.seasons i.up { transform: scaleY(1); }
.reduced .seasons i { transition: none; }
.no-webgl .seasons i { transform: none; }
.yr-marker { position: absolute; left: 0; top: -8px; bottom: 0; width: 2px; margin-left: -1px; background: var(--red); will-change: transform; pointer-events: none; }
.seasons i.on { background: var(--ink); }
.seasons i.now { background: var(--red); }
.seasons:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.ledger { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 11px; }
#request h2 span, .sources-head span { display: inline-block; }

#request h2 { margin: 0 0 clamp(20px, 4vh, 40px) -.05em; font-weight: 600; font-size: clamp(64px, min(9.8vw, 21vh), 190px); line-height: .84; letter-spacing: -.055em; }
#request p { max-width: 30em; margin: 0 0 22px; }
#request .note { margin: 14px 0 0; opacity: .6; font-size: 11px; }
.go { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 12px 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; border: 2px solid var(--ink); cursor: pointer; }
.go.ghost { background: transparent; color: var(--ink); }
.go[aria-disabled="true"], .go:disabled { cursor: not-allowed; opacity: .55; }
.go:not([aria-disabled="true"]):not(:disabled):hover { background: var(--red); border-color: var(--red); color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.lab { min-width: 0; border-top: 2px solid var(--ink); padding-top: 12px; align-self: stretch; display: flex; flex-direction: column; }
.lab-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.lab label { display: grid; gap: 3px; min-width: 0; }
.lab label .mono { font-size: 10.5px; letter-spacing: .12em; }
.lab-pick { flex: 1 1 100%; }
.lab-fields { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 200px; }
.lab-fields label { flex: 1 1 70px; }
.lab select, .lab input { width: 100%; font: 500 16px var(--sans); color: var(--ink); background: var(--paper); border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding: 6px 0; }
.lab input:disabled { color: rgba(0, 0, 0, .55); border-bottom-color: rgba(0, 0, 0, .3); }
.lab-form .go { padding: 9px 14px; font-size: 12px; }
.lab-url { margin: 10px 0 8px; font-size: 11px; letter-spacing: .04em; text-transform: none; overflow-wrap: anywhere; opacity: .7; }
.lab-table { flex: none; max-height: 23vh; overflow-y: auto; touch-action: pan-y; }
.lab table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lab th { position: sticky; top: 0; background: var(--paper); text-align: left; font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 6px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.lab td { padding: 4px 12px 4px 0; border-bottom: 1px solid rgba(0, 0, 0, .14); font-variant-numeric: tabular-nums; }
.lab .bar-head, .lab .bar-cell { width: 34%; padding-right: 0; }
.bar-cell i { display: block; height: 7px; background: var(--ink); transform-origin: 0 50%; }
.bar-cell i.peak { background: var(--red); }
.lab-status { margin: 8px 0 0; min-height: 1.3em; font-size: 13px; line-height: 1.3; }
.lab-status[data-kind="wait"], .lab-status[data-kind="bad"] { font-weight: 600; padding-left: 10px; border-left: 3px solid var(--red); }

footer { flex: none; margin: 0 -24px 0 calc(-1 * var(--gutter) - 12px); padding: 12px 24px 16px calc(var(--gutter) + 12px); color: rgba(0, 0, 0, .66); font-size: 12px; line-height: 1.3; display: grid; gap: 4px; border-top: 1px solid rgba(0, 0, 0, .14); }
footer p { margin: 0; max-width: 90ch; }

/* The case, made before the data arrives */
.look-head { position: absolute; z-index: 2; left: calc(var(--gutter) + 8px); top: 50px; }
.look-head h2 { margin: 0 0 0 -.03em; color: #fff; font-weight: 600; font-size: min(6.4vw, 12.6vh); line-height: .96; letter-spacing: -.045em; }
.look-head h2 span { display: block; }
.look-head h2 .red { color: var(--red); }
.reveal { position: static; margin: 16px 0 0 4px; text-align: left; color: var(--dim); }
.look-strip { position: absolute; z-index: 2; left: calc(var(--gutter) + 12px); right: var(--gutter); bottom: 20px; margin-top: 0; }
.look-strip .cell-value { font-size: clamp(28px, min(3.5vw, 6.6vh), 66px); }
.look-strip .cell-label { color: rgba(255, 255, 255, .78); }

/* Front page: one line divides the car from its data */
.hero { position: absolute; inset: 0; pointer-events: none; --cut: 0px; }
.word { position: absolute; left: calc(var(--gutter) + 6px); top: 46px; z-index: 0; }
.word h1, .word-line { display: block; margin: 0; font-weight: 600; font-size: var(--word, 24vw); line-height: .76; letter-spacing: -.05em; text-transform: uppercase; white-space: nowrap; }
.word span { display: block; }
.word span + span { margin-left: .28em; }
.word h1 { clip-path: inset(-20% calc(100% - var(--cut)) -20% -5%); }
/* the stroke sits behind a black fill, which hides the seams where the letter shapes overlap */
.word-line { position: absolute; left: 0; top: 0; color: #000; -webkit-text-stroke: 5px #fff; paint-order: stroke fill; clip-path: inset(-20% -5% -20% var(--cut)); }
.ground { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14%; height: 1px; background: rgba(255, 255, 255, .34); z-index: 0; }
.hero-foot { position: absolute; z-index: 2; left: calc(var(--gutter) + 12px); right: calc(var(--gutter) + 12px); bottom: 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; }
.hero-foot .line { margin: 0; font-size: clamp(16px, 1.45vw, 23px); line-height: 1.15; letter-spacing: -.01em; }
.hero-stat { justify-self: end; text-align: right; }
.hero-stat .cell-value { font-size: clamp(24px, min(2.9vw, 5vh), 50px); }
.hint { margin: 0; display: inline-flex; align-items: center; gap: 12px; padding: 9px 14px 9px 16px; background: #fff; color: var(--ink); border-radius: 999px; }
.hint .mono { font-size: 11px; }
.hint i { width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); animation: nudge 1.5s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px) rotate(45deg); } }
.scan { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 2px; background: var(--red); box-shadow: 0 0 16px 1px rgba(255, 42, 31, .65); pointer-events: none; will-change: transform; }
.scan-tag { position: absolute; top: 46%; left: 10px; padding: 4px 10px; color: var(--ink); background: var(--red); white-space: nowrap; font-size: 11px; opacity: 0; transition: opacity .25s; }
.scan.flip .scan-tag { left: auto; right: 10px; }
.scan.show .scan-tag { opacity: 1; }
.reduced .hint i { animation: none; }
.no-webgl .scan, .no-webgl .ground { display: none; }
.no-webgl .look-head, .no-webgl .look-strip { position: static; padding: 8vh calc(var(--gutter) + 12px) 0; }
.no-webgl .hero { position: static; padding: 80px calc(var(--gutter) + 12px) 40px; }
.no-webgl .word, .no-webgl .hero-foot { position: static; }
.no-webgl .word-line { display: none; }
.no-webgl .word h1 { clip-path: none; font-size: 28vw; }
.no-webgl .hero-foot { margin-top: 40px; }
.no-webgl .hint { display: none; }

/* One lap, replayed from telemetry: instruments on the left, the track and its trace on the right */
#lap { padding: 52px var(--gutter) 20px; }
.js #lap { display: grid; grid-template-columns: 1fr 3fr; }
.lap-side { display: flex; flex-direction: column; gap: clamp(12px, 2.6vh, 28px); padding: 0 16px 0 12px; min-width: 0; min-height: 0; }
.lap-head .tag { display: table; color: var(--ink); background: var(--red); padding: 4px 10px; }
.lap-head .cap { margin-top: 8px; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.25; }
.meter .rule { margin-bottom: 8px; }
.meter .cell-source { margin-bottom: 6px; font-size: 10px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter-value { margin: 0 0 0 -.04em; font-weight: 600; font-size: clamp(56px, min(7.4vw, 13.5vh), 132px); line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-value small { font-size: .26em; font-weight: 500; letter-spacing: -.01em; margin-left: .14em; }
.meter .cell-label { margin-top: 6px; white-space: pre; }
#rule-a, #rule-b { transform-origin: 0 50%; }
#rule-a { background: var(--red); }
.lap-mini { margin-top: auto; display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .34); padding-top: 9px; }
.lap-mini .cell-value { font-size: clamp(24px, min(2.7vw, 5vh), 46px); }
.lap-mini .cell-label { white-space: nowrap; }
.lap-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-left: 12px; padding-right: 12px; }
.track { position: relative; flex: 1 1 0; min-height: 0; }
#lap-track { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lap-line { fill: none; stroke: rgba(255, 255, 255, .92); stroke-width: 5; stroke-linejoin: round; }
.lap-done { fill: none; stroke: var(--red); stroke-width: 5; stroke-linejoin: round; }
.lap-car circle { stroke: #000; stroke-width: 3; }
.lap-car.a circle { fill: var(--red); }
.lap-car.b circle { fill: #fff; }
.lap-car text { fill: #fff; font: 400 14px var(--mono); letter-spacing: .12em; paint-order: stroke; stroke: #000; stroke-width: 5px; }
.trace { position: relative; flex: none; height: clamp(110px, 25vh, 280px); margin-top: 8px; }
.trace svg { position: absolute; left: 0; right: 0; top: 16px; bottom: 20px; width: 100%; height: calc(100% - 36px); overflow: hidden; }
.trace .floor { stroke: rgba(255, 255, 255, .34); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trace .grid { stroke: rgba(255, 255, 255, .13); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trace .sp { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trace .sp.a { stroke: var(--red); }
.trace .sp.b { stroke: #fff; }
.trace-title, .trace-tick, .trace-mark { position: absolute; margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.trace-title { left: 0; top: 0; color: #fff; }
.trace-tick { bottom: 0; transform: translateX(-50%); }
.trace-tick:first-of-type { transform: none; }
.trace-mark { top: 0; color: #fff; padding-left: 7px; }
.trace-mark::before { content: ""; position: absolute; left: 0; top: 2px; width: 1.5px; height: calc(var(--h) - 22px); background: var(--red); }
.trace-mark.flip { padding: 0 7px 0 0; transform: translateX(-100%); }
.trace-mark.flip::before { left: auto; right: -1px; }
.playhead { position: absolute; top: 16px; bottom: 20px; left: 0; width: 1.5px; background: #fff; will-change: transform; }

/* One archive, eight sources: a block composition. Each source opens its own brief. */
#sources { background: var(--red); color: var(--ink); }
.src-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(8, 1fr); }
.tile { --k: var(--ink); --w: #fff; --b: var(--red); position: relative; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; background: var(--b); color: var(--k); outline: 1px solid rgba(0, 0, 0, .55); outline-offset: -.5px; overflow: hidden; }
.tile.black { --k: #fff; --w: var(--red); --b: #000; }
.tile.white { --k: #000; --w: var(--red); --b: #fff; }
.tile.dark { --k: #fff; --w: #000; --b: #b9140c; }
.tile-head { display: flex; align-items: flex-end; padding: 40px 16px 8px calc(var(--gutter) + 12px); }
.tile-head h2 { margin: 0; color: #fff; font-weight: 600; font-size: min(5vw, 9.6vh); line-height: .96; letter-spacing: -.04em; }
.src-card { display: flex; flex-direction: column; text-align: left; font-family: var(--sans); cursor: pointer; padding: 12px 14px 10px; transition: filter .2s; }
.src-card svg { flex: 1 1 0; min-height: 0; width: 100%; overflow: visible; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.src-card svg * { fill: none; stroke: var(--k); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.src-card svg .w { stroke: var(--w); }
.src-card svg .fk { fill: var(--k); stroke: none; }
.src-card svg .fw { fill: var(--w); stroke: none; }
.src-name { margin: 4px 0 0; font-weight: 600; font-size: clamp(16px, min(1.45vw, 2.8vh), 26px); letter-spacing: -.02em; line-height: 1.05; }
.src-size { margin: 1px 0 0; font-size: clamp(13px, 1.05vw, 17px); line-height: 1.1; opacity: .82; }
.src-peek { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: var(--k); color: var(--b); transform: translateY(101%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); font-size: 14px; line-height: 1.25; }
.src-peek b { display: block; font-weight: 600; font-size: clamp(16px, 1.4vw, 22px); letter-spacing: -.02em; }
.src-peek span { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.src-card:hover .src-peek, .src-card:focus-visible .src-peek { transform: none; }
.src-card:hover svg, .src-card:focus-visible svg { transform: translateY(-10%) scale(.94); }

/* A source's own brief */
.detail { position: fixed; inset: 0; z-index: 20; background: var(--paper); color: var(--ink); display: grid; grid-template-columns: 5fr 7fr; gap: 0 28px; padding: 52px calc(var(--gutter) + 12px) 22px; visibility: hidden; }
.detail[hidden] { display: none; }
.js .detail.scrolls { overflow-y: auto; touch-action: pan-y; }
.detail-left { display: flex; flex-direction: column; min-width: 0; }
.detail-back { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 9px 14px; background: var(--ink); color: var(--paper); border: 0; cursor: pointer; font-size: 11.5px; }
.detail-back i { width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.detail-back:hover { background: var(--red); color: var(--ink); }
.detail h2 { margin: 2.6vh 0 0 -.04em; font-weight: 600; font-size: min(7vw, 13vh); line-height: .94; letter-spacing: -.05em; }
.detail-line { margin: 10px 0 0; color: #d41c12; font-weight: 600; font-size: clamp(20px, 2vw, 32px); line-height: 1.08; letter-spacing: -.02em; }
.detail-text { margin: 14px 0 0; max-width: 34em; font-size: clamp(15px, 1.2vw, 19px); line-height: 1.32; }
.detail-facts { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail-facts div { border-top: 1.5px solid var(--ink); padding-top: 7px; }
.detail-facts b { display: block; font-weight: 600; font-size: clamp(22px, min(2.4vw, 4.6vh), 40px); letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.detail-facts span { display: block; margin-top: 5px; font-size: 13px; line-height: 1.2; opacity: .72; }
.detail-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.detail-size { margin: 0; font-weight: 600; font-size: min(7.4vw, 14vh); line-height: .95; letter-spacing: -.05em; }
.detail-sub { margin: 8px 0 0; font-size: 11px; opacity: .72; }
.detail-chart { flex: 1 1 0; min-height: 90px; margin-top: 10px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1.5px solid var(--ink); }
.detail-chart i { flex: 1; min-width: 0; background: var(--ink); transform-origin: 50% 100%; }
.detail-chart i:last-child { background: var(--red); }
.detail-chart i:hover { background: var(--red); }
.detail-axis { display: flex; justify-content: space-between; margin: 5px 0 0; font-size: 11px; }
.detail-split { margin-top: 8px; display: grid; gap: 5px; }
.detail-split div { display: grid; grid-template-columns: minmax(90px, 26%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; text-transform: capitalize; }
.detail-split u { display: block; height: 9px; background: var(--ink); transform-origin: 0 50%; text-decoration: none; }
.detail-split b { font-weight: 600; font-variant-numeric: tabular-nums; }
.on-red .top { mix-blend-mode: normal; color: var(--ink); }

/* The last page: the car, drawn in ink on the page */
.js #request { display: grid; grid-template-columns: 1fr 1fr; }
.try-left { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 60px 24px 0 calc(var(--gutter) + 12px); min-width: 0; min-height: 100%; }
.try-right { display: flex; flex-direction: column; padding: 60px calc(var(--gutter) + 12px) 20px 12px; min-width: 0; min-height: 100%; }
.plate { position: relative; flex: 1 1 auto; min-height: 230px; margin: 10px 0 0; }
#plate-model { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plate figcaption { position: absolute; left: 12px; right: 12px; top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; letter-spacing: .12em; }
.crop { position: absolute; width: 12px; height: 12px; border: 0 solid var(--ink); }
.crop.tl { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; } .crop.tr { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.crop.bl { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; } .crop.br { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
.ruler { position: absolute; left: 12px; right: 12px; bottom: 0; height: 9px; overflow: hidden; }
.ruler i { position: absolute; left: -40px; right: -40px; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px); will-change: transform; }

/* Splash: no words. The line draws a real speed trace, then wipes the black away. */
.splash { position: fixed; inset: 0; z-index: 40; background: var(--ink); will-change: clip-path; }
#splash-trace { position: absolute; left: 0; top: 24vh; width: 100%; height: 52vh; overflow: hidden; }
#splash-trace polyline { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.splash-edge { position: fixed; z-index: 41; top: 0; bottom: 0; left: 0; width: 2px; background: var(--red); box-shadow: 0 0 22px 2px rgba(255, 42, 31, .75); will-change: transform; }
.seen .splash, .seen .splash-edge, .no-webgl .splash, .no-webgl .splash-edge { display: none; }

/* Phones: the car sits above the type */
@media (max-width: 720px) {
  .top nav a:first-child { display: none; }
  .index, .plate, .hero-stat { display: none; }
  .travel { gap: 0; }
  .ticks button { width: 12px; }
  .look-head h2 { font-size: 11.6vw; }
  .look-strip .cell-label { font-size: 12px; }
  .look-strip { --cols: 2 !important; }
  .js #sources { display: flex; flex-direction: column; }
  .src-main { flex: 1 1 0; }
  .src-figure { display: none; }
  .src-meta { display: none; }
  .src-grid { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(12, 1fr); }
  .tile { grid-area: auto !important; grid-column: span 3 !important; grid-row: span 3 !important; }
  .tile-head { grid-column: span 6 !important; padding: 44px 16px 10px calc(var(--gutter) + 12px); }
  .tile-head h2 { font-size: 7.6vw; }
  .tile-fill { display: none; }
  .src-peek { display: none; }
  .detail { display: block; padding-bottom: 28px; }
  .detail-chart { flex: none; height: 150px; }
  .detail-right { margin-top: 18px; }
  .detail-facts { margin-top: 18px; }
  .hero-foot { grid-template-columns: 1fr; justify-items: start; gap: 12px; bottom: 16px; }
  .hint { justify-self: center; }
  .ground { bottom: 24%; }
  .word { top: 58px; }
  .word-line { -webkit-text-stroke-width: 3px; }
  .scan-tag { top: 26%; }
  .strip { --cols: 2 !important; row-gap: 12px; }
  .strip[data-strip="tyres"] { --cols: 4 !important; }
  .js #request { grid-template-columns: 1fr; }
  .try-left { padding-right: calc(var(--gutter) + 12px); min-height: 0; }
  .try-right { grid-row: 2; padding-left: calc(var(--gutter) + 12px); min-height: 0; }
  .try-left footer { display: none; }
  .js #lap { display: flex; flex-direction: column; padding-left: var(--gutter); padding-right: var(--gutter); }
  .lap-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 0 12px; order: 2; }
  .lap-head { position: absolute; left: calc(var(--gutter) + 12px); top: 48px; right: 16px; }
  .lap-main { order: 1; flex: 1 1 0; margin-top: 76px; }
  .meter-value { font-size: 15vw; }
  .meter .cell-source { white-space: normal; }
  .meter .cell-label { white-space: normal; font-size: 9.5px; letter-spacing: .08em; }
  .lap-mini { grid-column: 1 / -1; margin-top: 0; }
  .lap-mini .cell-value { font-size: 8vw; }
  .trace { height: 92px; }
  .trace-mark { display: none; }
  .lap-line, .lap-done { stroke-width: 9; }
  .big { font-size: clamp(76px, 25vw, 150px); }
  .stop.long .big { font-size: 13.4vw; }
  .yr-top { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; }
  .yr-left { height: auto; gap: 8px; }
  .yr-head { font-size: 11.6vw; }
  .yr-cells { grid-auto-rows: auto; gap: 6px 0; margin-left: -4px; }
  #years .cell { padding: 0 8px 0 4px; }
  #years .cell-value { font-size: 5.6vw; }
  .year { font-size: 26vw; }
  .yr-cells { align-self: start; }
  .yr-layers { display: block; }
  .yr-count { margin-bottom: 5px; }
  .chip { font-size: 9px; padding: 2px 5px; }
  body { font-size: 17px; }
}

/* No WebGL, or the scripts failed: everything reads as one plain scrolling page */
.no-webgl #car, .no-webgl #lead, .no-webgl .reveal, .no-webgl .dim, .no-webgl .travel { display: none; }
.no-webgl [data-in] { opacity: 1 !important; visibility: visible !important; transform: none !important; }
.no-webgl .page { position: static; height: auto; min-height: 100vh; visibility: visible !important; opacity: 1 !important; transform: none !important; }
.no-webgl .stage { height: auto; overflow: visible; }
.no-webgl .stop { position: static; padding: 8vh calc(var(--gutter) + 12px); }
.no-webgl .strip { margin-top: 28px; }
.no-webgl .plate, .no-webgl .lab-form, .no-webgl .src-figure { display: none; }
.no-webgl .src-grid { position: static; grid-template-rows: auto; grid-auto-rows: 240px; }
.no-webgl .tile { grid-area: auto !important; grid-column: span 6; }
.no-webgl #lap, .no-webgl #sources { padding: 8vh calc(var(--gutter) + 12px); }

.no-webgl .rules { display: none; }

/* Footer runs across both grid columns: notices left, model credits right */
@media (min-width: 721px) {
  footer { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  footer p:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
}

.src-card.wide { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto auto; column-gap: 20px; }
.src-card.wide svg { grid-column: 2; grid-row: 1 / span 3; height: 100%; }
.src-card.wide .src-name { grid-column: 1; grid-row: 2; }
.src-card.wide .src-size { grid-column: 1; grid-row: 3; }
@media (max-width: 720px) { .src-card.wide { display: flex; } }

.detail-pic { --k: var(--ink); --w: var(--red); flex: 1 1 0; min-height: 0; margin-top: 14px; display: flex; }
.detail-pic svg { width: 100%; height: 100%; overflow: visible; }
.detail-pic svg * { fill: none; stroke: var(--k); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.detail-pic svg .w { stroke: var(--w); }
.detail-pic svg .fk { fill: var(--k); stroke: none; }
.detail-pic svg .fw { fill: var(--w); stroke: none; }
.detail-facts { margin-top: 0; }
@media (max-width: 720px) { .detail-pic { flex: none; height: 110px; } .detail-facts { margin-top: 14px; } }
@media (max-width: 720px) {
  .src-grid { grid-template-rows: auto repeat(4, 1fr); }
  .tile { grid-row: auto !important; }
}
