/* Unbuilt — a museum of impossible architecture.
   The page is a sheet of warm paper; the live model is drawn on a transparent
   canvas that sits on it, so the stone casts its shadow across the print. */

:root {
  --paper: #ece4d6;
  --paper-live: #ece4d6;          /* JS warms this as the sun lowers */
  --ink: #1c1a17;
  --ink-2: #474037;
  --ink-3: #6a6155;
  --rule: rgba(28, 26, 23, 0.34);
  --hair: rgba(28, 26, 23, 0.16);
  --sun: #c2592a;
  --sun-deep: #8f3c16;
  --focus: #8f3c16;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --didone: Didot, "Bodoni 72", "Bodoni MT", "Bodoni Moda", "Noto Serif Display", "Iowan Old Style", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;

  --m: clamp(24px, 2.8vw, 44px);
  --head: 64px;
  --side: clamp(272px, 22vw, 330px);
  --gap: clamp(24px, 3vw, 48px);
  --band: clamp(150px, 19vh, 200px);
  --dial: clamp(118px, 19vh, 204px);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper-live);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  background: var(--paper-live);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper: fine fibre grain and a faint unevenness, drawn by the browser from an inline SVG filter. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(120% 90% at 46% 42%, rgba(255, 250, 240, 0.34) 0%, rgba(255, 250, 240, 0) 55%, rgba(92, 70, 44, 0.09) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.33  0 0 0 0 0.27  0 0 0 0 0.2  0 0 0 0.075 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='640' height='640'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.006' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.36  0 0 0 0 0.25  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--sun-deep); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px; top: 10px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; color: var(--paper); }

/* ------------------------------------------------------------------ spread */

.spread {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 700px;
  display: grid;
  grid-template-columns: var(--m) minmax(0, 1fr) var(--gap) var(--side) var(--m);
  grid-template-rows: var(--head) minmax(0, 1fr) var(--band) var(--m);
  isolation: isolate;
}

.running-head {
  grid-column: 2 / 5;
  grid-row: 1;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  pointer-events: none;
}
.running-head > * { margin: 0; }
.running-head a { pointer-events: auto; }

.wordmark {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark-un { color: var(--ink-3); }

.running-sub {
  font-style: italic;
  font-size: 15px;
  color: var(--ink-2);
  text-align: center;
}

.running-right {
  justify-self: end;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.running-right a { text-decoration: none; padding: 10px 0; display: inline-block; }
.running-right a::after { content: " \2193"; letter-spacing: 0; }
.running-right a:hover { text-decoration: underline; }

/* The stage is full-bleed so the building and its shadow can cross the plate mark. */
.stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.is-dragging .stage { cursor: grabbing; }

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  opacity: 0;
}
.is-live #scene { opacity: 1; }
[data-motion="on"] #scene { transition: opacity 900ms var(--ease); }

/* Printed plate mark, crop marks, figure label and graphic scale — all beneath the canvas. */
.platemark {
  position: absolute;
  z-index: 1;
  left: var(--m);
  top: calc(var(--head) + 18px);
  right: calc(var(--m) + var(--side) + var(--gap));
  bottom: calc(var(--band) + var(--m));
  border: 1px solid rgba(28, 26, 23, 0.2);
  box-shadow: inset 1px 1px 0 rgba(255, 252, 245, 0.55), 1px 1px 0 rgba(255, 252, 245, 0.45);
  outline-offset: 5px;
}
.platemark:focus-visible { outline: 2px solid var(--focus); }

.platemark-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--ink-3);
  border-style: solid;
  border-width: 0;
}
.platemark-corner--tl { left: -22px; top: -22px; border-right-width: 1px; border-bottom-width: 1px; }
.platemark-corner--tr { right: -22px; top: -22px; border-left-width: 1px; border-bottom-width: 1px; }
.platemark-corner--bl { left: -22px; bottom: -22px; border-right-width: 1px; border-top-width: 1px; }
.platemark-corner--br { right: -22px; bottom: -22px; border-left-width: 1px; border-top-width: 1px; }

.fig-label {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-2);
}
.fig-label [data-fig] {
  font-style: normal;
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-right: 6px;
  color: var(--ink);
}

.graphic-scale {
  position: absolute;
  right: 16px;
  bottom: 10px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  color: var(--ink);
}
.north { display: block; overflow: visible; }
#north-needle { transform-origin: 0 0; }

