/* Pina Studio, direction C: "After Hours".
   The studio at 2 a.m., lit only by its screens. Colour beyond the screenshots is the
   frequency spectrum, sub to air, and it shows up only where there is sound. */

:root {
  color-scheme: dark;

  /* Neutral foundation: surfaces get lighter as they rise */
  --void: #060609;
  --surface: #0f0f14;
  --surface-2: #15151c;
  --surface-3: #1c1c25;
  --app: #0d0d10;          /* the app's own background, for letterboxing */
  --line: #1e1e27;
  --line-2: #2b2b37;
  --text: #edecf3;
  --text-2: #bdbcca;
  --muted: #8b8a99;
  --faint: #6a6979;

  /* Frequency bands */
  --b-sub: #ff4a2e;
  --b-low: #ff9f1c;
  --b-mid: #e9f26b;
  --b-pres: #3fe0c5;
  --b-air: #4b7bff;

  /* Live band levels, 0..1, written by main.js on whatever is on screen */
  --sub: 0; --low: 0; --mid: 0; --pres: 0; --air: 0; --level: 0;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale (six steps) */
  --fs-hero: clamp(42px, 7.1vw, 108px);
  --fs-h2: clamp(34px, 4.5vw, 64px);
  --fs-h3: clamp(20px, 1.65vw, 24px);
  --fs-lead: clamp(17px, 1.35vw, 20px);
  --fs-body: 16px;
  --fs-small: 13px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-shot: 14px;

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --wrap-wide: 1360px;
  --sec: clamp(104px, 13vw, 184px);
  --nav-h: 64px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background: var(--void);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Film grain on the void, under everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
code, kbd { font-family: var(--font-mono); }
::selection { background: rgba(237, 236, 243, .22); color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only, .skip:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  background: var(--text); color: var(--void);
  padding: 10px 16px; border-radius: 999px; font-weight: 600;
}

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap--wide { width: min(var(--wrap-wide), 100% - var(--gutter) * 2); }

.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 540;
  font-stretch: 94%;
  font-size: var(--fs-hero);
  line-height: 1;
  letter-spacing: -.026em;
  color: var(--text);
  text-wrap: balance;
}
.display .line { display: block; }
.h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 540;
  font-stretch: 96%;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -.024em;
  color: var(--text);
  text-wrap: balance;
  max-width: 24ch;
}
.h2 .tone-2 { display: block; }
.h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-stretch: 92%;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -.018em;
  color: var(--text);
}
.tone-2 { color: var(--muted); }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.lead code, .shot__caption code, .live__foot code, .term__d code {
  font-size: .86em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .08em .4em;
  white-space: nowrap;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: currentColor;
  opacity: .7;
}
.sep { color: var(--faint); margin-inline: .5em; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  padding: .1em .45em;
  font-size: .8em;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  line-height: 1.4;
  vertical-align: .08em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  transition: background-color .2s, box-shadow .25s, transform .15s var(--ease), color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn--sm { height: 36px; padding: 0 16px; font-size: var(--fs-small); }
.btn--lg { height: 52px; padding: 0 24px 0 20px; font-size: var(--fs-body); }
.btn--xl { height: 60px; padding: 0 30px 0 26px; font-size: var(--fs-body); }
.btn--light { background: var(--text); color: var(--void); }
.btn--light:hover { background: #fff; box-shadow: 0 0 0 5px rgba(237, 236, 243, .1), 0 10px 40px -10px rgba(237, 236, 243, .35); }
.btn--light:active { transform: scale(.98); background: #d9d8e2; box-shadow: none; }

.icon-link {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  color: var(--muted);
  transition: color .2s, background-color .2s;
}
.icon-link:hover { color: var(--text); background: var(--surface-2); }

/* Sound pill: the persistent control */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .2s, color .2s, box-shadow .2s, transform .15s var(--ease);
  white-space: nowrap;
}
.pill:hover { color: var(--text); background: var(--surface-2); }
.pill:active { transform: scale(.97); }
.pill[aria-pressed="true"] { color: var(--text); box-shadow: inset 0 0 0 1px #3a3a48; }
.pill--quiet { background: transparent; }

/* Five bars, one per band. Neutral and still until there is sound. */
.bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; flex: none; }
.bars i {
  width: 2px; height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform: scaleY(.28);
  transition: background-color .4s;
}
.bars i:nth-child(2) { transform: scaleY(.46); }
.bars i:nth-child(3) { transform: scaleY(.36); }
.bars i:nth-child(4) { transform: scaleY(.22); }
.bars i:nth-child(5) { transform: scaleY(.3); }
.bars--lg { height: 18px; gap: 3px; }
.bars--lg i { width: 3px; }
html[data-sound="on"] .bars i:nth-child(1) { background: var(--b-sub); }
html[data-sound="on"] .bars i:nth-child(2) { background: var(--b-low); }
html[data-sound="on"] .bars i:nth-child(3) { background: var(--b-mid); }
html[data-sound="on"] .bars i:nth-child(4) { background: var(--b-pres); }
html[data-sound="on"] .bars i:nth-child(5) { background: var(--b-air); }
html[data-sound="loading"] .bars i { animation: wait 1s var(--ease-io) infinite alternate; }
html[data-sound="loading"] .bars i:nth-child(2) { animation-delay: .12s; }
html[data-sound="loading"] .bars i:nth-child(3) { animation-delay: .24s; }
html[data-sound="loading"] .bars i:nth-child(4) { animation-delay: .36s; }
html[data-sound="loading"] .bars i:nth-child(5) { animation-delay: .48s; }
@keyframes wait { from { transform: scaleY(.2); } to { transform: scaleY(.8); } }

/* ---------- Frequency hairline ---------- */
.hairline {
  position: fixed;
  inset: 0 0 auto;
  height: 28px;
  z-index: 60;
  pointer-events: none;
}
.hairline::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(237, 236, 243, .16) 50%, transparent 100%) 0 0 / 50% 100% no-repeat,
              rgba(237, 236, 243, .045);
  animation: drift 16s linear infinite;
  transition: opacity .8s;
}
.hairline__canvas { width: 100%; height: 100%; opacity: 0; transition: opacity .8s; }
html[data-sound="on"] .hairline__canvas { opacity: 1; }
html[data-sound="on"] .hairline::before { opacity: 0; }
@keyframes drift {
  from { background-position: -50% 0, 0 0; }
  to { background-position: 150% 0, 0 0; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  z-index: 50;
  transition: background-color .35s, box-shadow .35s;
}
.nav.is-scrolled {
  background: rgba(6, 6, 9, .74);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-stretch: 92%;
  font-weight: 650;
  font-size: var(--fs-body);
  letter-spacing: -.015em;
  color: var(--text);
  flex: none;
}
.brand img { border-radius: 7px; }
.nav__links { display: flex; gap: 2px; margin-inline: auto; }
.nav__links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-current { color: var(--text); }
.nav__end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav__links + .nav__end { margin-left: 0; }
@media (max-width: 1080px) { .nav__links + .nav__end { margin-left: auto; } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal--late { transition-delay: .18s; }

/* ---------- Screenshot with bleed and band light ---------- */
.shot { position: relative; isolation: isolate; margin: 0; }
.shot .frame {
  position: relative;
  border-radius: var(--r-shot);
  overflow: hidden;
  background: var(--app);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 60px 140px -40px rgba(0, 0, 0, .95);
}
.shot .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .075), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.shot .frame > img { width: 100%; }

/* A blurred, scaled-down copy of the image: its colours spill into the room */
.bleed {
  position: absolute;
  inset: -1% -2%;
  z-index: -1;
  pointer-events: none;
  filter: blur(72px) saturate(2.4) brightness(2.1);
  opacity: .66;
  transform: translateZ(0) scale(1.06);
  will-change: opacity;
}
.bleed img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-sound="on"]) .bleed { animation: breathe 9s ease-in-out infinite alternate; }
}
@keyframes breathe {
  from { opacity: .5; transform: translateZ(0) scale(1.02); }
  to { opacity: .8; transform: translateZ(0) scale(1.07); }
}
html[data-sound="on"] .bleed { opacity: calc(.55 + var(--level) * .4); transition: opacity .2s linear; }

