/* Meet Starling (/starling): six scenes on one scrolling film, the page a first visitor to /agent lands on.
   Each scene pins to the screen while its steps play, and the next one slides over it; starling.js turns the scroll
   into steps, flies the one bird between the scenes' perches and runs the opening's request. Without JavaScript, with
   reduced motion or on a very short screen every scene still reads as a still page (docs/plans/starling-story.md). */

.st-page {
  background: var(--paper);
}
.js .st-page .site-header {
  display: none;
}
.st {
  --bar: 64px;
  --pad: clamp(20px, 4.5vw, 72px);
  --st-poster: min(12.4vw, 19svh);
  --st-poster-2: min(9.4vw, 15svh);
  --st-head: clamp(32px, 3.6vw, 52px);
  --bird: clamp(220px, 44svh, 400px);
  --stage: 760px;
  position: relative;
  color: var(--ink);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st {
  --st-head: clamp(28px, 3vw, 44px);
  --st-poster: min(13.4vw, 18svh);
  --st-poster-2: min(7vw, 12svh);
}

/* ── Words ─────────────────────────────────────────────────────────────────────────────────────────────────────── */

.st-label {
  margin: 0;
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st-label {
  font: 500 13px / 1 var(--sans);
  letter-spacing: 0.12em;
}
.st .st-poster {
  margin: 0;
  font: 800 var(--st-poster) / 0.9 var(--poster);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.st .st-poster-2 {
  font-size: var(--st-poster-2);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st .st-poster {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: none;
}
/* Chinese, Japanese and Korean headings break between words (the catalogs mark them with <wbr>), not inside one. */
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st :is(.st-poster, .st-h) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.st .st-h {
  max-width: 13em;
  margin: 0;
  font: 800 var(--st-head) / 1 var(--poster);
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st .st-h {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.24;
  text-transform: none;
}
.st .st-col .st-sub,
.st-lede {
  max-width: 30em;
  margin: 0;
  font: 400 var(--lede) / var(--lh-snug) var(--sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  text-wrap: pretty;
}
.st-act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin: 0;
}
.st-free {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st-free {
  font: 500 13px / 1 var(--sans);
  letter-spacing: 0.08em;
}

/* ── The bar: brand, the six scenes, the way in ────────────────────────────────────────────────────────────────── */

.st-bar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--bar);
  margin-bottom: calc(-1 * var(--bar));
  padding: 0 var(--pad);
  pointer-events: none;
  transition: color 0.4s;
}
.st-bar > * {
  pointer-events: auto;
}
.st-brand {
  display: flex;
  justify-self: start;
}
.st-brand img {
  width: auto;
  height: 16px;
  transition: filter 0.4s;
}
.st-wire {
  display: flex;
  align-items: center;
  gap: 6px;
}
.st-wire button {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: width 0.6s var(--ease-settle);
}
.st-wire button::before,
.st-wire button::after {
  content: "";
  position: absolute;
  inset: 13px 0;
  border-radius: var(--radius-pill);
  background: currentColor;
}
.st-wire button::before {
  opacity: 0.16;
}
.st-wire button::after {
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.st-wire button.is-done::after {
  transform: none;
  opacity: 0.5;
}
.st-wire button[aria-current] {
  width: 72px;
}
.st-wire button[aria-current]::after {
  background: var(--accent);
  transform: scaleX(max(0.06, var(--p, 0)));
}
.st-wire button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.st-wire span {
  position: absolute;
  top: 26px;
  left: 50%;
  translate: -50% 0;
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.st-wire button:is(:hover, :focus-visible) span {
  opacity: 1;
}
.st-end {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: var(--space-2);
}
/* The site's language menu, moved here by starling.js: it takes the bar's colour, light on the dark scene. */
.st-bar .lang-menu summary {
  color: inherit;
}
.st-bar .lang-menu summary:hover,
.st-bar .lang-menu[open] summary {
  color: var(--accent);
}
.st-cta {
  transition:
    opacity 0.3s,
    translate 0.5s var(--ease),
    background-color 0.3s,
    color 0.3s;
}
.st:is([data-scene="hook"], [data-scene="keep"]) .st-cta {
  opacity: 0;
  translate: 0 -8px;
  pointer-events: none;
}
.st[data-scene="get"] .st-bar {
  color: var(--on-night);
}
/* Unpinned stills scroll past the bar, so it stays at the top of the page. */
.st[data-flat] .st-bar {
  position: relative;
}
/* As the last scene leaves with the page, it passes under the bar, not through it. */
.st[data-scene="keep"] .st-bar {
  background: var(--paper);
}
.st[data-scene="get"] .st-brand img {
  filter: invert(1);
}
.st[data-scene="get"] :is(.st-cta, .st-dock) {
  background: var(--on-night);
  color: var(--night);
}
.st-dock {
  display: none;
}

/* ── The film ──────────────────────────────────────────────────────────────────────────────────────────────────── */

/* A scene not yet near the screen is not drawn: stacked over the opening, each later scene's drawings would otherwise be
   composited over the river's moving requests on every frame, unseen. Its height is its own, so the page keeps its
   length. */
.st-scene {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: clip;
  background: var(--paper);
  content-visibility: auto;
}
.st-scene ~ .st-scene {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow:
    0 -1px 0 var(--hair),
    0 -40px 80px rgba(15, 14, 18, 0.07);
}
.st-send,
.st-how,
.st-change {
  background: var(--layer-1);
}
.st-dwell {
  height: calc(var(--screens) * 100svh);
  pointer-events: none;
}
.st-in {
  position: relative;
  height: 100svh;
  padding: calc(var(--bar) + var(--space-4)) var(--pad) var(--space-8);
  opacity: calc(1 - var(--c, 0) * 0.6);
  transform: scale(calc(1 - var(--c, 0) * 0.05));
  transform-origin: 50% 30%;
}
.st-split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 88px);
}
.st-col {
  display: grid;
  align-content: center;
  gap: var(--space-5);
  min-width: 0;
}
.st-stage {
  position: relative;
  container-type: size;
  width: 100%;
  height: min(100%, var(--stage));
  min-height: 0;
}

/* A scene's words and stage rise the first time it comes on. */
.js .st-scene:not([data-seen]) :is(.st-col > *, .get-head > *, .keep-copy > *, .st-stage, .player) {
  opacity: 0;
  transform: translateY(32px);
}
.st-scene[data-seen] :is(.st-col > *, .get-head > *, .keep-copy > *, .st-stage, .player) {
  transition:
    opacity 0.7s var(--ease) calc(var(--i, 0) * 90ms),
    transform 1s var(--ease-settle) calc(var(--i, 0) * 90ms);
}
.st-scene :is(.st-col, .get-head, .keep-copy) > :nth-child(2) {
  --i: 1;
}
.st-scene :is(.st-col, .get-head, .keep-copy) > :nth-child(3) {
  --i: 2;
}
.st-scene :is(.st-col, .get-head, .keep-copy) > :nth-child(4) {
  --i: 3;
}
.st-scene :is(.st-stage, .player) {
  --i: 2;
}

/* A phone: one swipe, one scene (starling.js turns the pages). The scenes stay pinned with no room between them. */
.st[data-paged] .st-dwell {
  height: 0;
}

/* Stills: no JavaScript, or a screen too short to pin a scene. */
html:not(.js) .st-scene,
.st[data-flat] .st-scene {
  position: relative;
  height: auto;
}
html:not(.js) .st-in,
.st[data-flat] .st-in {
  height: auto;
  min-height: 100svh;
}
html:not(.js) .st-dwell,
.st[data-flat] .st-dwell {
  display: none;
}
html:not(.js) .st-stage,
.st[data-flat] .st-stage {
  height: var(--stage);
}
/* A still page shows every score written. */
.js .st[data-flat] .timed :is(.note, .with-note) {
  opacity: 1;
}

/* ── The one bird ──────────────────────────────────────────────────────────────────────────────────────────────── */

.st-perch {
  position: absolute;
  aspect-ratio: 541 / 640;
  pointer-events: none;
}
.st-perch img {
  display: block;
  width: 100%;
  height: 100%;
}
.js .st-perch img {
  visibility: hidden;
}
.st-bird {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 541px;
  height: 640px;
  visibility: hidden;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}
.st-bird.is-on {
  visibility: visible;
}
.st-bird img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  visibility: hidden;
}
.st-bird.is-on img.is-shown {
  visibility: visible;
}
.st-bird.is-flip img {
  scale: -1 1;
}
.st-bird.is-landing img {
  animation: st-land 0.42s var(--ease-settle);
  transform-origin: 50% 89%;
}
/* On the dark scene the bird stands on a paper disc (DESIGN.md, Starling). */
.st-bird::before {
  content: "";
  position: absolute;
  top: 7.7%;
  left: 9.5%;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  opacity: 0;
  scale: 0.6;
  transition:
    opacity 0.3s,
    scale 0.6s var(--ease-settle);
}
.st-bird.is-disc::before {
  opacity: 1;
  scale: 1;
}
@keyframes st-land {
  from {
    transform: translateY(-3%) scale(1.03, 0.97);
  }
}

/* A note on its way from the source to the page (starling.js). */
.st-spark {
  position: fixed;
  z-index: 25;
  top: -5px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  will-change: transform;
}
/* The stage has a little depth under a mouse: the source sits nearer than the page. */
@media (hover: hover) and (pointer: fine) {
  .st-stage :is(.src, .bench-ref) {
    translate: calc(var(--mx, 0) * -12px) calc(var(--my, 0) * -9px);
  }
  .st-stage :is(.st-sheet, .st-credit),
  .st-stage > .st-perch,
  .player {
    translate: calc(var(--mx, 0) * 7px) calc(var(--my, 0) * 5px);
  }
}

/* ── Shared pieces: paper sheets, source cards, waves ──────────────────────────────────────────────────────────── */

.st-sheet {
  position: absolute;
  padding: clamp(14px, 4.4cqw, 32px) clamp(14px, 5cqw, 36px);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  box-shadow:
    0 0 0 1px var(--hair),
    0 1px 2px rgba(15, 14, 18, 0.04),
    0 28px 56px -20px rgba(15, 14, 18, 0.16);
}
.st-sheet .engraved {
  display: block;
}
.st-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  font: 500 17px / 1.2 var(--serif);
}
.st-title span {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.src {
  position: absolute;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow:
    0 0 0 1px var(--hair),
    0 12px 28px -12px rgba(15, 14, 18, 0.14);
}
.src-rec {
  padding: 14px 18px;
}
.st-tag {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  font: 500 13px / 1.2 var(--sans);
}
.st-tag span {
  color: var(--muted);
  font-weight: 400;
}
.wave-box {
  position: relative;
  height: 40px;
  margin-top: var(--space-3);
}
.wave-box svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.st .wave-base {
  stroke: var(--line-strong);
  animation: none;
}
.st .wave-progress {
  transform: scaleX(var(--t, 0));
  transform-origin: 0 0;
}
.wave-head {
  position: absolute;
  inset: -5px 0;
  pointer-events: none;
  transform: translateX(calc(var(--t, 0) * 100%));
}
.wave-head::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
}
/* A recording that plays by itself while its scene is on: the head crosses the wave in four fifths of --loop, and each
   note is written as the head reaches its place (--f, from the example's real timings), then lights on every pass. */
.st-scene[data-live] .is-on .wave-head,
.st-scene[data-live] .loops .wave-head {
  animation: st-head var(--loop, 6s) linear infinite;
}
.st-scene[data-live] .is-on .wave-progress,
.st-scene[data-live] .loops .wave-progress {
  animation: st-fill var(--loop, 6s) linear infinite;
}
.js .timed :is(.note, .with-note) {
  opacity: 0;
}
.js .st-scene[data-live] .is-on .timed .note,
.js .st-scene[data-live] .loops .timed .note {
  animation:
    st-appear 0.01s linear calc(var(--f, 0) * var(--loop, 6s) * 0.8) both,
    st-flash var(--loop, 6s) linear calc(var(--f, 0) * var(--loop, 6s) * 0.8) infinite;
}
.js .st-scene[data-live] .is-on .timed .with-note,
.js .st-scene[data-live] .loops .timed .with-note {
  animation: st-appear 0.01s linear calc(var(--f, 0) * var(--loop, 6s) * 0.8) both;
}
@keyframes st-head {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  80% {
    transform: translateX(100%);
    opacity: 1;
  }
  86%,
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}
@keyframes st-fill {
  0% {
    transform: scaleX(0);
  }
  80%,
  100% {
    transform: scaleX(1);
  }
}
@keyframes st-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes st-flash {
  0%,
  5% {
    color: var(--accent);
    fill: var(--accent);
  }
  14%,
  100% {
    color: inherit;
    fill: currentColor;
  }
}
@keyframes st-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ── 1 · Meet Starling ─────────────────────────────────────────────────────────────────────────────────────────── */

.st-hook .st-in {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-bottom: 0;
}
.hook-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding-top: clamp(4px, 2.4svh, 32px);
}
.hook-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-8);
  margin-top: var(--space-2);
}
.hook-ask .st-lede {
  max-width: 24em;
}
.st-hook {
  --cue: 48px;
}
@keyframes st-fresh {
  0%,
  30% {
    color: var(--accent);
    fill: var(--accent);
  }
}
/* The way on: the edge of the next scene shows at the foot of the opening and says what to do. The next scene has the
   same edge, so it rises over this one without a seam. */
