/* Slice: a radiology light box. Blue-black film on a backlit white wall, one wax pencil. */

@font-face {
  font-family: 'Atkinson Next';
  src: url('assets/fonts/atkinson-hyperlegible-next-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Mono';
  src: url('assets/fonts/atkinson-hyperlegible-mono-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --wall: #eaf1f4; /* the diffuser, lit from behind */
  --glow: #fbfeff;
  --ink: #0b1722; /* type on the wall */
  --ink-2: #44586a;
  --film: #0a1520; /* blue-black film base */
  --film-2: #12283a;
  --film-line: #2f4a61;
  --on-film: #dcebf6;
  --on-film-2: #8fb0c8;
  --wax: #ff3ea5; /* the wax pencil: the one color no gray film contains */
  --wax-deep: #b80f72; /* the same pencil, pressed hard enough to read on white */
  --metal: linear-gradient(#dfe5e8, #a9b3b9 55%, #c7cfd3);
  --text: 'Atkinson Next', system-ui, sans-serif;
  --mono: 'Atkinson Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--text);
  color: var(--ink);
  /* Tubes behind the diffuser: brighter bands, a little fall-off at the edges. */
  background:
    radial-gradient(140% 100% at 50% 0%, transparent 55%, rgb(120 150 170 / 0.22) 100%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgb(255 255 255 / 0.55) 150px, transparent 240px),
    var(--wall);
  background-attachment: fixed;
  overflow-x: hidden;
}
/* The box strikes: two flickers, then steady. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #06101a;
  pointer-events: none;
  opacity: 0;
  animation: strike 1.1s linear 1 both;
}
@keyframes strike {
  0% { opacity: 0.92; }
  12% { opacity: 0.25; }
  18% { opacity: 0.85; }
  30% { opacity: 0.15; }
  36% { opacity: 0.6; }
  52%, 100% { opacity: 0; }
}

a {
  color: var(--wax-deep);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 0.18em;
}
:focus-visible {
  outline: 3px solid var(--wax-deep);
  outline-offset: 3px;
  border-radius: 4px;
}
.film :focus-visible {
  outline-color: var(--wax);
}
mark {
  color: inherit;
  background: linear-gradient(transparent 58%, rgb(255 62 165 / 0.42) 58% 94%, transparent 94%);
  padding-inline: 0.08em;
}
h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 60;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
}
.skip:focus {
  left: 8px;
}

/* ---- The rail the films clip to ---- */
.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  background: var(--metal);
  border-bottom: 1px solid #77848c;
  box-shadow: 0 6px 14px -8px rgb(20 40 60 / 0.5);
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rail-name {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.lamp {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wax);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.7), 0 0 10px var(--wax);
}
.rail nav {
  display: flex;
  gap: clamp(10px, 2.4vw, 28px);
}
.rail a {
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding-block: 15px;
}
.rail a:hover {
  box-shadow: inset 0 -3px 0 var(--wax-deep);
}

/* ---- Burnt-in annotation ---- */
.burn,
.tag {
  font: 500 0.74rem/1.35 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.burn {
  color: var(--on-film-2);
}
.burn b {
  color: var(--on-film);
  font-weight: 700;
}
.tag {
  color: var(--wax-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tag::before {
  content: '';
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--wax);
  transform: rotate(-4deg);
}

/* ---- Film ---- */
.film {
  position: relative;
  color: var(--on-film);
  background: radial-gradient(130% 100% at 50% 30%, var(--film-2), var(--film) 72%);
  border-radius: 12px;
  padding: clamp(14px, 2vw, 22px);
  box-shadow:
    inset 0 0 0 1px rgb(150 190 220 / 0.14),
    0 1px 0 rgb(255 255 255 / 0.9),
    0 22px 38px -22px rgb(10 30 50 / 0.55);
}
.film a {
  color: var(--on-film);
  text-decoration-color: var(--wax);
}
.film h3 {
  font: 800 1.5rem/1.1 var(--text);
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
}
.film p + p {
  margin-top: 0.8em;
}
.film .small,
.small {
  font-size: 0.9rem;
  color: var(--on-film-2);
}
figcaption {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--on-film-2);
  margin-top: 12px;
}
.clip {
  position: absolute;
  top: -15px;
  left: 16%;
  width: 58px;
  height: 27px;
  border-radius: 4px 4px 7px 7px;
  background: var(--metal);
  border: 1px solid #7b878e;
  box-shadow: 0 5px 8px -4px rgb(0 0 0 / 0.6);
}
.clip-2 {
  left: auto;
  right: 16%;
}

/* ---- The exam (hero) ---- */
.exam {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(28px, 3.4vw, 48px) var(--gutter) clamp(40px, 6vw, 80px);
}
.exam-words {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px clamp(28px, 5vw, 80px);
  margin-bottom: clamp(30px, 3vw, 40px);
}
h1 {
  font: 800 clamp(3.5rem, 8.6vw, 7.6rem) / 0.86 var(--text);
  letter-spacing: -0.055em;
  margin-left: -0.04em;
  white-space: nowrap;
}
.lede {
  font: 600 clamp(1.45rem, 2.4vw, 2.1rem) / 1.15 var(--text);
  letter-spacing: -0.02em;
  margin-top: 14px;
}
.what p {
  max-width: 50ch;
}
.how {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 3px solid var(--wax);
}
@media (min-width: 1000px) {
  .exam-words {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
  }
  .what {
    justify-self: end;
  }
  .sliders {
    grid-template-columns: 1fr !important;
  }
  .window {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) !important;
    column-gap: 28px !important;
    align-items: center;
  }
}
.film-exam {
  transform-origin: 50% 0;
  animation: hang 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s 1 both;
}
@keyframes hang {
  0% { transform: rotate(-1.4deg); }
  45% { transform: rotate(0.7deg); }
  75% { transform: rotate(-0.25deg); }
  100% { transform: rotate(0); }
}
.burn-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 14px;
  min-height: 2.7em;
}
#burn-pos {
  margin-left: auto;
}
.film-fallback {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 76vh;
  margin-inline: auto;
  border-radius: 4px;
}
/* With scripts the pictures hold their places from the first paint; without, the sheet stands in. */
.js .film-fallback,
html:not(.js) .panes,
html:not(.js) .window,
html:not(.js) .how,
html:not(.js) .real-frame {
  display: none;
}
.for-touch {
  display: none;
}
@media (hover: none) {
  .for-touch {
    display: inline;
  }
  .for-mouse {
    display: none;
  }
}
/* Each picture takes a width in proportion to its own shape, so a row shares one height. */
.panes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pane {
  flex: var(--a, 1) 1 0;
  min-width: 0;
}
.pane .burn {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 8px;
  white-space: nowrap;
}
/* Wide enough for all four in one row, the turning picture last. */
@media (min-width: 1000px) {
  .panes {
    flex-direction: row;
    align-items: flex-start;
  }
  .row {
    display: contents;
  }
  .pane[data-cut='view'] {
    order: 4;
  }
}
.view {
  position: relative;
  --x: 0.5;
  --y: 0.5;
  overflow: hidden;
  border-radius: 3px;
  cursor: crosshair;
  touch-action: pan-y; /* a sideways drag cuts or turns; an up-and-down swipe scrolls the page */
  background: #070e16;
}
.pane[data-cut='view'] .view {
  cursor: ew-resize;
}
/* The two labels on the film's edge: which scan is on the box. */
.scans {
  display: inline-flex;
  gap: 10px;
}
.scans button {
  font: 700 0.74rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 9px 11px;
  min-height: 34px;
  color: var(--ink);
  background: var(--glow);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.5);
  rotate: -1.5deg;
}
.scans button + button {
  rotate: 1.2deg;
}
.scans button[aria-pressed='true'] {
  background: var(--wax);
  color: #23000f;
}
.scans button[aria-pressed='false']:hover {
  background: #fff;
  translate: 0 -1px;
}
html:not(.js) .scans {
  display: none;
}
.pane[data-cut='view'] .burn {
  display: grid;
  gap: 6px;
  justify-content: start;
  white-space: normal;
}
.modes {
  display: flex;
  gap: 2px 14px;
  flex-wrap: wrap;
}
.modes button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 3px 0;
  background: none;
  border: 0;
  color: var(--on-film-2);
  border-bottom: 2px solid transparent;
}
.modes button:hover {
  color: var(--on-film);
}
.modes button[aria-pressed='true'] {
  color: var(--on-film);
  font-weight: 700;
  border-bottom-color: var(--wax);
}
.view canvas {
  display: block;
  width: 100%;
  height: auto;
}
.hair {
  position: absolute;
  background: var(--wax);
  opacity: 0.85;
  pointer-events: none;
}
.hair-v {
  top: 0;
  bottom: 0;
  width: 1px;
  left: calc(var(--x) * 100%);
}
.hair-h {
  left: 0;
  right: 0;
  height: 1px;
  top: calc(var(--y) * 100%);
}
.scale {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font: 500 0.66rem/1 var(--mono);
  color: var(--on-film);
  pointer-events: none;
  width: 29.5%; /* 10 mm of the walnut's 33.9; the script sets it for each scan */
  text-align: center;
}
.scale i {
  display: block;
  height: 5px;
  margin-bottom: 4px;
  border: 1px solid var(--on-film);
  border-top: 0;
}

