/* AetherStar site. One family (Archivo, width axis for display), one ground,
   one ink, one accent: the game's own P1 cyan. */

/* Self-hosted, so no visitor data goes to a font CDN. Archivo is under the
   SIL Open Font License, see fonts/OFL.txt. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0b0b0f;
  --ground-2: #131318;
  --ground-3: #1c1c23;
  --ink: #f3f3f5;
  --ink-2: #b4b4bf;
  --accent: #10cfd8;
  --accent: oklch(0.78 0.19 195);
  --accent-ink: #031a1c;
  --paper: #eeeef1;
  --paper-ink: #0b0b0f;
  --paper-ink-2: #4a4a55;

  --font: "Archivo", -apple-system, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 2.4vw, 32px);
  --max: 1440px;
  --section: clamp(112px, 14vw, 200px);

  /* Spring-ish easings. --spring settles without overshoot (damping ~1);
     --spring-bounce overshoots a touch, for press release. */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: linear(0, 0.096 4.4%, 0.354 10.6%, 0.618 17.8%, 0.809 25.6%, 0.918 33.6%, 0.971 42%, 0.992 51.6%, 1);
  --spring-bounce: linear(0, 0.22 6%, 0.66 15%, 0.98 24%, 1.06 31%, 1.04 40%, 1 52%, 0.995 64%, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3 { margin: 0; font-weight: 800; }
figure { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.h2 {
  font-stretch: 110%;
  font-size: clamp(1.9rem, 4.2vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 20ch;
  text-wrap: balance;
}
.h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.01em; font-weight: 750; }
.lead, .statement { font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.38; letter-spacing: -0.005em; }
.small { font-size: 0.9375rem; color: var(--ink-2); }
.meta { font-size: 0.9375rem; color: var(--ink-2); margin: 0; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 750; font-size: 1.0625rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  transition: background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { background: color-mix(in oklab, var(--accent) 88%, white); }
/* Feedback on pointer-down, release springs back */
.btn:active { background: color-mix(in oklab, var(--accent) 82%, black); }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.btn--ghost { background: var(--ground-3); color: var(--ink); }
.btn--ghost:hover { background: color-mix(in oklab, var(--ground-3) 80%, white); }
.link { display: inline-block; padding-block: 8px; font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); transition: text-decoration-color 200ms ease; }
.link:hover { text-decoration-color: currentColor; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 28px 0 18px; }
.actions--center { justify-content: center; margin: 0; }

/* ---------- Top bar: plain, solid ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--ground); transition: background-color 300ms ease; }
.bar.is-scrolled { background: var(--ground-2); }
.bar__inner { max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 32px; }
.wordmark { font-stretch: 125%; font-weight: 800; letter-spacing: 0.18em; text-decoration: none; font-size: 1rem; margin-right: auto; padding-block: 10px; }
.bar__nav { display: flex; gap: 28px; font-size: 0.9375rem; font-weight: 600; }
.bar__nav a { text-decoration: none; color: var(--ink-2); transition: color 160ms ease; padding-block: 8px; }
.bar__nav a:hover, .bar__nav a[aria-current="page"] { color: var(--ink); }
.bar__nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
/* Phones: the page links get their own row under the wordmark */
@media (max-width: 760px) {
  .bar__inner { flex-wrap: wrap; row-gap: 0; column-gap: 12px; padding-bottom: 4px; }
  .bar__nav { order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .bar__nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 360px) { .wordmark { letter-spacing: 0.1em; } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(28px, 4vw, 64px); }
.hero > .wrap:first-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; align-items: end; }
.hero .actions { margin: 22px 0 0; }
.hero__title { grid-column: 1 / -1; }
.hero__aside { grid-column: 2; }
.hero__title {
  font-stretch: 112%;
  /* "Karaoke night," is ~8.4em wide: never let it outgrow the column */
  font-size: min(clamp(2.4rem, 8.4vw, 8.75rem), calc((100vw - 2 * var(--gutter)) / 8.6));
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.hero__aside .lead { margin-bottom: 0; }
.hero__shot { margin-top: clamp(32px, 4vw, 56px); }
.hero__shot img { width: 100%; border-radius: 14px; background: var(--ground-2); }
@media (max-width: 900px) {
  .hero > .wrap:first-child { grid-template-columns: minmax(0, 1fr); }
  .hero__aside { grid-column: 1; }
  .hero__title { font-size: min(5.5rem, calc((100vw - 2 * var(--gutter)) / 8.6)); }
}

/* Karaoke headline: each syllable carries a cyan copy of itself that is
   revealed left to right, like the lyric fill in the game. A bar slides
   under the syllable being sung. The line resets to flat ink when done. */
.karaoke { position: relative; display: block; }
.karaoke__line { display: block; white-space: nowrap; }
.syl { position: relative; display: inline-block; }
.syl::after {
  content: attr(data-t);
  position: absolute; inset: 0;
  color: var(--accent);
  /* Glyphs overhang the syllable box (tight tracking, descenders, the comma),
     so the clip reaches past the box on every side. Unsung: the right edge is
     pulled all the way past the left overhang, so nothing shows. */
  clip-path: inset(-0.35em calc(100% + 0.2em) -0.35em -0.2em);
  pointer-events: none;
}
.syl.is-sung::after { clip-path: inset(-0.35em -0.2em -0.35em -0.2em); transition: clip-path var(--dur, 300ms) linear; }
.karaoke.is-done .syl::after { opacity: 0; transition: opacity 900ms ease; }
.karaoke__bar {
  position: absolute; left: 0; top: 0;
  width: 100px; height: 0.06em; min-height: 4px;
  background: var(--accent); border-radius: 99px;
  transform-origin: 0 50%;
  opacity: 0;
  will-change: transform, width;
}
.karaoke.is-playing .karaoke__bar { opacity: 1; }
.karaoke.is-done .karaoke__bar { opacity: 0; transition: opacity 400ms ease; }

/* ---------- How a night goes ---------- */
.night { padding-top: var(--section); }
.night__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: 64px; margin-top: 56px; }
.night__steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-block: 24px; opacity: 0.38; transition: opacity 500ms var(--ease-out); }
.step:first-child { min-height: 56vh; justify-content: flex-start; padding-top: 12vh; }
.step:last-child { min-height: 64vh; }
.step.is-active { opacity: 1; }
.step .h3 { font-stretch: 105%; font-size: clamp(1.75rem, 2.8vw, 2.5rem); letter-spacing: -0.025em; margin-bottom: 14px; }
.step p { max-width: 38ch; }
.step .step__img { display: none; }
.night__stage { position: relative; }
.stage { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; color: inherit; font: inherit; position: sticky; top: calc(50vh - (min(54vw, 860px) * 9 / 32)); aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--ground-2); margin-top: 12vh; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.035); transition: opacity 520ms var(--ease-out), transform 900ms var(--spring); }
.stage__img.is-active { opacity: 1; transform: scale(1); }
.stage:hover .shot__hint, .stage:focus-visible .shot__hint { opacity: 1; transform: none; }
.stage:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) {
  .night__grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
  .night__stage { display: none; }
  .step, .step:first-child, .step:last-child { min-height: 0; opacity: 1; padding: 36px 0 12px; }
  .step .step__img { display: block; width: 100%; border-radius: 10px; margin-top: 8px; background: var(--ground-2); }
}