/* Five lights behind the screen, sub on the left to air on the right */
.glow {
  position: absolute;
  inset: -16% -9% -20%;
  z-index: -2;
  pointer-events: none;
}
.glow i {
  position: absolute;
  top: 8%;
  width: 46%;
  height: 84%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: var(--v, 0);
  transform: scale(calc(.72 + var(--v, 0) * .38));
  mix-blend-mode: plus-lighter;
}
.glow i:nth-child(1) { left: -8%;  --c: rgb(255 74 46 / .62);  --v: var(--sub); }
.glow i:nth-child(2) { left: 12%;  --c: rgb(255 159 28 / .5);  --v: var(--low); }
.glow i:nth-child(3) { left: 27%;  --c: rgb(233 242 107 / .34); --v: var(--mid); }
.glow i:nth-child(4) { left: 43%;  --c: rgb(63 224 197 / .44); --v: var(--pres); }
.glow i:nth-child(5) { left: 62%;  --c: rgb(75 123 255 / .58); --v: var(--air); }

.shot__caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.shot__caption b { color: var(--text-2); font-weight: 600; }
.shot__caption a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.shot__caption a:hover { color: var(--text); text-decoration-color: var(--text); }

/* ---------- Sections ---------- */
/* The lights spill past the edges; clip them here so phones never scroll sideways.
   (clip, not hidden: it keeps the replay's sticky pin working) */
