/* Audio Studio AI: page CSS shared by every tool page.
   The hero's "window" is the tool itself, live, never a picture of it. Everything here sits inside a
   visual (the tool, a player, a card's panel) or sets the hero's own frame. */

html:root { --t-h2: clamp(24px, 1.143vw + 19.5px, 36px); }
:root {
  --ground-bg: #170b13; --ground-surface: #241420; --ground-ink: #ffffff; --ground-accent: #ff488b;
  --tool-line: color-mix(in oklab, var(--ink) 16%, transparent);
}

/* ---------------------------------------------------------------- the hero is the tool */
.hero--tool { --hgap: 16px; }
.hero--tool > .wrap > .hero-text { display: flex; flex-direction: column; height: 100%; }
.hero--tool .hero__c { display: grid; justify-items: center; text-align: center; gap: var(--s-3); max-width: 980px; margin: var(--s-6) auto 0; }
.hero--tool h1 { font-size: clamp(27px, 2.1vw + 15.8px, 46px); line-height: 1.08; max-width: none; text-wrap: balance; }
.hero--tool .hero__lead { font-size: 18px; line-height: 1.5; color: color-mix(in oklab, var(--ink) 80%, var(--bg)); max-width: 76ch; }

/* the row of tools under the header: real links, one page each */
.tooltabs { display: flex; gap: var(--s-1); padding: var(--s-1); margin-inline: auto; width: max-content; max-width: 100%;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tooltab { display: inline-flex; align-items: center; gap: var(--s-2); height: 44px; padding: 0 var(--s-4); border-radius: 999px;
  font: 500 15px/1.15 var(--font-text); color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.tooltab svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tooltab:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.tooltab[aria-current="page"] { background: color-mix(in oklab, var(--ink) 14%, var(--surface)); color: var(--ink); }

/* ---------------------------------------------------------------- the tool */
.tool { margin-top: var(--s-6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter); flex: none;
  border: 1px solid var(--tool-line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; text-align: left; }
.tool__stage { padding: var(--s-5) 0 var(--s-5) var(--s-5); display: flex; min-height: 300px; }
.tool__side { border: 0; margin: 0; position: relative; padding: var(--s-5) var(--s-6) var(--s-5) 0; display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.tool__foot { margin-top: auto; display: grid; gap: var(--s-3); }
.tool__go { width: 100%; height: 52px; font-size: 17px; }
.tool__notes { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; font-size: var(--t-label); line-height: 1.4; color: var(--muted); }
.tool__notes b { font-weight: 500; color: var(--ink); }

/* which part shows in which state: data-show lists the states */
.tool[data-state="empty"] [data-show]:not([data-show~="empty"]),
.tool[data-state="ready"] [data-show]:not([data-show~="ready"]),
.tool[data-state="working"] [data-show]:not([data-show~="working"]),
.tool[data-state="done"] [data-show]:not([data-show~="done"]) { display: none !important; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* state 1: the drop zone */
.drop { flex: 1; display: grid; place-content: center; justify-items: center; gap: var(--s-2); text-align: center; cursor: pointer;
  padding: var(--s-5); border-radius: var(--r-md); background: var(--bg);
  border: 1.5px dashed color-mix(in oklab, var(--ink) 30%, transparent);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--ink); background: color-mix(in oklab, var(--ink) 4%, var(--bg)); }
.drop__pick { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.drop__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: var(--s-2);
  background: color-mix(in oklab, var(--ink) 9%, transparent); }
.drop__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop__title { font: 500 20px/1.3 var(--font-text); color: var(--ink); }
.drop__hint { font-size: var(--t-small); line-height: 1.5; color: var(--muted); max-width: 44ch; }

/* state 2: the chosen file, its sound drawn */
.clip, .result { flex: 1; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-md); background: var(--bg); min-width: 0; }
.clip__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-3); }
.clip__id { display: flex; align-items: baseline; gap: 2px var(--s-3); flex-wrap: wrap; min-width: 0; }
.clip__name { font: 500 17px/1.3 var(--font-text); overflow-wrap: anywhere; }
.clip__meta { font: 400 var(--t-label)/1.4 var(--font-mono); color: var(--muted); }
.textbtn { appearance: none; background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; font: 500 var(--t-small)/1 var(--font-text); color: var(--ink);
  text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--ink) 40%, transparent); text-underline-offset: 4px; }
