/* sonarruler.com: the home page. Round 3, the user's picks from round 2: 2C's hero from 1000 px up and 2B's centred hero
 * below that; everything under the hero is 2B's (phone frames on wide plates, centred headings), with the live demo
 * video moved up above Quiet Mode, and the background bands 20 % fainter. site.css and the kit's base.css and
 * device.css come first. */

:root {
  /* from the content's right edge to the window's: the hero's scene bleeds that far so its ripples never meet an edge */
  --d-bleed: calc(max(0px, (100vw - var(--d-max)) / 2) + var(--d-gutter));
}

/* MARK: Hero
 * From 1000 px up (2C's): the words on the left, E's phone on the table to the right, its canvas bleeding to the
 * window's edge. Below that (2B's): the words stacked and centred, the phone on a wide stage under them, about 4:3 on
 * a phone. The scene plays its own 6 s loop (home.js); nothing sticks or follows the scroll. */

.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;        /* the scene's canvas bleeds to the window's edge */
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  /* the first screen under the header, and no taller */
  min-height: clamp(600px, calc(100vh - 84px), 820px);
}
@supports (height: 100svh) {
  .hero__grid { min-height: clamp(600px, calc(100svh - 84px), 820px); }
}
.hero__text { position: relative; z-index: 1; padding: 16px 0 56px; }
.hero__scene {
  position: relative;
  align-self: stretch;
  min-height: 460px;
  margin-left: calc(-0.5 * clamp(28px, 4vw, 56px));
  margin-right: calc(-1 * var(--d-bleed));
}
.eyebrow {
  font: 600 0.8125rem/1.3 var(--sr-mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--d-ink2);
  margin: 0 0 22px;
}
.hero__title {
  font: 700 clamp(3rem, 1.6rem + 4vw, 5.25rem)/0.98 var(--sr-font);
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.hero__sub {
  font-size: clamp(1.125rem, 1.03rem + 0.4vw, 1.375rem);
  line-height: 1.45;
  color: var(--d-ink2);
  max-width: 28ch;
  margin: 26px 0 36px;
  text-wrap: pretty;
}

/* MARK: Bands: the icon's bands, printed faintly in cream behind the hero and The science */

.bands {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.bands__inner { position: absolute; inset: 0; }
/* Round 3: the user asked for the background waves 20 % fainter, so every band layer prints at 0.8 of round 2's
 * strength (a band's tint is 0.8 as far from the paper as it was). One strength for the whole page. */
.bands__inner { opacity: 0.8; }
/* The hero's bands fade in under the header and out at the hero's foot, and print calmer behind the words. The calmer
 * part is a veil of the page's own colour laid over them (2C's: a mask gradient printed faint steps across the
 * strongest tints). */
.bands--hero {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 72px, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 72px, #000 70%, transparent 100%);
}
.bands--hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(247 243 234 / 0.62) 0%, rgb(247 243 234 / 0.58) 34%, rgb(247 243 234 / 0) 62%);
}
/* The science's bands fade in and out at the section's ends, and print as calmly as the hero's words side. */
.bands--science {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 80%, transparent 100%);
}
.bands--science .bands__inner {
  -webkit-mask-image: linear-gradient(rgb(0 0 0 / 0.4), rgb(0 0 0 / 0.4));
  mask-image: linear-gradient(rgb(0 0 0 / 0.4), rgb(0 0 0 / 0.4));
}

/* MARK: Plates, figures, captions (D2's) */

.plate {
  position: relative;
  background: var(--d-plate);
  border-radius: var(--d-radius);
  box-shadow: var(--d-shadow);
  overflow: hidden;
}
.fig { margin: 0; min-width: 0; }
.cap {
  margin: 16px auto 0;
  max-width: 64ch;
  font: 450 0.9375rem/1.5 var(--sr-mono);
  color: var(--d-ink2);
  text-align: center;
  text-wrap: balance;
}