main { overflow-x: clip; }
section { position: relative; }
.section-head { margin-bottom: clamp(48px, 6vw, 88px); }
.section-head .lead { margin-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(118px, 15vh, 170px); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(56% 60% at 30% 0%, rgba(150, 148, 190, .075), transparent 70%);
}
.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 64px;
  align-items: end;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.hero__lead { max-width: 52ch; }
.hero__cta { display: grid; gap: 14px; justify-items: start; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.meta {
  font-size: var(--fs-small);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.meta a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.meta a:hover { color: var(--text); text-decoration-color: currentColor; }
.size:not(:empty)::before { content: " · "; }

.listen {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 4px 20px 4px 4px;
  border-radius: 999px;
  text-align: left;
  color: var(--text);
  background: rgba(15, 15, 20, .7);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .2s, box-shadow .25s, transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.listen:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px #3a3a48; }
.listen:active { transform: scale(.98); }
.listen__orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.listen__orb::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(237, 236, 243, .35);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-sound="on"]):not([data-sound="loading"]) .listen__orb::after { animation: call 2.8s var(--ease) infinite; }
}
@keyframes call {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}
.listen__text { display: grid; line-height: 1.25; }
.listen__label { font-weight: 600; font-size: var(--fs-body); }
.listen__sub { font-size: var(--fs-small); color: var(--muted); }
html[data-sound="on"] .listen__orb { box-shadow: inset 0 0 0 1px #3a3a48, 0 0 28px -6px rgb(237 236 243 / calc(var(--level) * .5)); }

.hero__stage { margin-top: clamp(56px, 7vw, 96px); }
.shot--hero .frame { border-radius: 16px; }

/* ---------- Session replay ---------- */
.replay { padding-top: var(--sec); }
.replay__bar, .timeline, .replay__screen { display: none; }
.replay__main { display: block; }

/* Stacked (phones, reduced motion, no JS): a readable sequence */
.chapters { display: grid; gap: clamp(56px, 8vw, 88px); counter-reset: ch; }
.chapter { position: relative; }
.chapter__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.chapter__n { color: var(--text); }
.chapter__name { color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.chapter__where { margin-left: auto; font-variant-numeric: tabular-nums; }
.intent {
  margin-top: 22px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-stretch: 92%;
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.3;
  letter-spacing: -.015em;
  color: var(--text);
  text-wrap: balance;
}
.tag {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cmds { display: grid; gap: 8px; margin-top: 22px; }
.cmd {
  position: relative;
  display: block;
  padding: 10px 14px 10px 32px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-wrap: break-word;
}
.cmd::before {
  content: "$";
  position: absolute;
  left: 14px;
  color: var(--faint);
}
.cmd .k-bin { color: var(--text); font-weight: 500; }
.cmd .k-sub { color: var(--text); }
.cmd .k-str { color: var(--text-2); }
.cmd .k-op { color: var(--text); font-weight: 600; }
.cmd--more {
  font-family: var(--font-mono);
  background: transparent;
  border-style: dashed;
  border-color: var(--line-2);
}
.cmd--more::before { content: ""; }
.cmd--more { padding-left: 14px; }
.result {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  color: var(--text-2);
  text-wrap: pretty;
}
.result .ico { width: 18px; height: 18px; margin-top: 3px; color: var(--text); }
.chapter__still { margin-top: 24px; }
.stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-shot);
  background: var(--app);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 100px -40px rgba(0, 0, 0, .9);
}
.stage img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.js .stage img {
  position: absolute;
  left: 0; top: 0;
  max-width: none;
  object-fit: fill;
  transform-origin: 0 0;
}
.chapter--yours .chapter__name { color: var(--text); }
@media (min-width: 900px) {
  .replay:not(.is-pinned) .chapter {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(32px, 4.4vw, 72px);
    align-items: start;
  }
  .replay:not(.is-pinned) .chapter > * { grid-column: 1; }
  .replay:not(.is-pinned) .chapter__still { grid-column: 2; grid-row: 1 / span 5; margin-top: 0; }
}

/* Pinned, scroll-scrubbed (wide screens with motion allowed) */
.replay.is-pinned .replay__intro { margin-bottom: 0; }
.replay.is-pinned .replay__track { height: calc(7 * 88vh + 100vh); }
.replay.is-pinned .replay__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3.4vh, 36px);
  padding: calc(var(--nav-h) + 8px) 0 clamp(16px, 3vh, 32px);
}
.replay.is-pinned .replay__bar {
  display: flex;
  align-items: center;
  gap: 24px;
}
.replay__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.replay__title { white-space: nowrap; }
@media (max-width: 1240px) { .replay__song { display: none; } }
/* Shorter screens: tighten the step text so it always fits beside the screen */
@media (max-height: 860px) {
  .replay.is-pinned .intent { margin-top: 16px; font-size: 20px; }
  .replay.is-pinned .cmds { margin-top: 16px; gap: 6px; }
  .replay.is-pinned .cmd { padding-block: 7px; }
  .replay.is-pinned .result { margin-top: 14px; line-height: 1.5; }
  .replay.is-pinned .chapter__meta { padding-bottom: 10px; }
  .replay.is-pinned .lcd__cell b { font-size: 17px; }
}
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px rgba(237, 236, 243, .12); }
.replay__sound { margin-left: auto; }

