/* waveidea.ai: the homepage, /waitlist and the 404 page, on site-tokens.css.
   The world is a song's lyric sheet: white paper and ink. A voice note is the
   draft (ruled draft paper, marked in purple pen) and the song is printed
   beside it. On the first screen the chorus, printed huge in pale print ink,
   is the background; the page closes on a sheet of draft paper waiting for
   the visitor's own words. The landing's DESIGN.md documents the system and
   its numbers. */

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  scrollbar-color: var(--surface-mid) var(--paper);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
/* Controls with their own press feedback drop the mobile tap flash. */
button, .site-nav__links a, .site-nav__join, .social a, .button-link { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--pen); color: var(--on-action); }
input { caret-color: var(--pen); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }
/* The skip link's target: focus lands in main, which needs no ring of its own. */
main:focus { outline: none; }

[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: var(--z-skip); top: 12px; left: 12px;
  padding: 12px 18px; border-radius: var(--radius-card);
  background: var(--paper); color: var(--ink);
  font-weight: 500; text-decoration: none;
  transform: translateY(-160%);
}
/* Instant: a key brings it. Its shadow comes with it, or it would show above the page. */
.skip-link:focus-visible { transform: translateY(0); box-shadow: var(--shadow-lift); }

/* ---- Header: the sheet's running head ----------------------------------- */
.site-header {
  position: fixed; z-index: var(--z-header); inset: 0 0 auto;
  height: var(--header-h); padding-inline: var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-8);
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-logo { display: inline-flex; flex: none; } /* the logo never shrinks for the controls */
.site-logo img { height: 28px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--space-3); }
/* The links and the action: in the header on desktop, a panel on phones. */
.site-menu { display: flex; align-items: center; gap: var(--space-2); }
.site-nav .menu-toggle { display: none; }
.site-nav__links { display: flex; gap: var(--space-1); }
.site-nav__links a {
  display: block; padding: 10px 14px; border-radius: 10px;
  font-size: var(--text-label); font-weight: 500; line-height: 1; text-decoration: none;
  transition: background-color var(--dur-ui-2) var(--ease-color), transform var(--dur-press) var(--ease-out);
}
.site-nav__links a:active { transform: scale(0.97); }
.site-nav__join {
  display: inline-flex; align-items: center; height: 40px; margin-left: var(--space-2); padding: 0 18px;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--paper);
  font-size: var(--text-label); font-weight: 500; text-decoration: none;
  transition: transform var(--dur-press) var(--ease-out);
}
.site-nav__join:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .site-nav__links a:hover { background: var(--draft); }
}

/* ---- Pills, chips, play buttons ----------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--space-3); height: 36px; padding: 0 16px;
  border: 1.5px solid var(--surface-mid); border-radius: var(--radius-pill); background: var(--paper);
  font-size: var(--text-label); font-weight: 500; line-height: 1; color: var(--ink); white-space: nowrap;
}
/* A pill's pressed or selected edge changes at once (a key may have made it);
   the colour eases only while a pointer hovers. */
button.pill { cursor: pointer; transition: transform var(--dur-press) var(--ease-out); }
button.pill:active { transform: scale(0.97); }
button.pill[aria-pressed="true"], button.pill[aria-selected="true"] { border-color: var(--pen); }
@media (hover: hover) and (pointer: fine) {
  button.pill:hover { transition: transform var(--dur-press) var(--ease-out), border-color var(--dur-ui-2) var(--ease-color); }
  button.pill:not([aria-pressed="true"], [aria-selected="true"]):hover { border-color: var(--soft-blue); }
}
/* A second action: ink, so the gradient stays the one primary action. */
.cta-link {
  display: inline-flex; align-items: center; height: 52px; padding: 0 24px;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--paper);
  font-size: 1.0625rem; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-out);
}
.cta-link:active { transform: scale(0.97); }
.pill--style { height: 28px; padding: 0 12px; font-size: var(--text-small); border-color: var(--pen); }

.play {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--ink); color: var(--on-action); cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out);
}
.play svg { width: 14px; height: 14px; margin-left: 2px; }
.play:active { transform: scale(0.95); }
.play--grad { background: var(--grad); }
.play:disabled { cursor: not-allowed; opacity: 0.55; }
.play:disabled:active { transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: var(--space-5); padding: 6px 18px 6px 6px;
  border: 1px solid var(--rule); border-radius: var(--radius-pill); background: var(--paper);
  font-size: 1rem; font-weight: 500; line-height: 1; color: var(--ink); white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out);
}
.chip .play { width: 32px; height: 32px; }
.chip .play svg { width: 12px; height: 12px; }
.chip:active { transform: scale(0.97); }
.chip .play:active { transform: none; } /* the chip already scales its circle */
.chip:disabled { cursor: not-allowed; }
.chip:disabled:active { transform: none; }

/* ---- The draft: a voice note on ruled paper, marked in pen --------------- */
/* Phase 3 draws the pen by hand; this static version reads without script:
   chatter struck, story ringed, the style it asked for boxed, and a small
   number on each ringed word that reappears on its place in the chorus. */
