/* =====================================================================================================
   D-Max 1:59 preview - interface styles.
   Visual system: road markings, race timing boards and engineering labels. The truck stays the hero,
   so there are no large panels over it and Desert Orange is used only for active states and markers.
   Order: tokens / base / loader / top bar / progress line / story / pins / modes / sheet / index /
          phone and tablet / reduced motion.
   ===================================================================================================== */

/* ---------------------------------------------------------------------------------------------- tokens */
:root {
  --orange: #e2531a;            /* Desert Orange - accents only */
  --orange-hi: #ff7a3d;         /* lighter orange for small text on dark */
  --asphalt: #0c0d0e;
  --graphite: #1b1d20;
  --offwhite: #f3efe8;
  --road: #ffffff;
  --metal: #a3a8ad;             /* technical labels */
  --warn: #c0554a;              /* muted red: warnings and "to be confirmed" */

  --ink: var(--offwhite);       /* text that sits directly over the 3D scene */
  --dim: rgba(243, 239, 232, .74);
  --line: rgba(243, 239, 232, .26);

  /* small control surfaces: smoked glass with a hairline, never a bright box. Night deepens and cools them. */
  --panel: rgba(18, 19, 21, .46);
  --panel-ink: var(--offwhite);
  --panel-dim: rgba(243, 239, 232, .62);
  --panel-line: rgba(243, 239, 232, .22);
  --panel-accent: var(--orange-hi);

  --f-display: "Bahnschrift", "DIN Condensed", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --f-mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", ui-monospace, Menlo, "Roboto Mono", monospace;

  --gut: clamp(18px, 5vw, 84px);
  --rail-w: 132px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --theme: 1.4s;                /* day <-> night interface transition */
}
body.night {
  --panel: rgba(9, 12, 20, .62);
  --panel-line: rgba(214, 224, 243, .2);
}

/* ------------------------------------------------------------------------------------------------ base */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { background: var(--asphalt); color: var(--ink); font: 400 16px/1.55 var(--f-body); overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 3px; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: pan-y; }
body.locked #gl { touch-action: none; cursor: grab; }
body.locked #gl:active { cursor: grabbing; }

/* night adds a faint blue-black cast over the whole picture */
#tint { position: fixed; inset: 0; pointer-events: none; background: #060b1c; opacity: 0; transition: opacity var(--theme) ease; mix-blend-mode: multiply; }
body.night #tint { opacity: .34; }
/* top and bottom shading so words stay readable without a panel */
#scrim { position: fixed; inset: 0; pointer-events: none; transition: opacity .8s;
  background: linear-gradient(180deg, rgba(8, 9, 10, .66) 0, rgba(8, 9, 10, 0) 20%, rgba(8, 9, 10, 0) 52%, rgba(8, 9, 10, .82) 100%); }
body.locked #scrim { opacity: .5; }

/* the large, quiet 1:59:40 behind the hero and the finish */
#ghost { position: fixed; right: calc(var(--gut) + 40px); bottom: 7vh; pointer-events: none; font: 700 clamp(110px, 21vw, 380px)/.8 var(--f-display); font-stretch: 75%;
  letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1px rgba(243, 239, 232, .2); opacity: 0; transform: translateY(24px); transition: opacity 1.2s, transform 1.6s var(--ease); font-variant-numeric: tabular-nums; }
body.ready[data-sec="hero"].mode-story #ghost { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 22px; border: 1px solid var(--line); background: rgba(18, 19, 21, .3); font: 600 13px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s, transform .15s; }
.btn:hover { border-color: var(--ink); background: rgba(243, 239, 232, .1); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.solid:hover { background: #f0652a; border-color: #f0652a; color: #fff; }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* icon button used in every control group */
.ib { position: relative; width: 44px; height: 44px; display: grid; place-items: center; background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line);
  transition: background-color var(--theme), color var(--theme), border-color .2s, transform .15s; }
.ib .ib-l { display: none; }                                          /* text label, shown on phones where there is no tooltip */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.ixopen { overflow: hidden; }
.ib:hover { border-color: var(--panel-ink); }
.ib:active { transform: scale(.95); }
.ib::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .25s var(--ease); }
.ib[aria-pressed="true"] { color: var(--road); background: rgba(226, 83, 26, .16); }
.ib[aria-pressed="true"]::before { transform: scaleX(1); }           /* the bar means "on", not colour alone */
body.night .ib[aria-pressed="true"] { box-shadow: 0 0 14px rgba(226, 83, 26, .28); }
/* tooltip */
.ib[data-tip]::after { content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%); white-space: nowrap; pointer-events: none;
  background: var(--asphalt); color: var(--offwhite); font: 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; opacity: 0; transition: opacity .18s, transform .18s; z-index: 3; }
.ctl-row .ib[data-tip]::after { right: auto; left: 50%; top: auto; bottom: calc(100% + 10px); transform: translate(-50%, 6px); }
.ib:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.ctl-row .ib:focus-visible::after { transform: translate(-50%, 0); }
@media (hover: hover) { .ib:hover::after { opacity: 1; transform: translate(0, -50%); } .ctl-row .ib:hover::after { transform: translate(-50%, 0); } }

