/* ============================================================
   Page Turner landing — White minimalist, Apple-grade polish
   Plus Jakarta Sans + JetBrains Mono. One accent: editorial blue.
   No gradients, no pill buttons, hairline rules, generous whitespace.
   ============================================================ */

:root {
  --paper:      #FFFFFF;   /* canvas */
  --paper-2:    #F6F8FB;   /* cool bone alternate band */
  --surface:    #F8FAFC;   /* card face */
  --ink:        #0F1216;   /* cool near-black, never pure #000 */
  --ink-soft:   #3C4250;   /* secondary text (cool grey) */
  --ink-mute:   #7A828E;   /* captions, meta (cool grey) */
  /* --terra* keep their names but now hold the app's editorial BLUE (#2A6DF4,
     the light-theme accent) so the landing matches the app, not warm terracotta. */
  --terra:      #2A6DF4;   /* THE single accent (links, states, rules) */
  --terra-deep: #1E54C4;   /* deepest pressed tone */
  --terra-wash: #EAF1FE;   /* pale tag background */
  --amber:      #B07A2E;   /* honest low-confidence (kept — distinct semantic) */
  --rule:       #E6E9EF;   /* 1px hairline, cool */
  --rule-soft:  #F0F2F6;

  /* primary button: cool near-black ink. Clean, premium, monochrome.
     The blue accent is kept for small accents only, never the button fill. */
  --btn:        #0F1216;
  --btn-hover:  #222834;
  --btn-shadow: 0 12px 28px -14px rgba(15,18,22,0.55), 0 2px 6px -3px rgba(15,18,22,0.28);

  --maxw: 1180px;
  --measure: 1040px;
  --gut: clamp(22px, 5vw, 72px);

  --sans: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 2px 8px rgba(15, 18, 22, 0.05);
  --shadow-lift: 0 30px 80px -46px rgba(15,18,22,0.40);
}

* { box-sizing: border-box; }
/* overflow-x: clip (NOT hidden: clip creates no scroll container, so the
   sticky nav survives) kills the side-to-side rock on touch scroll: iOS lets
   the page pan toward any overflowing box (confetti bursts, transformed
   demos) even under body overflow-x hidden. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;        /* no orphaned words in headlines */
}
h1 { font-weight: 800; }
h2 { font-size: clamp(29px, 4.2vw, 46px); margin-bottom: 0.5em; letter-spacing: -0.032em; }

p { margin: 0 0 1em; max-width: 60ch; text-wrap: pretty; }

/* Accessibility: visible keyboard focus */
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

/* Skip-to-content for keyboard users */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 600; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* Footer legal row */
.legal { display: flex; gap: 18px; justify-content: center; margin-top: 14px; }
.legal a { color: var(--ink-mute); font-size: 13px; }
.legal a:hover { color: var(--terra); }

a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-deep); }

/* ---------- shared ---------- */

/* Bare typographic kicker — no chip. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terra-deep);
  margin: 0 0 20px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--terra); opacity: 0.55; display: inline-block; }

.lede { font-size: clamp(19px, 1.9vw, 23px); color: var(--ink-soft); line-height: 1.5; max-width: 46ch; letter-spacing: -0.01em; }
.sub  { color: var(--ink-soft); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.58; }

/* staccato value lines (the "Record yourself once. / Play." blocks) */
.mantra {
  margin: 26px 0 30px;
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.4;
  color: var(--ink); max-width: 24ch;
}
.mantra span { display: block; }
.mantra .mantra__hit { color: var(--terra); }