.textbtn:hover { text-decoration-color: currentColor; }
.clip__body { flex: 1; display: grid; align-content: center; gap: var(--s-2); }
.ruler { display: flex; justify-content: space-between; font: 400 var(--t-label)/1 var(--font-mono); color: var(--muted); }
.progress { height: 4px; border-radius: 4px; background: color-mix(in oklab, var(--ink) 12%, transparent); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); border-radius: inherit; transition: width 200ms linear; }
.clip__status { font-size: var(--t-small); color: var(--muted); }

/* a waveform: bars cut as a mask (studio.js draws them), the played part in ink */
.wave { --p: 0%; position: relative; height: 72px; min-width: 0;
  background: linear-gradient(to right, var(--ink) var(--p), color-mix(in oklab, var(--ink) 58%, transparent) var(--p));
  -webkit-mask: var(--wave) center / 100% 100% no-repeat; mask: var(--wave) center / 100% 100% no-repeat; }
.wave--sm { height: 44px; } .wave--lg { height: 96px; }
.wave.is-off { background: color-mix(in oklab, var(--ink) 16%, transparent); }
.wavebox { position: relative; min-width: 0; }
.wavebox::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: var(--p, 0%); width: 2px; margin-left: -1px; border-radius: 2px; background: var(--accent); opacity: var(--head, 0); }

/* state 3: the result, to hear and download */
.result { position: relative; }
.result__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.result__title { font: 500 17px/1.3 var(--font-text); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 8%, transparent); }
.seg > button { appearance: none; border: 0; cursor: pointer; height: 38px; padding: 0 var(--s-4); border-radius: 999px; background: none;
  font: 500 var(--t-small)/1 var(--font-text); color: var(--muted); white-space: nowrap; }
.seg > button:hover { color: var(--ink); }
.seg > button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.playrow { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); }
.playbtn { appearance: none; border: 0; cursor: pointer; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ink); color: var(--bg); transition: transform var(--dur) var(--ease); }
.playbtn:hover { transform: scale(1.05); } .playbtn:active { transform: scale(.97); }
.playbtn svg { width: 18px; height: 18px; fill: currentColor; }
.playbtn .ic-pause, .playbtn[aria-pressed="true"] .ic-play { display: none; }
.playbtn[aria-pressed="true"] .ic-pause { display: block; }
.playbtn--sm { width: 44px; height: 44px; } .playbtn--sm svg { width: 15px; height: 15px; }
.time { font: 400 var(--t-label)/1 var(--font-mono); color: var(--muted); white-space: nowrap; min-width: 9ch; text-align: right; }

/* the stems of a clip, one lane each */
.lanes { flex: 1; display: grid; gap: var(--s-3); align-content: center; }
.lane { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: var(--s-3); }
.lane__name { font: 500 var(--t-small)/1.3 var(--font-text); }
.lane__name small { display: block; font: 400 var(--t-label)/1.3 var(--font-text); color: var(--muted); }
.lane.is-off .lane__name { color: var(--muted); }
.lane.is-off .wave { background: color-mix(in oklab, var(--ink) 16%, transparent); }
.lane:not(.is-off) .lane__off { display: none; }