.draft {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-6);
  padding: var(--space-7) var(--space-8) var(--space-8);
  border-radius: var(--radius-card); background: var(--draft);
}
.said p {
  font-size: var(--text-said); line-height: 1.75; color: var(--ink-muted);
  /* One ruled line under every line of the transcript. */
  background: linear-gradient(to bottom, transparent calc(1.75em - 1px), var(--draft-rule) calc(1.75em - 1px), var(--draft-rule) 1.75em) 0 0 / 100% 1.75em;
}
/* Agentic's ramble, set large: the pen's strokes grow with the type, so the strike reads at a glance. */
.said--large p { font-size: clamp(1.25rem, 0.8rem + 1.9vw, 2.25rem); }
.said del { text-decoration: line-through 2px var(--pen); }
.said mark { background: none; color: var(--ink); border-radius: 0.6em; box-shadow: 0 0 0 1.5px var(--pen); padding: 0 0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.said .style-ask { color: var(--ink); outline: 1.5px dashed var(--pen); outline-offset: 2px; border-radius: 4px; }
/* Muted ink, not Soft Blue: on draft paper Soft Blue is 4.2 : 1 at 13 px. */
.said figcaption { margin-top: var(--space-3); font-size: var(--text-fine); color: var(--ink-muted); }
.n { margin-left: 0.15em; font-size: 0.62em; font-weight: 600; line-height: 0; vertical-align: 0.75em; color: var(--pen); font-variant-numeric: tabular-nums; }

/* ---- A song, printed ----------------------------------------------------- */
.cover {
  position: relative; width: var(--cover, 300px); aspect-ratio: 1; border-radius: var(--radius-cover); overflow: hidden;
  box-shadow: var(--shadow-cover);
  background:
    radial-gradient(60% 55% at 30% 30%, #f6c9e8 0 40%, transparent 70%),
    radial-gradient(55% 60% at 75% 70%, #bfeee1 0 35%, transparent 72%),
    radial-gradient(70% 70% at 60% 25%, #d8cff8 0 30%, transparent 75%), #efe9fb;
}
.cover--small { --cover: 120px; }
/* Real cover art fills its square; the paper shows only while it loads. */
.cover:has(picture) { background: var(--draft); }
.cover > picture, .cover img { display: block; width: 100%; height: 100%; }
.cover img { object-fit: cover; }
.kept { text-decoration: underline 0.09em var(--pen); text-underline-offset: 0.16em; text-decoration-skip-ink: none; }
/* The pen on the lower page (edit.js): a phrase a section, marked as it
   arrives. Without script only the word the Plans title turns on is marked,
   in print; while script runs nothing printed stands there, so the pen never
   hands over. The print comes back by itself 2.5 s after first paint unless
   the pen has started in time (html.pen-live), and at once when the pen fails
   to load or starts too late to draw (html.pen-off). An underlined phrase
   keeps its sentence's ink: an ink phrase underlined in a muted sentence is
   how this page draws a link. A ringed word takes ink like a draft's story
   word, and a little more room after it, so its ring stays off the next word. */
.pen-mark[data-pen="ring"] { color: var(--ink); margin-right: 0.25em; }
.underlined { text-decoration: underline 0.09em var(--pen); text-underline-offset: 0.16em; text-decoration-skip-ink: none; }
.js .underlined { text-decoration-color: transparent; animation: hold-line var(--dur-ui-3) linear 2.5s forwards; }
.pen-live .underlined { animation: none; }
.pen-off .underlined { animation: none; text-decoration-color: var(--pen); }
/* A kept word and its number never part at a line end. */
.nb { white-space: nowrap; }

.song-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-6) var(--space-7); align-items: center;
  padding: var(--space-7); border: 1px solid var(--rule); border-radius: var(--radius-print); background: var(--paper);
}
/* The title sits beside the cover; the sung lines, the seek line and the
   credits run the panel's width under them, as the hero's chorus does: four
   lines beside the cover would wrap and leave a word alone on a line. */
.song-card__body { display: contents; }
.song-card__lyrics, .song-card .seek, .song-card .credits { grid-column: 1 / -1; }
/* A song shown without its cover (the owner's choice) sets its title across the panel. */
.song-card:not(:has(> .cover)) { grid-template-columns: minmax(0, 1fr); }
/* The play button and the title share a row (a long title wraps beside the
   button, never under it); a style pill sits under the title. */
.song-card__title { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-3) var(--space-4); font-size: var(--text-h3); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.song-card__title .pill { grid-column: 2; justify-self: start; }
.song-card__lyrics { display: grid; gap: 2px; font-size: var(--text-lyric); font-weight: 600; line-height: var(--leading-lyric); letter-spacing: var(--track-lyric); }
/* One sung line a paragraph: a line too long for the panel splits evenly. */
.song-card__lyrics p, .chorus p { text-wrap: balance; }
/* Credits, set like a release's liner notes: the maker on its own line, then
   one short line a fact, its label in muted ink and its value in ink, the
   values aligned in one column. */
.credits { font-size: var(--text-fine); line-height: 1.45; color: var(--ink-muted); }
.credits__head { display: block; font-weight: 500; color: var(--ink); }
.credits__rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--space-6); margin-top: 2px; font-variant-numeric: tabular-nums; }
.credits__rows > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.credits__rows dd { color: var(--ink); }
.said__fold { display: none; }
.song-card .credits { padding-top: var(--space-4); border-top: 1px solid var(--rule); }

/* The hero's song: the chorus printed across the panel under its title. */
.song-card--hero { align-items: center; }
.song-card--hero .chorus, .song-card--hero .credits { grid-column: 1 / -1; }
/* Its credits keep the panel short: the facts stand side by side, each
   label over its value. */
.song-card--hero .credits__rows { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max-content; column-gap: var(--space-9); }
.song-card--hero .credits__rows > div { display: block; grid-column: auto; }
/* The chorus runs under the cover and title at every width: its four lines
   ("Miso, scratches through the mood") would wrap beside the cover and
   leave a word alone on a line. */
.chorus { display: grid; gap: 2px; font-size: var(--text-lyric); font-weight: 600; line-height: var(--leading-lyric); letter-spacing: var(--track-lyric); }

/* ---- Placeholders (counted by the routine; none may ship) --------------- */
.ph-tag {
  display: inline-block; padding: 3px 7px; border-radius: 6px; background: #fff3c4; color: #5a4200;
  font-size: 11px; font-weight: 500; line-height: 1.2; letter-spacing: 0; white-space: nowrap; vertical-align: middle;
}
.cover > .ph-tag { position: absolute; left: 8px; bottom: 8px; }

/* ---- The print: the song's chorus as one huge pale line across the first
   screen, set from the text column's edge and running off the page. Past the
   craft floor's 6 rem display cap on purpose: it is the ground, not a heading.
   It is SVG text: still text (phase 3 lights each word), decoration to
   assistive tech and to contrast checkers, which WCAG 1.4.3 exempts. */