.st-cue {
  position: absolute;
  right: 0;
  bottom: -16px;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: calc(var(--cue) + 16px);
  padding: 0 var(--pad) 16px;
  border: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--layer-1);
  box-shadow:
    0 -1px 0 var(--hair),
    0 -10px 28px rgba(15, 14, 18, 0.05);
  font: 500 15px / 1 var(--sans);
  color: var(--ink);
  cursor: pointer;
}
.st-cue .icon {
  width: 16px;
  height: 16px;
  animation: st-bob 1.6s var(--ease) infinite;
}
@keyframes st-bob {
  50% {
    transform: translateY(4px);
  }
}
@keyframes st-cue-in {
  from {
    transform: translateY(100%);
  }
}
/* Until the visitor has moved, the edge lifts a little every few seconds, the way a sheet asks to be pulled. */
@keyframes st-cue-lift {
  8% {
    transform: translateY(-9px);
  }
  16%,
  100% {
    transform: none;
  }
}
html:not(.js) .st-hook,
.st[data-flat] .st-hook {
  --cue: 0px;
}
html:not(.js) .st-cue,
.st[data-flat] .st-cue {
  display: none;
}
/* The opening: the headline rises, then the request is said and Starling starts on it. */
.js .st:not(.is-ready) .st-hook :is(.hook-copy > *, .st-cue) {
  opacity: 0;
}
.st.is-ready .hook-copy > * {
  animation: st-rise 0.9s var(--ease-settle) both;
}
.st.is-ready .hook-copy > .st-poster {
  animation: st-poster 1.1s var(--ease-settle) 0.08s both;
}
.st.is-ready .hook-copy > .hook-ask {
  animation-delay: 0.3s;
}
.st.is-ready .st-cue {
  animation: st-cue-in 0.8s var(--ease-settle) 1.2s backwards;
}
.st.is-ready[data-move="start"] .st-cue {
  animation:
    st-cue-in 0.8s var(--ease-settle) 1.2s backwards,
    st-cue-lift 4.5s var(--ease-settle) 4.5s infinite;
}
@keyframes st-poster {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(16%);
  }
  to {
    clip-path: inset(-10% -10% -20% -10%);
  }
}

/* The opening: what people ask Starling for, flowing down one curved staff (starling-river.js). Each request is a
   pair of white sheets (what was brought, what Starling made of it) over a mono label. The river slows to a pool at
   each one, where the request inks in, Starling lands on it and the result is written behind an orange pen. */
.st-hook .st-in {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding-bottom: calc(var(--cue) + var(--space-5));
}
.st-hook .hook-copy {
  align-content: center;
  padding-top: 0;
}
.st-hook .st-poster {
  --st-poster: min(6.6vw, 13svh);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .st-hook .st-poster {
  --st-poster: min(5.4vw, 11svh);
}
.hook-ask {
  display: grid;
  justify-items: start;
  gap: var(--space-5);
}
.st-say {
  justify-self: end;
  max-width: calc(100% - var(--perch) - var(--space-3));
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg);
  background: var(--ink);
  font: 400 16px / 1.4 var(--sans);
  color: var(--paper);
  text-wrap: pretty;
}
.st-say q {
  quotes: none;
}
@keyframes st-say {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}
@keyframes st-ink {
  from {
    opacity: 0;
  }
}

/* The stage runs from under the bar to under the next scene's edge, so the river comes from beyond the screen and
   goes on past it; its ends fade into the paper. */
