.zones { display: grid; gap: 3.25rem; }

.zone-name {
  margin: 0 0 1.1rem;
  color: var(--signal-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.controls { margin: 0; display: grid; gap: 1.1rem 2.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.controls > div { min-width: 0; display: grid; gap: .3rem; }

.controls dd:has(.traces), .controls dd:has(.readout) { padding-bottom: .9rem; }

.controls dt { font-size: .95rem; font-weight: 700; letter-spacing: .06em; }

.controls dd { margin: 0; min-width: 0; max-width: 46rem; color: var(--ink-soft); font-size: .95rem; line-height: 1.45; }

@media (max-width: 720px) {
  .zones { gap: 2.5rem; }
  /* Buy the panels back some width at phone sizes. */
  .traces { gap: .9rem; }
  .trace figcaption { font-size: .62rem; letter-spacing: 0; }
}

.controls > div.span-both { grid-column: 1 / -1; }

.segmented {
  display: inline-flex;
  padding: 1px;
  border-radius: 999px;
  background: #faf8f2;
  box-shadow: inset 0 0 0 1px rgb(9 8 6 / .12);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
}

.seg {
  padding: .42rem .95rem;
  border-radius: 999px;
  color: rgb(23 20 16 / .71);
}

.seg.is-on { background: #16140f; color: #f3f0e8; }

.modes { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: .7rem; }

.modes li { max-width: 34rem; }

.modes b { display: inline-block; min-width: 4.4rem; color: var(--ink); font-weight: 700; letter-spacing: .06em; }

.mode-note { max-width: 34rem; }

/* One column: MODE and the two traces need the width, and a reference
   list reads straight down anyway. */
.controls { grid-template-columns: minmax(0, 1fr); }

/* Every paragraph inside a dd is reset here, so anything that needs its
   own spacing has to win at this specificity or it silently loses it.
   .trace-key lost exactly that way and sat flush against the figure
   captions; measured gap was 0 px. Add the override next to this rule,
   not next to the block it belongs to. */
.controls dd > p { margin: 0; max-width: 34rem; }

.controls dd > p.mode-intro { margin-bottom: 1.15rem; }

.controls dd > p.mode-note { margin-top: 2.25rem; }

.controls dd > p.trace-key { margin-top: 1.7rem; }

.traces {
  margin-top: 1.4rem;
  max-width: 46rem;
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trace { margin: 0; }

.trace svg { display: block; width: 100%; height: auto; overflow: visible; }

.t-target { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }

.t-sung { fill: none; stroke: rgb(23 20 16 / .26); stroke-width: 1.6; }

.t-out { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.trace figcaption {
  margin-top: .7rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.trace-key { max-width: 34rem; font-size: .8rem; line-height: 1.5; color: rgb(23 20 16 / .6); }

/* Same reveal contract the home page uses: the observer adds js-reveal and
   motion-visible, and reduced motion never gets that far, so the drawn
   state below is what everyone else sees. */
html.js-reveal .trace.motion-reveal .t-out { stroke-dasharray: 420; stroke-dashoffset: 420; }

html.js-reveal .trace.motion-visible .t-out { animation: trace-draw 1400ms cubic-bezier(.22,.8,.28,1) both; }

@keyframes trace-draw { to { stroke-dashoffset: 0; } }

.f-harm { stroke: rgb(23 20 16 / .45); stroke-width: 1.4; }

.f-ghost { fill: none; stroke: rgb(23 20 16 / .3); stroke-width: 1.4; stroke-dasharray: 3 4; }

.f-floor { stroke: var(--line); stroke-width: 1; }

/* The dial's own readout row: SUNG, the detected note, the target note,
   TRUE. Weights follow the editor -- detected at 70%, target at full
   (editor_gpui/render.rs). */
.readout {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: baseline;
  gap: .55rem;
  padding: .7rem 1.1rem;
  border-radius: .3rem;
  background: #faf8f2;
  box-shadow: inset 0 0 0 1px rgb(9 8 6 / .1);
}

.r-label { font-size: .58rem; font-weight: 700; letter-spacing: .16em; color: rgb(23 20 16 / .85); }

.r-note { min-width: 1.9rem; text-align: center; font-size: 1.3rem; line-height: 1; }

.r-detected { color: rgb(23 20 16 / .7); }

.r-target { color: var(--ink); }

/* Which widget the control actually is: knob::element() for the five
   knobs, a segmented track for MODE and FORMANT. The readouts get no
   mark -- they are not controls, and the zone heading says so. */
.wid {
  width: .95em;
  height: .95em;
  margin-right: .55em;
  flex: none;
  fill: none;
  stroke: rgb(23 20 16 / .6);
  stroke-width: 1.25;
  stroke-linecap: round;
}

.wid-sw circle { fill: rgb(23 20 16 / .55); stroke: none; }

.controls dt { display: flex; align-items: center; letter-spacing: .01em; }

.legend {
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  color: rgb(23 20 16 / .6);
  font-size: .8rem;
}

.legend span { display: flex; align-items: center; }

.legend .wid { stroke: rgb(23 20 16 / .5); }

.back-link { margin: 0 0 var(--space-3); font-size: .85rem; }

.back-link a { color: var(--ink-soft); text-decoration: none; }

.back-link a:hover, .back-link a:focus-visible { color: var(--ink); text-decoration: underline; }