/* ---------------------------------------------------------------------------------------------- loader */
#loader { position: fixed; inset: 0; z-index: 60; background: var(--asphalt); display: grid; place-items: center; transition: opacity 1s ease, visibility 1s; }
#loader.done { opacity: 0; visibility: hidden; }
.ld { width: min(420px, 78vw); }
.ld-brand { font: 700 22px/1 var(--f-display); font-stretch: 75%; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 44px; }
.ld-brand b { color: var(--orange); }
.ld-num { font: 700 clamp(72px, 14vw, 120px)/.85 var(--f-display); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.ld-num small { font: 400 14px var(--f-mono); color: var(--metal); margin-left: 8px; }
.ld-line { height: 2px; margin-top: 22px; background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 22px); }
.ld-line i { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); transition: transform .35s ease-out; }
.ld-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font: 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--metal); }
.ld-help { margin-top: 18px; color: var(--dim); font-size: 14px; }
#loader.error .ld-num, #loader.error .ld-line, #loader.error #ld-km { display: none; }
#loader.error #ld-txt { color: var(--offwhite); font: 600 18px/1.3 var(--f-body); letter-spacing: 0; text-transform: none; }
#loader.error .ld-row::before { content: "!"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--warn); color: var(--warn); font: 700 13px var(--f-mono); }
#loader.error .ld-row { justify-content: flex-start; align-items: center; }
#ld-retry { margin-top: 22px; }

/* --------------------------------------------------------------------------------------------- top bar */
#nav { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 22px; padding: 16px clamp(16px, 3vw, 40px); pointer-events: none; }
#nav > * { pointer-events: auto; }
.brand { text-decoration: none; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.brand strong { font: 700 22px/1 var(--f-display); font-stretch: 75%; letter-spacing: .04em; text-transform: uppercase; }
.brand strong b { color: var(--orange); }
.brand small { font: 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--metal); }
.nav-pos { display: flex; align-items: baseline; gap: 12px; padding-left: 22px; border-left: 1px solid var(--line); font: 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; min-width: 0; }
#nav-km { color: var(--orange-hi); font-variant-numeric: tabular-nums; }
#nav-sec { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
body.locked .nav-pos { visibility: hidden; }
.nav-acts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nbtn, .dial, .ib, .back, .chip, .seg button { -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1); }
.nbtn { height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 9px; background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line);
  font: 600 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: background-color var(--theme), color var(--theme), border-color .2s, transform .15s; }
.nbtn:hover { border-color: var(--panel-ink); }
.nbtn:active { transform: scale(.97); }
.nbtn.icon-only { width: 44px; padding: 0; justify-content: center; }
.nbtn[aria-pressed="true"] { color: var(--road); border-color: var(--panel-line); box-shadow: inset 0 -2px 0 var(--orange); }

/* lighting dial: a small rotary switch, DAY <-> NIGHT */
.dial { height: 44px; padding: 0 14px 0 8px; display: inline-flex; align-items: center; gap: 10px; background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line);
  transition: background-color var(--theme), color var(--theme), border-color .2s, box-shadow var(--theme); }
.dial:hover { border-color: var(--panel-ink); }
.dial-knob { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; transform: rotate(-48deg); transition: transform 1.1s var(--ease), box-shadow var(--theme); }
.dial-knob::before { content: ""; position: absolute; left: 50%; top: 3px; width: 2px; height: 9px; margin-left: -1px; background: var(--orange); }   /* pointer */
.dial-knob::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: currentColor; opacity: .85; }
.dial[aria-pressed="true"] .dial-knob { transform: rotate(48deg); box-shadow: 0 0 0 3px rgba(226, 83, 26, .22), 0 0 16px rgba(226, 83, 26, .45); }
.dial-txt { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.dial-txt small { font: 9px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--panel-dim); transition: color var(--theme); }
.dial-txt b { font: 600 12px/1 var(--f-mono); letter-spacing: .12em; min-width: 5ch; }

/* --------------------------------------------------------------------------------------- progress line */
/* JS sets --p (0..1) on #rail; ticks carry their own --at. Vertical here, horizontal on phones. */
#rail { position: fixed; z-index: 20; right: clamp(16px, 2.2vw, 34px); top: 50%; width: var(--rail-w); transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 18px;
  transition: opacity .5s, visibility .5s; }