.lcd {
  display: flex;
  align-items: stretch;
  padding: 6px 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.lcd__cell {
  display: grid;
  gap: 2px;
  padding: 1px 16px;
  border-left: 1px solid var(--line);
}
.lcd__cell:first-child { border-left: 0; }
.lcd__cell b {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lcd__cell small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.lcd__cell--static b { color: var(--text-2); }

.replay.is-pinned .replay__main {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: clamp(32px, 4.4vw, 72px);
  align-items: center;
  min-height: 0;
}
.replay.is-pinned .replay__screen { display: block; }
.replay.is-pinned .chapter__still { display: none; }
.replay.is-pinned .chapters { display: grid; gap: 0; }
.replay.is-pinned .chapter {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .35s var(--ease), transform .7s var(--ease), visibility 0s linear .35s;
}
.replay.is-pinned .chapter.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.replay.is-pinned .chapter.is-past { transform: translateY(-16px); }
.replay.is-pinned [data-line] { opacity: .16; transition: opacity .35s var(--ease); }
.replay.is-pinned [data-line].is-on { opacity: 1; }
.replay.is-pinned .cmd.is-on.is-current { border-color: var(--line-2); background: var(--surface-2); }
.replay.is-pinned .cmd.is-current::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -.18em;
  background: var(--text);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.stage--live {
  width: min(100%, calc((100svh - 290px) * 1.6));
  margin-left: auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 60px 140px -40px rgba(0, 0, 0, .95);
}
.stage--live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .075), inset 0 1px 0 rgba(255, 255, 255, .07);
  z-index: 2;
}
.stage__layer { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.stage__layer.is-on { opacity: 1; }
.replay.is-pinned .stage__layer img { will-change: transform; }
.shot--stage .bleed { inset: 4% 4% 4% auto; width: min(92%, calc((100svh - 290px) * 1.6 * .92)); }
.bleed__img { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.bleed__img.is-on { opacity: 1; }
.stage__caption {
  margin-top: 14px;
  text-align: right;
  font-size: var(--fs-small);
  color: var(--muted);
}

.replay.is-pinned .timeline { display: block; }
.timeline__rail { position: relative; height: 1px; background: var(--line-2); }
.timeline__fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: var(--text);
}
.timeline__ticks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.timeline__ticks button {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 14px 8px 0 0;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  transition: color .2s;
}
.timeline__ticks button::before {
  content: "";
  position: absolute;
  left: 0; top: -4px;
  width: 1px; height: 9px;
  background: var(--line-2);
  transition: background-color .2s, height .2s, top .2s;
}
.timeline__ticks button:hover { color: var(--text-2); }
.timeline__ticks button:hover::before { background: var(--text-2); }
.timeline__ticks button[aria-current="step"] { color: var(--text); }
.timeline__ticks button[aria-current="step"]::before { background: var(--text); height: 13px; top: -6px; }
.timeline__ticks button.is-done::before { background: var(--text-2); }
.tk-n { font-family: var(--font-mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.timeline__ticks button[aria-current="step"] .tk-n { color: var(--text-2); }

/* ---------- Notes / agents ---------- */
.notes { padding-top: var(--sec); }
.prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.prompt {
  display: flex;
  flex-direction: column;
  min-height: 236px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .25s, background-color .25s, transform .4s var(--ease);
}
.prompt:hover { background: var(--surface-2); border-color: var(--line-2); }
.prompt__note {
  padding: 26px 26px 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-stretch: 90%;
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.018em;
  color: var(--text);
  text-wrap: balance;
}
.prompt__why { padding: 12px 26px 26px; color: var(--muted); text-wrap: pretty; }
.prompt__copy, .term__cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  text-align: left;
  font-size: var(--fs-small);
  color: var(--muted);
  transition: background-color .2s, color .2s;
}
.prompt__copy {
  margin-top: auto;
  padding: 0 14px 0 26px;
  border-top: 1px solid var(--line);
}
.prompt__copy code { flex: 1; min-width: 0; padding: 12px 0; line-height: 1.5; overflow-wrap: anywhere; }
.prompt__copy:hover, .term__cmd:hover { color: var(--text); background: var(--surface-3); }
.prompt__copy:active, .term__cmd:active { background: var(--line); }
.copy-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--font-text);
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .2s, color .2s;
}
.copy-state .ico { width: 15px; height: 15px; }
.is-copied .copy-state { color: var(--void); background: var(--text); box-shadow: none; }