.scalebar { font: 500 10px/1 var(--sans); letter-spacing: 0.06em; color: var(--ink-2); padding-bottom: 4px; }
.scalebar-bar {
  display: flex;
  width: 120px;
  height: 5px;
  border: 1px solid var(--ink);
  margin-bottom: 5px;
}
.scalebar-bar i { flex: 1; }
.scalebar-bar i:nth-child(odd) { background: var(--ink); }
.scalebar-labels { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.scalebar-labels span:first-child { transform: translateX(-2px); }
.scalebar-labels span:last-child { transform: translateX(8px); }

/* The static still: shown for no-JS, no-WebGL and lost contexts. */
.still {
  display: none;
  position: absolute;
  z-index: 2;
  left: var(--m);
  top: calc(var(--head) + 18px);
  right: calc(var(--m) + var(--side) + var(--gap));
  bottom: calc(var(--band) + var(--m));
  width: calc(100% - 2 * var(--m) - var(--side) - var(--gap));
  height: calc(100% - var(--head) - 18px - var(--band) - var(--m));
  object-fit: contain;
  mix-blend-mode: multiply;
}
.is-fallback .still { display: block; }
.is-fallback .stage { cursor: default; }

.drag-hint {
  position: absolute;
  z-index: 3;
  left: calc(var(--m) + 18px);
  top: calc(var(--head) + 30px);
  margin: 0;
  max-width: 17em;
  font-size: 13px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-2);
  pointer-events: none;
}
.hint-coarse { display: none; }
@media (pointer: coarse) {
  .hint-fine { display: none; }
  .hint-coarse { display: inline; }
}
[data-motion="on"] .drag-hint { transition: opacity 1200ms ease; }
.has-orbited .drag-hint { opacity: 0; }
.is-fallback .drag-hint { display: none; }

/* ------------------------------------------------------------------ plate text (lower margin) */

.plate-text {
  grid-column: 2;
  grid-row: 3;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(240px, 300px);
  align-items: end;
  gap: 0 clamp(20px, 2.4vw, 40px);
  padding-top: 22px;
  pointer-events: none;
}
.plate-text > * { pointer-events: auto; }

.numeral {
  margin: 0 0 -0.06em;
  font-family: var(--didone);
  font-weight: 400;
  font-size: clamp(88px, 10.5vh, 138px);
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 1.6ch;
}

.kicker {
  margin: 0 0 8px;
  font: 600 10.5px/1.2 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.plate-title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.lede {
  margin: 10px 0 0;
  max-width: 34em;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 12px 0 0;
}
.spec div { display: flex; align-items: baseline; gap: 7px; }
.spec dt {
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.spec dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums lining-nums; }

.verb { padding-bottom: 2px; }
.verb .control-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  color: var(--ink);
}

/* ------------------------------------------------------------------ instruments (right column) */

.instruments {
  grid-column: 4;
  grid-row: 2 / 4;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.1vh, 22px);
  padding-top: 18px;
  min-height: 0;
}

.instrument { margin: 0; padding: 0; border: 0; min-width: 0; }

.instrument-title {
  margin: 0 0 8px;
  padding: 0 0 6px;
  width: 100%;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
legend.instrument-title { float: left; }
legend.instrument-title + * { clear: both; }

.plate-list { list-style: none; margin: 0; padding: 0; }
.plate-button {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  align-items: baseline;
  width: 100%;
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink-2);
}
.plate-button-num { font-family: var(--didone); font-size: 20px; line-height: 1; color: var(--ink-3); }
.plate-button-name { font-style: italic; font-size: 15px; line-height: 1.25; }
.plate-button:hover .plate-button-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.plate-button[aria-pressed="true"] { color: var(--ink); }
.plate-button[aria-pressed="true"] .plate-button-num { color: var(--sun-deep); }
.plate-button[aria-pressed="true"] .plate-button-name { font-style: normal; }

.sundial {
  width: var(--dial);
  height: var(--dial);
  margin: 2px auto 6px;
  touch-action: none;
  cursor: pointer;
}
.sundial svg { display: block; width: 100%; height: 100%; overflow: visible; }