body.locked #rail { opacity: 0; visibility: hidden; }
.rail-read { text-align: right; display: grid; grid-template-columns: auto auto; justify-content: end; align-items: baseline; column-gap: 6px; row-gap: 5px; }
.rail-read b { font: 700 34px/.9 var(--f-display); font-stretch: 75%; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.rail-read i { font: normal 10px var(--f-mono); letter-spacing: .12em; color: var(--metal); }
.rail-read span { grid-column: 1 / -1; font: 12px/1 var(--f-mono); letter-spacing: .08em; color: var(--orange-hi); font-variant-numeric: tabular-nums; }
.rail-read em { grid-column: 1 / -1; font: normal 10px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.rail-acts { display: none; }
.rail-line { position: relative; width: 100%; height: min(46vh, 400px); }
/* dashed centre line, like a lane marking */
.rail-line::before { content: ""; position: absolute; right: 5px; top: 0; bottom: 0; width: 2px; background: repeating-linear-gradient(180deg, var(--line) 0 10px, transparent 10px 16px); }
.rail-fill { position: absolute; right: 5px; top: 0; bottom: 0; width: 2px; background: var(--orange); transform-origin: top; transform: scaleY(var(--p, 0)); }
.rail-mark { position: absolute; right: 0; top: calc(var(--p, 0) * 100%); width: 12px; height: 12px; margin-top: -6px; background: var(--orange); transform: rotate(45deg); }
.rail-mark::after { content: ""; position: absolute; inset: -5px; border: 1px solid var(--orange); animation: railpulse 2.4s ease-out infinite; }
@keyframes railpulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.tick { position: absolute; right: 0; top: calc(var(--at) * 100%); height: 24px; margin-top: -12px; padding-right: 22px; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.tick::after { content: ""; position: absolute; right: 2px; top: 50%; width: 8px; height: 1px; background: currentColor; }
.tick.major::after { width: 14px; right: -1px; height: 2px; margin-top: -1px; }
.tick span { opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; }
.tick.major span, .tick:hover span, .tick:focus-visible span, .tick.on span { opacity: 1; transform: none; }
.tick.on { color: var(--road); }
.tick.done { color: var(--orange-hi); }
.tick:hover { color: var(--road); }

/* ----------------------------------------------------------------------------------------------- story */
#story { position: relative; z-index: 5; pointer-events: none; transition: opacity .5s, visibility .5s; }
body.locked #story { opacity: 0; visibility: hidden; }
.sec { position: relative; overflow: clip; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 108px calc(var(--gut) + var(--rail-w) + 20px) 84px var(--gut); }
.sec-in { position: relative; width: min(470px, 100%); pointer-events: auto; }
.sec-a, .sec-b { position: relative; }
/* soft local shading behind the words instead of a card */
.sec-in::before { content: ""; position: absolute; inset: -60px -90px; z-index: -1; background: radial-gradient(closest-side, rgba(8, 9, 10, .62), rgba(8, 9, 10, 0)); pointer-events: none; }

/* enter / exit: each line rises and clears in turn */
.sec-a > *, .sec-b > * { opacity: 0; transform: translateY(22px); filter: blur(5px); transition: opacity .5s ease, transform .7s var(--ease), filter .5s ease; }
.sec.on .sec-a > *, .sec.on .sec-b > * { opacity: 1; transform: none; filter: none; }
.sec.on .sec-a > :nth-child(2) { transition-delay: .07s; } .sec.on .sec-a > :nth-child(3) { transition-delay: .14s; } .sec.on .sec-a > :nth-child(4) { transition-delay: .21s; } .sec.on .sec-a > :nth-child(5) { transition-delay: .28s; }
.sec.on .sec-b > :nth-child(1) { transition-delay: .26s; } .sec.on .sec-b > :nth-child(2) { transition-delay: .33s; } .sec.on .sec-b > :nth-child(3) { transition-delay: .4s; } .sec.on .sec-b > :nth-child(4) { transition-delay: .47s; } .sec.on .sec-b > :nth-child(5) { transition-delay: .54s; }

/* checkpoint label: KM + split time */
.cp { display: flex; align-items: center; gap: 12px; font: 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.cp::before { content: ""; width: 9px; height: 9px; background: var(--orange); transform: rotate(45deg); flex: none; }
.cp b { color: var(--road); font-weight: 400; }
.cp span + span::before { content: "/"; margin-right: 12px; color: var(--line); }
.eyebrow { font: 600 12px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--orange-hi); margin-bottom: 14px; }
h2.t { font: 700 clamp(44px, 5.6vw, 88px)/.9 var(--f-display); font-stretch: 75%; text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; }
h2.t em { font-style: normal; color: var(--orange); }
@media (min-width: 761px) { h2.t { white-space: nowrap; } }        /* each title line is set in content.js */
.body { margin-top: 20px; color: var(--dim); max-width: 42ch; font-size: 16px; }
.hint { margin-top: 16px; font: 12px/1.5 var(--f-mono); letter-spacing: .04em; color: var(--orange-hi); max-width: 40ch; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* technical data points */
.dps { display: flex; gap: 0; margin-top: 26px; border-top: 1px solid var(--line); }
.dp { padding: 14px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line); }
.dp:last-child { border-right: 0; margin-right: 0; }
.dp b { display: block; font: 700 44px/.9 var(--f-display); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.dp b small { font: 400 12px var(--f-mono); letter-spacing: .08em; color: var(--metal); margin-left: 6px; text-transform: uppercase; }
.dp span { display: block; margin-top: 8px; font: 10px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--metal); }

/* "next split" cue */
.next { margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); transition: color .2s; }
.next b { color: var(--road); font-weight: 400; }
.next svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.next:hover { color: var(--road); } .next:hover svg { transform: translateY(4px); }

/* layout: hero */
.sec[data-layout="hero"] { align-items: flex-end; padding-bottom: 12vh; }
.sec[data-layout="hero"] .sec-in { width: min(620px, 100%); }
.sec[data-layout="hero"] h2.t { font-size: clamp(46px, 5.5vw, 100px); }
.scroll-cue { position: fixed; z-index: 6; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font: 10px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
  transition: opacity .5s; pointer-events: none; }
.scroll-cue i { width: 1px; height: 38px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 14px; background: var(--orange); animation: cue 1.9s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-14px); } 100% { transform: translateY(38px); } }
body.scrolled .scroll-cue, body.locked .scroll-cue, body:not(.ready) .scroll-cue { opacity: 0; }