/* A wall seen from above: its face as an ink line, hatched behind (D2's Fig. 1 wall). */
.wall {
  background:
    linear-gradient(var(--d-ink), var(--d-ink)) 0 0 / 5px 100% no-repeat,
    repeating-linear-gradient(-45deg, rgb(38 18 8 / 0.34) 0 1.4px, transparent 1.4px 7px) 5px 0 / 17px 100% no-repeat;
  border-radius: 2px;
}
.tag {
  position: absolute;
  font: 500 0.8125rem/1 var(--sr-mono);
  color: var(--d-ink3);
  letter-spacing: 0.02em;
  padding: 2px 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: var(--d-plate);   /* the rings pass behind a tag: the paper keeps them off the word */
}

/* MARK: How does it work? */

.how { padding-top: clamp(32px, 4.4vw, 64px); }
.how__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.how__line {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  line-height: 1.5;
  color: var(--d-ink2);
  text-wrap: balance;
}
/* D2's chips: a disc and a name on the wash, each jumping to its mode. */
.toc {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.toc a {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px;
  padding: 0 22px 0 11px;
  border-radius: 999px;
  background: var(--d-wash);
  text-decoration: none;
}
.toc__t { font-weight: 650; }
@media (hover: hover) { .toc a:hover { background: #E8DCC4; } }

/* MARK: The modes: a centred heading block, a wide plate, the steps in a row */

.mode { padding-top: clamp(64px, 8vw, 120px); }
.mode__head {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.mode__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 0.75rem/1.3 var(--sr-mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--d-ink2);
  margin: 0 0 16px;
}
.mode__title {
  font: 700 clamp(2.125rem, 1.45rem + 1.8vw, 3.125rem)/1.04 var(--sr-font);
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.mode__lead {
  margin: 18px 0 0;
  max-width: 50ch;
  font-size: 1.1875rem;
  line-height: 1.55;
  text-wrap: balance;
}
.mode__fig { margin-top: clamp(28px, 3.4vw, 44px); }

/* D2's steps, laid in a row of three under the plate. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  min-height: 30px;
  text-wrap: pretty;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--d-wash);
  font: 700 0.875rem/30px var(--sr-mono);
  text-align: center;
}
.steps--row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px clamp(24px, 3.4vw, 56px);
  margin-top: clamp(28px, 3.4vw, 44px);
  padding: 0 clamp(0px, 2vw, 28px);
}
.steady {
  font: 700 0.8125rem/1 var(--sr-mono);
  letter-spacing: 0.09em;
  padding: 3px 8px 3px;
  border-radius: 999px;
  background: var(--sr-steady);
  color: var(--sr-yellow);
  white-space: nowrap;
  vertical-align: 1px;
}
.aside-note {
  margin: 26px 0 0;
  font: 500 0.9375rem/1.5 var(--sr-mono);
  color: var(--d-ink2);
  text-align: center;
  text-wrap: balance;
}

/* Single Phone Mode: the Live Wall loop in a landscape frame near the left, its bottom edge facing a wall near the
 * right end; the rings (home.js) go from that edge to the wall and back. */
.throw { height: clamp(300px, 26vw, 370px); }
.throw__phone {
  position: absolute;
  left: clamp(24px, 4.6%, 64px);
  top: 50%;
  translate: 0 -50%;
  width: clamp(320px, 39%, 500px);
}
.throw__wall { position: absolute; left: 88%; top: 19%; bottom: 19%; width: 22px; translate: -3px 0; }
.throw__tag { left: 88%; top: calc(19% - 24px); translate: -50% 0; }

/* Two Phone Mode: two landscape frames lying bottom edge to bottom edge, as on a table. The right one is the same
 * frame turned round, its light and shadow turned back so both are lit the same way. Its clip is the app's screen with
 * the speaker edge on the left, so the clip is turned back too, and both phones read upright. */
.pair { height: clamp(260px, 21vw, 310px); }
.pair__phone {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: clamp(260px, 31%, 400px);
}
.pair__phone--a { left: clamp(24px, 4.6%, 64px); }
.pair__phone--b { right: clamp(24px, 4.6%, 64px); rotate: 180deg; }
.pair__phone--b video { rotate: 180deg; }
.pair__phone--b .sr-device__body {
  background:
    linear-gradient(270deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0) 22%, rgb(0 0 0 / 0) 70%, rgb(0 0 0 / 0.16)),
    var(--sr-device-ring, #E6D3AE);
  box-shadow:
    0 calc(-5 * var(--u)) calc(12 * var(--u)) rgb(var(--sr-device-shadow-rgb, 107 58 10) / 0.2),
    0 calc(-20 * var(--u)) calc(56 * var(--u)) rgb(var(--sr-device-shadow-rgb, 107 58 10) / var(--sr-device-shadow-alpha, 0.3));
}
/* The plates' rings have their own layer (home.js mounts them there and clips it to the gap the chirp crosses). It
 * fades them out toward the plate's top and bottom, as the worked sum's are, instead of cutting them at its edges.
 * (The img is the capture tool's stand-in for the canvas in whole-page stills.) */
.rings { position: absolute; inset: 0; pointer-events: none; }
.rings > canvas, .rings > img {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%);
}
/* A clip's poster shows until it plays; the screen behind it is the app's own colour, never a black flash. */
.throw__phone .sr-device__screen { background: var(--sr-lw-top); }
.pair__phone .sr-device__screen { background: #F2B63A; }

/* MARK: Live demo video: a centred facade on a graphite plate with faint bands. It sits between Two Phone Mode and
 * Quiet Mode, in the modes' rhythm. */

.video { padding: clamp(64px, 8vw, 120px) 0 0; }
.video .section-title { text-align: center; }
.video .sr-video {
  max-width: 880px;
  margin: clamp(28px, 3.4vw, 44px) auto 0;
  --sr-video-radius: var(--d-radius);
  --sr-focus: var(--sr-cream);   /* the play button's focus ring, on the graphite */
  background: #2A2A2F;
}
.video__poster { background: #2A2A2F; }
/* The kit darkens a poster for an app screen; this plate is calm already, so it only darkens toward the note. */
.video .sr-video::after {
  background: linear-gradient(180deg, rgb(15 15 17 / 0) 50%, rgb(15 15 17 / 0.5) 100%);
}
/* Ready: the whole plate plays the video (home.js), and the button answers a pointer anywhere on it. */
.video .sr-video[data-state="ready"] { cursor: pointer; }
@media (hover: hover) { .video .sr-video[data-state="ready"]:hover .sr-video__play { opacity: 0.9; } }
.video .sr-video[data-state="ready"]:active .sr-video__play { opacity: 0.6; }
/* Under the plate: the same video on YouTube itself, for anyone who'd rather watch it there. */
.video__alt {
  margin: 10px 0 0;
  font: 500 0.9375rem/1.5 var(--sr-mono);
  color: var(--d-ink2);
  text-align: center;
}
.video__alt a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; text-underline-offset: 3px; }

/* MARK: Quiet Mode: the scope wide, the toy and the two notes under it */

.plate--scope { padding: 14px; background: #17171A; }
.plate--scope .sr-scope { --sr-scope-ratio: 16 / 3.2; --sr-scope-radius: 16px; }
/* What the plot is showing: a silent preview, or the sound that's playing. Low in the corner, on the plate's own colour,
 * clear of Quiet's band at the top and readable over the sweep. */
.scope__state {
  position: absolute;
  right: 26px;
  bottom: 26px;
  margin: 0;
  padding: 5px 9px;
  border-radius: 6px;
  background: #17171A;
  font: 500 0.75rem/1 var(--sr-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C9C4BA;
}
.quiet__row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(20px, 2.4vw, 32px);
  margin-top: clamp(28px, 3.4vw, 44px);
  align-items: start;
}
.toy { display: flex; flex-wrap: wrap; gap: 12px; }
.toy__btn { --sr-btn-h: 52px; }
.toy__btn svg { width: 16px; height: 16px; }
.toy__btn .i-stop { display: none; }
.toy__btn.is-playing .i-stop, .toy__btn[aria-pressed="true"] .i-stop { display: block; }
.toy__btn.is-playing .i-play, .toy__btn[aria-pressed="true"] .i-play { display: none; }
.toy__btn + .toy__btn { --sr-btn-bg: var(--d-wash); --sr-btn-fg: var(--d-ink); --sr-btn-on-bg: var(--sr-graphite); --sr-btn-on-fg: var(--sr-tape); }
.vol {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-width: 360px;
  min-height: 44px;
  margin-top: 16px;
  --sr-range-track: var(--d-wash);
}
.vol .sr-range { min-height: 44px; }
.vol__label { font: 600 0.75rem/1 var(--sr-mono); letter-spacing: 0.11em; text-transform: uppercase; color: var(--d-ink2); }
.small-print { margin-top: 14px; font: 450 0.9375rem/1.5 var(--sr-mono); color: var(--d-ink2); max-width: 44ch; text-wrap: pretty; }
.box { padding: 22px 24px; border-radius: 20px; background: var(--d-wash); }
.box .label { margin-bottom: 8px; }
.box__text { font-size: 1.0625rem; line-height: 1.5; text-wrap: pretty; }

/* MARK: The science: the lead, the worked sum wide, the temperature card under it */

/* overflow-x: clip keeps the heading's paper patch (it reaches out past the words) from widening a phone's page */
.science { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(80px, 10vw, 150px) 0 clamp(64px, 8vw, 120px); }
.science__head {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
/* The heading sits on clear paper: a soft patch of page under it keeps the crest lines off the words. */
.science__head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -56px -110px;
  background: radial-gradient(closest-side, var(--d-page) 72%, rgb(247 243 234 / 0) 100%);
  pointer-events: none;
}
.science__lead {
  margin: 18px auto 0;
  max-width: 50ch;
  font-size: 1.1875rem;
  line-height: 1.55;
  text-wrap: balance;
}
.sum-fig { max-width: 1040px; margin: clamp(32px, 4vw, 52px) auto 0; }
/* Captions that sit on the bands get a small paper label, so the crest lines never cross the words. */
.sum-fig .cap {
  display: table;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgb(247 243 234 / 0.94);
}

/* The worked sum (D2's Fig. 1), drawn wider: the phone, the rings, the wall and the dimension line. */
.fig1 { --p: 1; --s1: 1; --s2: 1; --hl: 1; }
.fig1__stage {
  position: relative;
  aspect-ratio: 16 / 6.2;
  min-height: 200px;
}
/* The rings fade out before the readout instead of stopping at the stage's edge. */
.fig1__stage > canvas, .fig1__stage > img {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 80%, transparent 98%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 80%, transparent 98%);
}
.fig1__phone {
  position: absolute;
  left: 24%; top: 46%;
  width: clamp(50px, 8.6%, 92px);
  height: auto;
  translate: -100% -50%;
  filter: drop-shadow(0 6px 8px rgb(38 18 8 / 0.16));
}
.fig1__wall { position: absolute; left: 84%; top: 13%; bottom: 20%; width: 22px; translate: -3px 0; }
.fig1__tag--phone { left: 24%; top: calc(46% + 30px); translate: -100% 0; margin-left: 4px; }
.fig1__tag--wall { left: 84%; top: calc(13% - 22px); translate: -50% 0; }
.fig1__dim {
  position: absolute;
  left: 24%; right: 16%;
  bottom: 9%;
  height: 14px;
  color: var(--d-ink);
  background:
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 0 0 / 1.5px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 1.5px 100% no-repeat;
  opacity: 0.9;
}
.fig1__dimlabel {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  padding: 2px 10px;
  background: var(--d-plate);
  font: 600 0.9375rem/1.2 var(--sr-mono);
  white-space: nowrap;
}

/* The readout: the stopwatch, then the sum filling in. */
.readout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 12px clamp(16px, 2vw, 28px);
  padding: 6px clamp(20px, 3vw, 40px) clamp(22px, 2.8vw, 32px);
}
.watch { display: grid; gap: 8px; }
.watch__label {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 0.75rem/1 var(--sr-mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--d-ink2);
}
.watch__icon { width: 18px; height: 18px; }
.watch__hand { transform-origin: 12px 13.5px; transform: rotate(calc(var(--p) * 360deg)); }
.watch__time {
  font: 700 clamp(2.125rem, 1.5rem + 1.7vw, 3rem)/0.95 var(--sr-mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sum {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: baseline;
  gap: 10px 10px;
  font: 500 clamp(1rem, 0.9rem + 0.25vw, 1.125rem)/1.2 var(--sr-mono);
  padding-bottom: 3px;
  justify-content: end;
}
.sum__op { color: var(--d-ink2); white-space: nowrap; text-align: right; }
.sum__eq { color: var(--d-ink2); }
.sum__note { font-size: 0.8125rem; color: var(--d-ink3); white-space: nowrap; }

/* A blank to fill in: an underline until the value is known, then the value (and the highlighter for the answer). */
.fill { position: relative; display: inline-block; justify-self: start; white-space: nowrap; font-weight: 700; color: var(--d-ink); }
.fill .v { opacity: var(--s, 1); }
.fill::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: currentColor;
  opacity: calc(0.45 * (1 - var(--s, 1)));
}
.fill--s1 { --s: var(--s1); }
.fill--s2 { --s: var(--s2); }
.fill--hl .v {
  background: linear-gradient(var(--d-hl), var(--d-hl)) no-repeat 0 88% / calc(var(--hl) * 100%) 52%;
  padding: 0 2px;
  margin: 0 -2px;
}

/* D2's temperature card, centred under the sum. */
.worked {
  max-width: 640px;
  margin: clamp(28px, 3.6vw, 44px) auto 0;
  padding: clamp(20px, 2.6vw, 32px);
  border-radius: 24px;
  background: var(--d-plate);
  box-shadow: var(--d-shadow);
}
.worked__lead { font-weight: 650; font-size: 1.125rem; }
.temp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  margin-top: 16px;
  --sr-range-track: var(--d-wash);
}
.temp__label { font: 600 0.75rem/1.3 var(--sr-mono); letter-spacing: 0.11em; text-transform: uppercase; color: var(--d-ink2); }
.temp__out { font: 700 1.75rem/1 var(--sr-mono); letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; }
.temp__range { grid-column: 1 / -1; width: 100%; min-height: 44px; }
.temp__ends { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: -6px; font: 500 0.75rem/1 var(--sr-mono); color: var(--d-ink3); }

.maths { margin-top: 22px; display: grid; gap: 10px; font: 500 1.0625rem/1.3 var(--sr-mono); }
.maths__row {
  display: grid;
  grid-template-columns: 1.2em 1em minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}
.maths__lhs { font-style: italic; font-weight: 600; }
.maths__eq { color: var(--d-ink2); text-align: center; }
.maths__rhs { display: inline-flex; align-items: center; gap: 0.45em; white-space: nowrap; }
.maths__note { font-size: 0.8125rem; color: var(--d-ink3); text-align: right; white-space: nowrap; }
.maths__unit { color: var(--d-ink2); }
.maths__row--result b { font-size: 1.375rem; letter-spacing: -0.02em; }
.root { display: inline-flex; align-items: stretch; }
.root__sign { width: 0.62em; height: auto; flex: none; margin-right: -1px; overflow: visible; }
.root__body {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 4px 4px 2px 5px;
  border-top: 1.5px solid currentColor;
}
.frac { display: inline-flex; flex-direction: column; align-items: center; font-size: 0.8em; line-height: 1.15; }
.frac > span:first-child { padding: 0 3px 2px; border-bottom: 1.3px solid currentColor; min-width: 2.2em; text-align: center; }
.frac > span:last-child { padding-top: 2px; }
.worked__example { margin-top: 22px; font-size: 1.125rem; line-height: 1.5; text-wrap: pretty; }
.worked__example b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hl { background: linear-gradient(var(--d-hl), var(--d-hl)) no-repeat 0 88% / 100% 52%; padding: 0 3px; margin: 0 -1px; }

/* MARK: Other features (D2's row of five) */

.features { padding: clamp(24px, 3vw, 40px) 0 clamp(48px, 6vw, 88px); }
.features .section-title { text-align: center; }
.index {
  --ix-gap: clamp(18px, 2.4vw, 36px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px var(--ix-gap);
  margin: clamp(32px, 4vw, 52px) 0 0;
}
.index__item { padding-top: 18px; position: relative; }
.index__item::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 28px; height: 2px;
  background: var(--d-ink);
  border-radius: 2px;
}
.index dt {
  display: flex; flex-direction: column; gap: 14px;
  font: 650 1.25rem/1.2 var(--sr-font);
  letter-spacing: -0.015em;
}
.index dt svg { width: 32px; height: 32px; color: var(--d-ink); }
.index dd { margin: 8px 0 0; color: var(--d-ink2); text-wrap: pretty; }

/* MARK: Read more about sound (D2's cards) */

.reading { padding: clamp(48px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.reading .section-title { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.cards {
  --cards-gap: clamp(16px, 2vw, 28px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--cards-gap);
}
.card {
  background: var(--d-plate);
  border-radius: var(--d-radius);
  box-shadow: var(--d-shadow);
  overflow: hidden;
}
.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 14px 26px;
  text-decoration: none;
  border-radius: inherit;
}
/* The card clips its corners, so its link's focus ring is drawn just inside it, where it can't be cut off. */
.card__link:focus-visible { outline-offset: -5px; border-radius: inherit; }
.card__fig {
  border-radius: 18px;
  background: #F4EDDF;
  overflow: hidden;
  margin-bottom: 22px;
}
.card__fig svg { width: 100%; height: auto; }
.card__kicker { margin: 0 12px 10px; font: 600 0.75rem/1.3 var(--sr-mono); letter-spacing: 0.11em; text-transform: uppercase; color: var(--d-ink2); }
.card__title {
  margin: 0 12px;
  font: 700 clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem)/1.12 var(--sr-font);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.card__dek { margin: 12px 12px 0; font-size: 1.0625rem; line-height: 1.5; color: var(--d-ink2); text-wrap: pretty; }
.card__more {
  display: inline-flex; align-items: center; gap: 8px;
  margin: auto 12px 0;
  padding-top: 20px;
  font: 600 0.875rem/1 var(--sr-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card__more svg { width: 16px; height: 16px; transition: translate var(--sr-dur-press) ease-out; }
@media (hover: hover) { .card__link:hover .card__more svg { translate: 3px 0; } }
/* The guide is another kind of read: a wide card under the three articles, its picture as wide as theirs and its words
 * lined up with the second card's. Below 900 px it's a card like the others. */
.card--wide { grid-column: 1 / -1; }
.card--wide .card__link {
  display: grid;
  grid-template-columns: calc((100% - 2 * var(--cards-gap) - 56px) / 3) minmax(0, 1fr);
  column-gap: calc(var(--cards-gap) + 28px);
  align-content: center;
  padding-bottom: 14px;
}
.card--wide .card__fig { grid-row: 1 / span 5; margin-bottom: 0; }
.card--wide .card__kicker { grid-column: 2; align-self: end; margin-top: 8px; }
.card--wide .card__title, .card--wide .card__dek, .card--wide .card__more { grid-column: 2; }
.card--wide .card__dek { max-width: 54ch; }
.card--wide .card__more { margin-top: 0; padding-bottom: 8px; align-self: start; }
.svg-label { font: 500 13px var(--sr-mono); fill: #6B4313; }
.more-soon {
  margin-top: 26px;
  text-align: center;
  font: 600 0.875rem/1.4 var(--sr-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--d-ink2);
}

/* The cards' small figures move slowly: pings spread, a trace scrolls, two pings race. */
.anim-ping path { animation: d-ping 3.6s linear infinite; }
.anim-ping .p2 { animation-delay: -1.2s; }
.anim-ping .p3 { animation-delay: -2.4s; }
@keyframes d-ping { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 0.85; } 100% { opacity: 0; } }
.anim-echo { animation: d-echo 3.6s linear infinite; }
@keyframes d-echo { 0%, 45% { opacity: 0.15; } 65% { opacity: 1; } 100% { opacity: 0.15; } }
.anim-scroll { animation: d-scroll 6s linear infinite; }
@keyframes d-scroll { from { transform: translateX(0); } to { transform: translateX(-90px); } }
.anim-step { animation: d-step 7s ease-in-out infinite; }
@keyframes d-step { 0%, 12%, 100% { transform: translateX(0); } 42%, 70% { transform: translateX(-46px); } }
.race { animation: d-race 5s linear infinite; }
.race--cold { --run: 196px; }
.race--warm { --run: 214px; }
@keyframes d-race {
  0% { transform: translateX(0); opacity: 0; }
  8% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translateX(var(--run)); opacity: 0; }
}

/* MARK: The honest note: E1's tilted tape measure, the sign-off before the footer */

.note { padding: clamp(48px, 6vw, 88px) 0 clamp(56px, 7vw, 104px); overflow: hidden; }
/* It comes in from off the left edge and ends just inside the right one, so its hook shows. */
.tape {
  position: relative;
  margin-left: -24px;
  margin-right: clamp(14px, 2.4vw, 34px);
  padding: 46px calc(var(--d-gutter) + 30px) 34px calc(var(--d-gutter) + 24px);
  background: var(--sr-tape);
  color: var(--sr-tape-ink);
  rotate: -1.6deg;
  box-shadow: 0 16px 26px -20px rgb(106 25 0 / 0.5);
}
.tape__ticks {
  position: absolute; left: 0; right: 0; top: 0; height: 22px;
  background:
    repeating-linear-gradient(90deg, rgb(26 20 8 / 0.85) 0 2px, transparent 2px 100px) 0 0 / auto 22px no-repeat,
    repeating-linear-gradient(90deg, rgb(26 20 8 / 0.7) 0 1.5px, transparent 1.5px 50px) 0 0 / auto 15px no-repeat,
    repeating-linear-gradient(90deg, rgb(26 20 8 / 0.55) 0 1px, transparent 1px 10px) 0 0 / auto 9px no-repeat;
}
.tape__text {
  margin: 0 auto;
  max-width: 1100px;
  font: 700 clamp(1.5rem, 1.05rem + 2vw, 2.75rem)/1.12 var(--sr-font);
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
}
/* One sentence to a line where both don't fit on one, so the break never splits "tape measure". */
.tape__line { display: inline-block; }
.tape__hook { position: absolute; right: 0; top: -7px; bottom: -7px; width: clamp(10px, 1.1vw, 15px); background: #6E665C; border-radius: 3px; }

/* MARK: Narrower screens */

@media (max-width: 1080px) {
  /* Rows of three, the last two centred under the centred heading instead of leaving a hole at the right */
  .index { display: flex; flex-wrap: wrap; justify-content: center; }
  .index__item { flex: 0 1 calc((100% - 2 * var(--ix-gap)) / 3 - 0.1px); }
  .quiet__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .quiet__toy { grid-column: 1 / -1; }
}

/* Under 1000 px the hero is 2B's: the words stacked and centred, then the scene on a wide stage within the page's
 * gutters. Its bands keep 2B's calm: 0.36 of their strength behind the words, 0.6 round the phone, laid on as a veil
 * of the page's colour (the same sum as 2B's mask). */
@media (max-width: 999.98px) {
  .hero { padding: clamp(8px, 1.6vw, 22px) 0 clamp(24px, 3vw, 44px); }
  .hero__grid { display: block; min-height: 0; }
  .hero__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
  }
  .eyebrow { margin: 0 0 18px; }
  .hero__title { font-size: clamp(2.875rem, 1.5rem + 4.6vw, 5.5rem); letter-spacing: -0.04em; }
  .hero__sub { max-width: 42ch; margin: 20px 0 28px; text-wrap: balance; }
  .hero__scene {
    align-self: auto;
    min-height: 0;
    height: clamp(320px, 30vw, 450px);
    margin: clamp(14px, 2vw, 28px) 0 0;
  }
  .bands--hero {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 72px, #000 74%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 72px, #000 74%, transparent 100%);
  }
  .bands--hero::after {
    background: linear-gradient(180deg, rgb(247 243 234 / 0.64) 0%, rgb(247 243 234 / 0.6) 42%, rgb(247 243 234 / 0.4) 70%);
  }
}

@media (max-width: 900px) {
  .cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .card--wide .card__link { display: flex; padding-bottom: 26px; }
  .card--wide .card__fig { margin-bottom: 22px; }
  .card--wide .card__kicker { margin-top: 0; align-self: auto; }
  .card--wide .card__more { margin-top: auto; padding-bottom: 0; align-self: auto; }
  .steps--row { gap: 18px 24px; padding: 0; }
}

/* Below about 760 px a mode's figure is the phone frame alone: no plate, no wall, no rings, no second phone. */
@media (max-width: 760px) {
  .throw, .pair { height: auto; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .rings { display: none; }
  .throw__phone, .pair__phone--a { position: relative; left: auto; top: auto; translate: none; width: 100%; max-width: 460px; margin: 0 auto; }
  .throw__wall, .throw__tag, .pair__phone--b { display: none; }
  .steps--row { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
}

@media (max-width: 700px) {
  .hero__scene { height: auto; aspect-ratio: 4 / 3; }
}

@media (max-width: 680px) {
  .eyebrow { margin-bottom: 14px; font-size: 0.75rem; }
  .hero { padding-top: 14px; padding-bottom: 32px; }
  .hero__sub { margin: 16px 0 22px; }
  .hero__scene { margin-top: 18px; }
  .mode__title { font-size: 2.125rem; }
  .mode { padding-top: 56px; }
  .mode__lead, .science__lead { font-size: 1.0625rem; margin-top: 16px; }
  .how__line { font-size: 1.0625rem; }
  .toc { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; gap: 8px; }
  .toc a { display: flex; }
  .steps { gap: 12px; }
  .steps--row { margin-top: 26px; }
  .video { padding-top: 56px; }
  .video .sr-video { --sr-video-radius: 20px; --sr-video-play: 64px; }
  .video__alt { font-size: 1rem; }
  .quiet__row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .quiet__toy { margin-bottom: 8px; }
  .toy__btn { --sr-btn-px: 16px; }
  .box { padding: 18px 20px; }
  .plate--scope { padding: 10px; }
  .plate--scope .sr-scope { --sr-scope-ratio: 16 / 9; --sr-scope-radius: 12px; }
  .fig1__stage { aspect-ratio: 16 / 10; }
  .fig1__phone { left: 30%; }
  .fig1__tag--phone { left: 30%; }
  .fig1__wall, .fig1__tag--wall { left: 86%; }
  .fig1__dim { left: 30%; right: 14%; }
  .readout { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-inline: 20px; }
  .sum { gap: 8px 8px; grid-template-columns: auto auto minmax(0, 1fr); justify-content: start; }
  .sum__note { display: none; }
  .science { padding: 64px 0 56px; }
  .maths__row + .maths__row .maths__note { display: none; }
  .maths { font-size: 1rem; }
  .maths__row { grid-template-columns: 1em 0.9em minmax(0, 1fr); }
  .maths__note { grid-column: 3; text-align: left; margin-top: -2px; }
  .features { padding: 8px 0 40px; }
  .index { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 26px; }
  .index__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; padding-top: 0; }
  .index__item::before { display: none; }
  .index dt { display: contents; }
  .index dt svg { grid-row: 1 / span 2; }
  .index dd { grid-column: 2; margin-top: 4px; }
  .reading { padding: 40px 0 16px; }
  /* The articles become a shelf you swipe: the page stays one column, the shelf scrolls on its own. */
  .cards {
    display: flex;
    gap: 12px;
    max-width: none;
    margin: 0 calc(-1 * var(--d-gutter));
    /* room under the cards for their whole shadow: the shelf clips at its padding, which cut a hard line across it */
    padding: 4px var(--d-gutter) 44px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--d-gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 84%; scroll-snap-align: start; }
  .more-soon { margin-top: -14px; }
  .note { padding: 32px 0 48px; }
  .tape { padding-top: 40px; }
  /* Copy lines at least 16 px on phones. */
  .cap, .aside-note, .small-print { font-size: 1rem; }
}

@media (max-width: 370px) {
  .hero__title { font-size: 2.5rem; }
  .sum { font-size: 0.9375rem; }
}

/* 320 px: the eyebrow keeps to one line instead of leaving "IPAD" on its own */
@media (max-width: 340px) {
  .eyebrow { letter-spacing: 0.06em; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-ping path, .anim-echo, .anim-scroll, .anim-step, .race { animation: none; }
  .anim-ping path, .anim-echo { opacity: 1; }
  .race--cold { transform: translateX(118px); }
  .race--warm { transform: translateX(150px); }
  .anim-step { transform: translateX(-46px); }
  .card__more svg { transition: none; }
}