.control-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.control-label {
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.control-out {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
}
.control-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.hint { margin: 0; font-size: 13px; font-style: italic; line-height: 1.35; color: var(--ink-2); }

/* Range inputs drawn as a surveyor's ruler. */
.ruler {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 26px;
  margin: 2px 0 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
.ruler:focus { outline: none; }
.ruler:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.ruler::-webkit-slider-runnable-track {
  height: 26px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 12px / var(--fill) 2px no-repeat,
    linear-gradient(var(--rule), var(--rule)) 0 12.5px / 100% 1px no-repeat,
    linear-gradient(90deg, var(--ink-3) 1px, transparent 1px) 0 16px / calc((100% - 1px) / 10) 4px repeat-x;
}
.ruler::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: 5.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 0 1px 0 rgba(255, 252, 245, 0.8);
}
.ruler::-moz-range-track {
  height: 1px;
  background: var(--rule);
}
.ruler::-moz-range-progress { height: 2px; background: var(--ink); }
.ruler::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.ruler:hover::-webkit-slider-thumb { background: #fff9ee; }
#hour::-webkit-slider-thumb { background: var(--sun); border-color: var(--sun-deep); }
#hour::-moz-range-thumb { background: var(--sun); border-color: var(--sun-deep); }
.ruler:disabled { opacity: 0.4; cursor: not-allowed; }

.text-button {
  flex: none;
  min-height: 32px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
  text-decoration-color: var(--rule);
}
.text-button:hover { text-decoration-color: var(--ink); color: var(--sun-deep); }
.text-button[aria-pressed="true"] { color: var(--sun-deep); text-decoration-color: currentColor; }
.text-button:disabled { opacity: 0.4; cursor: not-allowed; }

.sun .text-button { display: block; margin: 2px 0 0 auto; }

.season {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin: 6px 0 0;
}
.season label { position: relative; cursor: pointer; }
.season input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.season span {
  display: inline-block;
  padding: 7px 0 5px;
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}
.season input:checked + span { color: var(--ink); font-style: normal; border-bottom-color: var(--ink); }
.season input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.season label:hover span { color: var(--ink); }

.toggles {
  display: flex;
  gap: 22px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  background: none;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
}
.toggle::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
}
.toggle[aria-pressed="true"]::before { background: var(--sun); border-color: var(--sun-deep); }
.toggle-state { font-weight: 400; color: var(--ink-2); }

.fallback-note {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-2);
}

.is-fallback .needs-live { display: none; }

/* ------------------------------------------------------------------ notes (afterword) */

.notes {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 150px) var(--m) 64px;
}
.notes::before {
  content: "";
  position: absolute;
  left: var(--m);
  right: var(--m);
  top: 0;
  border-top: 1px solid var(--rule);
}

.notes-head { max-width: 46em; margin: 0 0 clamp(48px, 8vh, 90px) calc(120px + 4vw); }
.notes-head h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.notes-intro {
  margin: 22px 0 0;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-2);
  text-wrap: pretty;
}

.note {
  display: grid;
  grid-template-columns: calc(120px + 4vw) minmax(0, 38em);
  margin: 0 0 clamp(40px, 7vh, 72px);
}
.note-num {
  margin: 0;
  font-family: var(--didone);
  font-size: clamp(48px, 5vw, 76px);
  line-height: 0.85;
  color: var(--ink);
}
.note-body h3 {
  margin: 0 0 12px;
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.1;
}
.note-body p {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.62;
  hyphens: auto;
  text-wrap: pretty;
}
.note-try { color: var(--ink-2); font-size: 16px !important; font-style: italic; }
.note-try em { font-style: normal; }

.visit {
  margin: clamp(56px, 9vh, 96px) 0 0 calc(120px + 4vw);
  max-width: 44em;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}