/* layout: right (words on the right, clear of the progress line) */
.sec[data-layout="right"], .sec[data-layout="annot"] { justify-content: flex-end; }

/* layout: annot - an engineering-drawing column of labels */
.notes { list-style: none; padding: 0; margin-top: 26px; counter-reset: n; }
.notes li { counter-increment: n; position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); font: 600 13px/1.3 var(--f-body); letter-spacing: .06em; text-transform: uppercase; }
.notes li:last-child { border-bottom: 1px solid var(--line); }
.notes li::before { content: "A" counter(n); font: 400 11px var(--f-mono); color: var(--orange-hi); letter-spacing: .08em; }
.notes li::after { content: ""; position: absolute; right: 100%; top: 50%; width: 46px; height: 1px; margin-right: 12px; background: linear-gradient(90deg, transparent, var(--orange)); }

/* layout: caption - a slim bar along the bottom, truck left clear above it */
.sec[data-layout="caption"] { align-items: flex-end; padding-bottom: 9vh; }
.sec[data-layout="caption"] .sec-in { width: 100%; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 0 clamp(28px, 5vw, 80px); align-items: end; padding-top: 22px; border-top: 1px solid var(--line); }
.sec[data-layout="caption"] .sec-in::before { inset: -70px -100vw -30vh; background: linear-gradient(180deg, rgba(8, 9, 10, 0), rgba(8, 9, 10, .55)); }
.sec[data-layout="caption"] h2.t { font-size: clamp(40px, 4.6vw, 72px); }
.sec[data-layout="caption"] .body { margin-top: 0; }
.sec[data-layout="caption"] .sec-b { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 40px; }
.sec[data-layout="caption"] .dps, .sec[data-layout="caption"] .btns, .sec[data-layout="caption"] .next { margin-top: 0; }
.sec[data-layout="caption"] .dps { border-top: 0; border-left: 1px solid var(--line); padding-left: 28px; }
.sec[data-layout="caption"] .dp { padding-top: 0; }
.sec[data-layout="caption"] .next { margin-left: auto; }

/* layout: dash - full-width technical dashboard */
.sec[data-layout="dash"] { align-items: flex-end; padding-bottom: 7vh; }
.sec[data-layout="dash"] .sec-in { width: 100%; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.7fr); gap: clamp(28px, 5vw, 84px); align-items: end; }
.sec[data-layout="dash"] .sec-in::before { inset: -90px -100vw -30vh; background: linear-gradient(180deg, rgba(8, 9, 10, 0), rgba(8, 9, 10, .7) 45%); }
.sec[data-layout="dash"] h2.t { font-size: clamp(38px, 4.2vw, 64px); }
.split { margin-top: 22px; display: flex; align-items: baseline; gap: 12px; }
.split b { font: 700 clamp(56px, 6.5vw, 104px)/.85 var(--f-display); font-stretch: 75%; font-variant-numeric: tabular-nums; color: var(--orange); }
.split span { font: 10px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--metal); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.spec { padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); }
.spec + .spec { padding-left: 18px; border-left: 1px solid var(--line); }
.spec:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.spec dt { font: 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--metal); display: flex; justify-content: space-between; gap: 8px; }
.spec dt i { font-style: normal; color: var(--warn); }
.spec dd { margin: 12px 0 0; }
.spec dd b { font: 700 clamp(38px, 3.8vw, 58px)/.9 var(--f-display); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.spec dd b small { font: 400 12px var(--f-mono); letter-spacing: .08em; color: var(--metal); margin-left: 6px; text-transform: uppercase; }
.spec dd > span { display: block; margin-top: 8px; font: 11px/1.35 var(--f-mono); color: var(--dim); }
.spec.tbc dd b.ph { font: 600 13px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--warn); border: 1px dashed var(--warn); padding: 9px 10px; display: inline-block; }
.foot { margin-top: 12px; font: 10px/1.5 var(--f-mono); color: var(--metal); max-width: 80ch; }
.sec[data-layout="dash"] .next { margin-top: 10px; }