/* the side column: one field, one list, the one button */
.field2 { display: grid; gap: var(--s-2); }
.field2 > label, .field2 > .field2__label { font: 500 var(--t-small)/1.4 var(--font-text); color: var(--ink); }
.gets { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.45; }
.gets li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--s-3); align-items: start; color: color-mix(in oklab, var(--ink) 84%, var(--surface)); }
.gets svg { width: 16px; height: 16px; margin-top: 3px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* the three switches of the music remover */
.switches { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); min-height: 56px; padding-block: var(--s-2); cursor: pointer; border-bottom: 1px solid var(--line); }
.switch:first-child { border-top: 1px solid var(--line); }
.switch__name { font: 500 16px/1.3 var(--font-text); }
.switch__name small { display: block; font: 400 var(--t-label)/1.35 var(--font-text); color: var(--muted); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 46px; height: 28px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 16%, transparent); transition: background-color var(--dur) var(--ease); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: var(--bg); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--action); outline-offset: 2px; }
.switch__state { display: none; }

/* downloads, once the result is there */
.files { display: grid; margin: 0; padding: 0; list-style: none; }
.files a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); min-height: 48px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line); font: 500 15px/1.3 var(--font-text); }
.files li:first-child a { border-top: 1px solid var(--line); }
.files a span { font: 400 var(--t-label)/1 var(--font-mono); color: var(--muted); }
.files a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 4%, transparent); }

/* ---------------------------------------------------------------- below the tool */
/* a deck: two takes of one clip, one over the other, so the pauses line up */
.deck { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: var(--s-5); display: grid; gap: var(--s-2); }
.deck__row { display: grid; grid-template-columns: auto 132px minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-md); background: var(--bg); }
.deck__meta { display: grid; gap: 2px; }
.deck__meta b { font: 500 16px/1.3 var(--font-text); }
.deck__meta span { font-size: var(--t-label); color: var(--muted); }
.deck__pick { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-2) var(--s-1) 0; font-size: var(--t-small); color: var(--muted); }