.print {
  grid-area: print; z-index: var(--z-print); position: relative;
  font-size: clamp(4.25rem, 0.5rem + 12.5vw, 13rem); font-weight: 600; letter-spacing: -0.045em;
  pointer-events: none; user-select: none;
}
.print__track { position: relative; }
.print__sheet { display: block; width: 100%; height: 0.95em; overflow: visible; fill: var(--print); }
/* The hero's print is the first screen's ground: one chorus line a page, in
   two rows, set from the text column's edge behind the copy and the demo, at
   the row's foot; the song panel lies over its right end. As the song sings,
   each word deepens from print ink to sung ink, which every text on the page
   keeps 4.5 : 1 over, and the print turns to the next line as each line ends
   (edit.js). Opacity and colour only: nothing on it moves. Without script
   the first line stands. */
.print--hero { grid-area: 1 / 1 / 2 / -1; align-self: end; }
.print--hero .print__sheet { height: 1.83em; }
/* A turn: the old line is gone in 120 ms, the new one is in over 200 ms, so two
   huge lines never stand at half strength together. A word deepens as the
   panel's chorus lights it (120 ms, the colour ease). */
.print--hero .print__page { opacity: 0; transition: opacity var(--dur-ui-1) linear; }
.print--hero .print__page.is-shown { opacity: 1; transition-duration: var(--dur-ui-3); }
.print--hero .print__w { transition: fill var(--dur-ui-1) var(--ease-color); }
.print--hero .print__w.is-sung { fill: var(--print-sung); }

/* ---- Phase 3: the pen, the numbers, the karaoke (edit.js) ------------------ */
.said, .chorus, .song-card__lyrics, .pen-on { position: relative; }
.pen {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
  fill: none; stroke: var(--pen); stroke-linecap: round; stroke-linejoin: round;
}
/* The pen draws the marks; the printed ones step aside, keeping their boxes so nothing moves. */
/* Where the printed marks were already on screen when the pen took over (a
   module that arrived late, a jump to a section, a reload part-way down), they
   hand over by a short cross-fade (.pen-swap on that draft or song, set by
   edit.js for a moment); everywhere else the swap happens unseen, and a panel
   switch stays instant. */
.pen-swap .said del, .pen-swap .kept { transition: text-decoration-color var(--dur-ui-3) linear; }
.pen-swap .said mark { transition: box-shadow var(--dur-ui-3) linear; }
.pen-swap .said .style-ask { transition: outline-color var(--dur-ui-3) linear; }
.pen-swap .pen { animation: pen-in var(--dur-ui-3) linear; }
.pen-swap .n { transition: opacity var(--dur-ui-3) linear; }
.pen-swap .chorus { transition: color var(--dur-ui-3) linear; }
@keyframes pen-in { from { opacity: 0; } }
.said.pen-on del { text-decoration-color: transparent; }
.said.pen-on mark { box-shadow: none; }
.said.pen-on .style-ask { outline-color: transparent; }
.pen-on .kept { text-decoration-color: transparent; }
/* A number never starts a line: a word joiner ties it to the word it follows
   (generated content, so the karaoke's word count never sees it). */
.n::before { content: "\2060"; }
/* The karaoke: muted ink until sung, the pen's colour while sung, then ink. */
.chorus .w, .song-card__lyrics .w { transition: color var(--dur-ui-1) var(--ease-color); }
.is-singing .w { color: var(--ink-muted); }
.is-jump .w { transition: none; } /* a key or an idle seek: the words change at once */
.is-singing .w.is-now { color: var(--pen); }
.is-singing .w.is-sung { color: var(--ink); }

/* The first viewport's edit. With script, the page's head holds the hero's
   marks, numbers, underlines and chorus ink back for the pen
   (html.edit-pending), which draws them, or under Reduce Motion fades them in
   once; if the pen never comes, they return by themselves 2.5 s after first
   paint. */
.edit-pending .hero .said del { text-decoration-color: transparent; animation: hold-line var(--dur-ui-3) linear 2.5s forwards; }
.edit-pending .hero .said mark { box-shadow: none; animation: hold-ring var(--dur-ui-3) linear 2.5s forwards; }
.edit-pending .hero .said .style-ask { outline-color: transparent; animation: hold-box var(--dur-ui-3) linear 2.5s forwards; }
.edit-pending .hero .kept { text-decoration-color: transparent; animation: hold-line var(--dur-ui-3) linear 2.5s forwards; }
.edit-pending .hero .n { opacity: 0; animation: hold-number var(--dur-ui-3) linear 2.5s forwards; }
.edit-pending .hero .chorus { color: var(--ink-muted); animation: hold-ink var(--dur-ui-3) linear 2.5s forwards; }
@keyframes hold-line { to { text-decoration-color: var(--pen); } }
@keyframes hold-ring { to { box-shadow: 0 0 0 1.5px var(--pen); } }
@keyframes hold-box { to { outline-color: var(--pen); } }
@keyframes hold-number { to { opacity: 1; } }
@keyframes hold-ink { to { color: var(--ink); } }

/* ---- The players (demo-audio.js) --------------------------------------------- */
.play, .chip .play { position: relative; }
.js .play:disabled, .js .chip:disabled { cursor: default; opacity: 1; }
.i-pause, [data-state="playing"] .i-play { display: none; }
[data-state="playing"] .i-pause { display: inline; }
[data-state="playing"] svg { margin-left: 0; }
/* Loading: a pen-coloured arc runs round the button. */
[aria-busy="true"].play::after, [aria-busy="true"] .play::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--pen); border-right-color: var(--pen);
  animation: spin var(--dur-n-3) linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes busy { from { opacity: 0.35; } }
[data-state="error"].play, [data-state="error"] .play { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--pen); }

