:root {
  --paper: #f3eee3;
  --paper-2: #ebe5d7;
  --paper-3: #e2dbcb;
  --ink: #1c1a17;
  --ink-2: #47423b;
  --muted: #7b7468;
  --rule: #d6cebd;
  --slate: #2f4858;
  --moss: #5f7a52;
  --plum: #8a5a6b;
  --dark: #0c0d0e;
  --s1: #4f7391;
  --s3: #8a5a6b;
  --s4: #5f7a52;
  --s5: #b59a4c;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --gut: clamp(18px, 4.5vw, 56px);
  --measure: 39rem;
  --wide: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 56px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 clamp(18px, 1.25vw + 12px, 21px)/1.62 var(--serif);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, figure, table { margin: 0; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }
::selection { background: #d9d0b8; }

/* ── masthead ── */
.mast {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 46px; display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gut); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule); transform: translateY(-101%); transition: transform .35s ease;
}
.mast.show { transform: none; }
.mast-title { font: italic 400 19px/1 var(--display); text-decoration: none; white-space: nowrap; }
.mast-links { display: flex; gap: 22px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.mast-links::-webkit-scrollbar { display: none; }
.mast-links a { font: 500 11.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; color: var(--muted); white-space: nowrap; padding: 8px 0; transition: color .15s; }
.mast-links a:hover, .mast-links a.on { color: var(--ink); }
.mast-links a.on { box-shadow: 0 1px 0 var(--ink); }
.mast-progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

/* ── cover ── */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 480px; overflow: hidden; background: var(--dark); color: #fff; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 9, 10, .1) 30%, rgba(8, 9, 10, .78) 100%); }
.cover-text { position: absolute; z-index: 2; left: var(--gut); right: var(--gut); bottom: clamp(56px, 10vh, 110px); max-width: 60rem; }
.cover h1 { font: 300 clamp(68px, 14vw, 210px)/.88 var(--display); letter-spacing: -.02em; }
.deck { font: italic 400 clamp(20px, 2.3vw, 31px)/1.3 var(--serif); margin-top: .7em; max-width: 26em; text-wrap: balance; }
.byline { font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-top: 1.9em; opacity: .85; }
.byline span { margin: 0 .5em; opacity: .6; }
.cover-cue { position: absolute; z-index: 2; right: var(--gut); bottom: 26px; font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; text-decoration: none; opacity: .85; }
.cover-cue::after { content: "↓"; margin-left: .6em; display: inline-block; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* ── film ── */
.film { padding: clamp(48px, 9vh, 110px) var(--gut) 0; }
.film-frame { width: min(1240px, 100%); margin: 0 auto; background: #000; box-shadow: 0 30px 80px -40px rgba(28, 26, 23, .7); }
.film-frame video { width: 100%; aspect-ratio: 854 / 480; background: #000; }
.film-note { font: italic 400 .86em/1.5 var(--serif); color: var(--muted); text-align: center; margin: 16px auto 0; max-width: 40em; }

/* ── prose ── */
.prose { width: min(var(--measure), 100% - 2 * var(--gut)); margin: clamp(48px, 9vh, 104px) auto 0; }
.prose p + p { margin-top: 1.05em; }
.prose p { text-wrap: pretty; hanging-punctuation: first; }
.prose h3 { font: 500 clamp(26px, 2.6vw, 34px)/1.15 var(--display); margin-bottom: .6em; }
.dropcap::first-letter { font: 400 4.35em/.8 var(--display); float: left; padding: .06em .09em 0 0; }
.lede { margin-top: clamp(48px, 8vh, 96px); }

.figures {
  width: min(var(--wide), 100% - 2 * var(--gut)); margin: clamp(44px, 7vh, 80px) auto 0; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.figures > div { padding: 20px 18px 22px 0; }
.figures > div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.figures b { display: block; font: 300 clamp(28px, 3.1vw, 44px)/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.figures span { display: block; font: 400 13px/1.45 var(--sans); color: var(--muted); margin-top: 10px; max-width: 18em; }

/* ── full-bleed photographs ── */
.bleed { position: relative; margin-top: clamp(56px, 10vh, 120px); height: 100vh; height: 100svh; min-height: 420px; background: var(--dark); overflow: hidden; }
.bleed img { width: 100%; height: 100%; object-fit: cover; }
.bleed figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px var(--gut) 22px; color: #fff; font: italic 400 16px/1.4 var(--serif);
  background: linear-gradient(180deg, transparent, rgba(8, 9, 10, .6)); }

/* ── chapter heads ── */
.chapter-head { width: min(54rem, 100% - 2 * var(--gut)); margin: clamp(72px, 14vh, 170px) auto 0; text-align: center; }
.eyebrow { font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.chapter-head h2 { font: 300 clamp(54px, 9.5vw, 132px)/.95 var(--display); letter-spacing: -.02em; margin: .22em 0 .2em; }
.standfirst { font: italic 400 clamp(20px, 2vw, 26px)/1.35 var(--serif); color: var(--ink-2); max-width: 28em; margin: 0 auto; text-wrap: balance; }
.chapter-head + .prose { margin-top: clamp(36px, 6vh, 64px); }

/* ── scrollytelling ── */
.scrolly { position: relative; margin-top: clamp(40px, 7vh, 80px); }
.scrolly .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scrolly .steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; pointer-events: none; padding-bottom: 28vh; }
.step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 0 var(--gut); }
.step-long { min-height: 200vh; align-items: flex-start; }
.step-long .card { position: sticky; top: 30vh; }
.step-flight { min-height: 330vh; }
.card {
  pointer-events: auto; width: min(24.5rem, 100%); background: color-mix(in srgb, var(--paper) 95%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--rule); padding: 1.15em 1.3em 1.2em; font-size: .9em; line-height: 1.52;
  box-shadow: 0 18px 50px -28px rgba(28, 26, 23, .55);
}
.card p + p { margin-top: .8em; }
.card em { color: var(--slate); }
.card-n { font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .9em; }

.scrolly-img .stage { background: var(--paper-2); }
.stage-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.stage-img.on { opacity: 1; }
.scrolly-img.contain .stage { background: var(--paper); }
.scrolly-img.contain .stage-img { object-fit: contain; }

.scrolly-map .stage { display: flex; align-items: center; justify-content: flex-end; padding: 58px var(--gut) 14px; }
.map { position: relative; height: 100%; max-width: 100%; aspect-ratio: 1400 / 1740; background: var(--paper-2); box-shadow: 0 24px 60px -36px rgba(28, 26, 23, .6); }
.map-layers img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; }
.map-layers img.on { opacity: 1; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .5s; }
.map-svg .track-bg { fill: none; stroke: rgba(243, 238, 227, .85); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-svg .track { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-svg .seg { fill: none; stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .5s; }
.map.flight .map-svg .seg { opacity: .95; }
.map-svg .sight { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.map:not(.flight) .map-svg .sight { display: none; }
.map-pin, .map-jet { position: absolute; pointer-events: none; opacity: 0; transition: opacity .5s; }
.map.flight .map-pin, .map.flight .map-jet, .map.cams .map-pin { opacity: 1; }
.map-pin { transform: translate(-50%, -50%); }
.map-pin .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 2px solid var(--paper); }
.map-pin .tag { position: absolute; left: 14px; top: -7px; font: 500 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--paper); color: var(--ink); padding: 4px 6px; }
.map-pin .tag.flip { left: auto; right: 14px; }
.map-jet { width: 0; height: 0; }
.map-jet svg { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; max-width: none; overflow: visible; }
.map-legend { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: calc(100% - 20px); font: 500 11px/1.3 var(--sans); letter-spacing: .04em; background: var(--paper); padding: 7px 9px; }
.map-legend:empty { display: none; }
.map-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.map-readout { position: absolute; left: 10px; top: 10px; display: grid; grid-template-columns: repeat(2, auto); gap: 0; background: var(--paper); opacity: 0; transition: opacity .5s; }
.map.flight .map-readout { opacity: 1; }
.map-readout > div { padding: 8px 12px 9px; border: 0 solid var(--rule); }
.map-readout > div:nth-child(odd) { border-right-width: 1px; }
.map-readout > div:nth-child(-n+2) { border-bottom-width: 1px; }
.map-readout span { display: block; font: 500 9.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.map-readout b { display: block; font: 400 24px/1.05 var(--display); margin-top: 3px; font-variant-numeric: tabular-nums; min-width: 3.4em; }
.map-readout b small { font: 400 11px/1 var(--sans); color: var(--muted); margin-left: 2px; }

.workview { margin-top: clamp(36px, 6vh, 72px); background: var(--paper); }
.workview video { width: min(1680px, 100%); margin: 0 auto; background: var(--paper); }
.workview figcaption { width: min(46rem, 100% - 2 * var(--gut)); margin: 12px auto 0; }

/* ── figures in the column ── */
.wide { width: min(var(--wide), 100% - 2 * var(--gut)); margin: clamp(40px, 7vh, 84px) auto 0; }
figcaption, .note, .cap { font: 400 14px/1.5 var(--sans); color: var(--muted); }
figcaption b, .cap b { color: var(--ink); font-weight: 600; }
.wide > figcaption { margin-top: 12px; max-width: 46rem; }
.note { margin-top: 12px; max-width: 44rem; }

.plot-box { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 14px 0 8px; }
.plot-box svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; cursor: ew-resize; }
.plot-box .axis { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot-box .ser { fill: none; stroke-width: 1.7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plot-box text { font: 500 10.5px var(--sans); fill: var(--muted); letter-spacing: .08em; }
.plot-box .cursor { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot-read { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.btn { appearance: none; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font: 500 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 10px 16px; border-radius: 99px; min-width: 76px; transition: background .15s, color .15s; }
.btn:hover, .btn.playing { background: var(--ink); color: var(--paper); }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; width: 100%; height: 30px; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type=range]::-moz-range-track { height: 1px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.transport { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 14px; }
.clock { font: 500 12.5px/1.3 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 99px; overflow: hidden; flex: none; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--ink); cursor: pointer; font: 500 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 10px 16px; white-space: nowrap; }
.seg button.on { background: var(--ink); color: var(--paper); }

/* slice explorer */
.slice-plate { position: relative; }
.slice-plate img { width: 100%; }
.slice-line { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--slate); left: 0; pointer-events: none; }
.slice-line::before { content: ""; position: absolute; top: -4px; left: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--slate); }
.slice-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 18px; }
.slice-svg { width: 100%; height: auto; }
.slice-svg .sec { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.slice-svg .ghost { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.slice-svg .cl { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.slice-label { font: 400 clamp(22px, 2.2vw, 28px)/1.2 var(--display); min-height: 2.5em; }
.slice-label small { display: block; font: 400 13.5px/1.4 var(--sans); color: var(--muted); margin-top: 6px; }

/* stepper (paint layers) */
.stepper-view { background: var(--paper-2); border: 1px solid var(--rule); }
.stepper-view img { width: 100%; }
.stepper-bar { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin-top: 14px; }
.stepper-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.maps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.maps3 img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--rule); }
.maps3 .cap b { display: block; font: 500 17px/1.2 var(--display); margin-bottom: 3px; }
.maps3 .maps3-note { grid-column: 1 / -1; margin-top: 0; }
.maps3:empty { display: none; }
@media (max-width: 640px) { .maps3 { grid-template-columns: 1fr; } }
.stepper-nav button { appearance: none; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); cursor: pointer; font: 500 12px/1 var(--sans); letter-spacing: .06em; padding: 9px 13px; border-radius: 99px; }
.stepper-nav button b { font-weight: 500; color: var(--muted); margin-right: 7px; }
.stepper-nav button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stepper-nav button.on b { color: inherit; opacity: .6; }
.stepper figcaption { margin-top: 12px; min-height: 3em; max-width: 46rem; }

/* compare sliders */
.compare-box { position: relative; overflow: hidden; aspect-ratio: var(--ar, 16 / 9); background: var(--paper-2); --p: 50%; }
.cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--p)); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .3); }
.cmp-line::after { content: "↔"; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; font: 500 15px/1 var(--sans); box-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.cmp-tag { position: absolute; top: 12px; font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; background: var(--paper); color: var(--ink); padding: 7px 9px; pointer-events: none; }
.cmp-tag.left { left: 12px; } .cmp-tag.right { right: 12px; }
.compare-box input[type=range] { position: absolute; inset: 0; height: 100%; opacity: 0; cursor: ew-resize; }
.compare > figcaption { margin-top: 12px; }

/* turntable */
.turn-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; background: var(--paper); }
.turn-stage.drag { cursor: grabbing; }
.turn-stage img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.turn-foot { display: flex; gap: 10px 22px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.turn-foot figcaption { flex: 1 1 280px; margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery figcaption { margin-top: 7px; font-size: 12.5px; }
.gallery:empty, .tuning:empty { display: none; }

/* the four steps of condensation */
.how { list-style: none; counter-reset: how; width: min(var(--wide), 100% - 2 * var(--gut)); margin: clamp(40px, 6vh, 72px) auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.how li { counter-increment: how; padding: 18px 20px 6px 0; font-size: .86em; line-height: 1.5; color: var(--ink-2); }
.how li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.how li::before { content: counter(how); display: block; font: 300 54px/1 var(--display); color: var(--ink); margin-bottom: 10px; }
.how b { font: 500 1.15em/1.2 var(--display); color: var(--ink); }

/* dark bands for the simulations */
.band { margin-top: clamp(48px, 8vh, 96px); background: var(--dark); color: #d9d6cf; padding: clamp(20px, 5vh, 56px) 0 clamp(22px, 4vh, 44px); }
.band video { width: min(1400px, 100%); margin: 0 auto; background: var(--dark); }
.band figcaption { width: min(46rem, 100% - 2 * var(--gut)); margin: 16px auto 0; color: #a9a59c; }
.band figcaption b { color: #f3eee3; }

.sync-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); }
.sync-pair video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #05070c; }
.sync-pair > div:last-child video { background: #000; }
.cap { margin-top: 9px; }

.tuning { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tuning img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #05070c; }
.tuning figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.tuning figcaption b { display: block; font: 600 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }

/* table */
.table table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: .88em; }
.table th { font: 500 11px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 14px 10px 0; border-bottom: 1px solid var(--rule); }
.table td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table td:first-child { font: 500 1.05em/1.3 var(--display); white-space: nowrap; }
.table .num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td:nth-child(2) { color: var(--ink-2); }

.notes ul { list-style: none; }
.notes li { padding: .7em 0 .7em 1.4em; border-bottom: 1px solid var(--rule); position: relative; font-size: .92em; }
.notes li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

.colophon { width: min(46rem, 100% - 2 * var(--gut)); margin: clamp(64px, 12vh, 140px) auto 0; padding: 26px 0 80px; border-top: 1px solid var(--ink); font: 400 13.5px/1.6 var(--sans); color: var(--muted); }
.colophon p + p { margin-top: 1em; }
.colophon b { color: var(--ink); font-weight: 600; }

.missing { position: relative; min-height: 120px; }
.missing::after { content: attr(data-missing); position: absolute; inset: 0; display: grid; place-items: center; font: 500 11px var(--sans); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; background: var(--paper-2); }

/* gentle arrival */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }

/* ── wide screens: cards sit beside the graphic ── */
@media (min-width: 1000px) {
  .scrolly-map .step, .scrolly-img .step { padding-left: max(var(--gut), calc(50vw - 640px)); }
  .scrolly-img.contain .stage-img { left: 27rem; width: calc(100% - 27rem); }
  .scrolly-map .stage { padding-right: max(var(--gut), calc(50vw - 640px)); }
}

/* ── narrow screens ── */
@media (max-width: 999px) {
  .mast-links { display: none; }
  .scrolly-map .stage { justify-content: center; align-items: flex-start; padding: 54px 0 0; }
  .map { height: auto; width: min(100%, 78vh * 1400 / 1740); width: min(100%, calc(78svh * 0.8046)); }
  .step { align-items: flex-end; padding-bottom: 7vh; justify-content: center; }
  .step-long { align-items: flex-start; }
  .step-long .card { top: calc(100vh - 19rem); top: calc(100svh - 19rem); }
  .scrolly-img .stage-img { object-fit: contain; object-position: 50% 30%; }
  .card { font-size: .88em; }
  .figures { grid-template-columns: 1fr 1fr; }
  .figures > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .figures > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .figures > div:last-child { grid-column: 1 / -1; }
  .how { grid-template-columns: 1fr 1fr; }
  .how li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .how li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .tuning, .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:last-child:nth-child(odd) { display: none; }
  .slice-row { grid-template-columns: 1fr; }
  .bleed { height: 72vh; height: 72svh; }
}
@media (max-width: 640px) {
  .sync-pair { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .how li, .how li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .how li:first-child { border-top: 0; }
  .transport { grid-template-columns: auto 1fr; gap: 6px 12px; }
  .clock { grid-column: 1 / -1; white-space: normal; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }
  .map-readout b { font-size: 19px; }
  .map-readout > div { padding: 6px 9px 7px; }
  .cover-cue { right: auto; left: var(--gut); }
  .cover-text { bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .stage-img, .map-layers img { transition: none; }
  .cover-cue::after { animation: none; }
}

/* ── sound ── */
.layer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 2.4vw, 30px); border-top: 1px solid var(--ink); }
.layer { appearance: none; background: transparent; border: 0; border-radius: 0; text-align: left; color: var(--ink-2); font: 400 14px/1.5 var(--sans); padding: 16px 0 6px; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; min-width: 0; }
.strip, .dist-box { display: block; position: relative; overflow: hidden; background: var(--paper-2); --k: 0; }
.strip { aspect-ratio: 36 / 13; }
.dist-box { aspect-ratio: 4 / 1; border-top: 1px solid var(--ink); }
.strip img, .dist-box img { width: 100%; height: 100%; object-fit: fill; }
.strip::after, .dist-box::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--k) * 100%); width: 2px; margin-left: -1px; background: var(--plum); opacity: 0; }
.playing > .strip::after, .dist-box.playing::after { opacity: 1; }
.layer:hover .strip, .layer:focus-visible .strip { box-shadow: 0 0 0 1px var(--ink); }
.layer b { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 500 20px/1.2 var(--display); color: var(--ink); margin: 13px 0 5px; }
.layer b::after { content: "Play"; font: 500 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.layer.playing b::after { content: "Stop"; color: var(--plum); }
.layers > figcaption, .dist > figcaption { margin-top: 14px; }
#soundPlot svg { cursor: crosshair; }
#soundPlot .cut { stroke: var(--paper); stroke-width: 2; vector-effect: non-scaling-stroke; }
#soundPlot .env-pk { fill: var(--rule); }
#soundPlot .env-rms { fill: var(--ink-2); }
#soundPlot .mk circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
#soundPlot .mk text { font: 600 11.5px var(--sans); fill: var(--ink); letter-spacing: 0; }
#soundFig .transport { grid-template-columns: auto auto 1fr; }
#soundRead { display: block; white-space: normal; margin-top: 8px; min-height: 3em; }
#soundNotes { margin-top: clamp(24px, 4vh, 44px); }
@media (max-width: 860px) {
  .layer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layer:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .dist-box { aspect-ratio: 36 / 13; }
}