/* layout: finale - a poster: message low on the left, truck clear on the right, small print along the bottom */
.sec[data-layout="finale"] { align-items: flex-end; padding-bottom: 4.5vh; }
.sec[data-layout="finale"] .sec-in { width: 100%; }
.sec[data-layout="finale"] .sec-in::before { inset: -140px -100vw -30vh; background: linear-gradient(180deg, rgba(8, 9, 10, 0), rgba(8, 9, 10, .58) 48%, rgba(8, 9, 10, .8)); }
.sec[data-layout="finale"] .sec-a { max-width: 600px; }
.sec[data-layout="finale"] .eyebrow { margin-bottom: 22px; }
.finish { display: flex; align-items: flex-end; gap: clamp(20px, 2.6vw, 40px); margin-bottom: 18px; }
.finish div + div { padding-left: clamp(20px, 2.6vw, 40px); border-left: 1px solid var(--line); }
.finish span { display: block; margin-bottom: 9px; font: 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--metal); }
.finish b { display: block; font: 700 clamp(32px, 3.3vw, 52px)/.9 var(--f-display); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.finish b small { font: 400 12px var(--f-mono); letter-spacing: .1em; color: var(--metal); margin-left: 7px; }
.finish div:last-child b { color: var(--orange); }
.sec[data-layout="finale"] h2.t { font-size: clamp(56px, 7vw, 116px); }
.sec[data-layout="finale"] .sec-b { margin-top: 5.5vh; padding-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px clamp(28px, 6vw, 96px); align-items: start; }
.summary { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 7px 18px; font: 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.summary li + li::before { content: "/"; margin-right: 18px; color: var(--line); }
.disclaimer { font: 11px/1.55 var(--f-body); color: var(--metal); max-width: 78ch; }
.disclaimer p + p { margin-top: 3px; }

/* ------------------------------------------------------------------------------------------------ pins */
/* A pin = a marker on the truck + a drawn leader line + a label. JS moves it with transform. */
#pins { position: fixed; inset: 0; z-index: 14; pointer-events: none; overflow: hidden; }
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.pin.vis { opacity: 1; visibility: visible; }
.pin-dot { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; pointer-events: auto; display: block; }      /* 44px touch target */
.pin-dot::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1.5px solid var(--orange); background: rgba(12, 13, 14, .55); transition: transform .25s var(--ease), background .25s; }
.pin-dot::after { content: ""; position: absolute; inset: 19.5px; border-radius: 50%; background: var(--orange); }
.pin-dot i { position: absolute; inset: 9px; border-radius: 50%; border: 1px solid var(--orange); opacity: 0; animation: pinpulse 2.6s ease-out infinite; }
@keyframes pinpulse { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
button.pin-dot:hover::before, .pin.open .pin-dot::before { transform: scale(1.25); background: rgba(226, 83, 26, .35); }
.pin.open .pin-dot i { animation: none; }
div.pin-dot { pointer-events: none; }
.pin-line { position: absolute; left: 5px; bottom: 5px; width: 62px; height: 40px; overflow: visible; fill: none; stroke: var(--orange); stroke-width: 1; }
.pin-line polyline { stroke-dasharray: 112; stroke-dashoffset: 112; transition: stroke-dashoffset .55s var(--ease); }
.pin.open .pin-line polyline, .pin.peek .pin-line polyline { stroke-dashoffset: 0; }
.pin-lbl { position: absolute; left: 67px; top: -67px; width: max-content; max-width: 250px; opacity: 0; transform: translateX(-8px); transition: opacity .3s .12s, transform .45s var(--ease) .12s; pointer-events: none; }
.pin.open .pin-lbl, .pin.peek .pin-lbl { opacity: 1; transform: none; }
.pin-lbl b { display: block; height: 24px; padding: 0 2px; border-bottom: 1px solid var(--orange); font: 600 12px/22px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--road); white-space: nowrap; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.pin-lbl p { display: none; margin-top: 8px; padding: 9px 11px; background: rgba(12, 13, 14, .78); border-left: 2px solid var(--orange); font: 13px/1.45 var(--f-body); color: var(--offwhite); }
.pin.open .pin-lbl p { display: block; }
.pin.flip .pin-line { left: auto; right: 5px; transform: scaleX(-1); }
.pin.flip .pin-lbl { left: auto; right: 67px; transform: translateX(8px); }
.pin.flip.open .pin-lbl, .pin.flip.peek .pin-lbl { transform: none; }
.pin.flip .pin-lbl b { text-align: right; }
.pin.flip .pin-lbl p { border-left: 0; border-right: 2px solid var(--orange); }
@media (hover: hover) { .pin:has(button.pin-dot:hover) .pin-line polyline { stroke-dashoffset: 0; } .pin:has(button.pin-dot:hover) .pin-lbl { opacity: 1; transform: none; } }
.pin:has(button.pin-dot:focus-visible) .pin-line polyline { stroke-dashoffset: 0; }
.pin:has(button.pin-dot:focus-visible) .pin-lbl { opacity: 1; transform: none; }

/* ----------------------------------------------------------------------------------------------- modes */
.mode-ui { position: fixed; inset: 0; z-index: 15; pointer-events: none; animation: modein .6s ease both; }
.mode-ui > * { pointer-events: auto; }
@keyframes modein { from { opacity: 0; } to { opacity: 1; } }
.mode-head { position: absolute; top: 86px; left: clamp(16px, 3vw, 40px); display: flex; align-items: center; gap: 22px; pointer-events: none; }
.mode-head h2 { font: 700 clamp(28px, 3vw, 44px)/.95 var(--f-display); font-stretch: 75%; text-transform: uppercase; letter-spacing: .01em; }
.mode-head p { margin-top: 8px; font: 11px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); max-width: 46ch; }
.back { position: absolute; top: 86px; right: clamp(16px, 3vw, 40px); height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 10px; background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line);
  font: 600 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; transition: background-color var(--theme), color var(--theme), border-color .2s; }
.back:hover { border-color: var(--panel-ink); }