.rv {
  --rv-w: clamp(320px, 33vw, 480px);
  --rv-gap: 12%;
  position: relative;
  align-self: stretch;
  min-width: 0;
  margin: calc(-1 * (var(--bar) + var(--space-4))) 0 calc(-1 * (var(--cue) + var(--space-5)));
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
/* Its ends fade by paper laid over them, not a mask: a masked stage is drawn again whole, off screen, on every frame
   anything in it moves, and something in the river always moves. The paper sits over every request (16 to 20,
   starling-river.js) and lets presses through; the stage cuts off what lies past its edges. */
.js .rv {
  overflow: clip;
  isolation: isolate;
}
.js .rv::before,
.js .rv::after {
  content: "";
  position: absolute;
  z-index: 30;
  right: 0;
  left: 0;
  pointer-events: none;
}
.js .rv::before {
  top: 0;
  height: 14%;
  background: linear-gradient(var(--paper) calc(100% / 14), transparent);
}
.js .rv::after {
  bottom: 0;
  height: 16%;
  background: linear-gradient(transparent, var(--paper));
}
@media (hover: hover) and (pointer: fine) {
  .js .rv {
    cursor: grab;
  }
  .js .rv.is-dragging {
    cursor: grabbing;
  }
}
.rv-river {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.rv-line {
  fill: none;
  stroke: rgba(15, 14, 18, 0.22);
  stroke-width: 1.15;
}
/* The notes on the river: each its own drawing, moved by the compositor alone (starling-river.js places its middle,
   in the one transform it animates: a second, the translate property, would keep the browser from moving it alone). */
.rv-water {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rv-note {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  fill: var(--accent);
  opacity: 0;
  will-change: transform;
}
.rv-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.js .rv-list {
  position: absolute;
  inset: 0;
}
.rv-item {
  position: relative;
  width: var(--rv-w);
}
.js .rv-item {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}
.js .rv:not(.is-ready) .rv-item {
  visibility: hidden;
}

/* The pair: what was brought on the left, partly under what Starling made of it. */
.rv-pair {
  position: relative;
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  align-items: center;
}
.rv-in,
.rv-out,
.rv-file {
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow:
    var(--ring),
    0 14px 28px -18px rgba(15, 14, 18, 0.32);
}
.rv-in {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.rv-in :is(img, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rv-in-photo img {
  object-position: 50% 8%;
}
/* The clip's own caption, at its bottom right, would show half under the score: the video is drawn in from its left
   (the player's face, hands and fretboard), and the credit under the pair names him. */
.rv-in-video video {
  transform: scale(1.55);
  transform-origin: 0 20%;
}
.rv-in-score :is(img, svg) {
  box-sizing: border-box;
  padding: 8% 7%;
  object-fit: contain;
}
.rv-out {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-left: calc(-1 * var(--rv-gap));
  aspect-ratio: 16 / 9;
}
.rv-out > :is(img, svg) {
  position: absolute;
  inset: 9% 7%;
  width: 86%;
  height: 82%;
  object-fit: contain;
}
/* A score of two systems shows its first: as a picture (without JavaScript) by its top; written, its view is drawn
   round the system written (starling-cards.js). */
.rv-top > img {
  inset: 7% 6% 0;
  width: 88%;
  height: 93%;
  object-fit: cover;
  object-position: 50% 0;
}
/* Until a request's work is set up its result waits on an empty sheet, so a finished score never shows before it is
   written. */
.js .rv-item:not(.is-live, .is-done) .rv-out > img {
  opacity: 0;
}
/* A written mark grows from its own middle (starling-cards.js). */
.rv-score :is(.chord, .note, .rest, .mRest, .tabGrp, .harm, .dynam, .keyAccid),
.rv-score.jianpu > g {
  transform-box: fill-box;
  transform-origin: center;
}
/* A mark's colour is set a step at a time as it cools from orange to ink (starling-cards.js): the page's own colour
   transition on notes would start again at every step and keep each cooling note animating on its own. */
.engraved.rv-score .note {
  transition: none;
}

/* Words alone: the AI & MCP page's film writes the page with many cursors, on its own paper (mcp-film.js). */
.rv-solo {
  grid-template-columns: minmax(0, 1fr);
}
.rv-solo .rv-out {
  margin: 0;
}
.rv-swarm-out {
  aspect-ratio: 1000 / 538;
  background: #fbfbfa;
}
.rv-swarm {
  --film-ink: #0f0e12;
  --film-live: #e8501a;
  --film-bad: #c42b12;
  --film-note: #2a292e;
  --film-row: #f7f7f6;
  --film-row-dark: #efefed;
  --film-rule: #e4e4e1;
  --film-bar: #c9c9c6;
  position: relative;
  overflow: hidden;
}
.rv-swarm .film-paper {
  border-radius: 0;
  box-shadow: none;
}
.rv-swarm .film-roll {
  border-radius: var(--radius-sm);
}
/* Drawn small, the film keeps its cursors and their names at a size that reads: each grows from its tip by --grow
   (starling-cards.js). */
.rv-swarm .film-cur svg {
  scale: var(--grow, 1);
}
.rv-swarm .film-cur span {
  transform-origin: -15px -19px;
  scale: var(--grow, 1);
}
html:not(.js) .rv-swarm-out {
  aspect-ratio: 2.5 / 1;
}
html:not(.js) .rv-swarm-out img {
  inset: 8% 0 8% 5%;
  width: 95%;
  height: 84%;
  object-fit: cover;
  object-position: 0 50%;
}

/* Notes in flight from what was brought to where they are written. */
.rv-fx {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--accent);
  pointer-events: none;
}

/* What was brought, being read while its request is worked on: the recording's head and what it has heard, the
   photo's band, the video's heard length, the left hand gone over. */
.rv-in-wave {
  display: grid;
  padding: 18% 9%;
}
.rv-in-wave svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.rv-wave {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 3px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.rv-wave-heard {
  stroke: var(--accent);
  clip-path: inset(-30% calc((1 - var(--p, 0)) * 100%) -30% 0);
}
.rv-head {
  position: absolute;
  top: 14%;
  bottom: 14%;
  left: calc(9% + var(--p, 0) * 82%);
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
}
.rv-in-wave.is-heard .rv-head {
  opacity: 1;
}
.rv-scan {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 22%;
  border-bottom: 2px solid var(--accent);
  background: linear-gradient(transparent, var(--accent-tint) 40%, rgba(232, 80, 26, 0.22));
  transform: translateY(calc(var(--p, 0) * 454.5% - 100%));
  opacity: 0;
  pointer-events: none;
}
/* The head that writes a score: the photo's reading band on its side. It crosses each system as the system is
   written, and the page shows only behind it (starling-cards.js places it). */
.rv-pen {
  position: absolute;
  z-index: 3;
  top: 0;
  left: -1px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
/* Blank paper over what the head has not reached: it is moved, and the score under it is drawn once, not again as
   the head goes (starling-cards.js). */
.rv-cover {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: none;
  overflow: hidden;
  background-color: inherit;
  pointer-events: none;
  will-change: transform;
}
/* The page before a change, held still on the paper ahead of the head as the paper moves. */
.rv-cover > svg {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.rv-pen::before {
  content: "";
  position: absolute;
  top: 0;
  right: 2px;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--accent-tint) 40%, rgba(232, 80, 26, 0.2));
}
.rv-heard {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  width: calc(var(--p, 0) * 100%);
  height: 3px;
  background: var(--accent);
  pointer-events: none;
}
.rv-band {
  position: absolute;
  z-index: 1;
  left: 4%;
  width: calc(var(--p, 0) * 92%);
  border-radius: var(--radius-xs);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px rgba(232, 80, 26, 0.3);
  opacity: 0;
  pointer-events: none;
}

/* The files Starling hands over, as the app's download tiles (real downloads): the PDF's page, which the score lands
   on, and the MusicXML, written a line at a time. */
.rv-files {
  position: relative;
  z-index: 5;
  container-type: inline-size;
  display: grid;
  gap: var(--space-2);
  margin-left: calc(-1 * var(--rv-gap));
}
/* A tile's name and its download arrow keep their room; on a narrow tile (a phone's river) what leads the tile gives
   way, the MusicXML's lines fading out where they are cut. */
.rv-file {
  display: grid;
  grid-template-columns: auto minmax(max-content, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow:
    var(--ring),
    0 14px 28px -18px rgba(15, 14, 18, 0.32);
  font: 560 14px / 1.2 var(--sans);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s;
}
.rv-file:hover {
  background: var(--layer-1);
}
.rv-file > :first-child {
  min-width: 0;
  overflow: hidden;
}
@container (max-width: 240px) {
  .rv-xml {
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 16px), transparent);
    mask-image: linear-gradient(to right, black calc(100% - 16px), transparent);
  }
}
/* A tile waits solid, its file coming up in it as the file is made (starling-cards.js sets --on). */
.rv-file > * {
  opacity: var(--on, 1);
}
.rv-file .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.rv-file.is-ready .icon {
  animation: rv-nod 0.7s var(--ease-spring);
}
@keyframes rv-nod {
  40% {
    transform: translateY(3px);
  }
}
/* A page of music: the score's line set down it as systems. */
.rv-pdf-page {
  display: block;
  box-sizing: border-box;
  width: 32px;
  aspect-ratio: 210 / 297;
  padding: 5px 3px 7px;
  border-radius: 2px;
  background: url("/assets/river/jesu-g.svg") 50% 0 / 100% 25% repeat-y content-box var(--white);
  color: var(--line-strong);
  box-shadow: 0 0 0 1px currentColor;
}
.rv-pdf-page.is-blank {
  background-image: none;
}
.rv-xml {
  display: grid;
  gap: 1px;
  padding: 3px 0;
  font: 400 9px / 1.25 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.rv-xml-line {
  clip-path: inset(0 calc((1 - var(--k, 1)) * 100%) 0 0);
}
.rv-xml-line.is-writing {
  color: var(--accent);
}
.rv-ghost {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  box-sizing: border-box;
  height: auto;
  padding: 3%;
  border-radius: var(--radius-xs);
  background: var(--white);
  box-shadow: 0 10px 24px -10px rgba(15, 14, 18, 0.35);
  opacity: 0;
  pointer-events: none;
}

/* A press anywhere on a request's pair opens it large. */
.rv-open {
  position: absolute;
  z-index: 4;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  cursor: zoom-in;
}
.rv-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.rv.is-dragging .rv-open {
  cursor: grabbing;
}
html:not(.js) .rv-open,
html:not(.js) .rv-was {
  display: none;
}

.rv-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin: var(--space-3) 2px 0;
  font: 500 12px / 1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .rv-foot {
  font: 500 13px / 1.3 var(--sans);
  letter-spacing: 0.08em;
  text-transform: none;
}
.rv-foot > * {
  padding: 1px 4px;
  margin: -1px -4px;
  border-radius: var(--radius-xs);
  background: var(--paper);
}
.rv-credit {
  font: 400 11px / 1.3 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.rv-credit a {
  color: inherit;
  text-decoration: none;
}
.rv-credit a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* The request, said in the pool: the visitor's words in ink, one grapheme at a time (opacity only: a blur filter
   sticks on iOS Safari). */
.rv-say {
  position: absolute;
  bottom: calc(100% + var(--space-3));
  left: 0;
  width: max-content;
  max-width: calc(var(--rv-w) * 0.78);
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  background: var(--ink);
  font: 400 15px / 1.35 var(--sans);
  color: var(--paper);
  text-wrap: balance;
}
.rv-say q {
  quotes: none;
}
.js .rv-say {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: 0 100%;
  transition:
    opacity 0.25s var(--ease),
    transform 0.5s var(--ease-spring);
  pointer-events: none;
}
.js .rv-item.is-on .rv-say {
  opacity: 1;
  transform: none;
}
/* Each grapheme waits hidden for its turn and inks in; once in, nothing of the animation is kept on it (a fill kept
   forwards would hold every grapheme on a layer of its own). */
.rv-item.is-on .rv-say [data-g] {
  animation: st-ink 0.12s linear calc(0.3s + var(--g) * 30ms) backwards;
}

/* Where Starling stands: on the result's top edge, at its right, facing the request. */
.rv-item .st-perch {
  right: 3%;
  bottom: calc(100% - var(--rv-w) * 0.02);
  width: calc(var(--rv-w) * 0.18);
}
.rv-item:not(:first-child) .st-perch img {
  display: none;
}

/* Its sound: one press plays it (and holds the river), another stops it. */
.rv-play {
  position: absolute;
  z-index: 5;
  right: -10px;
  bottom: calc(var(--space-6) + 8px);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    var(--ring),
    0 8px 18px -8px rgba(15, 14, 18, 0.35);
  transition:
    background-color 0.2s,
    transform 0.4s var(--ease-spring),
    opacity 0.3s;
}
.rv-play::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
}
.rv-play .icon {
  width: 16px;
  height: 16px;
}
.rv-play:hover {
  transform: scale(1.06);
}
.rv-play:active {
  transform: scale(0.94);
}
.rv-play[aria-pressed="true"] {
  background: var(--accent);
  color: var(--white);
}
.rv-play:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.js .rv-item:not(.is-on) .rv-play {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

/* Without JavaScript the requests are a still column, each said above its pair, beside the headline. */
html:not(.js) .st-hook .st-in {
  align-items: start;
}
html:not(.js) .rv {
  margin: 0;
}
html:not(.js) .rv-list {
  display: grid;
  gap: var(--space-8);
}
html:not(.js) .rv-say {
  position: static;
  margin-bottom: var(--space-3);
}
html:not(.js) .rv-play {
  display: none;
}

/* A request opened large (starling-river.js): it rises out of its card over the dimmed page, and its work plays again
   at a size every note can be read; its label and credit, its sound and the one way in under it; the next and the
   one before beside it. The page beneath holds still. */
html.rv-opened {
  overflow: hidden;
}
/* The opened request has its own way in: the docked one waits behind it. */
html.rv-opened .st-dock {
  visibility: hidden;
}
.rv-zoom {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--space-6) clamp(72px, 8vw, 128px);
  border: 0;
  background: none;
  overflow: auto;
  overscroll-behavior: contain;
}
.rv-zoom[open] {
  display: grid;
  place-items: center;
}
.rv-zoom::backdrop {
  background: rgba(15, 14, 18, 0.38);
}
.rv-zoom[open]::backdrop {
  animation: rv-dim 0.3s var(--ease) both;
}
@keyframes rv-dim {
  from {
    opacity: 0;
  }
}
.rv-zoom-sheet {
  position: relative;
  box-sizing: border-box;
  width: min(1080px, 100%);
  padding: var(--space-6) var(--space-7) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 30px 80px -24px rgba(15, 14, 18, 0.45);
}
.rv-zoom-say {
  width: fit-content;
  max-width: calc(100% - 56px);
  margin: 0 0 var(--space-5);
  padding: 12px 18px;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  background: var(--ink);
  font: 400 18px / 1.35 var(--sans);
  color: var(--paper);
  text-wrap: balance;
}
/* The focus starts here, on the words that name the sheet, only as a place to go on from: no ring. */
.rv-zoom-say:focus {
  outline: none;
}
.rv-zoom-say q {
  quotes: none;
}
.rv-zoom-stage {
  position: relative;
}
.rv-zoom .rv-pair {
  grid-template-columns: 38% minmax(0, 1fr);
}
.rv-zoom .rv-solo {
  grid-template-columns: minmax(0, 1fr);
}
/* Opened, a score shows whole, on a sheet as tall as it is (the TAB's two systems too). */
.rv-zoom :is(.rv-out:not(.rv-swarm-out), .rv-in-score) {
  aspect-ratio: auto;
}
.rv-zoom .rv-out > :is(img, svg),
.rv-zoom .rv-in-score > :is(img, svg) {
  position: static;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-height: 60vh;
  padding: 6% 7%;
}
.rv-zoom .rv-out > .rv-was {
  position: absolute;
  top: 0;
  left: 0;
}
/* The film whole, its page and its piano roll, no taller than the screen leaves room for. */
.rv-zoom .rv-swarm-out {
  width: min(100%, calc(62vh * 1000 / 814));
  margin-inline: auto;
  aspect-ratio: 1000 / 814;
  background: none;
  box-shadow: none;
}
.rv-zoom .rv-swarm .film-paper {
  border-radius: var(--radius-md);
  box-shadow:
    var(--ring),
    0 14px 28px -18px rgba(15, 14, 18, 0.32);
}
.rv-zoom .rv-file {
  min-height: 72px;
  font-size: 17px;
}
.rv-zoom .rv-pdf-page {
  width: 44px;
}
.rv-zoom .rv-xml {
  font-size: 12px;
}
/* Until its work is set up, an opened result waits on its empty sheet. */
.rv-zoom.is-rising .rv-out > img,
.rv-zoom.is-rising .rv-pdf-page img,
.rv-zoom.is-rising .rv-xml {
  opacity: 0;
}
.rv-zoom-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.rv-zoom .rv-zoom-label {
  justify-content: flex-start;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}
.rv-zoom-acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.rv-zoom-listen[aria-pressed="true"] {
  border-color: var(--accent);
}
.rv-zoom-listen .icon {
  color: var(--accent);
}
.rv-zoom-listen[hidden] {
  display: none;
}
.rv-zoom-close,
.rv-zoom-step {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    var(--ring),
    0 8px 18px -8px rgba(15, 14, 18, 0.35);
  transition: transform 0.4s var(--ease-spring);
}
.rv-zoom-close {
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
}
.rv-zoom-step {
  top: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
}
.rv-zoom-step[data-step="-1"] {
  left: clamp(12px, 2.4vw, 36px);
}
.rv-zoom-step[data-step="1"] {
  right: clamp(12px, 2.4vw, 36px);
}
.rv-zoom-close:hover,
.rv-zoom-step:hover {
  transform: scale(1.06);
}
.rv-zoom-close:active,
.rv-zoom-step:active {
  transform: scale(0.94);
}
.rv-zoom-close .icon,
.rv-zoom-step .icon {
  width: 20px;
  height: 20px;
}
.rv-zoom :is(.rv-zoom-close, .rv-zoom-step):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .rv-zoom {
    padding: var(--space-3) var(--space-3) calc(var(--space-3) + 64px);
  }
  .rv-zoom[open] {
    place-items: start center;
  }
  .rv-zoom-sheet {
    padding: var(--space-5) var(--space-4) var(--space-4);
  }
  .rv-zoom-say {
    max-width: calc(100% - 48px);
    font-size: 16px;
  }
  /* A phone stacks the pair: what was brought, then what Starling made of it, each the width of the sheet. */
  .rv-zoom .rv-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }
  .rv-zoom .rv-in {
    width: 78%;
  }
  .rv-zoom :is(.rv-out, .rv-files) {
    margin: 0;
  }
  .rv-zoom-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .rv-zoom-acts {
    flex-wrap: nowrap;
  }
  .rv-zoom-acts .btn-ink {
    flex: 1;
  }
  .rv-zoom-listen {
    padding: 0 16px;
  }
  .rv-zoom-step {
    position: fixed;
    top: auto;
    bottom: var(--space-3);
    margin: 0;
  }
  .rv-zoom-step[data-step="-1"] {
    left: var(--space-4);
  }
  .rv-zoom-step[data-step="1"] {
    right: var(--space-4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rv-zoom[open]::backdrop {
    animation: none;
  }
}
.st-steps button:focus-visible,
.st-asks button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}
.desk-set {
  position: absolute;
  inset: 0;
  visibility: hidden;
  transition: visibility 0s 0.4s;
}
.desk-set.is-on {
  visibility: visible;
  transition-delay: 0s;
}
/* Its parts are named, not `*`: a rule ending in `*` under `.is-on` has the browser restyle everything inside whatever
   gains or loses is-on anywhere on the page, such as a whole request in the river with its score. */
.desk-set > :where(.src, .st-sheet, .st-credit) {
  opacity: 0;
  transition:
    opacity 0.35s,
    transform 0.5s var(--ease);
}
.desk-set > .src {
  transform: translate(-32px, -12px);
}
.desk-set > .st-sheet {
  transform: translateY(40px);
}
.desk-set.is-on > :where(.src, .st-sheet, .st-credit) {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s 0.15s,
    transform 0.9s var(--ease-settle) 0.15s;
}
.desk-set.is-on > .st-sheet {
  transition-delay: 0.28s;
}
.desk .st-sheet {
  top: 33cqh;
  right: 0;
  left: 9cqw;
}
.desk .src-rec {
  top: 6cqh;
  left: 0;
  width: 60cqw;
  --loop: 6s;
}
.desk-set[data-set="0"] {
  --loop: 6s;
}
.src-video {
  top: 0;
  left: 0;
  width: 38cqw;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.src-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.st-crop {
  bottom: 9cqh;
  overflow: hidden;
}
.st-crop img {
  display: block;
  width: 100%;
  height: auto;
}
.st-crop::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(transparent, var(--white));
}
.st-send[data-live] .desk-set.is-on .st-crop img {
  animation: st-wipe 2.6s var(--ease) 0.5s both;
}
@keyframes st-wipe {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0);
  }
}
.desk .st-credit {
  position: absolute;
  bottom: 0;
  left: 9cqw;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}
.src-photo {
  z-index: 2;
  top: 0;
  left: 1cqw;
  width: 25cqw;
  aspect-ratio: 1274 / 1557;
  overflow: hidden;
}
.src-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan {
  position: absolute;
  inset: 0 0 auto;
  height: 22%;
  border-bottom: 2px solid var(--accent);
  background: linear-gradient(transparent, var(--accent-tint) 40%, rgba(232, 80, 26, 0.22));
  transform: translateY(-100%);
}
.desk-set[data-set="2"] {
  --loop: 4.4s;
}
.st-send[data-live] .desk-set.is-on .scan {
  animation: st-scan var(--loop) linear infinite;
}
@keyframes st-scan {
  0% {
    transform: translateY(-100%);
    opacity: 1;
  }
  80% {
    transform: translateY(455%);
    opacity: 1;
  }
  88%,
  100% {
    transform: translateY(455%);
    opacity: 0;
  }
}
.desk .st-perch {
  --b: 30cqw;
  top: calc(33cqh - var(--b) * 1.0537);
  right: 1cqw;
  width: var(--b);
}

/* What a visitor sends is a request with its file: the tag names the file, the words say what to do with it. */
.ask-file {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.66;
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .ask-file {
  font: 500 12px / 1 var(--sans);
  letter-spacing: 0.08em;
}
.ask-file .icon {
  width: 14px;
  height: 14px;
}

/* ── 3 · How it works ──────────────────────────────────────────────────────────────────────────────────────────── */

.st-steps {
  display: grid;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: st-step;
}
.st-steps button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0 var(--space-4);
  width: 100%;
  padding: var(--space-3) 0;
  border: 0;
  background: none;
  text-align: start;
  color: var(--ink);
  opacity: 0.36;
  cursor: pointer;
  transition: opacity 0.4s;
}
.st-steps button {
  counter-increment: st-step;
}
.st-steps button::before {
  content: counter(st-step);
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--hair-strong);
  font: 500 12px / 1 var(--mono);
  font-variant-numeric: tabular-nums;
  transition:
    background-color 0.3s,
    color 0.3s;
}
.st-steps b {
  font: 600 20px / 24px var(--display);
  letter-spacing: -0.01em;
}
.st-steps span {
  grid-column: 2;
  font: 400 15px / 1.4 var(--sans);
  color: var(--muted);
}
.st-steps button:hover {
  opacity: 0.7;
}
.st-steps button[aria-pressed="true"] {
  opacity: 1;
}
.st-steps button[aria-pressed="true"]::before {
  background: var(--ink);
  box-shadow: none;
  color: var(--paper);
}
.bench-rec {
  top: 2cqh;
  left: 0;
  width: 56cqw;
  --loop: 5s;
  transition:
    opacity 0.4s,
    transform 0.7s var(--ease-settle);
}
.st-how:not([data-step="0"]) .bench-rec {
  opacity: 0;
  transform: translate(-24px, -12px);
}
.st-benchsheet {
  top: 40cqh;
  right: 0;
  left: 0;
}
.bench-score,
.bench-track {
  position: relative;
}
/* The draft is faint until it is written: bar by bar it turns to full ink in step three. */
.bench-score .layer {
  opacity: 0.4;
}
.js .st-how[data-live][data-step="0"] .bench-score .layer {
  animation: st-draft 0.5s linear calc(var(--loop, 5s) * 0.2 * (var(--k) - 1) + 0.3s) backwards;
}
@keyframes st-draft {
  from {
    opacity: 0;
  }
}
.bench-score [data-bar="1"] {
  --k: 1;
}
.bench-score [data-bar="2"] {
  --k: 2;
}
.bench-score [data-bar="3"] {
  --k: 3;
}
.bench-score [data-bar="4"] {
  --k: 4;
}
.st-how:is([data-step="2"], [data-step="3"]) .bench-score .layer {
  opacity: 1;
}
.st-how[data-step="2"] .bench-score .layer {
  transition: opacity 0.35s calc((var(--k) - 1) * 0.6s + 0.75s);
}
.bench-bands {
  position: absolute;
  inset: -8px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.bench-bands li {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--a);
  width: calc(var(--b) - var(--a));
  border-radius: var(--radius-xs);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px rgba(232, 80, 26, 0.3);
  opacity: 0;
}
.st-how[data-live][data-step="2"] .bench-bands li {
  animation: st-band 0.9s var(--ease) calc(var(--i) * 0.6s + 0.4s) both;
}
@keyframes st-band {
  0% {
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: 0 50%;
  }
  30%,
  70% {
    opacity: 1;
    transform: none;
    transform-origin: 0 50%;
  }
  100% {
    opacity: 0;
  }
}
.bench-ticks {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.bench-ticks li {
  position: absolute;
  top: 100%;
  left: var(--x);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 2px 0 0 -11px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  scale: 0;
  transition: scale 0.2s;
}
.bench-ticks .icon {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.st-how[data-step="3"] .bench-ticks li {
  scale: 1;
  transition: scale 0.6s var(--ease-spring) calc(var(--i) * 0.16s + 0.3s);
}
:is(.bench-ticks, .bench-bands) li:nth-child(1) {
  --i: 0;
}
:is(.bench-ticks, .bench-bands) li:nth-child(2) {
  --i: 1;
}
:is(.bench-ticks, .bench-bands) li:nth-child(3) {
  --i: 2;
}
:is(.bench-ticks, .bench-bands) li:nth-child(4) {
  --i: 3;
}
.bench-doubt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-8) 0 0;
  font: 500 13px / 1.3 var(--sans);
  color: var(--accent-text);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease);
}
.bench-doubt i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.st-how[data-step="3"] .bench-doubt {
  opacity: 1;
  transform: none;
  transition-delay: 1.1s;
}
.bench-ref {
  position: absolute;
  z-index: 2;
  top: -1cqh;
  left: 0;
  /* Never taller than the room above the sheet. */
  width: min(24cqw, (41cqh - 64px) * 0.7);
  margin: 0;
  padding: 8px 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow:
    0 0 0 1px var(--hair),
    0 20px 40px -16px rgba(15, 14, 18, 0.2);
  opacity: 0;
  transform: translate(-40px, 24px);
  transition:
    opacity 0.35s,
    transform 0.6s var(--ease);
}
.bench-ref img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}
.bench-ref figcaption {
  display: grid;
  gap: 2px;
  margin-top: var(--space-2);
  font: 500 12px / 1.3 var(--sans);
}
.bench-ref figcaption span {
  font-weight: 400;
  color: var(--muted);
}
.st-how:not([data-step="0"]) .bench-ref {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s 0.2s,
    transform 1s var(--ease-settle) 0.2s;
}
.bench .st-perch {
  --b: 30cqw;
  top: calc(40cqh - var(--b) * 1.0537);
  right: 2cqw;
  width: var(--b);
}
.bench .st-perch[data-on="2"] {
  right: 30cqw;
}
.st-foot {
  position: absolute;
  bottom: 0;
  left: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--soft);
}