.window {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--film-line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.wedge {
  position: relative;
  touch-action: pan-y;
}
.wedge canvas {
  display: block;
  width: 100%;
  height: 56px;
  image-rendering: pixelated;
  border-radius: 2px;
}
.band {
  --lo: 0.2;
  --hi: 0.9;
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: calc(var(--lo) * 100%);
  width: calc((var(--hi) - var(--lo)) * 100%);
  background: rgb(255 62 165 / 0.07);
  border-inline: 2px solid var(--wax);
  cursor: grab;
  touch-action: pan-y;
}
.grip {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  cursor: ew-resize;
}
.grip-lo {
  left: -10px;
}
.grip-hi {
  right: -10px;
}
.sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.sliders label {
  display: grid;
  grid-template-columns: auto 1fr 3ch;
  align-items: center;
  gap: 10px;
  font: 600 0.74rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-film-2);
}
input[type='range'] {
  width: 100%;
  min-width: 0;
  accent-color: var(--wax);
  height: 24px;
}
output {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--on-film);
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.presets button {
  font: 600 0.74rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 12px;
  min-height: 36px;
  background: transparent;
  color: var(--on-film);
  border: 1px solid var(--film-line);
  border-radius: 999px;
}
.presets button:hover {
  border-color: var(--on-film-2);
}
.presets button[aria-pressed='true'] {
  background: var(--wax);
  border-color: var(--wax);
  color: #23000f;
}
.count {
  min-height: 2.7em;
  font-variant-numeric: tabular-nums;
}