/* The seek line: a print rule that fills with ink as the song plays. */
.seek { display: flex; align-items: center; gap: var(--space-5); min-width: 0; }
html:not(.js) .seek { display: none; }
.song-card--hero .seek { grid-column: 1 / -1; }
.js .seek + .credits { padding-top: 0; border-top: 0; }
.seek__bar {
  --p: 0; flex: 1; min-width: 0; height: 32px; margin: -6px 0; padding: 0;
  background: none; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.seek__bar:disabled { cursor: default; }
.seek__bar::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; background: linear-gradient(to right, var(--ink) calc(var(--p) * 100%), var(--rule) 0); }
.seek__bar::-moz-range-track { height: 2px; border-radius: 1px; background: var(--rule); }
.seek__bar::-moz-range-progress { height: 2px; border-radius: 1px; background: var(--ink); }
.seek__bar::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--ink);
  opacity: 0; transform: scale(0.9); transition: opacity var(--dur-ui-2) var(--ease-color), transform var(--dur-ui-2) var(--ease-out);
}
.seek__bar::-moz-range-thumb {
  width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--ink);
  opacity: 0; transform: scale(0.9); transition: opacity var(--dur-ui-2) var(--ease-color), transform var(--dur-ui-2) var(--ease-out);
}
.seek.is-ready .seek__bar::-webkit-slider-thumb { opacity: 1; transform: none; }
.seek.is-ready .seek__bar::-moz-range-thumb { opacity: 1; transform: none; }
.seek__bar:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 6px; }
.seek__time { flex: none; font-size: var(--text-fine); line-height: 1; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seek__time:empty { display: none; }

/* Phones: the hero's draft shows the part of the note the chorus keeps, marked,
   so the edit reads on the first screen; its tail (and the tail's marks) folds
   behind an ellipsis until the voice note plays and opens it (demo-audio.js),
   the song and the form sliding down to make room. */
@media (max-width: 899px) {
  .hero__demo .said p { font-size: var(--text-small); }
  .hero__demo .draft:not(.is-open) .said__more { display: none; }
  .hero__demo .draft:not(.is-open) .said__fold { display: inline; }
  .hero__demo .said figcaption { display: none; }
}
html.vt-hero .hero .draft { view-transition-name: hero-draft; }
html.vt-hero .hero .song-card--hero { view-transition-name: hero-song; }
html.vt-hero .hero .print { view-transition-name: hero-print; }
html.vt-hero .hero__copy { view-transition-name: hero-copy; }
html.vt-hero::view-transition-group(*) { animation-duration: var(--dur-n-1); animation-timing-function: var(--ease-in-out); } /* moves on screen */
html.vt-hero::view-transition-old(hero-draft), html.vt-hero::view-transition-new(hero-draft) { animation-duration: calc(var(--dur-n-1) * 2 / 3); animation-timing-function: linear; }

/* Touch: every control answers a 44 px fingertip, without moving the layout. */
@media (pointer: coarse) {
  button.pill, .site-nav__join { position: relative; }
  .play[data-audio]::before, button.pill::before, .site-nav__join::before { content: ""; position: absolute; inset: -4px; }
  .seek__bar { height: 44px; margin-block: -12px; }
}

/* Between the homepage, /waitlist and the 404, the page cross-fades under a
   header that stays put (a cross-document view transition; browsers without
   it simply load the page). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation-duration: var(--dur-ui-1); animation-timing-function: linear; }
::view-transition-new(root) { animation-duration: var(--dur-ui-3); animation-timing-function: linear; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Hover, where a pointer can hover: a quiet answer before the press. The ink
   actions lift toward the pen, the gradient brightens, a voice note's chip
   takes the pen's edge, and a ready seek line shows its knob. */
@media (hover: hover) and (pointer: fine) {
  .site-nav__join, .cta-link { transition: background-color var(--dur-ui-2) var(--ease-color), transform var(--dur-press) var(--ease-out); }
  .site-nav__join:hover, .cta-link:hover { background: color-mix(in srgb, var(--ink), var(--pen) 22%); }
  .join__button, .play--grad { transition: filter var(--dur-ui-2) var(--ease-color), transform var(--dur-press) var(--ease-out), opacity var(--dur-ui-3) var(--ease-color); }
  .join__button:not(:disabled):hover, .play--grad:not(:disabled):hover { filter: brightness(1.07) saturate(1.1); }
  .chip { transition: transform var(--dur-press) var(--ease-out), border-color var(--dur-ui-2) var(--ease-color); }
  .chip:not(:disabled):hover { border-color: var(--pen); }
  .seek__bar:not(:disabled):hover::-webkit-slider-thumb { opacity: 1; transform: none; }
  .seek__bar:not(:disabled):hover::-moz-range-thumb { opacity: 1; transform: none; }
}

/* ---- 1. Hero --------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: clip; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--header-h) + var(--space-10)) var(--space-8);
}
.hero__inner {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "copy demo";
  align-items: center; gap: var(--space-9) var(--space-12);
}
.hero__copy { grid-area: copy; position: relative; z-index: var(--z-content); }
.hero__demo { grid-area: demo; position: relative; z-index: var(--z-content); }
.hero__title {
  display: flex; flex-direction: column; align-items: flex-start;
  font-size: var(--text-h1); font-weight: 600; line-height: var(--leading-display); letter-spacing: var(--track-display);
}
.hero__sub { max-width: var(--measure); margin-top: var(--space-8); font-size: var(--text-lead); }
.sub-short { display: none; }
.hero__copy .action { max-width: 560px; margin-top: var(--space-9); }
.hero__demo { display: grid; gap: var(--space-5); }
.hero--solo .hero__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy"; }
.hero--solo .hero__inner:has(> .print) { grid-template-areas: "copy" "print"; }
.hero--solo .hero__copy { max-width: 640px; }
.hero__ways { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-9); }

/* ---- The action (waitlist form, or the store badges after launch) ------- */
/* The launch switch (site-tokens.css): each wrapper is display: contents
   while its state is live, so its children keep their own layout, and
   display: none otherwise. A wrapper holds whole elements, never a styled
   one itself: display: contents would drop that element's own box. The
   fallbacks are the state before launch. With Google Play only, the waitlist
   block opens with that badge and a line for iPhone in one row, so the form
   stays in the first screen; the both-badges block after it is untouched. */
.launch-waitlist { display: var(--launch-waitlist, contents); }
.launch-before { display: var(--launch-before, contents); }
.launch-stores { display: var(--launch-stores, none); }
.launch-play-only { display: var(--launch-play-only, none); }
.launch-both { display: var(--launch-both, none); }
/* The field and the button share a row only where the field keeps room for
   a whole address; in a narrower column they stack. */
.action { container-type: inline-size; }
.join { display: flex; gap: var(--space-4); align-items: stretch; }
@container (max-width: 439px) {
  .join { flex-direction: column; gap: var(--space-3); }
  .join__button { width: 100%; }
}
.join__input {
  flex: 1 1 auto; min-width: 0; height: 60px; padding: 0 22px;
  border: 1.5px solid var(--surface-mid); border-radius: var(--radius-pill); background: var(--paper);
  font-size: 1.125rem; line-height: 1;
}
.join__input::placeholder { color: var(--ink-muted); }
/* The site's one focus ring (3 px purple), hugging the field; instant. */
.join__input:focus-visible { outline-offset: 0; border-color: var(--pen); }
.join__input[aria-invalid="true"] { border-color: var(--error-ink); }
/* White on the gradient is large text (24 px): 3.5–4.1 : 1 behind the label. */
.join__button {
  flex: 0 0 auto; height: 60px; padding: 0 28px; border: 0; border-radius: var(--radius-pill);
  background: var(--grad); color: var(--on-action); box-shadow: var(--shadow-action);
  font-size: var(--text-action); font-weight: 500; line-height: 1; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), opacity var(--dur-ui-3) var(--ease-color);
}
.join__button:active { transform: scale(0.97); }
.button-link { display: inline-flex; align-items: center; text-decoration: none; }
.join__button:disabled { cursor: progress; opacity: 0.7; }
/* The live region stays rendered (an empty one takes no space) so screen
   readers hear the first reply; each reply is a new element that enters. */