.visit h3 {
  margin: 0 0 16px;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.visit ul { margin: 0; padding: 0; list-style: none; }
.visit li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 1.6em;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.visit li::before { content: "\2014"; position: absolute; left: 0; color: var(--ink-3); }

.colophon {
  margin: clamp(64px, 12vh, 120px) auto 0;
  max-width: 36em;
  text-align: center;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.colophon p { margin: 0 0 18px; }
.colophon-mark {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}
.colophon-mark::first-letter { color: var(--sun); }

/* ------------------------------------------------------------------ stacked layout: phones, tablets, short screens */

@media (max-width: 1023px), (max-height: 619px) {
  :root {
    --m: 18px;
    --dial: min(46vw, 200px);
  }

  .spread {
    display: block;
    height: auto;
    min-height: 0;
  }

  .running-head {
    height: 52px;
    margin: 0 var(--m);
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .running-sub { display: none; }
  .wordmark { font-size: 14px; letter-spacing: 0.34em; }

  .stage {
    position: sticky;
    top: 0;
    height: 58vh;
    height: 58svh;
    min-height: 300px;
    max-height: 640px;
    z-index: 4;
    background: var(--paper-live);
    border-bottom: 1px solid var(--hair);
  }

  .platemark,
  .still {
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
  }
  .still { width: calc(100% - 20px); height: calc(100% - 20px); }
  .platemark-corner { display: none; }
  .fig-label { left: 12px; bottom: 10px; font-size: 12px; }
  .fig-view { display: none; }
  .graphic-scale { right: 10px; bottom: 6px; gap: 10px; }
  .north { width: 36px; height: 36px; }
  .scalebar-bar { width: 84px; }
  .drag-hint { left: 20px; top: 18px; font-size: 12.5px; max-width: 15em; }

  .plate-text {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0 16px;
    padding: 22px var(--m) 0;
  }
  .numeral { font-size: 76px; margin-top: 4px; }
  .plate-title { font-size: 28px; }
  .lede { font-size: 15.5px; }
  .verb {
    grid-column: 1 / -1;
    margin-top: 22px;
    padding: 14px 0 0;
    border-top: 1px solid var(--rule);
  }

  .instruments {
    padding: 22px var(--m) 8px;
    gap: 26px;
  }

  .plate-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .plate-button {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
    min-height: 88px;
    padding: 10px 8px 10px 0;
    border-top: 1px solid var(--hair);
  }
  .plate-button[aria-pressed="true"] { border-top: 2px solid var(--ink); padding-top: 9px; }
  .plate-button-num { font-size: 26px; }
  .plate-button-name { font-size: 13.5px; }

  .sun { display: grid; grid-template-columns: var(--dial) minmax(0, 1fr); gap: 0 18px; align-items: start; }
  .sun > legend { grid-column: 1 / -1; }
  .sun > .sundial { grid-row: 2 / span 4; margin: 4px 0 0; }
  .sun > .control-row, .sun > .ruler, .sun > .season, .sun > .text-button { grid-column: 2; }
  .season { flex-direction: column; gap: 0; }
  .season span { padding: 8px 0 6px; }
  .sun .text-button { margin: 6px 0 0; }

  .ruler { height: 40px; }
  .ruler::-webkit-slider-runnable-track {
    height: 40px;
    background:
      linear-gradient(var(--ink), var(--ink)) 0 19px / var(--fill) 2px no-repeat,
      linear-gradient(var(--rule), var(--rule)) 0 19.5px / 100% 1px no-repeat,
      linear-gradient(90deg, var(--ink-3) 1px, transparent 1px) 0 24px / calc((100% - 1px) / 10) 5px repeat-x;
  }
  .ruler::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: 9px; }
  .ruler::-moz-range-thumb { width: 20px; height: 20px; }

  .text-button, .toggle { min-height: 44px; }
  .toggles { margin-top: 0; gap: 28px; }

  .notes { padding-top: 72px; }
  .notes-head, .visit { margin-left: 0; }
  .note { grid-template-columns: 64px minmax(0, 1fr); }
  .note-num { font-size: 44px; }
  .note-body p { font-size: 17px; }
}

/* Landscape phones: model on the left, instruments scroll beside it. */
@media (max-height: 619px) and (orientation: landscape) and (min-width: 560px) {
  .spread {
    display: grid;
    grid-template-columns: minmax(0, 56%) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
  }
  .running-head { grid-column: 1 / -1; grid-row: 1; }
  .stage {
    grid-column: 1;
    grid-row: 2 / 4;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    max-height: none;
    border-bottom: 0;
    align-self: start;
  }
  .plate-text { grid-column: 2; grid-row: 2; }
  .instruments { grid-column: 2; grid-row: 3; }
}

@media (min-width: 640px) and (max-width: 1023px) and (min-height: 620px) {
  .instruments {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 36px;
  }
  .plates, .toggles, .fallback-note { grid-column: 1 / -1; }
}

/* Very short desktop windows: tighten the right column. */
@media (min-width: 1024px) and (min-height: 620px) and (max-height: 820px) {
  .instruments .hint { display: none; }
  .plate-button { min-height: 30px; }
  .spec { display: none; }
}

/* ------------------------------------------------------------------ 404 */

.lost {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--m) minmax(0, 1.2fr) minmax(0, 1fr) var(--m);
  grid-template-rows: var(--head) 1fr;
  gap: 0 clamp(24px, 5vw, 80px);
}
.lost-head { grid-column: 2 / 4; grid-row: 1; }
.lost-head a { pointer-events: auto; }
.lost-head .running-right a::after { content: none; }
.lost-figure { grid-column: 2; grid-row: 2; align-self: center; margin: 0; }
.lost-figure svg { display: block; width: 100%; height: auto; max-height: 70vh; }
.lost-figure figcaption { margin-top: 10px; font-size: 14px; font-style: italic; color: var(--ink-2); }
.lost-text { grid-column: 3; grid-row: 2; align-self: center; max-width: 30em; }
.lost-text h1 { margin: 0 0 16px; font-weight: 400; font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -0.015em; }
.lost-text p { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 0 0 14px; }
.lost-text .kicker { font-size: 10.5px; color: var(--ink-2); }
.lost-links .text-button { display: inline-flex; align-items: center; font-size: 11px; }

@media (max-width: 760px) {
  .lost { display: block; padding: 0 var(--m) 48px; }
  .lost-head { margin: 0; }
  .lost-figure { margin: 28px 0 24px; }
  .lost-text h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-motion="off"] * { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .ruler { appearance: auto; -webkit-appearance: auto; }
  .toggle::before { forced-color-adjust: none; }
}

@media print {
  .instruments, .verb, .drag-hint, .skip { display: none; }
}
