/* ng-declutter.css — desktop chrome reduction above the composer (2026-09-06)
 *
 * WHY. On the G9 (5120x1440) four stacked bands sat between the conversation
 * and the composer: the PARSE/RECALL/ROUTE/TOOLS/SYNTH pipeline strip (~60px),
 * the #nvv-bar voice row (~40px), the VOICE LANE panel (~122px), then the
 * composer. Vertical space is the scarce axis on an ultrawide and horizontal
 * is the abundant one, yet every band spent the scarce one.
 *
 * ng-mobile-revamp.css already hid the pipeline strip on mobile, noting it is
 * "instrumentation for a turn in flight; it held ~60px permanently. It is
 * still on desktop." This sheet finishes that reasoning on desktop.
 *
 * PRINCIPLE: nothing is deleted, and no DOM is moved. Each control is shown
 * exactly when it becomes meaningful and takes no room when it does not.
 * (The voice lane's own place() re-parents itself against #nvv-bar every 2s,
 * so physically relocating that bar would drag the lane along with it — hence
 * CSS-only compaction here, never a DOM move.)
 *
 * Loads after ng-mobile-revamp.css so it wins on desktop widths only; every
 * rule below is scoped to (min-width:1025px) and leaves mobile untouched.
 */

@media (min-width: 1025px) {

  /* ── 1. pipeline strip: instrumentation, not furniture ──────────────────
     Visible only while a turn is actually in flight. #pipeline already gets
     .busy / .idle from PL.el in mockup-v11.html, so this needs no JS. */
  #view-chat .pipeline.idle { display: none !important; }

  /* ── 2. #nvv-bar: keep the two controls that always mean something ─────
     HOLD TO TALK and the status chip stay. The rest earn their space. */
  #nvv-bar { margin: 0 0 3px !important; gap: 6px !important; }

  /* the hint is onboarding text, permanent cost, read once */
  #nvv-bar .nvv-hint { display: none !important; }

  /* mic permission only matters when it is NOT already granted */
  #nvv-bar .nvv-perm[data-p="granted"] { display: none !important; }

  /* REPLAY is dead weight until Sentinel Prime has actually spoken;
     it un-hides itself the moment the button stops being disabled */
  #nvv-bar .nvv-replay:disabled { display: none !important; }

  /* tighten what remains */
  #nvv-bar .nvv-mic { padding: 4px 10px !important; }
  #nvv-bar .nvv-chip { font-size: 9.5px !important; }

  /* ── 3. give the reclaimed height to the conversation ─────────────────── */
  #view-chat .composer { margin-top: 0 !important; }
}

/* Ultrawide: the composer column is centred and capped by --ng-chat-measure,
   so the voice bar and lane should track the SAME measure rather than
   spanning the full 5120px for two rows of text. */
@media (min-width: 1600px) {
  #nvv-bar,
  .vlane[data-mode=desktop] {
    width: min(100%, calc(var(--ng-chat-measure, var(--chat-measure, 860px)) + 28px));
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ── mobile voice overlay: reclaim the idle gap (2026-09-06) ───────────────
   #nvm-live reserves room for the transcript / progress / reply blocks, but
   all three carry [hidden] until a turn is actually in flight — so at rest it
   held a large empty band between the status chip and HOLD TO TALK, pushing
   the eye up and leaving ~40% of the overlay blank.
   :has() lets the container collapse only while every child is hidden, and it
   re-expands the instant one appears. No JS, no layout thrash. */
#nvm-live:not(:has(> :not([hidden]))) {
  min-height: 0 !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* with the gap gone, let the lens sit optically centred in what remains */
#nvm-stage { justify-content: center; }