.join__status { margin-top: var(--space-5); font-weight: 500; }
.join__status:focus { outline: none; } /* focus lands here after joining; the reply itself is the change */
.join__status:empty { margin-top: 0; }
/* The rise eases out; its fade runs linear at two thirds of it. */
.join__reply { display: block; transition: opacity calc(var(--dur-ui-3) * 2 / 3) linear, translate var(--dur-ui-3) var(--ease-out); }
@starting-style { .join__reply { opacity: 0; translate: 0 4px; } }
.join__status--ok { color: var(--ink); }
.join__status--error { color: var(--error-ink); }
.join__fine { margin-top: var(--space-5); font-size: var(--text-small); color: var(--ink-muted); }
.join__fine a { color: var(--ink); }
.join__nojs { display: none; margin-top: var(--space-5); font-size: var(--text-small); color: var(--ink); }
html:not(.js) .join, html:not(.js) .join__fine { display: none; }
html:not(.js) .join__nojs { display: block; }
/* 16 px apart: Google asks for a quarter of the badge's height (56 px) of
   clear space round its badge. */
.store-badges { display: flex; gap: var(--space-6); flex-wrap: wrap; align-items: center; }
.store-badges a { display: inline-flex; -webkit-tap-highlight-color: transparent; transition: transform var(--dur-press) var(--ease-out); }
.store-badges a:active { transform: scale(0.97); }
.store-badges img { height: 56px; width: auto; }
/* With Google Play only: its badge, then the line that sends iPhone visitors
   to the form under the row. */
.store-badges--play-only { margin-bottom: var(--space-7); }
.store-badges__aside { flex: 1 1 8em; font-weight: 500; }

/* ---- Sections: printed pages, ruled apart -------------------------------- */
.section { padding-bottom: var(--section-gap); }
.section__inner {
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
  padding-top: var(--section-gap); border-top: 1px solid var(--rule);
}
.section__title {
  max-width: 18ch; font-size: var(--text-h2); font-weight: 600; line-height: var(--leading-heading);
  letter-spacing: var(--track-heading); text-wrap: balance;
}
.section__lead { margin-top: var(--space-7); max-width: var(--measure-wide); font-size: var(--text-lead); color: var(--ink-muted); }
.section__note { margin-top: var(--space-10); max-width: var(--measure-wide); color: var(--ink-muted); }
.section__note a, .section__lead a { color: var(--ink); }
.section__note.credits { margin-top: var(--space-8); font-size: var(--text-fine); }
.section__cta { margin-top: var(--space-9); }

/* ---- Switchers (moments, versions) -------------------------------------- */
/* Without script every panel shows, stacked under its title; with script one
   panel shows and the titles become tabs (js/site/switcher.js): a numbered
   track list for the moments, pills for the versions. */
.switcher { margin-top: var(--space-11); }
.switcher__list { display: none; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-7); }
.js .switcher__list { display: flex; }
.js .switcher .panel[hidden] { display: none; }
.js .switcher .panel__title { display: none; }
.panel + .panel { margin-top: var(--space-11); }
.js .panel + .panel { margin-top: 0; }
.panel__title { display: inline-flex; gap: var(--space-3); margin-bottom: var(--space-6); font-size: var(--text-h3); font-weight: 600; line-height: 1.1; }

