/* The tool's own clothes — only what .fx doesn't already provide.
 * Everything colors through the site tokens; nothing invents a value. */

.fx--live { cursor: default; }

/* The drop zone is the tool's front door: one strong line, one quiet
 * promise. It shrinks to a slim reload strip once a song is loaded —
 * the panel becomes the point. */
.tool__drop {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 26px 18px; margin-bottom: 14px;
  border: 1.5px dashed var(--seam); border-radius: var(--r-card, 20px);
  background: var(--ground-lift, rgb(255 255 255 / .045));
  cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.tool__drop strong { font-weight: var(--w-strong, 800); }
.tool__drop span { color: var(--ink-quiet); font-size: .88em; }
.tool__drop.is-over { border-color: var(--accent-on); background: rgb(255 255 255 / .08); }
.tool__file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.is-loaded .tool__drop { padding: 10px 14px; grid-auto-flow: column; gap: 10px; }
.is-loaded .tool__drop strong { font-size: .88em; font-weight: var(--w-quiet, 600); }
.is-loaded .tool__drop strong::after { content: " — swap the song"; color: var(--ink-quiet); font-weight: 400; }
.is-loaded .tool__drop span { display: none; }

/* Real slider affordance on the tempo track; the pitch track stays a
 * readout (it follows), and says so on hover rather than pretending. */
.tool__track { cursor: ew-resize; touch-action: none; }
.tool__track:focus-visible { outline: 2px solid var(--accent-on); outline-offset: 4px; }
.tool__row--derived { opacity: .78; }
.tool__row--derived .fx__track { cursor: help; }

.fx--live .fx__preset { cursor: pointer; border: 0; font: inherit; }

/* Transport: one round play button, one bar, one clock. */
.tool__transport {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
}
.tool__play {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: var(--accent-on); color: var(--accent-ink, #150A20);
  cursor: pointer; position: relative;
}
.tool__play::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0; border-style: solid;
  border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor;
  translate: 2px 0;
}
.tool__play.is-playing::before {
  width: 12px; height: 14px; border: 0; translate: 0 0;
  background:
    linear-gradient(currentColor, currentColor) left  / 4px 100% no-repeat,
    linear-gradient(currentColor, currentColor) right / 4px 100% no-repeat;
}
.tool__bar {
  flex: 1; height: 8px; border-radius: 999px;
  background: rgb(255 255 255 / .15); overflow: hidden; cursor: pointer;
}
.tool__fill {
  height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: left center;
  background: var(--accent-on); border-radius: inherit;
}
.tool__time {
  flex: none; font-variant-numeric: tabular-nums;
  color: var(--ink-quiet); font-size: .88em; min-width: 8ch; text-align: right;
}

.tool__msg { min-height: 1.4em; margin: 10px 0 0; color: var(--ink-quiet); font-size: .92em; }

/* --------------------------------------------------------------- reverb */

.tool__reverb {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px solid var(--seam-hair, rgb(255 255 255 / .07));
}
.tool__revtoggle {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; background: none; color: inherit; font: inherit;
  font-weight: var(--w-strong, 800); cursor: pointer; padding: 4px 0;
}
.tool__revknob {
  width: 38px; height: 22px; border-radius: 999px;
  background: rgb(255 255 255 / .18); position: relative;
  transition: background .2s ease;
}
.tool__revknob::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 999px; background: #fff;
  transition: translate .2s ease;
}
.tool__revtoggle.on .tool__revknob { background: var(--accent-on); }
.tool__revtoggle.on .tool__revknob::after { translate: 16px 0; }

.tool__spaces { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 2px; }
.tool__space { font-size: .82em; }

/* Progressive disclosure, the app's own law mirrored: the panel grows when
 * an effect turns on. Off = the rooms and the knob fold away entirely —
 * a disabled section that stays open is a decision the user didn't make
 * still asking to be read. (0fr -> 1fr animates height cleanly.) */