/* The four steps read as a run in progress: what is done is ink, what Starling is doing now is orange and beats. */
.st-how[data-step="1"] .st-steps li:nth-child(-n + 1) button,
.st-how[data-step="2"] .st-steps li:nth-child(-n + 2) button,
.st-how[data-step="3"] .st-steps li:nth-child(-n + 3) button {
  opacity: 0.6;
}
.st-how[data-step="1"] .st-steps li:nth-child(-n + 1) button::before,
.st-how[data-step="2"] .st-steps li:nth-child(-n + 2) button::before,
.st-how[data-step="3"] .st-steps li:nth-child(-n + 3) button::before {
  background: var(--ink);
  box-shadow: none;
  color: var(--paper);
}
.st-how .st-steps button[aria-pressed="true"]::before {
  background: var(--accent);
  color: var(--white);
}
.st-how[data-live] .st-steps button[aria-pressed="true"]::before {
  animation: st-beat 1.4s var(--ease) infinite;
}
@keyframes st-beat {
  from {
    box-shadow: 0 0 0 0 rgba(232, 80, 26, 0.45);
  }
  to {
    box-shadow: 0 0 0 10px rgba(232, 80, 26, 0);
  }
}

/* ── 4 · You get (the dark scene) ──────────────────────────────────────────────────────────────────────────────── */