/* orientation indicator: plan view of the truck with a moving view cone */
.compass { display: flex; align-items: center; gap: 12px; padding-left: 22px; border-left: 1px solid var(--line); }
.compass svg { width: 54px; height: 54px; overflow: visible; }
.compass .cm-ring { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.compass .cm-truck { fill: rgba(243, 239, 232, .16); stroke: var(--ink); stroke-width: 1; }
.compass .cm-nose { fill: var(--ink); }
.compass .cm-cone { fill: rgba(226, 83, 26, .3); stroke: var(--orange); stroke-width: 1; }
.compass .cm-eye { fill: var(--orange); }
.compass g.cm-rot { transform-origin: 27px 27px; }
.compass div { font: 11px/1.5 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.compass div b { display: block; color: var(--road); font-weight: 400; font-variant-numeric: tabular-nums; }

/* control groups: a narrow column on the right; paint chips sit bottom left */
.ctl { position: absolute; inset: 0; padding: 60px clamp(16px, 2.2vw, 34px) 0 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 18px; pointer-events: none !important; }
.ctl > * { pointer-events: auto; }
.tabs { display: none; }
.grp h3 { font: 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; font-weight: 400; display: flex; align-items: center; gap: 8px; }
.grp h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.grp-btns { display: grid; grid-template-columns: repeat(2, 44px); gap: 6px; }
.grp-paint { position: absolute; left: clamp(16px, 3vw, 40px); bottom: 26px; max-width: min(680px, calc(100vw - 260px)); }
.chips { display: flex; gap: 8px; }
.chip { width: 116px; text-align: left; background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line); padding: 6px 6px 9px; position: relative;
  transition: transform .25s var(--ease), border-color .2s, background-color var(--theme), color var(--theme); }
.chip:hover { transform: translateY(-4px); border-color: var(--panel-ink); }
.chip-sw { display: block; height: 42px; background: var(--c); position: relative; overflow: hidden; }
.chip-sw::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .2) 0, rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, .14) 100%); }   /* lacquer sheen */
.chip b { display: block; margin-top: 8px; font: 600 12px/1.15 var(--f-body); }
.chip small { display: block; margin-top: 4px; font: 9px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--panel-dim); }
.chip.edition small { color: var(--panel-accent); }
.chip[aria-pressed="true"] { border-color: var(--panel-ink); box-shadow: inset 0 2px 0 var(--orange); }
.chip[aria-pressed="true"] .chip-sw::after { content: ""; position: absolute; right: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.6L12 5.4' fill='none' stroke='%23141516' stroke-width='1.8'/%3E%3C/svg%3E") center/16px; }   /* tick = selected */
.paint-note { margin-top: 9px; font: 10px/1.45 var(--f-mono); color: var(--dim); max-width: 64ch; }

/* interior: one row, bottom centre */
.ctl-row { inset: auto auto 26px 50%; padding: 0; transform: translateX(-50%); flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 26px; }
.ctl-row .grp-btns { display: flex; }
.seg { display: flex; }
.seg button { height: 44px; padding: 0 18px; background: var(--panel); color: var(--panel-ink); border: 1px solid var(--panel-line); font: 600 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase;
  transition: background-color var(--theme), color var(--theme), border-color .2s; position: relative; }
.seg button + button { margin-left: -1px; }
.seg button:hover { border-color: var(--panel-ink); z-index: 1; }
.seg button[aria-pressed="true"] { color: var(--road); background: rgba(226, 83, 26, .16); box-shadow: inset 0 -2px 0 var(--orange); z-index: 2; }
/* warm cast for the cabin */
body.mode-interior #scrim { background: radial-gradient(120% 90% at 50% 40%, rgba(60, 28, 6, 0) 40%, rgba(24, 12, 4, .55) 100%); opacity: 1; }

/* ----------------------------------------------------------------------------------- phone bottom sheet */
#sheet { display: none; }

/* --------------------------------------------------------------------------------------- course index */
#index { position: fixed; inset: 0; z-index: 50; background: rgba(10, 11, 12, .95); display: flex; justify-content: flex-end; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.index-in { width: min(560px, 100%); height: 100%; overflow-y: auto; padding: 22px clamp(18px, 4vw, 48px) 32px; border-left: 1px solid var(--line); animation: slidein .5s var(--ease) both; }
@keyframes slidein { from { transform: translateX(40px); } to { transform: none; } }
.index-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.index-head h2 { font: 700 34px/1 var(--f-display); font-stretch: 75%; text-transform: uppercase; }
#index .nbtn { background: transparent; color: var(--offwhite); border-color: var(--line); }
#index-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
#index-list button { width: 100%; display: grid; grid-template-columns: 86px 1fr auto; align-items: center; gap: 14px; min-height: 58px; padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; transition: padding .3s var(--ease), color .2s; color: var(--dim); }
#index-list button:hover { padding-left: 10px; color: var(--road); }
#index-list .ix-km { font: 12px/1 var(--f-mono); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--metal); }
#index-list .ix-name { font: 700 24px/1 var(--f-display); font-stretch: 75%; text-transform: uppercase; color: var(--offwhite); }
#index-list .ix-t { font: 12px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
#index-list button[aria-current="true"] .ix-km { color: var(--orange-hi); }
#index-list button[aria-current="true"] .ix-name::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--orange); transform: rotate(45deg); margin-right: 12px; vertical-align: 3px; }
.index-foot { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ===================================================================================== phone and tablet */
@media (max-width: 1100px) {
  .nbtn:not(.icon-only) span { display: none; }
  .nbtn:not(.icon-only) { width: 44px; padding: 0; justify-content: center; }
  .sec[data-layout="dash"] .sec-in { grid-template-columns: 1fr; gap: 22px; }
  .sec[data-layout="dash"] .body { display: none; }
  .split { margin-top: 12px; }
}

@media (max-width: 760px) {
  :root { --rail-w: 0px; }
  body { font-size: 15px; }
  #nav { gap: 12px; padding: 10px 14px; }
  .brand strong { font-size: 19px; } .brand small { display: none; }
  .nav-pos { padding-left: 12px; flex-direction: column; gap: 4px; font-size: 10px; align-items: flex-start; }
  #nav-360, #nav-int { display: none; }                         /* these move to the bottom bar */
  .dial { padding: 0 10px 0 7px; } .dial-txt small { display: none; }
  #ghost { font-size: 34vw; right: 14px; bottom: auto; top: 12vh; -webkit-text-stroke-color: rgba(243, 239, 232, .16); }

  /* progress line becomes a bottom bar that also carries the two mode buttons */
  #rail { right: 0; left: 0; top: auto; bottom: 0; width: auto; transform: none; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(8, 9, 10, 0), rgba(8, 9, 10, .9) 42%); }
  .rail-read { text-align: left; display: flex; align-items: baseline; gap: 6px; flex-wrap: nowrap; white-space: nowrap; min-width: 0; }
  .rail-read b { font-size: 26px; } .rail-read span { margin-left: 6px; font-size: 11px; } .rail-read em { display: none; }
  .rail-acts { display: flex; gap: 6px; }
  .rail-acts .nbtn { width: auto; padding: 0 12px; gap: 7px; height: 40px; font-size: 11px; }
  .rail-acts .nbtn span { display: inline; }
  .rail-line { grid-column: 1 / -1; height: 14px; width: 100%; }
  .rail-line::before { right: 0; left: 0; top: 6px; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 16px); }
  .rail-fill { right: 0; left: 0; top: 6px; bottom: auto; width: auto; height: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); }
  .rail-mark { right: auto; top: 2px; left: calc(var(--p, 0) * 100%); margin: 0 0 0 -5px; width: 10px; height: 10px; }
  .tick { top: -4px; right: auto; left: calc(var(--at) * 100%); width: 24px; height: 24px; margin: 0 0 0 -12px; padding: 0; }
  .tick span { display: none; }
  .tick::after { right: auto; left: 50%; top: 6px; width: 1px; height: 8px; margin: 0; }
  .tick.major::after { width: 2px; height: 12px; top: 4px; right: auto; margin-left: -1px; }

  /* story: words sit low, truck stays large above them */
  .sec { align-items: flex-end; padding: 80px 16px 118px; }
  .sec[data-layout] { justify-content: flex-start; align-items: flex-end; padding-bottom: 118px; }
  .sec-in, .sec[data-layout="hero"] .sec-in { width: 100%; }
  .sec-in::before, .sec[data-layout] .sec-in::before { inset: -70px -16px -118px; background: linear-gradient(180deg, rgba(8, 9, 10, 0), rgba(8, 9, 10, .74) 34%); }
  h2.t, .sec[data-layout="caption"] h2.t, .sec[data-layout="dash"] h2.t { font-size: clamp(38px, 11.5vw, 54px); }
  .sec[data-layout="hero"] h2.t { font-size: clamp(50px, 15vw, 72px); }
  .cp { margin-bottom: 12px; font-size: 11px; } .eyebrow { margin-bottom: 10px; font-size: 11px; }
  .body { margin-top: 12px; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hint, .next, .scroll-cue, .notes li::after { display: none; }
  .notes { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; } .notes li, .notes li:last-child { border: 0; padding: 0; font-size: 11px; gap: 6px; }
  .dps { margin-top: 14px; } .dp { padding: 10px 18px 0 0; margin-right: 18px; } .dp b { font-size: 32px; } .dp span { font-size: 9px; }
  .btns { margin-top: 16px; } .btn { min-height: 46px; padding: 0 18px; }
  .sec[data-layout="caption"] .sec-in { display: block; padding-top: 0; border-top: 0; }
  .sec[data-layout="caption"] .sec-b { display: block; }
  .sec[data-layout="caption"] .body { margin-top: 12px; }
  .sec[data-layout="caption"] .dps { margin-top: 14px; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .sec[data-layout="caption"] .dp { padding-top: 10px; }
  .sec[data-layout="caption"] .btns { margin-top: 16px; }
  .sec[data-layout="dash"] .sec-in { gap: 12px; }
  .split { display: none; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec, .spec + .spec { padding: 9px 10px 9px 0; border-left: 0; }
  .spec:nth-child(2n) { padding-left: 12px; border-left: 1px solid var(--line); }
  .spec dd { margin-top: 6px; } .spec dd b { font-size: 30px; } .spec dd > span { display: none; }
  .spec.tbc dd b.ph { font-size: 10px; padding: 6px 7px; }
  .foot { font-size: 9px; margin-top: 8px; }
  .sec[data-layout="finale"] { padding: 80px 16px 118px; }
  .sec[data-layout="finale"] h2.t { font-size: clamp(50px, 15vw, 72px); }
  .sec[data-layout="finale"] .eyebrow { margin-bottom: 14px; }
  .finish { margin-bottom: 12px; } .finish b { font-size: 32px; }
  .sec[data-layout="finale"] .sec-b { display: block; margin-top: 18px; padding-top: 12px; }
  .summary { gap: 5px 10px; font-size: 10px; } .summary li + li::before { margin-right: 10px; }
  .disclaimer { font-size: 10px; margin-top: 10px; }

  .pin-line { width: 40px; height: 26px; } .pin-lbl { left: 45px; top: -54px; max-width: 170px; } .pin.flip .pin-lbl { right: 45px; }
  .pin-lbl b { font-size: 11px; letter-spacing: .06em; } .pin.open .pin-lbl p { display: none; }       /* detail goes to the bottom sheet */

  /* modes */
  .mode-head { top: 66px; left: 14px; right: 14px; justify-content: space-between; gap: 10px; align-items: flex-start; }
  .mode-head h2 { font-size: 26px; } .mode-head p { display: none; }
  .compass { padding-left: 0; border-left: 0; gap: 8px; } .compass svg { width: 44px; height: 44px; } .compass div { font-size: 10px; text-align: right; order: -1; }
  .back { top: auto; bottom: calc(100% + 0px); }
  .back { position: fixed; top: 112px; left: 14px; right: auto; bottom: auto; height: 40px; padding: 0 12px; }
  .ctl, .ctl-row { position: fixed; inset: auto 0 0 0; transform: none; display: block; pointer-events: auto !important; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(8, 9, 10, 0), rgba(8, 9, 10, .92) 26%); }
  .tabs { display: flex; gap: 0; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
  .tabs button { flex: 1; min-height: 44px; font: 600 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); position: relative; }
  .tabs button[aria-selected="true"] { color: var(--road); }
  .tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--orange); }
  #ex-ctl .grp { display: none; } #ex-ctl .grp.show { display: block; }
  .grp h3 { display: none; }
  .grp-btns { display: flex; gap: 8px; } .ib { width: 52px; height: 56px; flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
  .ib[data-tip]::after { display: none; }
  .ib .ib-l { display: block; font: 9px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
  .grp-paint { position: static; max-width: none; }
  .chips { overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -14px; padding-left: 14px; padding-right: 14px; } .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; width: 104px; } .chip-sw { height: 30px; } .chip:hover { transform: none; }
  .paint-note { display: none; }
  .ctl-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .ctl-row .grp-btns { gap: 6px; } .ctl-row .ib { max-width: none; height: 52px; }
  .seg button { flex: 1; padding: 0 8px; height: 46px; font-size: 11px; }

  /* bottom sheet for marker details */
  #sheet { display: block; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--graphite); border-top: 2px solid var(--orange);
    animation: sheetin .45s var(--ease) both; }
  @keyframes sheetin { from { transform: translateY(100%); } to { transform: none; } }
  #sheet h3 { font: 700 26px/1 var(--f-display); font-stretch: 75%; text-transform: uppercase; padding-right: 48px; }
  #sheet p { margin-top: 8px; color: var(--dim); font-size: 14.5px; }
  .sheet-x { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; display: grid; place-items: center; }
}