/* ---- Series ---- */
.series {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter) 0;
}
.series-head {
  max-width: 64ch;
  margin-bottom: clamp(24px, 3vw, 40px);
}
h2 {
  font: 800 clamp(2.6rem, 6.4vw, 5.2rem) / 0.92 var(--text);
  letter-spacing: -0.045em;
}
.big {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  margin-top: 18px;
}
.part {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.links a {
  font: 600 0.8rem/1 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  color: var(--ink);
}
.links a:hover {
  background: var(--ink);
  color: var(--glow);
  border-color: var(--ink);
}
.film .links a {
  color: var(--on-film);
  border-color: var(--film-line);
}
.film .links a:hover {
  background: var(--on-film);
  color: var(--film);
  border-color: var(--on-film);
}

.wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}
.wall > * {
  grid-column: span 12;
}
.wall > :nth-child(odd) {
  rotate: -0.35deg;
}
.wall > :nth-child(even) {
  rotate: 0.3deg;
}
@media (min-width: 900px) {
  .wall > :nth-child(1) { grid-column: 1 / span 5; grid-row: 1; }
  .wall > .film-sheet { grid-column: 6 / span 7; grid-row: 1 / span 2; }
  .wall > .film-atlas { grid-column: 1 / span 5; grid-row: 2; }
  .wall > .film-ct {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(20px, 3vw, 44px);
    align-items: center;
  }
  .film-ct .ct { margin: 0; }
}
.wall-small {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  margin-top: clamp(18px, 2.4vw, 32px);
}
.wall-small > * {
  grid-column: auto !important;
}