.st-get {
  background: var(--night);
  color: var(--on-night);
}
.st-get .st-in {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 88px);
}
.get-head {
  display: grid;
  gap: var(--space-5);
}
.st-get .st-label,
.st-get .st-lede {
  color: var(--on-night-muted);
}
.player {
  --b: clamp(120px, 15vw, 230px);
  --loop: 9s;
  position: relative;
  display: grid;
  gap: var(--space-5);
  margin-top: calc(var(--b) * 0.5);
}
.st-playsheet {
  position: relative;
  padding: 28px 32px;
}
.player-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
}
.player-bar .wave-box {
  margin: 0;
}
.st-get .wave-base {
  stroke: rgba(240, 240, 239, 0.26);
}
.st-get .wave-fill {
  stroke: var(--accent-night);
}
.st-get .wave-head::before {
  background: var(--accent-night);
}
.st-play {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--on-night);
  color: var(--night);
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring);
}
.st-play:hover {
  transform: scale(1.06);
}
.st-play:active {
  transform: scale(0.96);
}
.st-play .icon {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: none;
}
.st-play:focus-visible,
.player-switch button:focus-visible {
  outline: 2px solid var(--accent-night);
  outline-offset: 3px;
}
.player-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--night-raise);
}
.player-switch button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  font: 500 13px / 1 var(--sans);
  color: var(--on-night-muted);
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.player-switch button[aria-pressed="true"] {
  background: var(--on-night);
  color: var(--night);
}
/* Playing for real: the sound's own clock (--t and .is-playing, from starling.js) takes over from the silent loop. */
.player[data-playing] :is(.wave-head, .wave-progress),
.js .player[data-playing] .timed :is(.note, .with-note) {
  animation: none !important;
}
.js .player[data-playing] .timed :is(.note, .with-note) {
  opacity: 1;
}
.st-get .st-perch {
  top: calc(-1 * var(--b) * 1.0537);
  right: 6%;
  width: var(--b);
}