/* short screens (phones on their side, small laptops) */
@media (max-height: 560px) {
  .sec { padding-top: 70px; padding-bottom: 76px; }
  h2.t, .sec[data-layout="hero"] h2.t, .sec[data-layout="caption"] h2.t, .sec[data-layout="dash"] h2.t { font-size: clamp(30px, 9vh, 46px); }
  .sec-in, .sec[data-layout="hero"] .sec-in { max-width: 56vw; }
  .body { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; }
  .dps, .notes, .hint, .next, .foot, .disclaimer, .summary, .split, #ghost { display: none; }
  .sec[data-layout="dash"] .sec-in { max-width: none; } .spec dd > span { display: none; } .spec { padding-top: 8px; padding-bottom: 8px; } .spec dd b { font-size: 28px; }
  .rail-line { height: min(46vh, 400px); }
  .mode-head { top: 62px; } .mode-head p { display: none; } .back { top: 62px; }
  .grp-btns { gap: 4px; } .ctl { gap: 8px; } .grp h3 { margin-bottom: 4px; }
  .paint-note { display: none; } .chip-sw { height: 22px; } .chip { width: 100px; }
}
@media (max-height: 560px) and (max-width: 760px) { .sec-in, .sec[data-layout="hero"] .sec-in { max-width: none; } .rail-line { height: 14px; } }
@media (max-height: 560px) and (min-width: 761px) {
  .ctl:not(.ctl-row) { padding: 62px 76px 0 0; justify-content: flex-end; align-items: flex-start; flex-direction: row; gap: 12px; }
  .mode-head h2 { font-size: 20px; } .compass { display: none; } .back span { display: none; } .back { padding: 0 13px; } .grp h3 { display: none; }
  .ctl:not(.ctl-row) .grp-btns { display: flex; } .ctl:not(.ctl-row) .ib[data-tip]::after { right: auto; left: 50%; top: calc(100% + 8px); transform: translate(-50%, 0); }
  .grp-paint { bottom: 10px; } .grp-paint h3 { display: none; }
}

/* ====================================================================================== reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .sec-a > *, .sec-b > * { filter: none; transform: none; }
}