/* The moments: an album's track list beside the track that plays. */
.js .switcher--tracks { display: grid; grid-template-columns: minmax(220px, 3fr) minmax(0, 9fr); gap: var(--space-10); align-items: start; }
.switcher--tracks .switcher__list { flex-direction: column; flex-wrap: nowrap; gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.track {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: baseline; column-gap: var(--space-4);
  width: 100%; padding: var(--space-6) var(--space-4); border: 0; border-bottom: 1px solid var(--rule);
  background: transparent; color: var(--ink); text-align: left; cursor: pointer;
  /* Selection changes at once (a key may have made it). A press tints the
     row: a scale would pull it off its own rule. */
}
.track:active { background: var(--draft); }
.track__n { font-size: var(--text-small); font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.track__name { font-size: var(--text-h3); font-weight: 600; line-height: 1.15; }
.track__song { grid-column: 2; margin-top: 4px; font-size: var(--text-small); color: var(--ink-muted); }
.track[aria-selected="true"] { background: var(--draft); }
.track[aria-selected="true"] .track__n, .track[aria-selected="true"] .track__name { color: var(--pen); }
@media (hover: hover) and (pointer: fine) {
  .track:not([aria-selected="true"]):hover .track__name { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
}

.pair { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-7); align-items: start; }
.pair--wide { margin-top: var(--space-11); }
/* Agentic: the request runs the whole column, and the song it became sits under it to the right. */
.agentic .pair--wide { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
.agentic .pair--wide > .song-card { width: min(100%, 680px); justify-self: end; }

/* ---- 6. How it works ---------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-9); margin-top: var(--space-11); counter-reset: step; }
.step { counter-increment: step; }
/* The app's own screens at their own shape (Relume timeline 19 keeps each step's image whole);
   a print rule draws the glass edge over the picture, the draft paper shows while it loads. */
.screen {
  display: block; aspect-ratio: 640 / 1310; width: min(100%, 260px); border-radius: 28px; overflow: hidden;
  background: var(--draft); outline: 1px solid var(--rule); outline-offset: -1px;
}
.screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.step__title { display: flex; align-items: baseline; gap: var(--space-4); margin-top: var(--space-7); font-size: var(--text-h3); font-weight: 600; line-height: 1.15; }
.step__title::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--ink); color: var(--on-action); font-size: 1rem; font-weight: 600; translate: 0 -0.12em; }
.step__text { margin-top: var(--space-3); max-width: 30ch; color: var(--ink-muted); }

/* ---- 7. Plans ----------------------------------------------------------- */
.plans__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7); margin-top: var(--space-11); }
/* Three columns of one printed table, ruled apart; on phones, one after another under a rule. */
.plan { padding: var(--space-8) 0; border-top: 1px solid var(--rule); }
.plan__name { font-size: var(--text-h3); font-weight: 600; line-height: 1.1; }
.plan__price { margin-top: var(--space-4); color: var(--ink-muted); }
.plan__amount { font-size: var(--text-h3); font-weight: 600; line-height: 1.1; color: var(--ink); margin-right: 4px; }
.plan__year { display: block; margin-top: 2px; font-size: var(--text-small); }
.plan__rows { margin-top: var(--space-7); }
.plan__rows > div { padding-block: var(--space-5); border-top: 1px solid var(--rule); }
.plan__rows dt { font-size: var(--text-small); color: var(--ink-muted); }
.plan__rows dd { margin-top: 2px; font-weight: 500; }
/* From 900 px the eight rows line up across the three plans (subgrid), so a
   row reads straight across however its values wrap. */
@media (min-width: 900px) {
  .plans__grid { grid-template-rows: auto auto repeat(8, auto); row-gap: 0; column-gap: 0; border-top: 1px solid var(--rule); }
  .plan { padding: var(--space-8) var(--space-8) 0; border-top: 0; }
  .plan:first-child { padding-left: 0; }
  .plan:last-child { padding-right: 0; }
  .plan + .plan { border-left: 1px solid var(--rule); }
  .plan { display: grid; grid-row: span 10; grid-template-rows: subgrid; }
  .plan__rows { display: grid; grid-row: span 8; grid-template-rows: subgrid; }
}

/* ---- 8. FAQ ------------------------------------------------------------- */
/* One column of open answers, read in order; from 1024 px the title stands
   to its left, so answers of very different lengths leave no holes. */
.faq__list { display: grid; gap: var(--space-9); margin-top: var(--space-11); }
.faq__item { padding-top: var(--space-8); border-top: 1px solid var(--rule); }
.faq__item h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.2; }
.faq__item p { margin-top: var(--space-4); max-width: var(--measure-wide); color: var(--ink-muted); }
@media (min-width: 1024px) {
  .faq .section__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: var(--space-12); align-items: start; }
  .faq .section__title { grid-row: 1 / span 2; }
  .faq__list, .faq .section__note { grid-column: 2; }
  .faq__list { margin-top: var(--space-4); }
}

/* ---- 9. Finale: the visitor's own draft, and the action ------------------- */
.finale { overflow: clip; }
.finale .section__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
/* The page closes on a print as it opens on one: "Talk or sing." huge
   and pale behind the title, from the column's left edge off the page. */
.finale__head { display: grid; place-items: center; width: 100%; }
.finale__head > *, .print--finale { grid-area: 1 / 1; }
.print--finale { width: 100%; }
.finale__title { position: relative; z-index: var(--z-content); }
.finale__title { font-size: var(--text-h1); font-weight: 600; line-height: var(--leading-display); letter-spacing: var(--track-display); }
/* The same draft paper as the voice notes, with one ruled line written on. */
.finale__card {
  width: min(100%, 640px); margin-top: var(--space-10); padding: var(--space-9); text-align: left;
  border-radius: var(--radius-card); background: var(--draft);
}
.finale__lead {
  margin-bottom: var(--space-7); font-size: var(--text-lead); line-height: 1.75;
  background: linear-gradient(to bottom, transparent calc(1.75em - 1px), var(--draft-rule) calc(1.75em - 1px), var(--draft-rule) 1.75em) 0 0 / 100% 1.75em;
}
/* js/site/qr.js (phase 3) draws the code in ink on paper into this slot. */
.handoff { display: none; align-items: center; gap: var(--space-7); margin-top: var(--space-8); padding-top: var(--space-8); border-top: 1px solid var(--rule); }
.handoff__code { flex: none; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rule); }
/* Drawn by qr.js as the finale nears; without script there is no code to scan. */
html:not(.js) .handoff__code { display: none; }
.handoff__code svg { width: 100%; height: 100%; fill: var(--ink); }
.handoff__text { font-size: var(--text-small); color: var(--ink-muted); }
@media (min-width: 900px) and (pointer: fine) { .handoff { display: flex; } }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--paper); }
.site-footer__inner {
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; padding-block: var(--space-12) var(--space-10);
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-8) var(--space-9); align-items: center;
}
.site-footer__logo img { height: 32px; width: auto; }
.social { display: flex; gap: var(--space-5); justify-self: end; }
.social a { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 1px var(--rule); transition: transform var(--dur-press) var(--ease-out); }
.social a:active { transform: scale(0.95); }
.legal ul { display: flex; gap: var(--space-8); }
.legal a { font-weight: 500; text-decoration: none; }
.datarep { display: flex; gap: var(--space-5); justify-self: end; }
.datarep img { width: 64px; height: 64px; }
.site-footer__copy { grid-column: 1 / -1; font-size: var(--text-small); color: var(--ink-muted); }
@media (hover: hover) and (pointer: fine) {
  .legal a:hover, .section__note a:hover { text-decoration: underline; }
}