/* a card's panel holds one small piece of the studio */
.card > .panel.panel--flush { display: grid; place-items: center; padding: var(--s-5); --p-h: 220px; }
.panel::before { display: none; }
.frag { position: relative; z-index: 1; width: 100%; display: grid; gap: var(--s-3); }
.frag__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font: 400 var(--t-label)/1.2 var(--font-mono); color: color-mix(in oklab, var(--ink) 76%, transparent); }
.frag__bar b { font: 500 var(--t-small)/1.2 var(--font-text); color: var(--ink); }
.frag__video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; display: grid; align-items: end; padding: var(--s-3);
  background: linear-gradient(160deg, #3a2030, #1a0d15 70%); }
.frag__sub { justify-self: center; padding: 3px 10px; border-radius: 4px; background: rgb(0 0 0 / .62); color: #fff; font-size: var(--t-small); line-height: 1.4; text-align: center; }
.frag__lines { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.frag__lines li { display: grid; grid-template-columns: 5ch minmax(0, 1fr); gap: var(--s-3); font-size: var(--t-small); line-height: 1.4; color: var(--ink); }
.frag__lines time { font: 400 var(--t-label)/1.5 var(--font-mono); color: var(--muted); }
.frag__lines li.is-b { color: var(--muted); }
.frag__prompt { padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-strong); font-size: 16px; color: var(--ink); }
.frag .lane { grid-template-columns: 92px minmax(0, 1fr); }
.frag .wave { height: 32px; }
.card--link { text-decoration: none; }
.card__go { margin-top: var(--s-3); font: 500 15px/1.4 var(--font-text); color: var(--ink); display: inline-flex; gap: 6px; }
.card__go::after { content: "\2192"; transition: transform var(--dur) var(--ease); }
.card--link:hover .card__go::after { transform: translateX(3px); }

/* languages as a plain list in columns */
.langs { columns: 4; column-gap: var(--gutter); margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.5; }
.langs li { break-inside: avoid; padding-block: 7px; border-bottom: 1px solid var(--line); }
.langs small { color: var(--muted); font-size: var(--t-small); }
.deck--list { padding: var(--s-5) var(--s-6); }
.deck--list .langs li:nth-last-child(-n+1) { border-bottom: 0; }
.section-head > .link { justify-self: start; }

/* the model line under the other tools */
.modelrow { margin-top: var(--s-6); display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.modelrow p { max-width: 62ch; font-size: var(--t-lead); line-height: 1.5; }
.footer__note { color: var(--muted); font-size: var(--t-small); max-width: 62ch; }

/* a step's picture: the tool in that state, small */
[data-moment="pinned-chapters"] .mo-pc__visual.mo-pc__visual--lit { background: var(--surface); border: 1px solid var(--line); }
.mini { width: min(100%, 420px); display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--p-bg); border: 1px solid var(--line); text-align: left; }
.mini__drop { display: grid; place-items: center; gap: var(--s-2); padding: var(--s-6) var(--s-4); border-radius: var(--r-sm); border: 1.5px dashed color-mix(in oklab, var(--ink) 30%, transparent); font: 500 16px/1.3 var(--font-text); text-align: center; }
.mini__drop small { font: 400 var(--t-label)/1.4 var(--font-text); color: var(--muted); }
.mini__field { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 var(--s-4); border-radius: var(--r-sm); border: 1px solid var(--tool-line); font-size: 15px; }
.mini__field::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translateY(-3px); }
.mini__btn { display: grid; place-items: center; height: 44px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 15px/1 var(--font-text); }
.mini__rows { display: grid; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.mini__rows li { display: flex; justify-content: space-between; padding-block: 9px; border-bottom: 1px solid var(--line); }
.mini__rows li span { font: 400 var(--t-label)/1.6 var(--font-mono); color: var(--muted); }
.mini .switch { min-height: 44px; cursor: default; }
.mini .switch__name { font-size: 15px; }

/* ---------------------------------------------------------------- wide screens */
@media (min-width: 1024px) {
  .deck .wave { height: 112px; }
  .tool { min-height: min(440px, calc(100svh - 430px)); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .hero--tool { height: auto; min-height: 100svh; }
  .tool__stage { min-height: 280px; }
  .langs { columns: 3; }
}

/* ---------------------------------------------------------------- a phone held upright */
@media (max-width: 639px) {
  .hero--tool { --hgap: 12px; height: auto; min-height: 100svh; }
  .tooltabs { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 18px; }
  .tooltab { flex-direction: column; justify-content: center; height: 52px; padding: 0 2px; border-radius: 14px; gap: 0; font-size: 13px; white-space: normal; text-align: center; word-spacing: 100vw; }
  .tooltab svg { display: none; }
  .hero--tool .hero__c { margin-top: var(--s-5); gap: var(--s-2); }
  .hero--tool .hero__lead { font-size: 16px; }
  /* a phone: no box round the tool; the drop zone is the box, the controls stand on the page's own lines */
  .tool { grid-template-columns: minmax(0, 1fr); margin-top: var(--s-5); border: 0; border-radius: 0; background: none; overflow: visible; }
  .tool__stage { padding: 0; min-height: 0; }
  .tool__side { padding: var(--s-4) 0 0; gap: var(--s-4); }
  .clip, .result { background: var(--surface); border: 1px solid var(--line); }
  .pick__btn { background: var(--surface); }
  .seg > button { height: 44px; }
  .deck__pick { display: grid; } .deck__pick .seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .deck__pick .seg > button { padding: 0; }
  .tool .gets { display: none; }
  .drop { padding: var(--s-4); }
  .drop__icon { width: 40px; height: 40px; margin-bottom: 0; } .drop__icon svg { width: 18px; height: 18px; }
  .drop__title { font-size: 18px; }
  .clip, .result { padding: var(--s-4); gap: var(--s-3); }
  .wave { height: 56px; }
  .playrow { grid-template-columns: auto minmax(0, 1fr); } .playrow .time { grid-column: 1 / -1; text-align: left; }
  .lane { grid-template-columns: 88px minmax(0, 1fr); }
  .switch { min-height: 46px; padding-block: 0; } .tool .switch__name small { display: none; }
  .hero__lead--wide { display: none; }
  .wave--sm { height: 30px; } .lanes { gap: var(--s-1); }
  .tool[data-state="done"] .tool__foot { order: -1; margin-top: 0; }
  .result .textbtn { min-height: 36px; }
  .drop { min-height: 124px; }
  .deck { padding: var(--s-3); }
  .deck__row { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-3); }
  .deck__row .wavebox { grid-column: 1 / -1; grid-row: 2; }
  .langs, .langs[style] { columns: 3 !important; column-gap: var(--s-3); font-size: 15px; } .langs li { padding-block: 5px; } .langs small { display: block; font-size: 13px; }
  .h2-more, [data-only-wide] { display: none !important; }
  .deck--list { padding: var(--s-3) var(--s-4); }
  #compare .rows > li { padding-block: var(--s-2); } #compare .wave { height: 36px; } #compare .deck__row { padding: var(--s-2) var(--s-3); row-gap: var(--s-1); }
  #steps { min-height: 200lvh; }
  .card > .panel.panel--flush { --p-h: 276px; }
  #steps .mo-pc__visual.mo-pc__visual--lit { aspect-ratio: 1 / 1; }
}

/* additions */
.switch__track.is-on { background: var(--ink); }
.switch__track.is-on::after { transform: translateX(18px); background: var(--bg); }
.tool__kept { font-size: 15px; line-height: 1.45; color: color-mix(in oklab, var(--ink) 84%, var(--surface)); }
/* three cards stay three across from 1024: their panels hold fluid pieces, not fixed-width fragments */
@media (min-width: 1024px) { :is(#outputs, #uses, #tools) .grid > .card.span-4:has(> .panel) { grid-column: auto / span 4; } }
/* tablets: the three cards stay three across, the questions two across, the steps' pictures as tall as their piece */
@media (min-width: 640px) and (max-width: 1023px) {
  :is(#outputs, #uses, #tools) .grid > .card.span-4 { grid-column: auto / span 4; --c-pad: 20px; }
  #questions .grid > .faq.span-6 { grid-column: auto / span 6; }
  #steps .mo-pc__visual.mo-pc__visual--lit { aspect-ratio: auto; padding: var(--s-4); }
  #steps .mo-pc__steps { gap: var(--s-4); } #steps .mo-pc__step { padding-top: var(--s-4); }
  #steps .mini { gap: var(--s-2); padding: var(--s-3); } #steps .mini__drop { padding: var(--s-4); }
  .card > .panel.panel--flush { --p-h: 320px; }
  .tooltabs { width: 100%; } .tooltab { flex: 1; justify-content: center; padding: 0 var(--s-2); }
}

/* the price line by the button */
.tool__notes a, .priceline a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); text-underline-offset: 3px; }
.tool__notes a:hover { text-decoration-color: currentColor; }
.tool__notes > span:first-child { flex: 1 1 240px; }

/* change voice: six voices to pick from, or your own */
.voices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.voice { position: relative; display: block; cursor: pointer; }
.voice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.voice span { display: grid; place-items: center; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--tool-line); background: var(--bg); font: 500 15px/1 var(--font-text); color: var(--ink);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.voice:hover span { border-color: color-mix(in oklab, var(--ink) 45%, transparent); }
.voice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.voice input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }
.voice--own { grid-column: 1 / -1; }
.own { display: none; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; font-size: var(--t-small); color: var(--muted); }
.tool__side:has(.voice--own input:checked) .own { display: flex; }
.lines { display: grid; gap: var(--s-2); }
.lines summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 44px; font: 500 var(--t-small)/1.4 var(--font-text); list-style: none; }
.lines summary::after { content: "Edit"; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--ink) 40%, transparent); text-underline-offset: 4px; }
.lines[open] summary::after { content: "Hide"; }
.lines__t small { display: block; font: 400 var(--t-label)/1.4 var(--font-mono); color: var(--muted); }
.lines summary::-webkit-details-marker { display: none; }
.lines textarea, .prompt textarea { width: 100%; resize: none; border-radius: var(--r-sm); border: 1px solid var(--tool-line); background: var(--surface); color: var(--ink); font: 400 16px/1.5 var(--font-text); padding: var(--s-3); }
.lines textarea { height: 104px; margin-top: var(--s-2); }