/* ---------- Scoring: cyan field ---------- */
.scoring { margin-top: var(--section); padding-block: var(--section); background: var(--accent); color: var(--accent-ink); }
.scoring ::selection { background: var(--accent-ink); color: var(--accent); }
.scoring .statement { margin-top: 28px; max-width: 34ch; }
.split { margin-top: clamp(56px, 8vw, 104px); }
.split__bar { display: grid; grid-template-columns: 90fr 10fr; gap: 6px; height: clamp(84px, 10vw, 128px); }
.split__bar > span {
  display: flex; align-items: flex-end; padding: 14px 18px; border-radius: 12px;
  font-size: 0.9375rem; font-weight: 600; line-height: 1.1;
}
.split__bar b { display: block; font-stretch: 125%; font-size: clamp(1.4rem, 2.6vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 4px; }
.split__notes { background: var(--accent-ink); color: var(--accent); flex-direction: column; justify-content: flex-end; align-items: flex-start !important; }
.split__lines { background: color-mix(in oklab, var(--accent-ink) 22%, var(--accent)); flex-direction: column; justify-content: flex-end; align-items: flex-start !important; white-space: nowrap; overflow: visible; }
.split__copy { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; margin-top: 32px; }
.split__copy p { margin: 0; }
@media (max-width: 700px) {
  .split__bar { grid-template-columns: minmax(0, 1fr); height: auto; }
  .split__bar > span { min-height: 88px; }
  .split__copy { grid-template-columns: minmax(0, 1fr); }
}

.ladder { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px 72px; margin-top: clamp(80px, 10vw, 140px); align-items: start; }
.ladder__label { display: block; font-weight: 600; font-size: 0.9375rem; }
.ladder__score {
  display: block; font-stretch: 125%; font-weight: 800;
  font-size: clamp(4rem, 12vw, 10.5rem); line-height: 0.95; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; margin-top: 12px;
}
.ladder__rank { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.stars { font-size: 0.7em; letter-spacing: 0.08em; }
.stars span { opacity: 0.25; }
.ladder__table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 1.0625rem; }
.ladder__table thead th { text-align: left; font-size: 0.875rem; font-weight: 600; padding: 0 16px 8px; }
.ladder__table td { padding: 11px 16px; background: color-mix(in oklab, var(--accent-ink) 9%, var(--accent)); font-variant-numeric: tabular-nums; transition: background-color 220ms ease, color 220ms ease; }
.ladder__table td:first-child { border-radius: 10px 0 0 10px; width: 34%; font-weight: 600; }
.ladder__table td:last-child { border-radius: 0 10px 10px 0; font-weight: 750; }
.ladder__table tbody tr { cursor: pointer; }
.ladder__table tbody tr:hover td { background: color-mix(in oklab, var(--accent-ink) 18%, var(--accent)); }
.ladder__table tbody tr:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.ladder__table tr.is-on td, .ladder__table tr.is-on:hover td { background: var(--accent-ink); color: var(--accent); }
@media (max-width: 860px) { .ladder { grid-template-columns: minmax(0, 1fr); } }

/* Range: a filled track in the accent's ink */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0; touch-action: pan-y; }
.range::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(var(--accent-ink), var(--accent-ink)) 0 / var(--fill, 73%) 100% no-repeat, color-mix(in oklab, var(--accent-ink) 18%, var(--accent)); }
.range::-moz-range-track { height: 10px; border-radius: 99px; background: color-mix(in oklab, var(--accent-ink) 18%, var(--accent)); }
.range::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--accent-ink); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--accent-ink); border: 5px solid var(--accent); transition: transform 300ms var(--spring-bounce); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-ink); border: 5px solid var(--accent); }
.range:active::-webkit-slider-thumb { transform: scale(1.18); }
.range:focus-visible { outline-color: var(--accent-ink); }