/* ── 5 · You say ───────────────────────────────────────────────────────────────────────────────────────────────── */

.st-asks {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.st-asks button {
  max-width: 25em;
  padding: 14px 18px;
  border: 0;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  background: var(--white);
  box-shadow: var(--ring);
  font: 400 17px / 1.4 var(--sans);
  text-align: start;
  color: var(--ink);
  opacity: 0.5;
  cursor: pointer;
  transition:
    opacity 0.4s,
    background-color 0.4s,
    color 0.4s,
    transform 0.6s var(--ease-settle);
}
.st-asks q {
  quotes: none;
}
.st-asks button:hover {
  opacity: 0.8;
}
.st-asks button[aria-pressed="true"] {
  background: var(--ink);
  box-shadow: none;
  color: var(--paper);
  opacity: 1;
  transform: translateX(12px);
}
/* Every scene is a request and Starling's answer (starling.js). The request types itself in; the stage, which is the
   answer, waits until it has been said (data-asking). A scene with several requests says them in turn: the ones before
   stay above, small, and the ones to come keep their room, unseen (data-ask). */
.st-scene[data-ask="0"] .st-asks li:nth-child(n + 2),
.st-scene[data-ask="1"] .st-asks li:nth-child(n + 3) {
  visibility: hidden;
}
.st-scene[data-ask] .st-asks button[aria-pressed="false"] {
  transform: scale(0.94);
  transform-origin: 0 50%;
}
.st-scene[data-live][data-ask] .st-asks button[aria-pressed="true"] {
  animation: st-say 0.5s var(--ease-spring) both;
}
.st-scene[data-live][data-ask] :is(.st-asks button[aria-pressed="true"], :is(.st-col, .get-head) > .st-say) [data-g] {
  animation: st-ink 0.12s linear calc(0.45s + var(--g) * 30ms) backwards;
}
.js .st-scene[data-seen][data-asking] :is(.st-stage, .player) {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.25s var(--ease),
    transform 0s 0.25s;
}
:is(.st-col, .get-head) > .st-say {
  justify-self: start;
  max-width: 25em;
  padding: 14px 18px;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  font-size: 17px;
}
.st-get .st-say {
  background: var(--paper);
  color: var(--ink);
}
.easel {
  --b: 26cqw;
  display: grid;
  align-content: center;
  gap: var(--space-5);
  padding-top: calc(var(--b) * 0.5);
}
.st-easelsheet {
  position: relative;
}
.easel-score {
  display: grid;
}
.easel-score > div {
  grid-area: 1 / 1;
  visibility: hidden;
}
.easel-score > .is-on {
  visibility: visible;
}
.easel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 32px;
  margin-top: var(--space-4);
}
.easel-reply {
  display: none;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  font: 400 14px / 1.3 var(--sans);
  font-variant-numeric: tabular-nums;
}
.easel-reply.is-on {
  display: flex;
  animation: st-rise 0.5s var(--ease) 0.5s both;
}
.easel-reply b {
  font: 500 12px / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.easel-listen .icon {
  fill: currentColor;
  stroke: none;
}
.easel-files {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-height: 68px;
}
.file-tile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 18px 10px 10px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--ring);
  font: 500 14px / 1.2 var(--sans);
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  transform: translateY(-56px) scale(0.9);
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease);
}
.file-tile b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 48px;
  border-radius: var(--radius-xs);
  background: var(--ink);
  font: 600 11px / 1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--paper);
}
.st-change[data-step="2"] .file-tile {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.4s 0.5s,
    transform 0.9s var(--ease-spring) 0.5s;
}
.st-change[data-step="2"] .file-tile + .file-tile {
  transition-delay: 0.62s;
}
.file-tile:hover {
  box-shadow: 0 0 0 1px var(--hair-strong);
}
.easel .st-perch {
  top: calc(-1 * var(--b) * 1.0537);
  right: 2cqw;
  width: var(--b);
}
.st-easelsheet .st-perch {
  top: calc(-1 * var(--b) * 1.0537);
}