/* sound effects: the description box is the stage */
.prompt { flex: 1; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-md); background: var(--bg); min-width: 0; }
.prompt label { font: 500 var(--t-small)/1.4 var(--font-text); }
.prompt textarea { flex: 1; min-height: 112px; font-size: 20px; line-height: 1.4; background: none; border: 0; padding: 0; }
.prompt textarea::placeholder { color: color-mix(in oklab, var(--ink) 38%, transparent); }
.prompt textarea:focus { outline: none; }
.prompt:focus-within { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--ink) 55%, transparent); }
.prompt__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font: 400 var(--t-label)/1.4 var(--font-mono); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.chip { appearance: none; cursor: pointer; height: 36px; padding: 0 var(--s-3); border-radius: 999px; border: 1px solid var(--tool-line); background: none; color: var(--ink); font: 400 var(--t-small)/1 var(--font-text); white-space: nowrap; }
.chip:hover { border-color: color-mix(in oklab, var(--ink) 50%, transparent); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.said { font: 400 18px/1.4 var(--font-text); color: var(--ink); }
.seg--full { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }

/* six example sounds */
.sounds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.sounds .deck__row { grid-template-columns: auto minmax(0, 1fr); }
.sounds .deck__meta b { font-size: 15px; }
.sounds .wavebox { grid-column: 1 / -1; }
.sounds .wave { height: 40px; }

/* pricing */
.hero--price { height: auto; min-height: 0; padding-bottom: var(--s-9); }
.hero--price .hero__c { justify-items: start; text-align: left; margin-inline: 0; max-width: 760px; }
.pack { display: grid; gap: var(--s-4); align-content: start; padding: var(--s-6); border: 1px solid var(--tool-line); border-radius: var(--r-lg); background: var(--surface); }
.pack__price { font: var(--display-weight) clamp(56px, 6vw, 88px)/1 var(--font-display); letter-spacing: var(--display-tracking-xl); }
.pack__price small { font: 400 var(--t-lead)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); margin-left: var(--s-2); }
.pack .btn { width: 100%; height: 52px; font-size: 17px; }
.pack ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); font-size: 15px; color: color-mix(in oklab, var(--ink) 84%, var(--surface)); }
.price { width: 100%; border-collapse: collapse; font-size: 16px; }
@media (min-width: 900px) { .price { display: table; } .price thead { display: table-header-group; } .price tbody { display: table-row-group; } .price tr { display: table-row; } .price th, .price td { display: table-cell; } }
main > section#credits { height: auto; }
.price th { text-align: left; font: 500 var(--t-label)/1.4 var(--font-text); color: var(--muted); padding: 0 var(--s-4) var(--s-3) 0; vertical-align: bottom; }
.price td { padding: var(--s-4) var(--s-4) var(--s-4) 0; border-top: 1px solid var(--line); vertical-align: top; }
.price td:first-child { font-weight: 500; }
.price td:first-child a { color: inherit; text-decoration: none; }
.price td:first-child a:hover { text-decoration: underline; text-underline-offset: 4px; }
.price .num { font-family: var(--font-mono); font-size: 15px; white-space: nowrap; }
.price small { display: block; color: var(--muted); font-size: var(--t-label); }
.price__grid { margin-top: var(--s-6); align-items: start; }
@media (max-width: 899px) {
  .price tr { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  /* a narrow screen: each tool is a block, its three figures in a row under its name */
  .price, .price tbody, .price tr, .price td { display: block; }
  .price thead { display: none; }
  .price tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1) var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--line); }
  .price td { border: 0; padding: 0; }
  .price td:first-child { grid-column: 1 / -1; font-size: 18px; margin-bottom: var(--s-1); }
  .price td[data-l]::before { content: attr(data-l); display: block; font: 500 var(--t-label)/1.4 var(--font-text); color: var(--muted); }
}
@media (max-width: 639px) {
  .voices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prompt { padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); }
  .prompt textarea { min-height: 84px; font-size: 18px; }
  .chips { flex-wrap: nowrap; overflow: hidden; } .chips li:nth-child(n+3) { display: none; }
  .sounds { grid-template-columns: minmax(0, 1fr); }
  .pack { padding: var(--s-5); }
  .lines textarea { height: 88px; }
}
.voice > span.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
span.voice { cursor: default; }
.own--always { display: flex; }
.seg--full > button { height: 42px; padding: 0; }
.frag .voices { gap: var(--s-2); }
.deck__row--plain { grid-template-columns: 132px minmax(0, 1fr) auto; }
@media (max-width: 639px) { .deck__row--plain { grid-template-columns: minmax(0, 1fr) auto; } }