.tool__revbody {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.tool__revinner { overflow: hidden; min-height: 0; }
.tool--reverb .tool__revbody { grid-template-rows: 1fr; }
@media (prefers-reduced-motion: reduce) { .tool__revbody { transition: none; } }

/* Before a song exists, the panel is quiet and the drop zone is the one
 * vibrant thing — one primary action per region. */
.fx--live:not(.is-loaded) .fx__song,
.fx--live:not(.is-loaded) .fx__row,
.fx--live:not(.is-loaded) .fx__link,
.fx--live:not(.is-loaded) .tool__reverb,
.fx--live:not(.is-loaded) .fx__presets,
.fx--live:not(.is-loaded) .tool__transport { opacity: .5; }
.fx__song, .fx__row, .fx__link, .tool__reverb, .fx__presets, .tool__transport {
  transition: opacity .3s ease;
}

/* The locked pitch row answers a touch instead of ignoring it. */
@keyframes toolNudge {
  0%, 100% { translate: 0 0; }
  25% { translate: -4px 0; } 55% { translate: 3px 0; } 80% { translate: -1px 0; }
}
.tool__nudge { animation: toolNudge .3s ease; }
@media (prefers-reduced-motion: reduce) { .tool__nudge { animation: none; } }

/* --------------------------------------------------------------- export */

.tool__export {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--seam-hair, rgb(255 255 255 / .07));
}
.tool__exbtn {
  border: 1px solid var(--seam, rgb(255 255 255 / .12));
  background: rgb(255 255 255 / .08); color: inherit; font: inherit;
  font-weight: var(--w-strong, 800); font-size: .92em;
  padding: 10px 18px; border-radius: var(--r-pill, 999px); cursor: pointer;
}
.tool__exbtn--go { background: var(--accent-on); color: var(--accent-ink, #150A20); border-color: transparent; }
.tool__exbtn:disabled { opacity: .45; cursor: default; }
.tool__exnote { flex-basis: 100%; color: var(--ink-faint, rgb(255 255 255 / .55)); font-size: .8em; }

/* -------------------------------------------------- export overlay */

.tool__overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 24px;
  background: rgb(8 5 16 / .78);
  backdrop-filter: blur(14px) saturate(.85);
  -webkit-backdrop-filter: blur(14px) saturate(.85);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.tool__overlay.on { opacity: 1; pointer-events: auto; }

.tool__ocard {
  position: relative; width: min(440px, 100%);
  display: grid; gap: 14px; justify-items: center; text-align: center;
  padding: 34px 26px 26px; border-radius: var(--r-card, 20px);
  background: linear-gradient(158deg, rgb(255 255 255 / .12), rgb(255 255 255 / .05));
  border: 1px solid rgb(255 255 255 / .17);
}
.tool__oclose {
  position: absolute; top: 10px; right: 12px;
  border: 0; background: none; color: var(--ink-quiet); font-size: 24px;
  line-height: 1; cursor: pointer; padding: 6px;
}

.tool__slide { min-height: 108px; display: grid; gap: 8px; align-content: start; }
.tool__slideh {
  font-family: var(--display, inherit); font-weight: var(--w-catch, 900);
  font-size: clamp(22px, 5.4vw, 27px); line-height: 1.12;
  background: linear-gradient(92deg, #fff, var(--accent-on));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tool__slidep { margin: 0; color: var(--ink-body, inherit); font-size: .95em; max-width: 34ch; }
.tool__slide.in { animation: toolSlideIn .5s cubic-bezier(.22, .7, .25, 1); }
@keyframes toolSlideIn {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) { .tool__slide.in { animation: none; } }

.tool__dots { display: flex; gap: 7px; }
.tool__dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: rgb(255 255 255 / .25); transition: background .3s, scale .3s;
}
.tool__dot.on { background: var(--accent-on); scale: 1.25; }

.tool__octa {
  display: inline-block; padding: 11px 26px; border-radius: var(--r-pill, 999px);
  background: var(--accent-on); color: var(--accent-ink, #150A20);
  font-weight: var(--w-strong, 800); text-decoration: none;
}

.tool__obar {
  width: 100%; height: 8px; border-radius: 999px;
  background: rgb(255 255 255 / .14); overflow: hidden;
}
.tool__ofill {
  height: 100%; width: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-on), var(--fresh-on, var(--accent-on)));
  transform: scaleX(0); transform-origin: left center;
  transition: transform .4s ease;
}
.tool__oeta { color: var(--ink-quiet); font-size: .85em; min-height: 1.2em; }

.tool__octawrap { display: grid; gap: 6px; justify-items: center; }
.tool__octalabel {
  font-size: .72em; font-weight: var(--w-strong, 800);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-quiet);
}
.tool__octa img { display: block; }
.tool__overlay.is-done .tool__ofill { background: var(--fresh-on, var(--accent-on)); }

.tool__loop {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--seam, rgb(255 255 255 / .12));
  background: rgb(255 255 255 / .07); color: var(--ink-quiet);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.tool__loop.on { background: var(--accent-on); color: var(--accent-ink, #150A20); border-color: transparent; }
.tool__overlay.is-done .tool__dots { display: none; }
.tool__overlay.is-done .tool__slideh { background: linear-gradient(92deg, #fff, var(--fresh-on, var(--accent-on))); -webkit-background-clip: text; background-clip: text; }
.tool__exnote a { color: var(--accent-on); font-weight: var(--w-strong, 800); }

.tool__slideimg {
  width: auto; max-width: min(280px, 100%); max-height: 150px;
  object-fit: contain; border-radius: 14px;
  border: 1px solid rgb(255 255 255 / .14);
  justify-self: center; display: block;
}
/* NOTE (his call, r-tool-4): raw screenshots are a placeholder — the slides
 * become designed, animated compositions in the T2.5 pass. */

/* ----------------------------------------------- player-grade additions */

.tool__ab { width: auto; padding: 0 10px; font-size: 13px; font-weight: 700; }
.tool__ab.armed { border-color: var(--accent-on); color: var(--accent-on); }
.tool__ab.on { background: var(--accent-on); color: var(--accent-ink, #150A20); }
.tool__volwrap { flex: 0 0 74px; display: flex; align-items: center; }
.tool__vol { width: 74px; height: 6px; }
.tool__bar { position: relative; }
.tool__peaks {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.tool__fill { position: relative; opacity: .55; }

.tool__rack {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--seam-hair, rgb(255 255 255 / .07));
}
.tool__rackkey {
  font-size: .78em; font-weight: var(--w-strong, 800);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  flex-basis: 100%;
}
.tool__rackchip { font-size: .82em; opacity: .85; }
.tool__lock { opacity: .6; font-size: .85em; }
.tool__racklist {
  list-style: none; margin: 0; padding: 0; text-align: left;
  display: grid; gap: 8px; font-size: .92em; color: var(--ink-body);
}
.tool__racklist li.hot { color: var(--accent-on); }
.tool__racklist strong { color: inherit; }

/* ================================================================
   THE INSTRUMENT (r-tool-6 — his critique, PLAYBOOK applied)
   The tool IS the hero visual: an audio machine in a dimmed field,
   light bursting from behind it (design-moves §6). Everything else
   on the first viewport is subordinate to it.
   ================================================================ */

/* The field steps back on tool pages — atmosphere, not protagonist. */
.page-tool #rays { opacity: .38; }
.page-tool #dust { opacity: .45; }

.hero-tool {
  --veil: .90;
  min-height: 100svh;
  display: grid; align-content: start;
  padding-top: clamp(24px, 6svh, 64px);
}
.hero-tool__in {
  display: grid; justify-items: center; text-align: center;
  gap: 10px;
}
.hero-tool__h1 { font-size: clamp(34px, 5vw, 52px); margin-top: 6px; }
.hero-tool__sub { max-width: 46ch; color: var(--ink-body); }

/* The stage: an enormous soft light burst behind the machine — the one
   bright thing on the viewport, and it belongs to the subject. */
.hero-tool__stage {
  position: relative; width: 100%;
  display: grid; justify-items: center;
  margin-top: clamp(14px, 3svh, 30px);
  padding-bottom: clamp(28px, 6svh, 64px);
}
.hero-tool__stage::before {
  content: ""; position: absolute; inset: -12% -20%;
  background:
    radial-gradient(ellipse 62% 55% at 50% 42%,
      oklch(0.55 0.19 var(--hue, 294) / .55), transparent 68%),
    radial-gradient(ellipse 40% 30% at 50% 38%,
      oklch(0.75 0.16 var(--hue, 294) / .35), transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}

/* The machine: ~720px of instrument, not a settings card. */
.hero-tool .fx--live {
  position: relative;
  width: min(720px, 100%);
  max-width: none;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 26px;
  background: linear-gradient(160deg, rgb(255 255 255 / .14), rgb(255 255 255 / .055));
  border: 1px solid rgb(255 255 255 / .22);
  box-shadow: 0 30px 80px rgb(0 0 0 / .45);
}

/* Instrument type scale — read from across the room (design-moves §4
   corollary: nobody mistakes an illustration-scale control for chrome). */
.hero-tool .fx__key {
  font-size: 12px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-quiet);
  min-width: 64px; text-align: left;
}
.hero-tool .fx__row { padding: 13px 0; gap: 14px; }
.hero-tool .fx__track { height: 10px; }
.hero-tool .fx__val { font-size: 1.02em; min-width: 78px; }
.hero-tool .fx__name { font-size: 1.15em; }

/* The drop zone is the machine's face before a song exists — the
   instruction lives IN the instrument, not above it. */
.hero-tool .tool__drop { padding: 34px 20px; gap: 6px; }
.hero-tool .tool__drop strong { font-size: 1.25em; font-weight: 900; }
.tool__formats {
  color: var(--ink-faint); font-size: .78em; letter-spacing: .08em;
}

/* Export is THE action: one wide accent bar, WAV as its quiet aside. */
.hero-tool .tool__export { gap: 12px; }
.hero-tool .tool__exbtn--go {
  flex: 1 1 auto; padding: 15px 22px; font-size: 1.02em;
  box-shadow: 0 8px 28px oklch(0.7 0.16 var(--hue, 294) / .35);
}

/* Rack modal illustrations — the function drawn, not described. */
.tool__fxart {
  width: 200px; height: 84px; margin-inline: auto;
  display: grid; place-items: center;
}
.tool__fxart svg { width: 100%; height: 100%; overflow: visible; }
.tool__fxart .st { stroke: var(--accent-on); stroke-width: 3; fill: none; stroke-linecap: round; }
.tool__fxart .st2 { stroke: rgb(255 255 255 / .4); stroke-width: 3; fill: none; stroke-linecap: round; }
.tool__fxart .fl { fill: var(--accent-on); }
@keyframes fxartPulse { 50% { transform: scaleY(1.5); } }
@keyframes fxartSweep { 50% { transform: translateX(14px); } }
@keyframes fxartOut { 50% { transform: translateX(8px); } }
@keyframes fxartOutL { 50% { transform: translateX(-8px); } }
.tool__fxart [data-a="pulse"] { animation: fxartPulse 1.1s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.tool__fxart [data-a="sweep"] { animation: fxartSweep 1.6s ease-in-out infinite; }
.tool__fxart [data-a="out"] { animation: fxartOut 1.4s ease-in-out infinite; }
.tool__fxart [data-a="outl"] { animation: fxartOutL 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tool__fxart [data-a] { animation: none; } }

/* Slide scenes — compositions, not screenshots. A framed device floating
   over drifting light, caption owning its own line. */
.tool__scene {
  position: relative; width: min(300px, 100%); height: 170px;
  margin-inline: auto; border-radius: 16px; overflow: hidden;
  background: linear-gradient(150deg, oklch(0.35 0.12 var(--hue, 294)), oklch(0.2 0.08 calc(var(--hue, 294) - 40)));
}
.tool__scene .orb {
  position: absolute; border-radius: 999px; filter: blur(18px);
  background: oklch(0.7 0.17 var(--hue, 294) / .55);
  animation: sceneDrift 5s ease-in-out infinite alternate;
}
.tool__scene .orb--b { background: oklch(0.8 0.14 calc(var(--hue, 294) + 60) / .4); animation-duration: 7s; }
@keyframes sceneDrift { to { translate: 12px -10px; } }
.tool__scene .dev {
  position: absolute; left: 50%; top: 12px; translate: -50% 0;
  width: 84px; border-radius: 12px; overflow: hidden;
  border: 2px solid rgb(255 255 255 / .35);
  box-shadow: 0 12px 30px rgb(0 0 0 / .5);
  animation: sceneFloat 4s ease-in-out infinite alternate;
}
.tool__scene .dev img { display: block; width: 100%; height: auto; }
.tool__scene .dev--wide {
  width: 190px; border-radius: 10px; top: 28px;
}
@keyframes sceneFloat { to { translate: -50% -6px; } }
@media (prefers-reduced-motion: reduce) {
  .tool__scene .orb, .tool__scene .dev { animation: none; }
}

/* The feature strip under the tool (grid--3 fallback if pages.css lacks it) */
.tool-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px;
  text-align: left; }
/* Fixed counts, never an orphan: 1 -> 2 -> 3x2 -> 1x6. */
.tool-facts { grid-template-columns: 1fr; }
@media (min-width: 640px)  { .tool-facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tool-facts { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1640px) { .tool-facts { grid-template-columns: repeat(6, 1fr); } }
.tool-facts li { color: var(--ink-body); font-size: .95em; line-height: 1.5; }
.tool-facts strong { color: var(--ink, #fff); }

/* ================================================================
   ONE FRAME ON A LAPTOP (r-tool-7). A 13" MacBook viewport is wide
   and short (~1280x715): the machine spends WIDTH, not height —
   two columns on desktop, and every vertical gap earns its keep.
   ================================================================ */

.page-tool #rays { opacity: .25; }
.page-tool #dust { opacity: .35; }
.field-off #rays, .field-off #dust { display: none; }

.tool__fieldbtn {
  position: fixed; right: 14px; bottom: 14px; z-index: 40;
  border: 1px solid var(--seam, rgb(255 255 255 / .12));
  background: rgb(20 12 36 / .7); color: var(--ink-quiet);
  font: inherit; font-size: 12px; padding: 7px 12px;
  border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tool__fieldbtn.on { color: var(--accent-on); border-color: var(--accent-on); }

/* Height discipline: the hero's type scales by viewport HEIGHT too. */
.hero-tool { padding-top: clamp(12px, 3svh, 40px); }
.hero-tool__h1 { font-size: clamp(26px, min(4.6vw, 6svh), 46px); }
.hero-tool__sub { font-size: clamp(15px, 2.2svh, 18px); }
.hero-tool__in { gap: 6px; }
.hero-tool__stage { margin-top: clamp(8px, 2svh, 20px); }
.hero-tool .fx--live { padding: clamp(16px, 2.6svh, 26px) clamp(18px, 2.4vw, 30px); }
.hero-tool .fx__row { padding: clamp(7px, 1.2svh, 12px) 0; }
.hero-tool .tool__drop { padding: clamp(16px, 3svh, 28px) 18px; }
.hero-tool .tool__transport { margin-top: clamp(8px, 1.4svh, 14px); }
.hero-tool .tool__export { margin-top: clamp(8px, 1.4svh, 14px); padding-top: clamp(8px, 1.4svh, 14px); }
.hero-tool .tool__reverb { padding-top: clamp(8px, 1.4svh, 12px); }
.hero-tool .tool__rack { padding-top: clamp(8px, 1.4svh, 12px); margin-top: 6px; }

/* The wide machine: two columns from 1000px up. Left is the dial side,
   right is the sound side, transport and export span. */
@media (min-width: 1000px) {
  .hero-tool .fx--live {
    width: min(940px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(22px, 3vw, 40px);
    grid-template-areas:
      "drop drop"
      "song chain"
      "presets chain"
      "tempo chain"
      "pitch chain"
      "link chain"
      "transport transport"
      "export export"
      "msg msg";
    align-content: start;
  }
  .hero-tool .tool__dropbar { grid-area: drop; }
  .hero-tool .fx__song { grid-area: song; }
  .hero-tool .tool__r-tempo { grid-area: tempo; }
  .hero-tool .tool__r-pitch { grid-area: pitch; }
  .hero-tool .fx__link { grid-area: link; align-self: start; }
  .hero-tool .tool__chain { grid-area: chain; align-self: start; }
  .hero-tool .fx__presets { grid-area: presets; align-self: start; padding-top: 2px; }
  .hero-tool .tool__transport { grid-area: transport; }
  .hero-tool .tool__export { grid-area: export; }
  .hero-tool .tool__msg { grid-area: msg; }
  .is-loaded .tool__drop { padding: 8px 14px; }
}

.fact-ic {
  width: 26px; height: 26px; display: block; margin-bottom: 8px;
  stroke: var(--accent-on); stroke-width: 1.8; fill: none;
}
.fact-ic circle, .fact-ic rect[x='5'] { fill: none; }

/* Laptop-short viewports (the 13" MacBook case): every vertical costume
   comes off. The machine, whole, in one frame, is the contract. */
@media (min-width: 1000px) and (max-height: 800px) {
  .page-tool .crumbs { display: none; }
  .hero-tool { padding-top: 8px; }
  .hero-tool__h1 { font-size: clamp(24px, 3.6svh, 34px); }
  .hero-tool__h1 br { display: none; }
  .hero-tool__sub { font-size: 14px; }
  .hero-tool__in { gap: 3px; }
  .hero-tool__stage { margin-top: 8px; padding-bottom: 16px; }
  .hero-tool .fx--live { padding: 12px 24px 14px; row-gap: 0; }
  .hero-tool .tool__drop { padding: 12px 16px; margin-bottom: 8px; }
  .hero-tool .tool__drop strong { font-size: 1.05em; }
  .hero-tool .fx__song { padding: 2px 0 6px; }
  .hero-tool .fx__row { padding: 6px 0; }
  .hero-tool .fx__link { padding: 4px 0; }
  .hero-tool .fx__presets { padding-top: 6px; }
  .hero-tool .tool__transport { margin-top: 8px; }
  .hero-tool .tool__export { margin-top: 8px; padding-top: 8px; }
  .hero-tool .tool__exbtn--go { padding: 11px 20px; }
  .hero-tool .tool__msg { margin-top: 4px; min-height: 1em; font-size: .85em; }
  .hero-tool .tool__revbody { font-size: .95em; }
  .is-loaded .tool__drop { padding: 6px 12px; margin-bottom: 6px; }
}

@media (min-width: 1000px) and (max-height: 800px) {
  .hero-tool__stage { padding-bottom: 4px; }
  .hero-tool .tool__drop { margin-bottom: 4px; }
  .hero-tool .fx__song { padding-bottom: 4px; }
  .hero-tool .tool__transport { margin-top: 6px; }
  .hero-tool .tool__export { margin-top: 6px; padding-top: 6px; }
}

@media (min-width: 1000px) and (max-height: 800px) {
  /* The status line floats under the machine instead of inside its frame —
     it is occasional speech, not anatomy. */
  .hero-tool .fx--live { position: relative; }
  .hero-tool .tool__msg {
    position: absolute; left: 24px; right: 24px; top: 100%;
    margin: 6px 0 0; min-height: 0; text-align: center;
  }
}

/* ================================================================
   r-tool-8: empty = all door, loaded = all workspace.
   ================================================================ */

/* The field falls to a whisper. */
.page-tool #rays { opacity: .15; }
.page-tool #dust { opacity: .25; }

/* RIGID MACHINE (r-tool-9): the full UI is always present. Empty = every
   control dimmed and disabled; only the drop bar and the demo key are live.
   State changes swap content, never the container's shape. */
.fx--live:not(.is-loaded) .fx__song,
.fx--live:not(.is-loaded) .fx__presets,
.fx--live:not(.is-loaded) .fx__row,
.fx--live:not(.is-loaded) .fx__link,
.fx--live:not(.is-loaded) .tool__chain,
.fx--live:not(.is-loaded) .tool__transport,
.fx--live:not(.is-loaded) .tool__export {
  opacity: .38; pointer-events: none; filter: saturate(.6);
  transition: opacity .35s ease, filter .35s ease;
}
.fx--live:not(.is-loaded) { opacity: 1 !important; }

/* Workspace mode: once a song exists the marketing voice steps aside. */
.tool-live .hero-tool__sub { display: none; }
.tool-live .hero-tool__h1 { font-size: clamp(17px, 2.4svh, 20px); opacity: .85; }
.tool-live .hero-tool { padding-top: 10px; }
.tool-live .hero-tool__stage { margin-top: 6px; }
.hero-tool__h1, .hero-tool__sub { transition: font-size .3s ease, opacity .3s ease; }

/* Contrast floor: quiet is allowed, illegible is not. */
.hero-tool .fx__sub { color: var(--ink-body); }
.tool__rackkey { color: var(--ink-quiet); }
.tool__formats { color: var(--ink-quiet); }
.tool__exnote { color: var(--ink-quiet); }
.page-tool .crumbs, .page-tool .crumbs a { color: var(--ink-body); }

/* The waveform earns its height. */
.hero-tool .tool__bar { height: 14px; border-radius: 7px; }

/* The pinned transport: a slim fixed workbench edge, shown only when the
   machine's own controls have scrolled away. */
.tool__tdock {
  position: fixed; left: 50%; bottom: 12px; translate: -50% 0; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  width: min(560px, calc(100% - 24px));
  padding: 8px 12px; border-radius: 999px;
  background: rgb(18 10 34 / .88);
  border: 1px solid rgb(255 255 255 / .18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgb(0 0 0 / .5);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.tool__tdock.on { opacity: 1; pointer-events: auto; }
.tool__tdock-play { flex: 0 0 36px; width: 36px; height: 36px; }
.tool__tdock .tool__bar { height: 8px; }
.tool__tdock .tool__time { min-width: 5ch; }
.tool__tdock-exp { padding: 8px 16px; font-size: .88em; flex: none; box-shadow: none; }

@media (min-width: 1000px) and (max-height: 800px) {
  .hero-tool .tool__export { margin-top: 5px; padding-top: 5px; gap: 8px; }
  .hero-tool .tool__exnote { font-size: .74em; margin-top: -2px; }
  .hero-tool .tool__exbtn--go { padding: 10px 20px; }
  .is-loaded .tool__drop { padding: 5px 12px; margin-bottom: 4px; }
  .hero-tool .fx__song { padding-bottom: 2px; }
  .hero-tool .fx__presets { padding-top: 0; }
  .tool-live .hero-tool__h1 { font-size: 16px; }
  .tool-live .hero-tool { padding-top: 6px; }
  .tool-live .hero-tool__stage { margin-top: 4px; }
}

/* The drop bar: one strip, one height, two sentences. */
.tool__dropbar {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 8px 8px 16px;
  border: 1.5px dashed var(--seam); border-radius: 14px;
  background: var(--ground-lift, rgb(255 255 255 / .045));
  transition: border-color .2s ease, background .2s ease;
}
.fx--live.is-over .tool__dropbar { border-color: var(--accent-on); background: rgb(255 255 255 / .1); }
.tool__droplab { flex: 1; cursor: pointer; display: block; }
.tool__droptext strong { font-weight: var(--w-strong, 800); }
.is-loaded .tool__dropbar { border-style: solid; }
.is-loaded .tool__droplab:hover .tool__droptext strong { color: var(--accent-on); }
.tool__demo {
  flex: none; border: 1px solid var(--seam, rgb(255 255 255 / .12));
  background: rgb(255 255 255 / .09); color: inherit; font: inherit;
  font-size: .88em; font-weight: 700; padding: 9px 16px;
  border-radius: 999px; cursor: pointer; pointer-events: auto;
}
.tool__demo:hover { border-color: var(--accent-on); color: var(--accent-on); }

/* The signal chain rack: one column, one reading direction. */
.tool__chain {
  border: 1px solid var(--seam-hair, rgb(255 255 255 / .07));
  border-radius: 14px; padding: 12px 14px;
  display: grid; gap: 8px; align-content: start;
}
.tool__chain .tool__rackkey { flex-basis: auto; margin-bottom: 2px; }
.tool__module { border-top: 0 !important; padding-top: 0 !important; margin-top: 0 !important; }
.tool__chainrows { display: grid; gap: 6px; }
.tool__chainrow {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--seam-hair, rgb(255 255 255 / .07));
  background: rgb(255 255 255 / .04); color: var(--ink-body);
  font: inherit; font-size: .88em; padding: 7px 12px;
  border-radius: 10px; cursor: pointer; text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.tool__chainrow:hover { background: rgb(255 255 255 / .09); border-color: var(--seam); }
.tool__chainrow .tool__lock { color: var(--accent-on); font-weight: 800; }

/* r-tool-10 polish */
.tool__dropic { flex: none; width: 22px; height: 22px; color: var(--accent-on); }
.tool__dropic svg { width: 100%; height: 100%; display: block; }
.tool__droplab { display: flex; align-items: center; gap: 10px; }

/* Reverb wears the same box as every other chain module — it IS one; the
   rooms and mix unfold inside the box when it is on. */
.tool__module {
  border: 1px solid var(--seam-hair, rgb(255 255 255 / .07)) !important;
  background: rgb(255 255 255 / .04);
  border-radius: 10px; padding: 7px 12px !important;
  transition: background .15s ease, border-color .15s ease;
}
.tool--reverb .tool__module { border-color: var(--accent-on) !important; background: rgb(255 255 255 / .07); }
.tool__revtoggle { width: 100%; justify-content: space-between; flex-direction: row-reverse; font-size: .88em; padding: 0; }
.tool__revtoggle .tool__revknob { flex: none; }
.tool__spaces { margin-top: 8px; }

/* Three-device fan for the slideshow scenes */
.tool__scene .dev--fan { width: 72px; top: 16px; }
.tool__scene .dev--fan0 { left: 22%; rotate: -7deg; animation-delay: .4s; }
.tool__scene .dev--fan1 { left: 50%; top: 8px; z-index: 2; width: 80px; }
.tool__scene .dev--fan2 { left: 78%; rotate: 7deg; animation-delay: .8s; }
.tool__scene .dev--fan0, .tool__scene .dev--fan2 { filter: brightness(.85); }

/* The app band = the homepage band pattern verbatim: looping rail behind,
   copy panel over it, scrim on (it exists FOR this layout). */
.toolband { display: grid; gap: clamp(48px, 9svh, 110px); padding: clamp(36px, 7svh, 80px) 0; }
.toolband__panel { max-width: 52ch; }
.toolband__cta { display: grid; gap: 6px; justify-items: start; padding-top: 8px; }



/* Embedded machine (retrofit pages): same instrument, no full-height hero. */
.hero-tool--embed { min-height: 0; padding: clamp(28px, 6svh, 64px) 0; }

/* r-tool-16: shorter machine, bigger voice. */

/* Song header centered — it is the machine's title, not a side note. */
.hero-tool .fx__song { display: grid; justify-items: center; text-align: center; }

/* Four presets, one row — smaller pills that never wrap to a lonely 4th. */
.hero-tool .fx__presets { flex-wrap: nowrap; gap: 6px; }
.hero-tool .fx__preset { font-size: .8em; padding: 7px 10px; white-space: nowrap; flex: 1 1 0; text-align: center; }

/* The chain tiles: six effects as icon tiles, 3x2 — invitations, not rows. */
.tool__chaintiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tool__tile {
  display: grid; justify-items: center; gap: 2px;
  border: 1px solid var(--seam-hair, rgb(255 255 255 / .07));
  background: rgb(255 255 255 / .04); color: var(--ink-body);
  font: inherit; padding: 8px 4px 7px; border-radius: 10px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, translate .15s ease;
}
.tool__tile:hover { background: rgb(255 255 255 / .1); border-color: var(--accent-on); translate: 0 -1px; }
.tool__tileart { width: 56px; height: 24px; display: block; }
.tool__tileart svg { width: 100%; height: 100%; overflow: visible; }
.tool__tileart .st, .tool__tileart .st2 { stroke-width: 5; }
.tool__tilename { font-size: .68em; font-weight: 700; letter-spacing: .02em; }

/* The header earns back the height the machine gave up. */
@media (min-width: 1000px) and (max-height: 800px) {
  .hero-tool__h1 { font-size: clamp(28px, 4.6svh, 40px); }
  .hero-tool__sub { font-size: 15px; }
  .tool-live .hero-tool__h1 { font-size: 19px; }
}