/* ── 6 · Your turn ─────────────────────────────────────────────────────────────────────────────────────────────── */

.st-keep .st-in {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding-bottom: 0;
}
.keep-copy {
  display: grid;
  align-content: center;
  gap: var(--space-5);
}
.keep-copy .st-poster {
  --st-poster: min(17vw, 24svh);
}
:root:is(:lang(zh), :lang(ja), :lang(ko)) .keep-copy .st-poster {
  --st-poster: min(15vw, 20svh);
}
.st-again {
  position: absolute;
  bottom: var(--space-5);
  left: var(--pad);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: 500 13px / 1 var(--sans);
  color: var(--muted);
  cursor: pointer;
}
.st-again:hover {
  color: var(--ink);
}
.st-again .icon {
  width: 16px;
  height: 16px;
}

/* The last scene hands over the box the whole page has been talking into: the page's requests type themselves in,
   and a press anywhere on it is the way in. */
.st-keep .st-in {
  grid-template-rows: minmax(0, 1fr);
  padding-bottom: var(--space-12);
}
.st-keep .keep-copy {
  justify-items: start;
  width: min(100%, 720px);
  margin-inline: auto;
}
.st-box {
  --b: clamp(120px, 20svh, 200px);
  position: relative;
  display: grid;
  gap: var(--space-4);
  width: 100%;
  margin-top: calc(var(--b) * 0.95);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow:
    0 0 0 1px var(--hair-strong),
    0 24px 48px -24px rgba(15, 14, 18, 0.18);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.3s var(--ease);
}
.st-box:hover {
  box-shadow:
    0 0 0 1px var(--ink),
    0 24px 48px -24px rgba(15, 14, 18, 0.24);
}
.st-box-words {
  min-height: 2.8em;
  font: 400 20px / 1.4 var(--sans);
  color: var(--soft);
  text-wrap: pretty;
}
.st-box[data-typing] .st-box-words {
  color: var(--ink);
}
.js .st-keep[data-live] .st-box-words::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: -0.18em;
  animation: st-caret 1s steps(2, jump-none) infinite;
}
@keyframes st-caret {
  to {
    opacity: 0;
  }
}
.st-box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.st-box-add {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--hair-strong);
  color: var(--muted);
}
.st-box-add .icon {
  width: 18px;
  height: 18px;
}
.st-box .btn .icon {
  width: 16px;
  height: 16px;
  margin-left: var(--space-2);
}
.st-box .st-perch {
  top: calc(-1 * var(--b) * 1.0537);
  right: var(--space-6);
  width: var(--b);
}
.st-keep .st-free {
  margin: 0;
}

/* ── Phones ────────────────────────────────────────────────────────────────────────────────────────────────────── */