@media (max-width: 639px) { .tool[data-kind="prompt"][data-state="done"] .tool__foot { order: 0; } .pair:has(> [data-show]:only-child) { grid-template-columns: minmax(0, 1fr); } }
.tool[data-state="done"] .pair { grid-template-columns: minmax(0, 1fr); }

/* a short window (a small laptop, a phone on its side): sections grow with what they hold instead of running under the next one */
main > section.hero.hero--tool { height: auto; min-height: 100svh; }
main > section.hero.hero--price { min-height: 0; }
main > section.section:not([data-moment]) { height: auto; min-height: calc(var(--h, 1) * 100svh); }
footer.footer.closing { height: auto; min-height: 100svh; }

/* after the review */
.files a::after { content: "\2193"; font: 400 16px/1 var(--font-text); color: var(--muted); }
.files a { grid-template-columns: minmax(0, 1fr) auto auto; }
.files a:hover::after { color: var(--ink); }
.tool__notes { display: grid; gap: 2px; }
.tool__notes > span:first-child { flex: none; }
.voices li { position: relative; }
.voice__hear { appearance: none; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 32px; height: 40px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--muted); border-radius: var(--r-sm); }
.voice__hear svg { width: 12px; height: 12px; fill: currentColor; }
.voice__hear:hover, .voice__hear[aria-pressed="true"] { color: var(--ink); }
.voices li:has(input:checked) .voice__hear { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.voices li:has(input:checked) .voice__hear:hover, .voices li:has(input:checked) .voice__hear[aria-pressed="true"] { color: var(--bg); }
.voices li:has(.voice__hear) .voice > span { padding-left: 22px; }
.price td:first-child a span { color: var(--muted); }
@media (max-width: 639px) {
  /* the first screen on a phone has about 660px under the browser's bars: keep the main button inside it */
  .hero--tool .hero__c { margin-top: var(--s-4); }
  .clip .ruler { display: none; } .clip .wave, .clip .wave--lg { height: 40px; }
  .clip { gap: var(--s-2); }
  .tool .voices { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .tool .voice--own { grid-column: span 2; }
  .tool .voice span { font-size: 14px; }
  .prompt { gap: var(--s-2); } .prompt textarea { min-height: 60px; }
  .tool[data-kind="prompt"] .own--always { order: 3; }
  .tool[data-kind="prompt"] .tool__side { gap: var(--s-3); }
  .lines summary { min-height: 40px; }
}