/* ---- Below 1280: the hero's columns tighten ------------------------------ */
@media (max-width: 1279px) and (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: var(--space-10); }
}

/* ---- Phone composition (below 900 px) ----------------------------------- */
@media (max-width: 899px) {
  .site-logo img { height: 24px; }
  /* The header keeps Menu; the links and the action open as a panel. */
  .js .site-nav .menu-toggle { display: inline-flex; }
  html:not(.js) .site-nav { display: none; }
  .menu-toggle { height: 38px; font-size: var(--text-small); }
  .site-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--space-6);
    padding: var(--space-4) var(--gutter) var(--space-8);
    background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-lift);
  }
  /* A press brings the panel in (it fades at two thirds of its 6 px drop); a
     key opens it at once, and it always closes at once. */
  .site-menu.is-open { display: flex; transition: opacity calc(var(--dur-ui-4) * 2 / 3) linear, translate var(--dur-ui-4) var(--ease-out); }
  @starting-style { .site-menu.is-open { opacity: 0; translate: 0 -6px; } }
  .site-menu.is-open.is-instant { transition: none; }
  .site-nav__links { flex-direction: column; gap: 0; }
  .site-nav__links a { padding: var(--space-6) 0; border-radius: 0; border-bottom: 1px solid var(--rule); font-size: var(--text-h3); font-weight: 600; }
  .site-nav__links a:active { transform: none; background: var(--draft); } /* ruled rows tint, never shrink off their rule */
  .site-nav__join { justify-content: center; height: 52px; margin-left: 0; font-size: 1.0625rem; }

  /* The edit and the song first, then the h1 and the action in thumb reach;
     the chorus printed huge closes the first screen where there is room and
     opens the next one where there is not. */
  .hero { justify-content: flex-start; padding-block: calc(var(--header-h) + var(--space-6)) var(--space-9); }
  .hero__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "demo" "copy" "print"; align-content: space-between; flex: 1; gap: var(--space-7); }
  .hero--solo .hero__inner { align-content: center; }
  .hero__demo { gap: var(--space-4); }
  .hero__demo .credits { display: none; }
  .hero__demo .draft { gap: var(--space-3); padding: 0; background: none; }
  .print { font-size: 17vw; }
  .print.print--hero { grid-area: print; align-self: auto; font-size: calc((100vw - 2 * var(--gutter)) / 7.6); }
  .sub-long { display: none; }
  .sub-short { display: inline; }
  .hero__sub { margin-top: var(--space-6); }
  .hero__copy .action { margin-top: var(--space-7); }
  .join { flex-direction: column; gap: var(--space-3); }
  .join__input { height: 52px; }
  .join__button { width: 100%; height: 58px; }
  .join__fine, .join__nojs { font-size: var(--text-fine); }

  .song-card { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-6); gap: var(--space-5); }
  .cover--small { --cover: 88px; }
  .song-card--hero .cover--small { --cover: 64px; }
  .draft { padding: var(--space-6); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .js .switcher--tracks { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .track { padding-block: var(--space-5); }
  /* Each step as a row: the screen beside its number and words. */
  .steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-9); }
  .step { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-6); align-items: center; }
  .step__title { margin-top: 0; }
  .plans__grid { grid-template-columns: minmax(0, 1fr); }
  /* Plans on a phone read as a spec sheet: label left, value right, one
     tight ruled line each, so three plans stop costing a third of the page. */
  .plan { padding-block: var(--space-7) var(--space-5); }
  .plan__rows { margin-top: var(--space-5); }
  .plan__rows > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: var(--space-5); align-items: baseline; padding-block: var(--space-3); }
  .plan__rows dd { margin-top: 0; font-size: var(--text-small); }
  /* Tighter section rhythm: the desktop's air reads as gaps on a narrow column. */
  .switcher, .steps, .plans__grid, .faq__list { margin-top: var(--space-9); }
  /* With the Free/Pro/Studio pills, one plan shows at a time. */
  .plans__tabs { margin: var(--space-9) 0 0; }
  .plans__tabs + .plans__grid { margin-top: var(--space-5); }
  .plans__grid > .plan[hidden] { display: none; }
  .steps { gap: var(--space-7); }
  .faq__list { gap: var(--space-7); }
  .faq__item { padding-top: var(--space-6); }
  .faq__item p { margin-top: var(--space-3); }
  .finale__card { padding: var(--space-7); }
  .finale__head > .print--finale { grid-area: 2 / 1; margin-top: var(--space-5); }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .social, .datarep { justify-self: start; }
}
/* Shorter phones (most phones once the browser's bars are counted): the hero
   keeps the marked lines and the chorus lines their numbers point to (the
   first two), and gives up, in turn, the chorus's other lines, the song's
   seek line and style pill, its cover, then a step of the h1's size, so the
   action keeps the first screen. */
@media (max-width: 899px) and (max-height: 760px) {
  .hero__demo .chorus p:nth-child(n + 3) { display: none; }
  .hero__demo .song-card--hero .seek, .hero__demo .song-card--hero .pill--style { display: none; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .hero__demo .song-card--hero .cover { display: none; }
}
@media (max-width: 899px) and (max-height: 660px) {
  .hero:not(.hero--solo) .hero__title { font-size: 2.25rem; }
  .hero:not(.hero--solo) .hero__inner { gap: var(--space-5); }
}
/* Narrow phones: the note's kept part stays on two lines, and with Google Play
   only its badge stands 48 px tall (Google's floor is 28 px), so the line for
   iPhone keeps its place beside it. */
@media (max-width: 379px) {
  .hero__demo .said p { font-size: var(--text-fine); }
  .store-badges--play-only img { height: 48px; }
}
/* Very short windows (a phone held sideways, a page at 400 % zoom): the
   header scrolls away with the page instead of covering a quarter of it. */
@media (max-height: 420px) {
  .site-header { position: absolute; }
}
/* Short desktop windows: the hero's chorus keeps the two lines its numbers
   point to, its seek line gives way (play and pause stay), and its credits
   run on one line. */
@media (min-width: 900px) and (max-height: 700px) {
  .hero__demo .chorus p:nth-child(n + 3) { display: none; }
  .hero__demo .song-card--hero .seek { display: none; }
  .hero__demo .credits { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-8); }
  .hero__demo .credits__rows { margin-top: 0; }
  .hero__demo .credits__rows > div { display: flex; gap: var(--space-3); }
}
/* Under 600 px of height (a landscape phone, a window at 200 % zoom) the song
   and its print give way, so the h1 and the action lead the first screen. */