.difficulty { margin-top: clamp(80px, 10vw, 140px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 72px; }
.difficulty .h3 { grid-column: 1; font-stretch: 112%; font-size: clamp(1.75rem, 2.8vw, 2.5rem); letter-spacing: -0.025em; }
.difficulty > p { grid-column: 1; }
.tolerance { grid-column: 2; grid-row: 1 / span 2; margin: 0; display: grid; gap: 4px; }
.tolerance > div { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; padding: 14px 16px; border-radius: 10px; background: color-mix(in oklab, var(--accent-ink) 9%, var(--accent)); }
.tolerance dt { font-weight: 800; }
.tolerance dd { margin: 0; display: flex; align-items: center; gap: 16px; }
/* The band: one semitone = 14px either side of the note */
.band { position: relative; flex: none; width: 92px; height: 34px; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: calc(6px + var(--st) * 28px); transform: translateY(-50%); border-radius: 6px; background: color-mix(in oklab, var(--accent-ink) 25%, var(--accent)); }
.band::after { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 3px; background: var(--accent-ink); }
@media (max-width: 860px) { .difficulty { grid-template-columns: minmax(0, 1fr); } .tolerance { grid-column: 1; grid-row: auto; margin-top: 12px; } }
@media (max-width: 480px) {
  .tolerance > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tolerance dd { gap: 12px; }
  .band { width: 72px; }
}

/* ---------- Modes ---------- */
.modes { padding-top: var(--section); }
.modes__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px 64px; margin-top: 56px; align-items: start; }
.modes__party img { width: 100%; border-radius: 14px; background: var(--ground-2); }
.modes__text { display: grid; gap: 40px; padding-top: 8px; }
.mode .h3 { font-stretch: 112%; font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -0.025em; margin-bottom: 10px; }
.mode p { margin: 0; }
@media (max-width: 900px) { .modes__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Audience ---------- */
.audience { padding-top: var(--section); }
.audience__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 40px 64px; align-items: center; }
.audience__text .h2 { margin-bottom: 28px; font-size: clamp(2.1rem, 4.4vw, 4rem); }
.audience__shot img { width: 100%; border-radius: 14px; background: var(--ground-2); }
@media (max-width: 900px) { .audience__grid { grid-template-columns: minmax(0, 1fr); } .audience__shot { order: -1; } }