@media (max-width: 759.98px) {
  .st {
    --bar: 56px;
    --st-poster: min(21.5vw, 10.4svh);
    --st-poster-2: min(14vw, 8svh);
    --st-head: 26px;
    --bird: clamp(130px, 21svh, 195px);
    --stage: 440px;
  }
  :root:is(:lang(zh), :lang(ja), :lang(ko)) .st {
    --st-poster: min(20vw, 11svh);
    --st-poster-2: min(11vw, 8svh);
  }
  .st-bar {
    grid-template-columns: 1fr auto;
    align-content: start;
    gap: var(--space-2);
    padding-top: var(--space-2);
  }
  .st-wire {
    grid-column: 1 / -1;
    order: -1;
    gap: 4px;
  }
  /* The menu keeps its 44px tap target without making the brand's row taller. */
  .st-end {
    margin: -14px -8px -14px 0;
  }
  .st-wire button,
  .st-wire button[aria-current] {
    flex: 1;
    width: auto;
    height: 16px;
  }
  .st-wire button[aria-current] {
    flex: 2.6;
  }
  .st-wire button::before,
  .st-wire button::after {
    inset: 7px 0;
  }
  .st-wire span {
    display: none;
  }
  .st-cta {
    display: none;
  }
  .st-dock {
    position: fixed;
    z-index: 35;
    right: var(--space-4);
    bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
    left: var(--space-4);
    display: flex;
    box-shadow: 0 12px 32px -8px rgba(15, 14, 18, 0.3);
    transition:
      translate 0.6s var(--ease-settle),
      opacity 0.3s,
      background-color 0.3s,
      color 0.3s;
  }
  .st:is([data-scene="hook"], [data-scene="keep"]) .st-dock {
    translate: 0 140%;
    opacity: 0;
    pointer-events: none;
  }
  .st-in {
    padding: calc(var(--bar) + var(--space-2)) var(--pad) var(--space-6);
  }
  .st-split,
  .st-get .st-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: var(--space-4);
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  .st-col,
  .get-head {
    gap: var(--space-3);
  }
  .hook-copy {
    gap: var(--space-3);
  }
  .hook-ask {
    gap: var(--space-4);
  }
  /* Under the way in, so Starling has the right of the row to itself. */
  .hook-ask .st-free,
  .keep-copy .st-free {
    flex-basis: 100%;
    margin-top: calc(-1 * var(--space-2));
  }
  .st-hook {
    --cue: calc(44px + env(safe-area-inset-bottom));
  }
  .st-cue {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    font-size: 14px;
  }
  /* The four steps fold to their discs; the one that is on keeps its words. */
  .st-steps {
    grid-template-columns: repeat(4, auto) minmax(0, 1fr);
    align-items: start;
    gap: var(--space-2);
    margin-top: 0;
  }
  .st-steps li {
    display: contents;
  }
  .st-steps button {
    grid-row: 1;
    grid-template-columns: 24px;
    width: auto;
    padding: var(--space-2) 0;
  }
  .st-steps li:nth-child(1) button {
    grid-column: 1;
  }
  .st-steps li:nth-child(2) button {
    grid-column: 2;
  }
  .st-steps li:nth-child(3) button {
    grid-column: 3;
  }
  .st-steps li:nth-child(4) button {
    grid-column: 4;
  }
  .st-steps button :is(b, span) {
    display: none;
  }
  .st-steps li button[aria-pressed="true"] {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }
  .st-steps button[aria-pressed="true"] :is(b, span) {
    display: block;
    grid-column: 1;
  }
  .st-steps button[aria-pressed="true"]::before {
    display: none;
  }
  .st-steps li::before {
    content: none;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: var(--space-2) 0;
    border-radius: 50%;
    background: var(--ink);
    font: 500 12px / 1 var(--mono);
    color: var(--paper);
  }
  .st-scene[data-step="0"] .st-steps li:nth-child(1)::before {
    content: "1";
    grid-column: 1;
  }
  .st-scene[data-step="1"] .st-steps li:nth-child(2)::before {
    content: "2";
    grid-column: 2;
  }
  .st-scene[data-step="2"] .st-steps li:nth-child(3)::before {
    content: "3";
    grid-column: 3;
  }
  .st-scene[data-step="3"] .st-steps li:nth-child(4)::before {
    content: "4";
    grid-column: 4;
  }
  .st-steps b {
    font-size: 18px;
  }
  .st-asks {
    gap: var(--space-2);
    margin-top: 0;
  }
  .st-asks button {
    max-width: 100%;
    padding: 10px 14px;
    font-size: 15px;
  }
  .st-asks button:not([aria-pressed="true"]) q {
    display: block;
    overflow: hidden;
    max-width: 16em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .st-asks button:not([aria-pressed="true"]) {
    padding: 6px 12px;
    font-size: 13px;
  }
  .st-asks button[aria-pressed="true"] {
    transform: none;
  }
  .st-title {
    font-size: 15px;
  }
  .desk .st-sheet {
    top: 30cqh;
    left: 0;
  }
  .desk .src-rec {
    top: 0;
    width: 68cqw;
    padding: 10px 14px;
  }
  .src-video {
    width: 46cqw;
  }
  .src-photo {
    width: 30cqw;
  }
  .desk .st-credit {
    left: 0;
  }
  .desk .st-perch {
    --b: 34cqw;
    top: calc(30cqh - var(--b) * 1.0537);
    right: -2cqw;
  }
  .desk-set:not([data-set="1"]),
  .desk .st-perch:not([data-on="1"]) {
    translate: 0 9cqh;
  }
  .st-stage {
    align-self: center;
  }
  /* The bench stacks from the foot: the note, the sheet, and above the sheet whatever room is left for the recording,
     the printed score and Starling. On a short screen the page shows more bars, smaller, so the sheet gives room. */
  .bench {
    --inner: calc(100cqw - 2 * clamp(14px, 5cqw, 36px));
    --track: clamp(var(--inner), (100cqh - 224px) * 4.345, 2 * var(--inner));
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 20px;
  }
  .bench-rec,
  .bench-ref,
  .bench .st-perch {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    grid-area: 1 / 1;
    align-self: end;
  }
  .bench-rec {
    justify-self: start;
    width: 66cqw;
    margin-bottom: 14px;
    padding: 10px 14px;
  }
  .bench-ref {
    display: flex;
    flex-direction: column;
    justify-self: start;
    width: 34cqw;
    max-height: calc(100% - 8px);
    margin-bottom: 8px;
    padding: 6px 6px 8px;
  }
  .bench-ref img {
    flex: 0 1 auto;
    min-height: 0;
    object-fit: cover;
    object-position: 50% 0;
  }
  .bench-ref figcaption {
    flex: none;
    margin-top: 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  .bench-doubt {
    margin-top: 30px;
  }
  .bench-ref figcaption span {
    display: none;
  }
  .bench .st-perch {
    --b: 34cqw;
    justify-self: end;
    margin: 0 -2cqw calc(var(--b) * -0.129) 0;
  }
  .bench .st-perch[data-on="2"] {
    right: auto;
    margin-right: calc(32cqw - 10px);
  }
  .st-benchsheet {
    position: relative;
    top: auto;
    grid-area: 2 / 1;
  }
  .bench-score {
    overflow-x: clip;
  }
  .bench-track {
    width: var(--track);
    transition: transform 0.6s var(--ease);
  }
  .st-how:is([data-step="2"], [data-step="3"]) .bench-track {
    transform: translateX(calc(var(--inner) - var(--track)));
  }
  .st-how[data-step="2"] .bench-track {
    transition: transform 1.5s var(--ease) 1.3s;
  }
  .wave-box {
    height: 30px;
    margin-top: var(--space-2);
  }
  .player {
    align-self: center;
    gap: var(--space-3);
  }
  .st-playsheet {
    padding: 12px 14px;
  }
  .player-bar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-2) var(--space-4);
  }
  .player-switch {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .st-play {
    width: 48px;
    height: 48px;
  }
  .player {
    --b: 26vw;
  }
  .st-get .st-perch {
    right: 0;
  }
  /* The easel stacks from the foot too; Starling is as large as the room above the sheet allows. */
  .easel {
    --b: clamp(84px, (100cqh - 236px) / 1.06, 34cqw);
    align-content: end;
    gap: var(--space-3);
    padding-top: 0;
  }
  .easel-files {
    flex-wrap: nowrap;
    gap: var(--space-2);
    min-height: 50px;
  }
  .file-tile {
    flex: 1 1 0;
    gap: var(--space-2);
    min-width: 0;
    padding: 6px 8px 6px 6px;
    font-size: 12.5px;
  }
  .file-tile b {
    flex: none;
    width: 30px;
    height: 38px;
    font-size: 10px;
  }
  .file-tile span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .easel .st-perch {
    right: -2cqw;
  }
  .keep-copy {
    align-content: start;
    gap: var(--space-4);
    padding-top: 5svh;
  }
  .keep-copy .st-poster {
    --st-poster: min(27vw, 15svh);
  }
  :root:is(:lang(zh), :lang(ja), :lang(ko)) .keep-copy .st-poster {
    --st-poster: min(21vw, 13svh);
  }
  .st-again {
    bottom: var(--space-3);
  }
}

/* Phones, the opening: the headline over the river, which runs down past the docked way in. */
@media (max-width: 759.98px) {
  .st-hook {
    --cue: calc(100px + env(safe-area-inset-bottom));
  }
  .st-hook .st-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: var(--space-3);
    padding-bottom: var(--cue);
  }
  .st-hook .hook-copy {
    gap: var(--space-2);
    padding-top: var(--space-1);
  }
  .st-hook .st-poster,
  :root:is(:lang(zh), :lang(ja), :lang(ko)) .st-hook .st-poster {
    --st-poster: min(11.4vw, 7.4svh);
  }
  .st-hook .hook-ask {
    display: none;
  }
  .st-say {
    padding: 10px 14px;
    font-size: 15px;
  }
  /* The river takes the screen from under the headline to the edges and down past the docked way in, fading under
     it. */
  .rv {
    --rv-w: min(76vw, 310px);
    margin: 0 calc(-1 * var(--pad)) calc(-1 * var(--cue));
  }
  .js .rv::before {
    height: 7%;
    background: linear-gradient(var(--paper), transparent);
  }
  .js .rv::after {
    height: 32%;
    background: linear-gradient(transparent, var(--paper) 62.5%);
  }
  .rv-say {
    max-width: calc(var(--rv-w) * 0.78);
    padding: 8px 12px;
    font-size: 14px;
  }
  .rv-foot {
    margin-top: var(--space-2);
    font-size: 11px;
  }
  .st-hook .st-label {
    display: none;
  }
  /* The way on sits over the docked way in and says what to do. */
  .st-cue {
    right: var(--space-4);
    bottom: calc(var(--space-3) + 48px + env(safe-area-inset-bottom));
    left: var(--space-4);
    height: 36px;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 13px;
    color: var(--muted);
  }
  .st.is-ready .st-cue,
  .st.is-ready[data-move="start"] .st-cue {
    animation: st-appear 0.6s linear 1.2s both;
  }
  .st[data-scene="hook"] .st-dock {
    translate: none;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Phones: what is sent, the run and the request box. */
@media (max-width: 759.98px) {
  /* The visitor speaks from the right, as in a chat; Starling answers below. */
  .st-asks {
    justify-items: end;
  }
  .st-asks button,
  :is(.st-col, .get-head) > .st-say {
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg);
  }
  .st-scene[data-ask] .st-asks button[aria-pressed="false"] {
    transform: none;
  }
  :is(.st-col, .get-head) > .st-say {
    justify-self: end;
    max-width: 100%;
    padding: 10px 14px;
    font-size: 15px;
  }
  .st-sends button:not([aria-pressed="true"]) .ask-file {
    display: none;
  }
  /* The run is one line of status under the request: the four discs, then what Starling is doing now. */
  .st-how .st-steps li button[aria-pressed="true"] {
    grid-column: 5;
    grid-row: 1;
    align-self: center;
    padding-left: var(--space-2);
  }
  .st-how .st-steps button[aria-pressed="true"] span {
    display: none;
  }
  .st-how .st-steps b {
    font-size: 16px;
  }
  /* Beside Starling, who sits at the sheet's corner. */
  .st-get .get-head > .st-say {
    margin-right: 88px;
  }
  .st-scene.st-how .st-steps li::before {
    background: var(--accent);
    color: var(--white);
  }
  .st-how[data-live] .st-steps li::before {
    animation: st-beat 1.4s var(--ease) infinite;
  }
  .st-keep .st-in {
    padding-bottom: 64px;
  }
  .st-keep .keep-copy {
    align-content: center;
    padding-top: 0;
  }
  .st-box {
    --b: clamp(80px, 13svh, 110px);
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .st-box-words {
    min-height: 4.2em;
    font-size: 17px;
  }
  .st-box .st-perch {
    right: var(--space-3);
  }
}

/* ── Reduced motion: every scene rests on its end frame ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .st *,
  .st *::before,
  .st *::after {
    animation: none !important;
    transition: none !important;
  }
  .st-in {
    opacity: 1;
    transform: none;
  }
  .js .timed :is(.note, .with-note) {
    opacity: 1;
  }
  .wave-head {
    display: none;
  }
}