/* The contact sheet */
.sheet-frame {
  position: relative;
  cursor: pointer;
}
.sheet-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.sheet-frame {
  --cols: 12;
  --rows: 12;
  --cell: 113 / 115;
}
.ring {
  --c: 10;
  --r: 5;
  position: absolute;
  width: calc(100% / var(--cols));
  aspect-ratio: var(--cell);
  left: calc(var(--c) * 100% / var(--cols));
  top: calc(var(--r) * 100% / var(--rows));
  border: 2.5px solid var(--wax);
  border-radius: 47% 53% 50% 50% / 54% 46% 54% 46%;
  transform: scale(1.22) rotate(-9deg);
  transition: left 0.18s, top 0.18s;
  pointer-events: none;
}
html:not(.js) .ring {
  display: none;
}
.film-sheet figcaption .burn {
  display: block;
  margin-bottom: 4px;
}

/* How a CT sees */
.ct {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  margin: 16px 0 12px;
  align-items: end;
}
.ct canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  background: #070e16;
}
.ct figcaption {
  margin-top: 6px;
}
.ct-views {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 11ch 1fr;
  align-items: center;
  gap: 12px;
  font: 600 0.74rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-film-2);
}
html:not(.js) .ct,
html:not(.js) .film-ct .small {
  display: none;
}

/* The atlas: four films */
.layers {
  margin: 16px 0 12px;
  display: grid;
  gap: 6px;
}
.layers button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--film-line);
  background: linear-gradient(160deg, #1a3449, #0d1c2a);
  color: var(--on-film-2);
  font-size: 0.92rem;
  line-height: 1.35;
}
.layers b {
  display: block;
  color: var(--on-film);
  font: 700 0.78rem/1.6 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.js .layers {
  position: relative;
  display: block;
  height: 176px;
}
.js .layers li {
  position: absolute;
  top: calc((3 - var(--i)) * 27px);
  left: calc((3 - var(--i)) * 9px);
  right: calc(var(--i) * 9px);
  z-index: calc(4 - var(--i));
  transition: transform 0.55s cubic-bezier(0.3, 0.1, 0.2, 1), opacity 0.45s;
}
.js .layers button {
  height: 94px;
  box-shadow: 0 -6px 14px -8px #000;
}
.js .layers li.peeled {
  transform: translate(38%, -70%) rotate(9deg);
  opacity: 0;
  pointer-events: none;
}
html:not(.js) .film-atlas .small {
  display: none;
}

/* grooph */
.film-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
  rotate: 0.25deg;
}
.film-wide h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}
.loop {
  width: 100%;
  height: auto;
}
.wire {
  fill: none;
  stroke: var(--on-film-2);
  stroke-width: 1.5;
}
.node rect {
  fill: #0c1b29;
  stroke: var(--on-film);
  stroke-width: 1.5;
}
.node text {
  fill: var(--on-film);
  font: 600 12px var(--mono);
  text-anchor: middle;
}
.pulse {
  fill: #fff;
  filter: drop-shadow(0 0 5px #bfe2ff);
}
.wax {
  fill: none;
  stroke: var(--wax);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transform-origin: 427px 106px;
  transform: rotate(-12deg);
  animation: circle 6s ease-out infinite;
}
@keyframes circle {
  0%, 45% { stroke-dashoffset: 1; }
  62%, 100% { stroke-dashoffset: 0; }
}

/* Link Meteor and Ars Magna */
.fields {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.fields div {
  display: grid;
  grid-template-columns: 12ch minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.fields dt {
  font: 500 0.7rem/1.2 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-film-2);
}
.fields dd {
  font: 500 0.82rem/1.3 var(--mono);
  padding: 7px 9px;
  border: 1px dashed var(--film-line);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.recut {
  margin-top: 14px;
  display: grid;
  gap: 4px;
  font: 700 0.95rem/1.5 var(--mono);
  letter-spacing: 0.32em;
}
.recut span + span {
  margin-left: 0.5em;
  padding-left: 0.75em;
  border-left: 2px solid var(--wax);
}
.recut li:first-child {
  color: var(--on-film-2);
}
.film-last h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.film-last {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--ink-2);
  color: var(--ink);
}
.film-last .burn {
  color: var(--ink-2);
}
.film-last .links a {
  color: var(--ink);
  border-color: var(--ink-2);
}
.film-last .links a:hover {
  background: var(--ink);
  color: var(--glow);
}

/* ---- The report ---- */
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}
.report h3 {
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 14px;
}
.interests {
  counter-reset: n;
}
.interests li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 2.2ch 1fr;
  gap: 12px;
  font: 700 clamp(1.25rem, 2.2vw, 1.75rem) / 1.2 var(--text);
  letter-spacing: -0.02em;
  padding-block: 9px;
}
.interests li::before {
  content: counter(n) '.';
  font-family: var(--mono);
  font-weight: 500;
  color: var(--wax-deep);
}
.history div + div {
  margin-top: 16px;
}
.history dt {
  font: 600 0.78rem/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.aside {
  margin-top: 22px;
  color: var(--ink-2);
  font-style: italic;
  rotate: -1deg;
  max-width: 34ch;
}

/* ---- Follow-up: film ID stickers ---- */
.stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.stickers a {
  display: block;
  font: 700 0.9rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--glow);
  padding: 13px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: translate 0.12s, box-shadow 0.12s, background 0.12s;
}
.stickers li:nth-child(odd) a {
  rotate: -1.2deg;
}
.stickers li:nth-child(3n) a {
  rotate: 1deg;
}
.stickers a:hover {
  background: var(--wax);
  translate: 2px 2px;
  box-shadow: 1px 1px 0 var(--ink);
}