.live {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 128px);
  align-items: center;
  margin-top: clamp(104px, 12vw, 168px);
}
.shot--agent .frame { border-radius: 16px; }
.shot--agent .bleed { inset: 6% 0; }
.shot--agent .glow { inset: -10% -50%; }
.live__copy > p { margin-top: 14px; max-width: 46ch; }
.live__copy .h3 { font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -.03em; font-stretch: 88%; max-width: 16ch; }
.live__points { margin-top: 40px; display: grid; gap: 0; }
.live__points li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.live__n { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); padding-top: 2px; }
.live__t { color: var(--text); font-weight: 600; }
.live__d { color: var(--muted); margin-top: 2px; }
.crop {
  position: relative;
  margin-top: 16px;
  width: min(100%, 460px);
  aspect-ratio: 5.87;
  border-radius: 10px;
  background: var(--app) url("media/arrange.webp") no-repeat 100% 0 / 454.5% auto;
  box-shadow: 0 0 0 1px var(--line-2);
}
.crop__ring {
  position: absolute;
  left: 67.7%;
  top: 46.7%;
  width: 22%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  box-shadow: 0 0 0 4px rgba(237, 236, 243, .12), 0 0 24px rgba(237, 236, 243, .25);
}
.live__foot { margin-top: 28px; font-size: var(--fs-small); color: var(--muted); }