/* ---------- Setup: paper ground ---------- */
.setup { margin-top: var(--section); padding-block: var(--section); background: var(--paper); color: var(--paper-ink); }
.setup .small { color: var(--paper-ink-2); }
.setup__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px 72px; margin-top: 56px; align-items: start; }
.setup .h3 { font-stretch: 112%; font-size: clamp(1.6rem, 2.4vw, 2.1rem); letter-spacing: -0.025em; margin-bottom: 14px; }
.setup__mics img { width: 100%; border-radius: 12px; margin: 8px 0 24px; background: var(--ground); }
.code { margin: 8px 0 24px; padding: 22px 24px; border-radius: 12px; background: var(--paper-ink); color: var(--paper); overflow-x: auto; font: 500 0.875rem/1.7 ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; }
@media (max-width: 900px) { .setup__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Download ---------- */
.download { padding-top: var(--section); }
.dl { list-style: none; margin: 48px 0 28px; padding: 0; display: grid; gap: 6px; }
.dl__row { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; padding: 28px 32px; border-radius: 14px; background: var(--ground-2); }
.dl__row:first-child { background: var(--ground-3); }
.dl__row .h3 { font-stretch: 125%; font-size: clamp(1.75rem, 3.2vw, 2.75rem); letter-spacing: -0.035em; margin-bottom: 6px; }
.dl__row p { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .dl__row { padding: 22px 20px; } .dl__row .btn { width: 100%; } }

/* ---------- FAQ ---------- */
.faq { padding-top: var(--section); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 32px 72px; }
.faq__list { display: grid; gap: 4px; }
.qa { background: var(--ground-2); border-radius: 12px; }
.qa summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 700; font-size: 1.125rem; position: relative; border-radius: 12px; transition: background-color 200ms ease; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { background: var(--ground-3); }
.qa summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform 380ms var(--spring); }
.qa[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.qa__body { padding: 0 22px 6px; color: var(--ink); }
.qa[open] .qa__body { animation: qa-in 420ms var(--spring); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 860px) { .faq__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.foot { margin-top: var(--section); padding-block: 40px 48px; border-top: 1px solid var(--ground-3); background: var(--ground); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.foot__col h2 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 10px; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot__col a { text-decoration: none; color: var(--ink-2); transition: color 160ms ease; }
.foot__col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot__note { font-size: 0.875rem; color: var(--ink-2); max-width: 52ch; margin: 0 0 10px; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot__about { grid-column: 1 / -1; } }

/* ---------- Sub-page head ---------- */
.page-head { padding-top: clamp(40px, 6vw, 96px); }
.page-head h1 { font-stretch: 110%; font-size: min(clamp(2.4rem, 7vw, 6.5rem), calc((100vw - 2 * var(--gutter)) / 7.2)); line-height: 0.92; letter-spacing: -0.04em; max-width: 14ch; text-wrap: balance; }
.page-head .lead { margin-top: 24px; max-width: 46ch; }
.page-head + section { padding-top: clamp(56px, 7vw, 96px); }

/* ---------- Home: what you need ---------- */
.needs { margin-top: var(--section); }
.needs__list { margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 56px; padding: clamp(28px, 4vw, 56px); border-radius: 16px; background: var(--ground-2); }
.needs__list dt { font-stretch: 125%; font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 12px; }
.needs__list dd { margin: 0; }
.needs__list dd p { margin: 0 0 12px; }
@media (max-width: 860px) { .needs__list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Home: highlights, prose list with links ---------- */
.highlights { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 32px 72px; align-items: start; }
.highlights ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.highlights li:nth-child(odd) { background: var(--ground-2); border-radius: 10px; }
.highlights li { padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 4px 28px; }
.highlights li strong { font-weight: 750; }
.highlights li span { color: var(--ink); }
.highlights .link { display: inline-block; margin-top: 20px; }
@media (max-width: 860px) { .highlights { grid-template-columns: minmax(0, 1fr); } .highlights li { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Screenshot mosaic ---------- */
.gallery { margin-top: var(--section); }
.mosaic { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 48px; }
.mosaic > :first-child { grid-column: 1; grid-row: span 2; }
@media (max-width: 860px) {
  .mosaic { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mosaic > :first-child { grid-column: 1 / -1; grid-row: auto; }
  .mosaic > :last-child:nth-child(even) { grid-column: 1 / -1; }
}

/* Zoomable screenshots: a real button around the image */
.shot {
  position: relative; display: block; width: 100%; padding: 0; margin: 0; border: 0;
  background: var(--ground-2); border-radius: 14px; overflow: hidden;
  cursor: zoom-in; color: inherit; font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--spring); }
.mosaic .shot { aspect-ratio: 16 / 9; height: 100%; }
.mosaic > :first-child { aspect-ratio: auto; }
.shot:hover img { transform: scale(1.02); }
.shot:active img { transform: scale(0.99); transition-duration: 120ms; }
.shot__hint {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(11, 11, 15, 0.86); color: var(--ink);
  font-size: 0.8125rem; font-weight: 650;
  opacity: 0; transform: translateY(6px);
  transition: opacity 220ms ease, transform 420ms var(--spring);
  pointer-events: none;
}
.shot__hint svg { width: 14px; height: 14px; }
.shot:hover .shot__hint, .shot:focus-visible .shot__hint { opacity: 1; transform: none; }
@media (hover: none) { .shot__hint { display: none; } }
.shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shot__cap { display: block; margin-top: 10px; font-size: 0.9375rem; color: var(--ink-2); text-align: left; }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(6, 6, 9, 0.96);
  opacity: 0; visibility: hidden;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
  touch-action: none;
}
.lb.is-open { opacity: 1; visibility: visible; transition: opacity 260ms ease; }
.lb__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); }
.lb__count { font-size: 0.9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lb__tools { display: flex; gap: 8px; }
.lb__btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: var(--ground-3); color: var(--ink);
  cursor: pointer; transition: transform 360ms var(--spring-bounce), background-color 160ms ease;
}
.lb__btn:hover { background: color-mix(in oklab, var(--ground-3) 75%, white); }
.lb__btn:active { transform: scale(0.92); transition-duration: 90ms; }
.lb__btn svg { width: 20px; height: 20px; }
.lb__btn[hidden] { display: none; }
.lb__stage { position: relative; display: grid; place-items: center; padding: 0 clamp(8px, 5vw, 88px); min-height: 0; }
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb__nav--prev { left: clamp(8px, 1.6vw, 24px); }
.lb__nav--next { right: clamp(8px, 1.6vw, 24px); }
.lb__nav:active { transform: translateY(-50%) scale(0.92); }
.lb__cap { padding: 14px var(--gutter) 20px; text-align: center; color: var(--ink); font-size: 0.9375rem; max-width: 80ch; margin: 0 auto; }
.lb:fullscreen { background: #000; }
.lb:fullscreen .lb__stage { padding: 0; }
.lb:fullscreen .lb__img { border-radius: 0; }
@media (max-width: 700px) { .lb__nav { top: auto; bottom: -58px; transform: none; } .lb__nav:active { transform: scale(0.92); } .lb__cap { padding-bottom: 76px; } }

/* ---------- Origins ---------- */
.origins { margin-top: var(--section); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 32px 72px; }
.origins__text p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .origins { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Call to action band ---------- */
.cta { margin-top: var(--section); padding: clamp(36px, 5vw, 72px); border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; }
.cta .h2 { max-width: 18ch; font-size: clamp(1.6rem, 4.4vw, 3.75rem); }
.cta p { margin: 14px 0 0; max-width: 44ch; }
.cta .btn { background: var(--accent-ink); color: var(--accent); }
.cta .btn:hover { background: color-mix(in oklab, var(--accent-ink) 82%, white); }

/* ---------- Prose pages (songs, download, legal) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-stretch: 112%; font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.1; margin: clamp(48px, 6vw, 80px) 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; font-weight: 750; margin: 32px 0 8px; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose strong { font-weight: 750; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 72px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.note { padding: 22px 24px; border-radius: 12px; background: var(--ground-2); margin: 24px 0; }
.note p:last-child { margin-bottom: 0; }
.ext::after { content: " ↗"; font-weight: 500; }

.tags { width: 100%; border-collapse: separate; border-spacing: 0 3px; font-size: 0.9375rem; margin: 12px 0 0; }
.tags th { text-align: left; font-weight: 650; color: var(--ink-2); padding: 0 14px 6px; font-size: 0.875rem; }
.tags td { padding: 10px 14px; background: var(--ground-2); vertical-align: top; }
.tags td:first-child { border-radius: 8px 0 0 8px; font-weight: 650; width: 42%; }
.tags td code { white-space: nowrap; }
@media (max-width: 600px) {
  .tags td code { white-space: normal; overflow-wrap: anywhere; }
  .tags td { padding: 10px; }
}
.tags td:last-child { border-radius: 0 8px 8px 0; }
.tags code, .prose code { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 0.9em; }

.req { margin: 0; display: grid; gap: 4px; }
.req > div { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 4px 24px; padding: 16px 20px; border-radius: 10px; background: var(--ground-2); }
.req dt { font-weight: 750; }
.req dd { margin: 0; }
@media (max-width: 600px) { .req > div { grid-template-columns: minmax(0, 1fr); } }

.changes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.changes li { padding-left: 22px; position: relative; }
.changes li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Legal pages read like documents */
.legal .prose h2 { font-stretch: 100%; font-size: 1.5rem; letter-spacing: -0.01em; margin-top: 48px; }
.legal address { font-style: normal; }
.placeholder { background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--ink); padding: 0 4px; border-radius: 4px; }

/* ---------- Accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage__img { transform: none; transition: opacity 300ms ease; }
  .split__bar > span, .btn, .range::-webkit-slider-thumb, .qa summary::after { transition: none; }
  .qa[open] .qa__body { animation: none; }
  .btn:active { transform: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: #dcdce3; --paper-ink-2: #222; }
}