@media (max-width: 899px) and (max-height: 600px) {
  .hero__demo, .hero__demo ~ .print { display: none; }
}
/* Tablet portrait: the phone composition in a centred column. */
@media (min-width: 600px) and (max-width: 899px) {
  .hero__inner, .section__inner { width: min(100% - 2 * var(--gutter), 600px); }
  .hero__demo .credits { display: block; }
  .print { font-size: 13vw; }
  .print.print--hero { font-size: calc(min(100vw - 2 * var(--gutter), 600px) / 7.6); }
}
/* Shorter tablets: the credits give way so the action keeps the first screen. */
@media (min-width: 600px) and (max-width: 899px) and (max-height: 900px) {
  .hero__demo .credits { display: none; }
}
/* With Google Play only, the action carries one row more (its badge and the
   line for iPhone), so the hero gives way 100 px of height sooner, in the
   same order, with one step before the song goes: under 700 px its chorus
   lines go. Short desktop windows take the short subtitle. The Join button
   keeps the first screen; a browser without style queries keeps the steps
   above. */
@container style(--launch-play-only: contents) {
  @media (max-width: 899px) and (max-height: 860px) {
    .hero__demo .chorus p:nth-child(n + 3) { display: none; }
    .hero__demo .song-card--hero .seek, .hero__demo .song-card--hero .pill--style { display: none; }
  }
  @media (max-width: 899px) and (max-height: 800px) {
    .hero__demo .song-card--hero .cover { display: none; }
  }
  @media (max-width: 899px) and (max-height: 760px) {
    .hero:not(.hero--solo) .hero__title { font-size: 2.25rem; }
    .hero:not(.hero--solo) .hero__inner { gap: var(--space-5); }
  }
  @media (max-width: 899px) and (max-height: 700px) {
    .hero__demo .chorus { display: none; }
  }
  @media (min-width: 900px) and (max-height: 700px) {
    .sub-long { display: none; }
    .sub-short { display: inline; }
  }
}

/* Reduce Motion means fewer and gentler, not none: colour and opacity
   changes stay; nothing travels or scales. Phase 3's scenes add their own. */
@media (prefers-reduced-motion: reduce) {
  .site-nav__links a:active, .site-nav__join:active, button.pill:active, .play:active,
  .chip:active, .join__button:active, .cta-link:active, .social a:active, .store-badges a:active { transform: none; }
  .join__reply, .site-menu.is-open { transition-property: opacity; }
  /* Loading still shows activity: the arc breathes instead of turning. The seek knob simply appears. */
  [aria-busy="true"].play::after, [aria-busy="true"] .play::after { animation: busy var(--dur-n-4) var(--ease-color) infinite alternate; border-right-color: transparent; }
  .seek__bar::-webkit-slider-thumb { transform: none; }
  .seek__bar::-moz-range-thumb { transform: none; }
}

/* More contrast, when asked: muted ink becomes ink, and the hairlines, the
   ruled lines and the field and pill edges step up to Soft Blue (4.56 : 1). */
@media (prefers-contrast: more) {
  :root { --ink-muted: var(--ink); --surface-mid: var(--soft-blue); --draft-rule: var(--soft-blue); }
}

/* ---- Forced colours (Windows contrast themes) -----------------------------
   The system's colours replace ours, which needs help in three places.
   Chrome paints a readability backplate behind every line of text, and with
   Söhne's tall ascent (1.171 em) at the display and lyric leadings a line's
   backplate covers the line above, so those blocks opt out of backplates and
   take the system's text colour themselves. Actions whose shape is a
   background (the gradient, the ink circles) get an edge the system draws.
   Selected tracks and pills, the seek line and the print take system
   colours, so nothing that carries a state disappears. */
@media (forced-colors: active) {
  :is(h1, h2, h3), .chorus, .song-card__lyrics, .song-card__title > span:not(.pill), .track__name, .said mark {
    forced-color-adjust: none; color: CanvasText;
  }
  .chorus .w, .song-card__lyrics .w, .is-singing .w, .is-singing .w.is-sung { color: CanvasText; }
  .edit-pending .hero .chorus { color: CanvasText; animation: none; }
  .is-singing .w.is-now, .track[aria-selected="true"] .track__name { color: Highlight; }
  .chorus .n, .song-card__lyrics .n { color: CanvasText; }
  .kept { text-decoration-color: CanvasText; }
  .pen { stroke: CanvasText; }
  .join__button, .play, .site-nav__join, .cta-link { border: 1px solid ButtonText; }
  button.pill[aria-selected="true"], button.pill[aria-pressed="true"] { border-color: Highlight; }
  :focus-visible, .seek__bar:focus-visible { outline-color: Highlight; }
  .print { forced-color-adjust: none; }
  .print__sheet { fill: GrayText; }
  .print--hero .print__w.is-sung { fill: GrayText; }
  .seek__bar { forced-color-adjust: none; }
  .seek__bar::-webkit-slider-runnable-track { background: linear-gradient(to right, CanvasText calc(var(--p) * 100%), GrayText 0); }
  .seek__bar::-webkit-slider-thumb { background: CanvasText; }
  .seek__bar::-moz-range-track { background: GrayText; }
  .seek__bar::-moz-range-progress, .seek__bar::-moz-range-thumb { background: CanvasText; }
}