/* ---------- What an agent can't do ---------- */
.craft { padding-top: var(--sec); }
.craft .h2 { max-width: 24ch; }
.craft__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.craft__media { position: sticky; top: calc(var(--nav-h) + 40px); }
.craft__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
}
.craft__item:first-child { border-top: 0; padding-top: 0; }
.craft__n { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.craft__item p { margin-top: 10px; text-wrap: pretty; }
.chip-cmd {
  display: inline-block;
  margin-top: 16px;
  margin-right: 6px;
  padding: 5px 10px;
  font-size: var(--fs-small);
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow-wrap: anywhere;
}

/* ---------- Midnight Drive ---------- */
.listen-sec { padding-top: var(--sec); }
.listen-sec .songs { width: min(var(--wrap), 100% - var(--gutter) * 2); display: grid; gap: clamp(24px, 3vw, 36px); }
.songs__tabs { justify-self: center; }
.songs__tabs [role="tab"] { display: flex; align-items: center; gap: 10px; }
.songs__tabs [role="tab"] small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; color: var(--muted); }
@media (max-width: 640px) { .songs__tabs [role="tab"] small { display: none; } }
.md { display: grid; gap: 20px; }
.md[hidden] { display: none; }
.js .songs .md:not([hidden]) { animation: fade-in .5s var(--ease); }
.shot--md .glow { inset: -14% -6% -18%; }
.md__window { position: relative; }
.md__overlay { position: absolute; inset: 0; pointer-events: none; }
.md__row {
  position: absolute;
  left: 17.2%;
  right: 0;
  background: rgba(6, 6, 9, 0);
  transition: background-color .3s var(--ease);
}
.md__row.is-off { background: rgba(6, 6, 9, .74); }
.md__lane {
  position: absolute;
  left: 41.14%;
  width: 57.78%;
  top: 12%;
  height: 85%;
  pointer-events: auto;
  cursor: col-resize;
}
.md__head {
  position: absolute;
  inset: 0;
  transform: translateX(calc(var(--pos, 0) * 100%));
  pointer-events: none;
}
.md__head::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text);
  box-shadow: 0 0 14px 1px rgba(237, 236, 243, .55);
}
.md__head::after {
  content: "";
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: var(--text);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.md__console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 12px;
}
.md__transport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 20px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.md__play {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--void);
  background: var(--text);
  transition: background-color .2s, transform .15s var(--ease), box-shadow .25s;
}
.md__play:hover { background: #fff; box-shadow: 0 0 0 6px rgba(237, 236, 243, .1); }
.md__play:active { transform: scale(.96); }
.md__play .ico { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.md__play .ico--play { translate: 1px 0; }
.md__play .ico--pause, .md.is-playing .md__play .ico--play { display: none; }
.md.is-playing .md__play .ico--pause { display: block; }
.md__spinner {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--text);
  opacity: 0;
}
.md.is-loading .md__spinner { opacity: 1; animation: spin .8s linear infinite; }
.md.is-loading .md__play { background: var(--surface-3); color: var(--text-2); }
@keyframes spin { to { transform: rotate(1turn); } }
.md__clock { display: flex; flex-wrap: wrap; }
.md__clock .lcd__cell:first-child { padding-left: 0; }
.md__sections { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.md__sections button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .2s, color .2s;
}
.md__sections button:hover { color: var(--text); background: var(--surface-3); }
.md__sections button[aria-current="true"] { color: var(--void); background: var(--text); box-shadow: none; }
.md__status { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--muted); }
.md__status.is-error { color: var(--text); }
.md__status button { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

.md__stems { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 8px; }
.stem {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 14px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .25s, background-color .25s;
}
.stem__name { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text); transition: color .25s; }
.stem__dot { width: 9px; height: 9px; border-radius: 3px; background: var(--track); flex: none; transition: opacity .25s; }
.stem__meter { position: relative; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.stem__meter i {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(var(--m, 0));
  background: var(--track);
  border-radius: inherit;
}
.stem__btns { display: flex; gap: 6px; }
.stem__btns button {
  flex: 1;
  height: 44px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .15s, color .15s, transform .12s var(--ease);
}
.stem__btns button:hover { color: var(--text); background: var(--surface-3); }
.stem__btns button:active { transform: scale(.95); }
.stem__btns button[aria-pressed="true"] { color: var(--void); background: var(--text); box-shadow: none; }
.stem.is-off { background: transparent; }
.stem.is-off .stem__name { color: var(--muted); }
.stem.is-off .stem__dot { opacity: .3; }

/* ---------- Studio ---------- */
.studio { padding-top: var(--sec); }
.tabs { --stage-h: clamp(220px, 40vw, 520px); }
.tabs__list {
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__list [role="tab"] {
  flex: none;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.tabs__list [role="tab"]:hover { color: var(--text); }
.tabs__list [role="tab"][aria-selected="true"] {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.tabs__panels { margin-top: clamp(40px, 5vw, 64px); }
.tabs__panel { display: grid; justify-items: center; gap: 32px; }
.tabs__panel[hidden] { display: none; }
.js .tabs__panel:not([hidden]) { animation: fade-in .5s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tabs__panel > .shot {
  height: var(--stage-h);
  width: 100%;
  display: grid;
  place-items: center;
}
.shot--fit .frame { width: min(100%, calc(var(--stage-h) * var(--ar))); aspect-ratio: var(--ar); }
.shot--fit .frame > img { height: 100%; object-fit: cover; }
.shot--fit .bleed { inset: 6% auto; left: 50%; width: min(92%, calc(var(--stage-h) * var(--ar) * .92)); translate: -50% 0; }
.tabs__cap { max-width: 62ch; text-align: center; color: var(--text-2); text-wrap: pretty; }

.spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: clamp(80px, 10vw, 128px);
}
.spec__col { padding-top: 22px; border-top: 1px solid var(--line); }
.spec__h {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.spec__col p { text-wrap: pretty; }
.formats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.formats span {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.keys {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 56px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.keys li { display: inline-flex; align-items: center; gap: 8px; }
.keys kbd { font-size: var(--fs-small); }

/* ---------- Open ---------- */
.open { padding-top: var(--sec); }
.open__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: var(--fs-small); color: var(--muted); padding-top: 2px; }
.facts dd { color: var(--text); font-weight: 500; }
.terms { display: grid; gap: 12px; }
.term {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.term__h { color: var(--text); font-weight: 600; }
.term__d { margin-top: 10px; color: var(--muted); font-size: var(--fs-body); }
.term__cmd {
  margin-top: 14px;
  padding: 8px 8px 8px 14px;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-2);
}
.term__cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tools li {
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-2);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tools .tools__more { color: var(--muted); background: transparent; box-shadow: none; padding-inline: 4px; }

/* ---------- Finale ---------- */
.finale {
  --flood: .9;
  margin-top: var(--sec);
  padding: clamp(120px, 16vw, 220px) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.flood {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  pointer-events: none;
}
.flood i {
  --v: 0;
  align-self: end;
  height: 92%;
  margin-inline: -18%;
  transform-origin: 50% 100%;
  transform: scaleY(calc(var(--flood, 0) * (.72 + var(--v) * .4)));
  background:
    radial-gradient(60% 34% at 50% 100%, var(--c), transparent 100%),
    linear-gradient(to top, var(--c) 0%, color-mix(in srgb, var(--c) 55%, transparent) 30%, color-mix(in srgb, var(--c) 18%, transparent) 62%, transparent 92%);
  filter: blur(56px);
  opacity: .9;
  mix-blend-mode: plus-lighter;
}
.flood i:nth-child(1) { --c: rgb(255 74 46 / .95);  --v: var(--sub); }
.flood i:nth-child(2) { --c: rgb(255 159 28 / .8); --v: var(--low); }
.flood i:nth-child(3) { --c: rgb(233 242 107 / .58); --v: var(--mid); }
.flood i:nth-child(4) { --c: rgb(63 224 197 / .72); --v: var(--pres); }
.flood i:nth-child(5) { --c: rgb(75 123 255 / .95); --v: var(--air); }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-sound="on"]) .flood i { animation: swell 7s ease-in-out infinite alternate; }
  html:not([data-sound="on"]) .flood i:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
  html:not([data-sound="on"]) .flood i:nth-child(3) { animation-duration: 6.2s; animation-delay: -4s; }
  html:not([data-sound="on"]) .flood i:nth-child(4) { animation-duration: 9s; animation-delay: -1s; }
  html:not([data-sound="on"]) .flood i:nth-child(5) { animation-duration: 7.6s; animation-delay: -3s; }
}
@keyframes swell { from { scale: 1 .82; } to { scale: 1 1.06; } }
.finale::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 22%;
  z-index: -1;
  background: linear-gradient(var(--void), rgba(6, 6, 9, 0));
  pointer-events: none;
}
.finale__title { margin-inline: auto; max-width: none; }
.finale__lead { margin: 28px auto 0; color: var(--text-2); }

.dl {
  max-width: 1000px;
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding: clamp(20px, 3vw, 36px);
  text-align: left;
  background: rgba(11, 11, 15, .8);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 50px 120px -40px rgba(0, 0, 0, .8);
}
.dl__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.dl__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 28px;
}
html[data-os="win"] .dl__os--win { order: -1; }
.dl__h { font-size: var(--fs-body); font-weight: 600; color: var(--text); }
.dl__what { margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
.dl__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 14px;
  padding: 0 12px 0 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .2s, box-shadow .2s;
}
.dl__link + .dl__link { margin-top: 8px; }
.dl__link .size { margin-right: auto; font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.dl__link .size:empty { margin-right: auto; }
.dl__link .ico { width: 18px; height: 18px; color: var(--muted); transition: color .2s, transform .2s var(--ease); }
.dl__link:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px #3a3a48; }
.dl__link:hover .ico { color: var(--text); transform: translateY(2px); }
.dl__note { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); text-wrap: pretty; }
.dl__note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.dl__note a:hover { color: var(--text); text-decoration-color: currentColor; }
.dl__os--src .term__cmd { background: var(--void); }

/* ---------- Footer ---------- */
.foot { padding: 40px 0 48px; border-top: 1px solid var(--line); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot__line { font-size: var(--fs-small); color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; font-size: var(--fs-small); }
.foot__links a { color: var(--text-2); padding: 10px 0; transition: color .2s; }
.foot__links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .hero__row { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .prompts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md__console { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .craft__grid, .open__grid { grid-template-columns: minmax(0, 1fr); }
  .craft__media { position: relative; top: 0; }
  .live { grid-template-columns: minmax(0, 1fr); }
  .shot--agent { width: min(260px, 70%); margin-inline: auto; }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dl__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dl__os + .dl__os { padding-top: 28px; border-top: 1px solid var(--line); }
  html[data-os="win"] .dl__os--win + .dl__os { padding-top: 28px; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .pill .pill__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pill { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .nav .btn--sm { height: 44px; }
  .nav .icon-link { width: 44px; height: 44px; }
  .nav__inner { gap: 12px; }
  .nav__end { gap: 4px; }
  .brand span { font-size: var(--fs-body); }
  .hero__buttons { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .hero__cta { justify-items: stretch; }
  .hero__buttons .btn, .listen { width: 100%; }
  .listen { padding-right: 16px; }
  /* Phones: crop the wide windows to the part that reads, bleeding off the screen edges */
  .shot--hero .frame { width: 165%; margin-left: -24%; border-radius: 10px; }
  .shot--md .frame { width: 175%; margin-left: -71%; border-radius: 10px; }
  .prompts {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 84%;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .prompts::-webkit-scrollbar { display: none; }
  .prompt { min-height: 0; scroll-snap-align: start; }
  .finale { padding-bottom: 168px; }
  .prompt__note { padding: 22px 20px 0; }
  .prompt__why { padding: 10px 20px 22px; }
  .prompt__copy { padding: 0 10px 0 20px; }
  .craft__item { grid-template-columns: 36px minmax(0, 1fr); }
  .md__transport { padding: 16px; gap: 16px; }
  .md__stems { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stem { flex-direction: row; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; }
  .stem__name { flex: 1; min-width: 0; }
  .stem__meter { width: 56px; flex: none; }
  .stem__btns button { width: 44px; flex: none; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tabs__list { margin-inline: 0; }
  .tabs__panel > .shot { height: auto; min-height: 0; }
  .shot--fit .frame { width: 100%; }
  .shot--fit .bleed { width: 92%; }
  .tabs__cap { text-align: left; }
  .keys { gap: 12px 20px; }
  .foot__links { margin-left: 0; }
  .shot__caption { flex-direction: column; }
  .chapter__still .stage { border-radius: 10px; }
}

@media (pointer: coarse) {
  .pill { height: 44px; }
  .md__sections button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .bleed { opacity: .5; }
  .flood i { --flood: .85; }
}