.foot {
  max-width: 1400px;
  margin: clamp(56px, 8vw, 110px) auto 0;
  padding: 22px var(--gutter) 40px;
  border-top: 1.5px solid var(--ink);
  font-size: 0.86rem;
  color: var(--ink-2);
  display: grid;
  gap: 8px;
}
.foot p {
  max-width: 96ch;
}

/* ---- Narrower ---- */
@media (max-width: 980px) {
  .exam {
    grid-template-columns: minmax(0, 1fr);
  }
  .film-wide,
  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .rail-text {
    display: none;
  }
  .rail {
    font-size: 0.68rem;
    letter-spacing: 0.03em;
  }
  .rail nav {
    flex: 1;
    justify-content: space-between;
    gap: 6px;
  }
  .sliders {
    grid-template-columns: 1fr;
  }
  .panes,
  .row {
    gap: 10px 8px;
  }
  .burn,
  .tag {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }
}

/* A long film swings less. */
@media (max-width: 980px) {
  .film-exam {
    animation-name: hang-small;
  }
}
@keyframes hang-small {
  0% { transform: rotate(-0.5deg); }
  50% { transform: rotate(0.25deg); }
  100% { transform: rotate(0); }
}
@media (pointer: coarse) {
  .band {
    top: -8px;
    bottom: -8px;
  }
  .grip {
    width: 36px;
  }
  .grip-lo {
    left: -19px;
  }
  .grip-hi {
    right: -19px;
  }
  .presets button {
    min-height: 44px;
  }
  .modes button {
    padding-block: 11px;
  }
  .scans button {
    min-height: 40px;
  }
}

/* The real toy */
.film-real {
  margin-top: clamp(18px, 2.4vw, 32px);
  rotate: -0.2deg;
}
.real-frame {
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  border-radius: 8px;
  border: 1px dashed var(--film-line);
  background: #070e16;
  overflow: hidden;
}
.real-frame:has(iframe) {
  padding: 0;
  border-style: solid;
  place-content: stretch;
}
.real-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.real-frame button {
  font: 700 0.86rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 16px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--wax);
  color: #23000f;
}
.real-frame button:hover {
  background: #ff6bb9;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body::before,
  .film-exam,
  .wax {
    animation: none;
  }
  .pulse {
    display: none;
  }
  .js .layers li,
  .ring,
  .stickers a {
    transition: none;
  }
}