.plate {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--ink-mute); margin-top: 14px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: -0.005em;
  padding: 13px 24px; border-radius: 9px;   /* crisp, not pill */
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.22s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease), box-shadow 0.26s var(--ease), border-color 0.2s var(--ease);
}
.btn--solid { background: var(--btn); color: #fff; box-shadow: 0 1px 1px rgba(15,18,22,0.04); }
.btn--solid:hover { background: var(--btn-hover); color: #fff; box-shadow: var(--btn-shadow); transform: translateY(-1px); }
.btn--solid:active { transform: translateY(0) scale(0.98); box-shadow: 0 1px 1px rgba(15,18,22,0.04); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

/* small inline text link (tertiary) */
.textlink { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 7px; }
.textlink:hover { color: var(--terra); }
.textlink .arr { transition: transform 0.2s var(--ease); }
.textlink:hover .arr { transform: translateY(2px); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 15px var(--gut);
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--rule); background: rgba(255,255,255,0.82); }
.nav__brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.nav__mark { width: 28px; height: 28px; border-radius: 7px; }
.nav__word { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--ink-soft); font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 18px; }
.nav__demo { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.nav__demo:hover { color: var(--terra); }
.lang { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.lang__btn { display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; padding: 3px; }
.lang__flag { width: 20px; height: 14px; border-radius: 2.5px; box-shadow: 0 0 0 1px rgba(15,18,22,0.12); display: block; flex: none; opacity: 0.45; transition: opacity 0.15s var(--ease); }
.lang__btn.is-active .lang__flag, .lang__btn:hover .lang__flag { opacity: 1; }
.lang__btn.is-active { color: var(--terra); font-weight: 500; }
.lang__sep { color: var(--ink-mute); }

/* ---------- HERO ---------- */
.hero { position: relative; padding: clamp(34px, 4.5vw, 60px) var(--gut) clamp(38px, 4.5vw, 64px); overflow: hidden; }
.staff { position: absolute; top: 44px; left: 0; width: 100%; height: 60px; opacity: 0.55; }
.staff line { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.staff.is-drawn line { animation: draw 1.8s var(--ease) forwards; }
.staff.is-drawn line:nth-child(2){animation-delay:.07s} .staff.is-drawn line:nth-child(3){animation-delay:.14s}
.staff.is-drawn line:nth-child(4){animation-delay:.21s} .staff.is-drawn line:nth-child(5){animation-delay:.28s}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__grid {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__title { font-size: clamp(44px, 6vw, 84px); letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance; margin: 6px 0 22px; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 30px; }
.hero__under { margin-top: 22px; }

/* ---------- iPad mockup ---------- */
.ipad { margin: 0; background: #11151B; border-radius: 26px; padding: 11px; box-shadow: var(--shadow-lift); }
.ipad--landscape { aspect-ratio: 1194 / 834; }
.ipad--portrait { aspect-ratio: 1080 / 1440; max-width: 392px; margin-inline: auto; }
.ipad__screen { position: relative; width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: var(--paper); transform: translateZ(0); clip-path: inset(0 round 14px); }
.ipad__screen img, .ipad__screen video { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.hero__device { position: relative; }

/* hero studio video — muted autoplay loop with a sound toggle (off by default) */
.vid-sound {
  position: absolute; bottom: 13px; right: 13px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: #fff;
  background: rgba(17,21,27,0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 6px 11px 6px 9px;
  cursor: pointer; transition: background 0.25s var(--ease), transform 0.12s var(--ease);
}
.vid-sound:hover { background: rgba(17,21,27,0.9); }
.vid-sound:active { transform: translateY(1px); }
.vid-sound svg { width: 15px; height: 15px; display: block; transform-origin: 40% 50%; }
.vid-sound .vid-sound__on { display: none; }
.vid-sound.is-on .vid-sound__off { display: none; }
.vid-sound.is-on .vid-sound__on { display: block; }
.vid-sound.is-on { background: var(--terra); border-color: transparent; box-shadow: 0 6px 16px -8px rgba(42,109,244,0.7); animation: sound-pop 0.3s var(--ease); }
/* while muted: long rest, then a quick speaker wiggle (the Buy Me a Coffee
   periodic-nudge pattern) so the toggle gets noticed without shouting */
.vid-sound:not(.is-on) .vid-sound__off { animation: sound-nudge 5.5s var(--ease) infinite 2.5s; }
.vid-sound:hover:not(.is-on) .vid-sound__off { animation: sound-nudge-now 0.7s var(--ease); }
@keyframes sound-nudge {
  0%, 82%, 100% { transform: rotate(0); }
  85% { transform: rotate(-11deg) scale(1.1); }
  89% { transform: rotate(9deg) scale(1.1); }
  93% { transform: rotate(-6deg) scale(1.05); }
  96% { transform: rotate(3deg); }
}
@keyframes sound-nudge-now {
  0%, 100% { transform: rotate(0); }
  22% { transform: rotate(-11deg) scale(1.1); }
  48% { transform: rotate(9deg) scale(1.1); }
  74% { transform: rotate(-5deg); }
}
/* sound live: the two wave arcs breathe in alternation */
.vid-sound.is-on .vid-sound__on path:nth-of-type(2) { animation: sound-wave 1.4s ease-in-out infinite; }
.vid-sound.is-on .vid-sound__on path:nth-of-type(3) { animation: sound-wave 1.4s ease-in-out infinite 0.35s; }
@keyframes sound-wave { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes sound-pop { 0% { transform: scale(0.92); } 55% { transform: scale(1.05); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .vid-sound, .vid-sound svg, .vid-sound.is-on .vid-sound__on path { animation: none !important; }
}

/* ---------- bands ---------- */
.band { padding: clamp(36px, 4.6vw, 66px) var(--gut); max-width: var(--maxw); margin: 0 auto; }
.band--alt { background: var(--paper-2); max-width: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { max-width: 760px; margin-bottom: 30px; }

/* two-up paper themes */
.twoup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.paper-card { margin: 0; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.solo-demo { display: flex; justify-content: center; }
.solo-demo .demo-clip { width: min(560px, 100%); margin: 0; }

/* feature copy + art */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature--rev .feature__copy { order: 2; }

.cite { font-family: var(--mono); font-size: 10px; vertical-align: super; color: var(--terra); background: var(--terra-wash); border-radius: 3px; padding: 1px 4px; margin-left: 3px; cursor: help; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.cite:hover { background: var(--terra); color: #fff; }

/* ---- live demo clips, framed in a 3D-immersive iPad device ---- */
.demo-clip { margin: 0; }
.ipad3d { perspective: 1600px; position: relative; }
/* confetti burst out of the iPad when the fingering lands (end of each loop) */
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.confetti i { position: absolute; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: confetti 2.1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes confetti {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(0.5); }
  7% { opacity: 1; transform: translate(calc(var(--dx) * 0.14), calc(var(--dy) * 0.2)) rotate(calc(var(--r) * 0.15)) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}
.ipad3d__device {
  background: linear-gradient(155deg, #232a34 0%, #0d1015 62%);
  border-radius: 30px; padding: 10px;
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 0 0 1px rgba(0,0,0,0.5);
  transform: rotateY(-9deg) rotateX(3deg);
  transition: transform .6s var(--ease);
  will-change: transform;
}
.ipad3d:hover .ipad3d__device { transform: rotateY(0deg) rotateX(0deg); }
/* translateZ(0) + clip-path: hard-clip the media to the bezel even mid-3D-transform
   (border-radius + overflow:hidden alone leaks during rotateY in Safari/Chrome) */
.ipad3d__screen { border-radius: 20px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); transform: translateZ(0); clip-path: inset(0 round 20px); }
.ipad3d__screen > video, .ipad3d__screen > img { display: block; width: 100%; height: auto; }
.ipad3d .plate { margin-top: 14px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .ipad3d__device { transition: none; } }
@media (max-width: 880px) { .ipad3d__device { transform: none; } }
/* the page-turn / replay composed shots already carry their own device frame + backdrop */
.demo-shot { margin: 0; }
.demo-shot img { display: block; width: 100%; height: auto; border-radius: 14px; }
.demo-shot .plate { margin-top: 9px; }
.follow__gallery { margin-top: 26px; gap: 16px; margin-left: clamp(-44px, -3vw, 0px); }
/* let the portrait import clip sit naturally beside the square paper-theme swatches */
.twoup { align-items: start; }

/* "La page": single import demo, centered and rotated 90deg */
.twoup--single { grid-template-columns: min(560px, 94%); justify-content: center; }
.twoup--single .ipad3d { margin: clamp(20px, 3.5vw, 44px) 0; }
.twoup--single .ipad3d__device,
.twoup--single:hover .ipad3d__device { transform: rotate(90deg); transform-origin: center; }
.twoup--single .plate { transform: none; }

/* ---------- Floating Score Agent bubble (bottom-right, opens on #score-agent) ---------- */
@keyframes askpulse { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
/* pointer-events: the fixed container spans the closed panel's 440px footprint;
   without none it eats clicks meant for the page underneath (hero sound button) */
.agent { position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.agent__fab, .agent__panel { pointer-events: auto; }
.agent__fab { display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border: none; border-radius: 999px; background: var(--terra); color: #fff; font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; box-shadow: 0 14px 34px -12px rgba(42,109,244,0.6); transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease); }
.agent__fab:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(42,109,244,0.72); }
.agent__fab-ic { width: 19px; height: 19px; flex: none; }
.agent.is-open .agent__fab { display: none; }
.agent__panel { width: min(440px, 92vw); max-height: min(74vh, 600px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 30px 80px -28px rgba(20,30,60,0.5); overflow: hidden; transform-origin: bottom right; opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.97); transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s; }
.agent.is-open .agent__panel { opacity: 1; visibility: visible; transform: none; }
.agent__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.agent__title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.agent__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 4px var(--terra-wash); }
.agent__close { border: none; background: none; font-size: 18px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.agent__close:hover { color: var(--ink); background: var(--surface); }
/* flex children default to min-width:auto and refuse to shrink under wide
   content (the engraved embeds): min-width 0 + overflow-x hidden keep every
   embed INSIDE the panel, so the tabs above stay reachable. */
.agent__body { padding: 16px; overflow-y: auto; overflow-x: hidden; flex: 1; min-width: 0; min-height: 0; }
.agent__reply, .agent__msg { min-width: 0; max-width: 100%; }
.agent__ctx { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.agent__reply { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.agent__reply:not(:empty) { margin-bottom: 16px; }
/* one question/answer pair per block: the panel reads as a thread */
.agent__msg { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--rule-soft); }
.agent__msg:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.agent__q { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; }
.agent__q b { color: var(--ink); font-weight: 600; }
.agent__loading { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.agent__lo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terra); animation: askpulse 1s var(--ease) infinite; }
.agent__sources { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); display: grid; gap: 8px; }
/* engraved analysis chunk inside a chat reply (server-side Verovio render) */
.agent__excerpt { margin: 14px 0 0; padding: 12px; max-width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; overflow-x: auto; }
.agent__excerpt svg { display: block; width: 100%; min-width: 480px; height: auto; }
/* static demo embed (compact 2-system render: no min-width, no scroll) */
.agent__excerpt img { display: block; width: 100%; max-width: 100%; height: auto; }
.agent__excerpt figcaption { font-family: var(--mono); font-size: 10.5px; color: var(--ink-mute); margin-top: 8px; white-space: normal; }
.agent__sources-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.agent__cite { font-size: 13px; color: var(--ink-soft); margin: 0; }
.agent__cite a { font-weight: 500; }
.agent__err { font-size: 14px; color: var(--ink-soft); }
.agent__beta { margin: 12px 0 0; }
.agent__beta .btn { font-size: 13.5px; padding: 9px 16px; }
.agent__sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.agent__chip { font: inherit; font-size: 13px; padding: 8px 13px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; transition: border-color .16s var(--ease), background .16s var(--ease); }
.agent__chip:hover { border-color: var(--terra); background: var(--terra-wash); }
.agent__chip[disabled] { opacity: 0.5; cursor: default; }
/* 3-tab topic switcher: WRAPS instead of clipping (the third tab was cut
   to "Schubert · Der Zw" in the 360px panel) */
.agent__tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.agent__tab { flex: none; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; white-space: nowrap; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink-soft); cursor: pointer; transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
.agent__tab:hover { border-color: var(--terra); color: var(--terra); }
.agent__tab.is-active { border-color: var(--terra); color: var(--terra); background: var(--terra-wash); }
/* nudge toward the Schubert tab (it hides the poem translation) */
.agent__tab[data-tab="schubert"]:not(.is-active) { animation: tabnudge 3s var(--ease) infinite; }
@keyframes tabnudge { 0%, 72%, 100% { box-shadow: 0 0 0 0 rgba(42,109,244,0); } 82% { box-shadow: 0 0 0 5px rgba(42,109,244,0.16); } }

/* Rendered answer (markdown) */
.agent__reply-txt p { margin: 0 0 10px; }
.agent__reply-txt p:last-child { margin-bottom: 0; }
.agent__reply-txt b { font-weight: 700; color: var(--ink); }
.agent__reply-txt i { font-style: italic; }

/* Translate chip (a verb, not a question) */
.agent__chip--act { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--terra); border-color: var(--terra); background: var(--terra-wash); }
.agent__chip--act:hover { background: var(--terra); color: #fff; }

/* Free-text ask box */
.agent__ask { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.agent__ask[hidden], .agent__wall[hidden] { display: none; }  /* explicit display defeats the [hidden] attribute otherwise */
.agent__input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 13px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); transition: border-color .16s var(--ease); }
.agent__input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra-wash); }
.agent__send { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; border: none; border-radius: 11px; background: var(--terra); color: #fff; cursor: pointer; transition: transform .16s var(--ease), opacity .16s var(--ease); }
.agent__send:hover { transform: translateY(-1px); }
.agent__send:active { transform: scale(0.94); }
.agent__send:disabled { opacity: 0.5; cursor: default; transform: none; }

/* Two free questions, then the waitlist wall */
.agent__wall { margin-top: 16px; padding: 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.agent__wall-t { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 6px; }
.agent__wall-m { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 12px; }
.agent__wall-f { display: flex; gap: 8px; align-items: center; }
.agent__wall-f input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 13px; border: 1px solid var(--rule); border-radius: 11px; background: #fff; color: var(--ink); }
.agent__wall-f input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra-wash); }
.agent__wall-f button { flex: none; font: inherit; font-size: 13.5px; font-weight: 600; padding: 10px 15px; border: none; border-radius: 11px; background: var(--terra); color: #fff; cursor: pointer; white-space: nowrap; }
.agent__wall-ok { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0; }

/* Public-domain text + translation, stanza by stanza (original verse, then
   its translation right underneath: stays readable in a 360px panel) */
.agent__tr { margin-top: 4px; }
.agent__tr-legend { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }
/* two clean columns: original verse left, its translation right (Élie) */
.agent__tr-verse { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; padding: 10px 0; border-top: 1px solid var(--rule-soft); }
.agent__tr-verse:first-of-type { border-top: 0; padding-top: 0; }
.agent__tr-o { font-size: 13.5px; line-height: 1.55; color: var(--ink); margin: 0; }
.agent__tr-t { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); font-style: italic; margin: 0; }
.agent__tr-note { font-size: 12px; color: var(--ink-soft); margin: 12px 0 0; font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  .agent__panel { transition: opacity .2s linear, visibility .2s; transform: none; }
  .agent.is-open .agent__panel { transform: none; }
  .agent__lo-dot { animation: none; }
}
@media (max-width: 620px) { .agent__fab-lbl { display: none; } .agent__fab { padding: 14px; } .agent { right: 14px; bottom: 14px; } }

.proof { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 0; margin-top: clamp(28px, 3.6vw, 46px); border-top: 1px solid var(--rule); }
.proof__cell { border-left: 1px solid var(--rule); padding: 30px 30px 8px; }
.proof__cell:first-child { border-left: 0; padding-left: 0; }
.proof__stat { font-family: var(--mono); font-size: clamp(34px, 4vw, 46px); font-weight: 500; color: var(--ink); letter-spacing: -0.02em; line-height: 1; display: block; }
.proof__stat b { color: var(--terra); font-weight: 500; }
.proof__lead { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; margin: 14px 0 7px; }
.proof__txt { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 14px; line-height: 1.5; }
.proof__providers { display: flex; flex-wrap: wrap; gap: 6px 7px; margin: 6px 0 0; }
.provider { font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 8px; background: var(--surface); }

/* engraved analysis — Verovio SVG produced by the production pipeline
   (harmony_deep -> harmony_print -> Verovio), shown chat-excerpt sized:
   the same chunk the Score Agent drops in a reply, with a one-line caption */
/* lives inside the proof cell: compact, never grows the cell */
.muso-engraving { margin: 14px 0 0; }
.muso-engraving__sheet {
  max-width: 560px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  padding: clamp(12px, 1.8vw, 18px);
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.05);
  overflow-x: auto;
}
.muso-engraving__sheet img { display: block; width: 100%; height: auto; }
.muso-engraving__cap { font-family: var(--mono); font-size: 10.5px; color: var(--ink-mute); margin: 8px 2px 0; letter-spacing: 0.01em; }

/* coach (roadmap) — a chat-mock of the future Coach offering a locked focus session */
.coach__mock {
  margin: 0 0 0 auto; max-width: 460px; width: 100%;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 16px;
  padding: 18px 18px 16px; box-shadow: var(--shadow-lift);
}
.coach__bar { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--rule-soft); }
.coach__avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--terra-wash); color: var(--terra); }
.coach__avatar svg { width: 16px; height: 16px; }
.coach__id { display: flex; flex-direction: column; line-height: 1.25; }
.coach__name { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.coach__status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--terra); display: inline-flex; align-items: center; gap: 5px; }
.coach__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--terra); animation: coachPulse 2.2s var(--ease) infinite; }
@keyframes coachPulse { 0% { box-shadow: 0 0 0 0 rgba(42,109,244,0.45); } 70% { box-shadow: 0 0 0 7px rgba(42,109,244,0); } 100% { box-shadow: 0 0 0 0 rgba(42,109,244,0); } }
.coach__soon { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px; }
.coach__bubble { margin: 15px 0 0; padding: 13px 15px; font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px 14px 14px 14px; }
.coach__bubble b { color: var(--terra); font-weight: 600; }
.coach__picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.coach__pick { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 6px 11px; }
.coach__pick-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-mute); }
.coach__pick-v { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.coach__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.coach__btn { font-family: var(--sans); font-size: 13px; font-weight: 600; border: 1px solid var(--rule); border-radius: 8px; padding: 9px 14px; }
.coach__btn--go { background: var(--btn); color: #fff; border-color: var(--btn); }
.coach__btn--no { background: transparent; color: var(--ink-soft); }
.coach__locks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.coach__lock { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.01em; color: var(--ink-mute); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; }
.coach__lock svg { width: 11px; height: 11px; opacity: 0.65; flex: none; }
.coach__mock .plate { margin-top: 14px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .coach__status::before { animation: none; } }

/* toolkit — de-boxed spec row, hairline-divided, 8 tools on a 4x2 grid.
   Icons are single-color line SVGs mirroring the app's own Toolbox symbols. */
.tools-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tool { background: none; border: 0; border-left: 1px solid var(--rule); border-radius: 0; padding: 30px 24px; }
.tool:nth-child(4n + 1) { border-left: 0; padding-left: 0; }
.tool:nth-child(n + 5) { border-top: 1px solid var(--rule); }
/* coming-soon plate under the toolkit grid: wash card + swinging pendulum */
.tools-soon { display: flex; align-items: center; gap: 16px; margin: 26px 0 0; padding: 15px 18px; background: var(--terra-wash); border: 1px solid rgba(42, 109, 244, 0.18); border-radius: 12px; }
.tools-soon p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 78ch; }
.tools-soon__ic { flex: none; width: 32px; height: 32px; color: var(--terra); }
.tools-soon__ic svg { width: 100%; height: 100%; }
.tools-soon__pendulum { transform-box: view-box; transform-origin: 50% 65%; animation: pendulum 1.1s ease-in-out infinite alternate; }
@keyframes pendulum { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } }
.tool__ic { display: inline-flex; width: 26px; height: 26px; color: var(--terra); margin-bottom: 14px; }
.tool__ic svg { width: 100%; height: 100%; }
.tool h3 { font-size: 19px; margin-bottom: 5px; letter-spacing: -0.01em; }
.tool p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* the engine — multilayer follower scene */
.engine__viz { display: block; margin-top: 14px; }
.dtw { position: relative; margin: 0; background: #07071a; border: 1px solid #15162e; border-radius: 16px; padding: clamp(14px, 2.4vw, 26px); box-shadow: 0 30px 80px -46px rgba(8,9,30,0.7); }
.dtw__svg { width: 100%; height: auto; display: block; }
/* MATCH panel: live wave on top, score notes below, green match links lit
   in step with the sweeping head (6s cycle, delays set inline per link) */
.dtw__wave--live { stroke: #7fa6ff; stroke-width: 1.8; }
.dtw__notes rect { fill: #2A6DF4; opacity: 0.5; }
.dtw__link { stroke: #9be7b0; stroke-width: 1.5; stroke-linecap: round; opacity: 0; animation: dtwlink 6s linear infinite; }
@keyframes dtwlink { 0% { opacity: 0; } 3% { opacity: 0.95; } 18% { opacity: 0.3; } 55% { opacity: 0.14; } 100% { opacity: 0; } }
/* signal-flow scaffolding */
.dtw__stage { font-family: var(--mono); font-size: 10px; font-weight: 600; fill: var(--terra); letter-spacing: 0.14em; }
.dtw__stage--p { fill: rgba(224,151,95,0.85); }
.dtw__node, .dtw__chip, .dtw__matrix { fill: #0c0d24; stroke: #23264a; stroke-width: 1; }
.dtw__matrix { fill: #060617; }
.dtw__node--out { fill: rgba(42,109,244,0.10); stroke: rgba(120,170,255,0.42); }
.dtw__nlabel { font-family: var(--mono); font-size: 10px; fill: #cfe0ff; letter-spacing: -0.01em; }
.dtw__cap { font-family: var(--mono); font-size: 9px; fill: rgba(255,255,255,0.42); letter-spacing: 0.04em; }
.dtw__wave { fill: none; stroke: #7fa6ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dtw__flow { fill: none; stroke: #5a6cff; stroke-width: 1.6; stroke-linejoin: round; marker-end: url(#arr); }
.dtw__flow--soft { stroke: rgba(120,170,255,0.5); stroke-width: 1.3; stroke-dasharray: 2 4; }
.dtw__conf-x { font-family: var(--mono); font-size: 12px; fill: #cfe0ff; }
.dtw__conf-v { fill: #9be7b0; font-weight: 600; }
.dtw__chroma rect { fill: #2A6DF4; animation: chroma 1.6s var(--ease) infinite alternate; transform-box: fill-box; transform-origin: bottom center; }
.dtw__chroma rect:nth-child(odd) { fill: #7fa6ff; }
.dtw__chroma rect:nth-child(1){animation-delay:0s}.dtw__chroma rect:nth-child(2){animation-delay:.11s}
.dtw__chroma rect:nth-child(3){animation-delay:.22s}.dtw__chroma rect:nth-child(4){animation-delay:.33s}
.dtw__chroma rect:nth-child(5){animation-delay:.44s}.dtw__chroma rect:nth-child(6){animation-delay:.55s}
.dtw__chroma rect:nth-child(7){animation-delay:.66s}.dtw__chroma rect:nth-child(8){animation-delay:.77s}
.dtw__chroma rect:nth-child(9){animation-delay:.88s}.dtw__chroma rect:nth-child(10){animation-delay:.99s}
.dtw__chroma rect:nth-child(11){animation-delay:1.1s}.dtw__chroma rect:nth-child(12){animation-delay:1.2s}
@keyframes chroma { from { opacity: 0.2; transform: scaleY(0.3); } to { opacity: 0.95; transform: scaleY(1); } }
.dtw .plate { color: rgba(255,255,255,0.55); margin-top: 12px; }
.engine__layers { list-style: none; counter-reset: layer; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.4vw, 30px); }
.engine__layers li { counter-increment: layer; position: relative; padding-left: 42px; }
.engine__layers li::before { content: counter(layer); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--terra); background: var(--terra-wash); border-radius: 8px; }
.engine__layers b { display: block; font-size: 15.5px; letter-spacing: -0.01em; margin-bottom: 2px; }
.engine__layers span { font-size: 14px; color: var(--ink-soft); }
/* open-stack credit line (under-the-hood) */
.engine__stack { margin: clamp(20px, 2.6vw, 30px) 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-mute); max-width: 72ch; }
.engine__stack b { color: var(--ink-soft); font-weight: 600; }
/* practice vs concert */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(26px, 3.6vw, 44px); }
.mode { border: 1px solid var(--rule); border-radius: 14px; padding: 26px 26px 28px; background: var(--surface); }
.mode__tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; color: var(--ink-mute); }
.mode h3 { font-size: 21px; letter-spacing: -0.02em; margin-bottom: 8px; }
.mode p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.mode--practice { border-left: 3px solid var(--terra); }
.mode--practice .mode__tag { color: var(--terra-deep); }
.mode--concert { color: #eaf1ff; background: #0f1530; border-color: #1d2750; }
.mode--concert h3 { color: #ffffff; }
.mode--concert p { color: #aab6da; }
.mode--concert .mode__tag { color: #8aa6ff; }
.mode--concert { border-left: 3px solid #2A6DF4; }

.ticks { list-style: none; padding: 0; margin: 24px 0 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--ink-soft); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border: 2px solid var(--terra); border-radius: 50%; }
.soon { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terra); background: var(--terra-wash); border-radius: 5px; padding: 2px 7px; margin-right: 7px; vertical-align: middle; }

/* FOLLOW pinned */
.follow { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); padding: clamp(44px, 5.5vw, 82px) var(--gut); max-width: var(--maxw); margin: 0 auto; align-items: start; }
.follow__sticky { position: sticky; top: 92px; }
.follow__copy { padding-top: 8px; }

/* MAKER */
.maker { background: var(--paper-2); border-top: 1px solid var(--rule); padding: clamp(40px, 5vw, 70px) var(--gut) 38px; }
.maker__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.maker__mark { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 22px; }
.maker__note { color: var(--ink-soft); font-size: 17px; max-width: 52ch; }
.maker__cta { display: flex; align-items: center; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.coming { font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); letter-spacing: 0.04em; }

/* iPad-app waitlist (wired to POST /api/waitlist — same backend as the web demo) */
.waitlist { margin-top: 26px; max-width: 470px; }
.waitlist__label { display: block; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink-mute); margin-bottom: 12px; }
.waitlist__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.waitlist__email {
  flex: 1; min-width: 220px;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 9px;
  padding: 13px 15px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.waitlist__email::placeholder { color: var(--ink-mute); }
.waitlist__email:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px rgba(42,109,244,0.12); }
.waitlist__email:disabled { opacity: 0.6; cursor: default; }
.waitlist .btn--solid { white-space: nowrap; }
.waitlist__msg { min-height: 18px; margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.waitlist__msg.is-ok { color: var(--terra-deep); }
.waitlist__msg.is-err { color: var(--amber); }
.waitlist .coming { display: block; margin-top: 14px; }
/* support block: the Buy Me a Coffee call, under the beta form */
.coffee { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--rule); max-width: 470px; }
.coffee__line { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.coffee__why { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 14px; }
/* official BMC script button. The widget replaces its script tag with
   <div class="bmc-btn-container"><a class="bmc-btn">…</a></div> (NOT
   .bmc-button — three rounds of zoom silently missed). Native height 60px,
   inline styles: zoom is the one reliable constraint. 0.62 ≈ 37px in the nav,
   just under the 40px Get the beta. */
.nav__right .bmc-btn-container { zoom: 0.62; line-height: 0; }
.coffee .bmc-btn-container { zoom: 0.7; line-height: 0; }
.nav__right .btn--solid { height: 37px; padding: 0 16px; font-size: 14px; }
/* phone nav: Buy Me a Coffee replaces the beta button (Élie 2026-06-10) --
   the beta CTA already lives at the bottom of the page, in the maker block */
@media (max-width: 620px) { .nav__right > .btn--solid { display: none; } }

.maker__photo { margin: 0; }
.maker__photo img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 18px 48px rgba(20, 22, 28, 0.28); }
.maker__plate { margin: 12px 2px 0; font-size: 13px; color: var(--ink-mute); letter-spacing: 0.01em; }
.plate--footer { text-align: center; margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--rule); color: var(--ink-mute); }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 920px) {
  .hero__grid, .feature, .follow, .maker__grid { grid-template-columns: 1fr; }
  .feature--rev .feature__copy { order: 0; }
  .follow__sticky { position: static; }
  .follow__gallery { margin-left: 0; }
  .twoup, .duo { grid-template-columns: 1fr; }
  /* import demo, rotated 90deg: its visual width = column width × 4/3 + bezel.
     The full-width 1fr above let the turned clip bleed past the viewport, so
     the column shrinks with the screen (this line must stay AFTER the 1fr). */
  .twoup--single { grid-template-columns: min(420px, calc(68vw - 24px)); }
  /* the rotated box is laid out portrait but SHOWS landscape: pull back the
     leftover vertical air (layout height - visual height = column/3),
     keeping 14px of real breathing room each side */
  .twoup--single .ipad3d { margin-block: calc(min(420px, 68vw - 24px) / -6 + 14px); }
  .tools-row { grid-template-columns: 1fr 1fr; }
  .tool:nth-child(4n + 1) { border-left: 1px solid var(--rule); padding-left: 24px; }
  .tool:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .tool:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .modes { grid-template-columns: 1fr; }
  .engine__layers { grid-template-columns: 1fr 1fr; }
  .proof { grid-template-columns: 1fr; }
  .proof__cell { border-left: 0; border-top: 1px solid var(--rule); padding: 26px 0 8px; }
  .proof__cell:first-child { border-top: 0; padding-top: 4px; }
  .nav__links, .nav__demo { display: none; }
  /* hero, single column: hook → proof → act → detail. display: contents lifts
     the copy's children into the flex column so the device interleaves between
     the lede and the CTA (the reveal on .hero__copy stops rendering, by design:
     above-the-fold copy should not start invisible on mobile anyway). */
  .hero__grid { display: flex; flex-direction: column; gap: 0; }
  .hero__copy { display: contents; }
  .hero__copy > .eyebrow { order: 1; }
  .hero__copy > .hero__title { order: 2; }
  .hero__copy > .lede { order: 3; }
  .hero__device { order: 4; margin: 10px 0 4px; }
  .hero__copy > .hero__cta { order: 5; margin: 26px 0 30px; }
  .hero__copy > .sub { order: 6; }
  .hero__copy > .hero__under { order: 7; }
  .coach__mock { margin-inline: auto; }
}
@media (max-width: 700px) {
  /* the signal-flow diagram keeps a readable size and pans horizontally
     instead of scaling its 9px captions into dust */
  .dtw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dtw__svg { min-width: 660px; }
}
/* horizontal pans stay inside their box: no scroll-chaining the page sideways */
.dtw, .muso-engraving__sheet, .agent__excerpt { overscroll-behavior-x: contain; }
@media (max-width: 620px) {
  /* iOS Safari zooms into focused inputs under 16px: pin form fields at 16px */
  .agent__input, .agent__wall-f input, .waitlist__email { font-size: 16px; }
  .nav { gap: 12px; }
  .nav__right { gap: 12px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero__title { font-size: clamp(36px, 10.5vw, 44px); }
  .tools-row { grid-template-columns: 1fr; }
  .tool, .tool:nth-child(4n + 1), .tool:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .tool:nth-child(n + 2) { border-top: 1px solid var(--rule); }
  .tool { padding-top: 18px; padding-bottom: 16px; }
  .engine__layers { grid-template-columns: 1fr; }
  .hero__cta { gap: 11px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .waitlist .btn--solid { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  /* the mark carries the brand; the beta CTA keeps its room */
  .nav__word { display: none; }
}
/* touch ergonomics: grow the small targets without reshaping the layout */
@media (pointer: coarse) {
  .lang__btn { padding: 10px 7px; margin: -7px 0; }
  .nav__right .btn--solid { height: 41px; }
  .vid-sound { padding: 9px 13px 9px 11px; }
  .agent__send { width: 44px; height: 44px; }
  .agent__close { padding: 10px 12px; }
  .agent__chip { padding: 10px 14px; }
  .agent__tab { padding: 8px 13px; }
  .legal a { padding: 8px 2px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .staff line { stroke-dashoffset: 0; }
  .dtw__chroma rect { opacity: 0.8; transform: none; }
  .dtw__link { opacity: 0.45; }
}
