/**
 * TRANSFER UNIFIED — the ONE destination sheet of the TC overhaul v2
 * (PLAN-transfer-center.md, 2026-08-01).
 *
 * Contract (§1/§2 of the plan — settled, do not relitigate):
 *  - Base token family is --term-* (the Roast Ladder retheme interface;
 *    roast-ladder re-asserts 62 --term-* names under [data-roast-theme]).
 *    Never mint a parallel token family here.
 *  - Each vertical slice migrates one region's styles INTO this sheet and
 *    DELETES that region's rules from every old sheet in the same commit
 *    (§2 item 14 — ship-blocker). Old sheets shrink and die as their last
 *    consumer region migrates.
 *  - This sheet loads LAST on /transfer so migrated regions win the cascade
 *    over any not-yet-deleted legacy rule during a slice's transition.
 *
 * Regions land in slice order:
 *   1. START-THE-CALL dock          — MIGRATED (slice 1, 2026-08-01)
 *   2. Left rail + origin merge
 *   3. NOW / arc curation
 *   4. Chart-materials scratch pad
 *   5. Note-drawer editing
 */

/* ==========================================================================
   REGION 1 · START-THE-CALL dock (slice 1)
   The ONE implementation of #tcCaptureChooser. Replaces the deleted blocks in
   transfer-center.css (base chooser, 2026-07-31) and transfer-ux-polish.css
   §8 (Phosphor handset / emoji collapse) + §10 (option-row chrome) — the
   ux-polish refinements are folded in as base, unconditionally.

   States (call-dock.js, owner ruling 2026-08-01):
     (fresh workspace)        full-size chooser — the page's primary action
     .is-dockable             workspace has call material; head shows ⌄ dock
     .is-docked               compact one-row strip; Logistics / Direct /
                              Record stay one click away
   The live-call collapse is NOT here and NOT this region's to own:
   transfer-clinical-canvas.css hides .tc-call-setup-control during
   .tc-clinical-live — recorder contract, untouched.
   ========================================================================== */

.tc-capture-chooser {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--term-border-default);
    border-radius: 8px;
    background: var(--term-accent-ghost, rgba(0, 255, 208, 0.05));
}

.tc-capture-chooser-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.tc-capture-chooser-title {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.72rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--term-fg-primary);
}

.tc-capture-chooser-sub {
    font-size: var(--term-text-xs, 0.72rem);
    color: var(--term-fg-muted);
}

.tc-capture-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--term-space-md, 12px);
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid var(--term-border-subtle, var(--term-border-default));
    border-radius: 6px;
    background: rgba(255, 247, 238, 0.015);
    transition: border-color 140ms ease, background-color 140ms ease;
}

.tc-capture-option:hover {
    border-color: var(--tux-hairline-strong, rgba(191, 161, 98, 0.32));
    background: rgba(255, 247, 238, 0.035);
}

.tc-capture-option--primary {
    border-color: var(--term-accent-dim, rgba(0, 255, 208, 0.40));
    background: var(--term-accent-ghost, rgba(0, 255, 208, 0.05));
}

.tc-capture-option--primary:hover {
    border-color: var(--term-accent, #4CC4B4);
}

.tc-capture-option-copy {
    flex: 1 1 260px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tc-capture-option-copy strong {
    font-size: 0.8rem;
    color: var(--term-fg-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Phosphor handset replaces the platform-red 📞 emoji (red = danger only on
   this surface): ::before paints the icon, ::first-letter collapses the emoji
   glyph — flex yields to inline-block so ::first-letter applies. JS never
   rewrites these labels (call status goes to #tcTwilioStatus). */
.tc-capture-option--primary .tc-capture-option-copy strong {
    display: inline-block;
}

.tc-capture-option--primary .tc-capture-option-copy strong::before {
    content: "\e3b8"; /* .ph.ph-phone */
    font-family: "Phosphor";
    color: var(--term-gold, #BFA162);
    margin-right: 0.45em;
    -webkit-font-smoothing: antialiased;
}

.tc-capture-option--primary .tc-capture-option-copy strong::first-letter {
    font-size: 0;
}

.tc-capture-option--primary .tc-twilio-call-btn {
    display: inline-block;
}

.tc-capture-option--primary .tc-twilio-call-btn::before {
    content: "\e3b8"; /* .ph.ph-phone */
    font-family: "Phosphor";
    margin-right: 0.45em;
    -webkit-font-smoothing: antialiased;
}

.tc-capture-option--primary .tc-twilio-call-btn::first-letter {
    font-size: 0;
}

.tc-capture-option-tag {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6875rem; /* adjudicate F-4: was 0.62rem (9.9px) -> 11px floor */
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--term-accent, #00FFD0);
    border: 1px solid var(--term-accent-dim, rgba(0, 255, 208, 0.40));
    border-radius: 4px;
    padding: 1px 6px;
}

.tc-capture-option-copy small {
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--term-fg-secondary);
}

.tc-capture-option-controls {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    flex-wrap: wrap;
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
}

.tc-capture-option-controls .tc-doctor-phone {
    flex: 1 1 180px;
    min-width: 160px;
}

/* --- Dock strip ---------------------------------------------------------- */

/* Hidden at rest; IS the chooser when docked. */
.tc-call-dock-strip {
    display: none;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    flex-wrap: wrap;
    min-width: 0;
}

.tc-capture-chooser.is-docked {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: transparent;
}

.tc-capture-chooser.is-docked .tc-capture-chooser-head,
.tc-capture-chooser.is-docked .tc-capture-option {
    display: none;
}

.tc-capture-chooser.is-docked .tc-call-dock-strip {
    display: flex;
    flex: 1 1 auto;
}

.tc-call-dock-label {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--term-fg-muted);
}

.tc-call-dock-btn {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    letter-spacing: 0.04em;
    color: var(--term-fg-secondary);
    background: transparent;
    border: 1px solid var(--term-border-subtle, var(--term-border-default));
    border-radius: 5px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color 140ms ease, color 140ms ease;
}

.tc-call-dock-btn:hover {
    color: var(--term-fg-primary);
    border-color: var(--tux-hairline-strong, rgba(191, 161, 98, 0.32));
}

/* Redock affordance: only meaningful on a post-call workspace whose chooser
   is currently expanded. */
.tc-call-dock-redock {
    display: none;
    margin-left: auto;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    letter-spacing: 0.04em;
    color: var(--term-fg-muted);
    background: transparent;
    border: 1px solid var(--term-border-subtle, var(--term-border-default));
    border-radius: 5px;
    padding: 2px 8px;
    cursor: pointer;
}

.tc-capture-chooser.is-dockable:not(.is-docked) .tc-call-dock-redock {
    display: inline-block;
}

.tc-call-dock-redock:hover {
    color: var(--term-fg-primary);
    border-color: var(--tux-hairline-strong, rgba(191, 161, 98, 0.32));
}

/* --- Note drawer edit surface (Series 5, 2026-08-08) ----------------------
   In-drawer editing of the canonical GeneratedNote. The textarea replaces
   the rendered output while editing; _noteRawText stays the sole Copy/Save
   source and Save rides the existing versioned note PUT. */
.tc-note-edit-area {
    flex: 1 1 auto;
    min-height: 16rem;
    width: 100%;
    resize: none;
    field-sizing: fixed;
    padding: var(--term-space-md, 12px);
    background: var(--term-bg-void, #0E0D0B);
    color: var(--term-fg-primary);
    border: 1px solid var(--term-border-default, #2A2720);
    border-radius: 4px;
    font-family: var(--term-font-body);
    font-size: var(--term-text-sm, 0.8125rem);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-y: auto;
}
.tc-note-edit-area[hidden] { display: none; }

/* --- Hang-up decision prompt (Series 3.5 / A6.1, 2026-08-08) --------------
   Shown by call-dock.js ONLY when a call just ended on the still-selected
   workspace and no disposition exists. Presentation only — the chips proxy
   the masthead decision buttons; dismiss forfeits nothing. */
.tc-hangup-prompt {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    flex-wrap: wrap;
    margin-top: 6px;
    padding: 6px 12px;
    border: 1px solid var(--tux-hairline-strong, rgba(191, 161, 98, 0.32));
    border-radius: 6px;
    background: var(--term-bg-elevated, rgba(191, 161, 98, 0.06));
}

.tc-hangup-prompt[hidden] { display: none; }

/* A new capture starting is the hard end of the previous call's question. */
body.tc-clinical-live .tc-hangup-prompt { display: none; }

.tc-hangup-prompt-label {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--term-fg-secondary);
}

.tc-hangup-chip {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    letter-spacing: 0.04em;
    color: var(--term-fg-secondary);
    background: transparent;
    border: 1px solid var(--term-border-subtle, var(--term-border-default));
    border-left-width: 3px;
    border-radius: 5px;
    padding: 4px 12px;
    cursor: pointer;
    transition: border-color 140ms ease, color 140ms ease;
}

.tc-hangup-chip:hover { color: var(--term-fg-primary); }

.tc-hangup-chip--accept  { border-left-color: var(--term-status-ready, #22C55E); }
.tc-hangup-chip--pending { border-left-color: var(--term-status-warn, #EAB308); }
.tc-hangup-chip--decline { border-left-color: var(--term-status-error, #EF4444); }

.tc-hangup-prompt-dismiss {
    margin-left: auto;
    font-size: var(--term-text-sm, 0.8125rem);
    line-height: 1;
    color: var(--term-fg-muted);
    background: transparent;
    border: 0;
    padding: 2px 6px;
    cursor: pointer;
}

.tc-hangup-prompt-dismiss:hover { color: var(--term-fg-primary); }

/* --- Live call: the call-setup rail -------------------------------------
   2026-08-02, owner ruling ("the goal wasn't to trap the doctor").

   Until now the whole chooser carried .tc-call-setup-control, so the
   clinical-live collapse in transfer-clinical-canvas.css blanked it outright:
   once ANY capture started — a Twilio call or a plain mic recording — the
   doctor could no longer see or change the number Twilio dials him at, and had
   nowhere to write the callback number the RN reads out mid-call. That is the
   one moment he hears it.

   The shell and the two phone boxes now carry .tc-call-setup-live and survive
   the collapse; this block strips them down to a single compact row so
   surviving does not mean the bulky panel returns over the live canvas. The
   copy blocks, the chooser head and the dock strip all still collapse.

   What may be DIALED is not decided here: _updateTwilioUI hides/disables the
   dial buttons from real Twilio state, and _startTwilioCall refuses outright
   while a call is active. CSS governs visibility only — never safety. */
body.tc-clinical-live #tcCaptureChooser {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--term-space-sm, 8px);
    padding: 0;
    border: 0;
    background: transparent;
}

body.tc-clinical-live #tcCaptureChooser .tc-capture-chooser-head,
body.tc-clinical-live #tcCaptureChooser .tc-call-dock-strip,
body.tc-clinical-live #tcCaptureChooser .tc-capture-option-copy {
    display: none;
}

/* Option rows lose their card chrome and become inline control clusters. */
body.tc-clinical-live #tcCaptureChooser .tc-capture-option {
    display: contents;
}

body.tc-clinical-live #tcCaptureChooser .tc-capture-option-controls {
    margin-left: 0;
    gap: var(--term-space-sm, 8px);
}

/* Mid-call the phone boxes are compact; they are for confirming a number and
   jotting one down, not for filling a form. */
body.tc-clinical-live #tcDoctorPhone,
body.tc-clinical-live #tcDirectCallNumber {
    max-width: 11rem;
    min-width: 7.5rem;
    flex: 0 1 11rem;
}

/* ==========================================================================
   REGION 2 · LEFT RAIL + ORIGIN MERGE (slice 2, 2026-08-02)
   The ONE implementation of the rail bays, transfer cards, and the origin
   strip. Replaces the deleted blocks in transfer-center.css (S6 card, S8
   status badges, disposition badge, card gap), transfer-redesign.css (rail
   bay + flight-strip decision line), transfer-tapestry.css (card surface),
   transfer-ux-polish.css §1/§3/§5/§7/§9 card rules, and the origin band's
   entire display implementation in transfer-episode-tapestry.css +
   transfer-ux-polish.css (band, summary grid, stopgaps — owner ruling: the
   band merged into the selected rail card; identity renders on the card).
   ux-polish refinements are folded in as base, unconditionally (slice-1
   precedent). The dormant [data-tc-skin] overrides were resolved by the
   plan's §3 item 6 owner ruling (P4-4, 2026-08-04): folded out of
   transfer-redesign.css into the global Roast Ladder theme sheet
   roast-ladder-skins.css.
   ========================================================================== */

/* --- Rail bays (server queue_state vocabulary — slice 2 part 1) ---------- */

.tc-rail-bay {
    list-style: none;
    font-family: var(--term-font-mono);
    font-size: var(--tux-text-xs, 0.6875rem);
    font-weight: 600;
    letter-spacing: var(--term-tracking-wider);
    color: var(--tux-fg-meta, var(--term-fg-muted));
    /* 32px visual band, label aligned to the cards' inner text edge (ul pad +
       card pad = bay pad-left 16px), divider pushed off the first card. */
    display: flex;
    align-items: flex-end;
    min-height: 32px;
    padding: 12px var(--term-space-lg, 16px) 6px;
    border-bottom: 1px solid var(--term-border-subtle);
    margin-bottom: 2px;
    pointer-events: none;
}

/* --- Transfer card ------------------------------------------------------- */

.tc-transfer-card {
    /* Raised vellum tile against the void (2026-05-28 + tapestry surface):
       elevated plane, load-bearing boundary edge, resting shadow so the row
       reads as a clickable tile. The .selected treatment still wins. */
    background: var(--term-bg-surface);
    border: 1px solid var(--term-border-default);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(232, 228, 220, 0.04);
    padding: var(--term-space-lg);
    padding-right: calc(var(--term-space-lg) + 2rem);
    position: relative;
    cursor: pointer;
    /* Explicit transition whitelist (adjudicate F-11, 2026-08-10): `transition:
       all` animated margin-right — which .selected sets to reach the seam — so
       every select/deselect ran a LAYOUT animation (relayout of the card, its
       flex siblings, and the rail scroll geometry) on the hottest click path.
       Whitelisting paint/compositor props makes margin-right snap. */
    transition:
        border-color var(--term-duration-normal) var(--term-easing),
        background-color var(--term-duration-normal) var(--term-easing),
        box-shadow var(--term-duration-normal) var(--term-easing),
        transform var(--term-duration-normal) var(--term-easing),
        opacity var(--term-duration-normal) var(--term-easing);
}

/* Entry animation gated to first paint only (adjudicate F-11b): transfer-list.js
   adds .is-new to cards only on the first populated render (see _firstPaintDone),
   so a full innerHTML rebuild on every poll no longer restarts N concurrent
   slide-in animations. */
.tc-transfer-card.is-new {
    animation: tc-card-enter 400ms var(--term-easing) both;
}

.tc-transfer-card.tc-card-menu-open {
    z-index: 10;
}

.tc-card-actions {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 3;
}

.tc-card-actions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--tux-fg-meta, var(--term-fg-muted));
    background: transparent;
    cursor: pointer;
}

.tc-card-actions-btn:hover,
.tc-card-actions-btn[aria-expanded="true"] {
    color: var(--tux-fg-strong, var(--term-fg-primary));
    border-color: var(--tux-hairline-strong, var(--term-border-default));
    background: var(--term-bg-elevated);
}

.tc-card-actions-btn:focus-visible,
.tc-card-actions-item:focus-visible {
    outline: 2px solid var(--term-live);
    outline-offset: 2px;
}

.tc-card-actions-menu {
    position: absolute;
    top: calc(100% + 0.2rem);
    right: 0;
    z-index: 20;
    min-width: 10rem;
    padding: 0.25rem;
    border: 1px solid var(--tux-hairline-strong, var(--term-border-default));
    border-radius: 4px;
    background: var(--term-bg-elevated);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.tc-card-actions-menu[hidden] {
    display: none;
}

.tc-card-actions-item {
    width: 100%;
    min-height: 32px;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-radius: 3px;
    color: var(--tux-fg-body, var(--term-fg-secondary));
    background: transparent;
    font-family: var(--term-font-body);
    font-size: var(--tux-text-sm, 0.75rem);
    text-align: left;
    cursor: pointer;
}

.tc-card-actions-item:hover {
    color: var(--tux-fg-strong, var(--term-fg-primary));
    background: var(--term-gold-ghost);
}

@keyframes tc-card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stepped ziggurat corners — top-right / bottom-left */
.tc-transfer-card::before {
    content: '';
    position: absolute;
    top: var(--term-corner-offset);
    right: var(--term-corner-offset);
    width: var(--term-corner-size);
    height: var(--term-corner-size);
    border-top: var(--term-corner-width) solid var(--term-gold-dim);
    border-right: var(--term-corner-width) solid var(--term-gold-dim);
    opacity: 0.35;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 60% 100%, 60% 40%, 0 40%);
    pointer-events: none;
    transition: opacity var(--term-duration-normal) var(--term-easing);
}

.tc-transfer-card::after {
    content: '';
    position: absolute;
    bottom: var(--term-corner-offset);
    left: var(--term-corner-offset);
    width: var(--term-corner-size);
    height: var(--term-corner-size);
    border-bottom: var(--term-corner-width) solid var(--term-gold-dim);
    border-left: var(--term-corner-width) solid var(--term-gold-dim);
    opacity: 0.35;
    clip-path: polygon(0 0, 40% 0, 40% 60%, 100% 60%, 100% 100%, 0 100%);
    pointer-events: none;
    transition: opacity var(--term-duration-normal) var(--term-easing);
}

/* Hover: lift + perceptible surface shift so rows read as clickable tiles. */
.tc-transfer-card:hover {
    border-color: var(--tux-hairline-strong, var(--term-border-default));
    background: color-mix(in srgb, var(--term-bg-elevated, #1A120B) 94%, #FFF7EE);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tc-transfer-card:hover::before,
.tc-transfer-card:hover::after {
    opacity: 0.6;
}

/* Selected: neutral identity ring PLUS a gold continuity edge on the seam
   (right) side, reconnecting the card to the encounter it opens. Owner ruling
   2026-08-09 (reconnect) reverses the 2026-08-06 neutral-only treatment: the
   ring keeps the one-selection identity language, the gold edge carries the
   card→encounter connection the owner reported missing ("detached from the
   transfer screen when you click a patient"). The card also reaches the panel's
   right seam (cancels the list gutter) so the gold bar meets the workspace edge
   instead of floating inside the rail. */
.tc-transfer-card.selected {
    background: var(--dr-inkwash, color-mix(in srgb, var(--term-fg-primary) 4%, transparent));
    /* Reach the panel seam AND drop the right border so the inset gold bar
       (painted at the PADDING edge per CSS Backgrounds §7) lands on the true
       visual edge, not 1px short (adjudicate F-2). With border-right:0 the gold
       already sits at the border-box edge, so margin-right only cancels the list
       gutter (-sm); an earlier extra -1px overshot into the rail's 1px border and
       spawned a 1px rail scrollbar (adjudicate F-8 — measured cardRight 320 vs
       clientW 319; corrected to cardRight 319 == content edge, 0 overflow). Gold
       is listed FIRST so it paints on top of the neutral ring at the seam. */
    margin-right: calc(-1 * var(--term-space-sm));
    border-right: 0;
    box-shadow:
        inset -3px 0 0 0 var(--term-gold, #c79a3b),
        inset 0 0 0 2px var(--sn-selection-ring, color-mix(in srgb, var(--term-fg-primary) 25%, transparent));
}

.tc-transfer-card.selected::before,
.tc-transfer-card.selected::after {
    opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
    .tc-transfer-card {
        animation: none;
    }
    .tc-transfer-card:hover {
        transform: none;
    }
}

/* --- Card content: name loudest, identity quiet, meta recedes ------------ */

/* Flight-strip lead line — decision word + call time (the two facts the rail
   exists to answer). 11px floor (was 0.5rem in redesign). */
.tc-card-decision-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.tc-card-dispo-word {
    font-family: var(--term-font-mono);
    font-size: var(--tux-text-xs, 0.6875rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--tc-dispo-undecided, var(--term-fg-muted));
}

.tc-card-dispo-word[data-disposition="accept"]             { color: var(--tc-dispo-accept, var(--term-status-ready)); }
.tc-card-dispo-word[data-disposition="pending_specialist"] { color: var(--tc-dispo-pending, var(--term-status-editing)); }
.tc-card-dispo-word[data-disposition="local_mgmt_advice"]  { color: var(--tc-dispo-advice, var(--term-blue, #5B9BD5)); }
.tc-card-dispo-word[data-disposition="decline"]            { color: var(--tc-dispo-decline, var(--term-red, #E55A50)); opacity: 0.75; }

.tc-card-call-time {
    font-family: var(--term-font-mono);
    font-size: var(--tux-text-xs, 0.6875rem);
    color: var(--term-fg-muted);
    flex: none;
}

/* Name owns the card — 15px Outfit 600 near-white; age/sex rides the line
   without competing. */
.tc-card-name {
    font-family: var(--term-font-display);
    font-size: var(--tux-text-15, 0.9375rem);
    font-weight: 600;
    color: var(--tux-fg-strong, var(--term-fg-primary));
    margin: 0 0 2px 0;
}

.tc-card-name .tc-card-agesex {
    font-size: var(--tux-text-sm, 0.75rem);
    font-weight: 500;
    color: var(--tux-fg-meta, var(--term-fg-secondary));
}

/* Saved-note glyph on the name line. */
.tc-card-note-badge {
    margin-left: 0.35em;
    font-size: var(--tux-text-xs, 0.6875rem);
    color: var(--term-accent, #4CC4B4);
}

/* Diagnosis is why the doctor opens the card: roman body face, 12px floor,
   near-white. 2-line clamp resting; full text when the card is selected. */
.tc-card-diagnosis {
    font-family: var(--term-font-body, 'DM Sans', sans-serif);
    font-style: normal;
    font-size: var(--tux-text-sm, 0.75rem);
    color: var(--tux-fg-body, var(--term-fg-secondary));
    margin-top: var(--term-space-xs);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.tc-transfer-card.selected .tc-card-diagnosis {
    display: block;
    overflow: visible;
}

/* Identity block (slice 2 — the origin band merged into the card): MRN +
   referring clinician in a quiet mono block, revealed on the SELECTED card
   only. The markup is in every card (identity derives from the rendered
   row); CSS owns the reveal so selection stays a pure class toggle. */
.tc-card-identity {
    display: none;
}

.tc-transfer-card.selected .tc-card-identity {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.9em;
    row-gap: 2px;
    margin-top: var(--term-space-xs);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--tux-text-xs, 0.6875rem);
    color: var(--tux-fg-meta, var(--term-fg-secondary));
    letter-spacing: 0.04em;
}

/* MRN is an identifier, not prose: spaced, slashed zero so L/1, I/1, O/0 are
   unambiguous (JetBrains Mono ships the "zero" feature). */
.tc-card-mrn {
    font-feature-settings: "zero" 1;
    letter-spacing: 0.06em;
}

/* --- Card badges --------------------------------------------------------- */

.tc-card-badges {
    display: flex;
    gap: var(--term-space-sm);
    margin-top: var(--term-space-sm);
    flex-wrap: wrap;
}

/* List-card disposition badge — color encodes the decision at a glance. */
.tc-disposition-badge {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid var(--term-boundary, #6A655C);
    color: var(--term-fg-primary, #E8E4DC);
}

.tc-disposition-badge[data-disposition="accept"]            { border-color: var(--term-status-ready); color: var(--term-status-ready); }
.tc-disposition-badge[data-disposition="decline"]           { border-color: var(--term-red);    color: var(--term-red); }
.tc-disposition-badge[data-disposition="local_mgmt_advice"] { border-color: var(--term-blue);   color: var(--term-blue); }
.tc-disposition-badge[data-disposition="pending_specialist"]{ border-color: var(--term-status-editing); color: var(--term-status-editing); }

/* The decision line already answers "decision?" — the legacy badge repeating
   it below is noise; the urgency/status badges stay. */
.tc-transfer-card .tc-card-decision-line ~ .tc-card-badges .tc-disposition-badge {
    display: none;
}

/* Status badge: filled borderless pill — a different SHAPE language from the
   square urgency outline, so the two no longer read as a toggle pair. */
.tc-status-badge {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid var(--term-border-default);
    border-radius: 999px;
    display: inline-block;
    line-height: 1.4;
}

.tc-status-badge[data-status="pending"] {
    color: var(--tux-fg-meta, var(--term-fg-muted));
    border-color: transparent;
    background: var(--term-gold-ghost, rgba(191, 161, 98, 0.05));
}

.tc-status-badge[data-status="accepted"] {
    color: var(--term-status-ready);
    border-color: rgba(34, 197, 94, 0.4);
}

.tc-status-badge[data-status="in_transit"] {
    color: var(--term-status-generating);
    border-color: rgba(59, 130, 246, 0.4);
}

.tc-status-badge[data-status="arrived"] {
    color: var(--term-gold);
    border-color: var(--term-gold-dim);
}

.tc-status-badge[data-status="cancelled"] {
    color: var(--term-status-error);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Unclassified urgency must not be the loudest element on the card: quiet
   hairline outline, meta ink. (The tiered urgency-badge base stays in
   transfer-center.css S7 — it is shared with the routing advisor.) */
.tc-urgency-badge:not([data-urgency]),
.tc-urgency-badge[data-urgency=""],
.tc-urgency-badge[data-urgency="0"] {
    color: var(--tux-fg-meta, var(--term-fg-muted));
    border-color: var(--tux-hairline, var(--term-border-default));
    background: transparent;
    font-weight: 500;
    text-shadow: none;
}

/* Minimal accept-needs-unit gap roll-up on the card. */
.tc-card-gap {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 600;
    color: #F59E0B;
    margin-left: 4px;
}

/* --- Card meta ----------------------------------------------------------- */

.tc-card-facility {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
    margin-top: var(--term-space-sm);
}

.tc-card-time {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
}

/* --- Origin strip (the band's replacement) ------------------------------- */

/* Thin affordance strip at the workspace top: the selected card's gold edge
   visually continues here (same 3px accent), and it carries the source
   status / Edit Source control. Patient identity lives on the selected rail
   card, not here. The flag-off chart-materials branch (disposition on,
   ux-polish off) flows below the affordance row via flex-wrap.
   2026-08-02 (owner ruling): the strip's second affordance, "Edit transfer
   details", was removed — it opened an overlay that blanked the recorder,
   NOW panel and decision spine. Its button styles are deleted here rather
   than left dormant (§2 item 11: no parallel implementations). */
.tc-origin-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    min-width: 0;
    padding: 0.3rem 0.75rem 0.3rem 0.55rem;
    border: 1px solid var(--term-border-default);
    border-left: 3px solid var(--term-gold);
    border-radius: 0.45rem;
    background:
        linear-gradient(90deg, var(--term-gold-ghost), transparent 38%),
        var(--term-bg-elevated);
}

/* Connector nub: a short gold dash exiting the strip toward the rail — the
   visible join between the selected card's edge and the workspace. */
.tc-origin-strip__connector {
    flex: none;
    width: 0.9rem;
    height: 2px;
    margin-left: -0.55rem;
    background: linear-gradient(90deg, var(--term-gold), var(--term-gold-dim));
    border-radius: 1px;
    pointer-events: none;
}

.tc-origin-strip__source {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-left: auto;
    min-width: 0;
    color: var(--tux-fg-meta, var(--term-fg-secondary));
    font-family: var(--term-font-mono);
    font-size: var(--tux-text-xs, 0.6875rem);
}

.tc-origin-strip__source-icon {
    color: var(--term-live);
}

.tc-origin-strip__source-edit {
    min-height: 1.6rem;
    padding: 0.18rem 0.58rem;
    border: 1px solid var(--term-border-strong);
    border-radius: 0.35rem;
    color: var(--term-fg-primary);
    background: var(--term-bg-input);
    font: inherit;
    cursor: pointer;
}

/* Flag-off embedded chart field (disposition on, ux-polish off): full-width
   row under the affordances; unreachable under prod flags. */
.tc-origin-strip > #tcChartMaterialsField {
    flex: 1 1 100%;
    min-width: 0;
}

/* Desktop episode grid: the strip inherits the origin band's track — row 2,
   spanning both columns. The row templates in transfer-ux-polish.css /
   transfer-episode-tapestry.css size row 2 `auto`, so the band's former
   height flows to the flexible canvas/NOW row. */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"] .tc-origin-strip {
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: start;
    }
}

/* Focus treatment for the strip's control (was in the episode-tapestry
   focus list; ux-polish also paints its own ring under the flag). */
.tc-origin-strip__source-edit:focus-visible {
    outline: 2px solid var(--term-live);
    outline-offset: 2px;
}

/* Live call, non-polish tapestry: the strip stays visible against the legacy
   live child sweep — its embedded chart-materials field is the paste target
   mid-call in that flag combo (the band's old restore, carried over). */
body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
    #tcWorkspaceForm > .tc-origin-strip {
    display: flex !important;
}

/* Live call under ux-polish (prod): the canvas owns the page — the strip
   yields like the band did (row 2 is 0 in the live grid templates; a
   display:none child is what lets the track collapse). The chart field
   lives in the one-well on this path. Wins over the restore above by
   specificity and order. */
body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"].tc-clinical-live
    #tcWorkspaceForm > .tc-origin-strip {
    display: none !important;
}

/* ==========================================================================
   REGION 3 · FISHBONE/VITALS INSTRUMENTS (Stage 1, 2026-08-02)
   PLAN-fishbone-instruments.md — hosts only; the panels style THEMSELVES
   (mounted verbatim, never re-themed here). This region owns host sizing,
   grid placement of #tcLabsPanel, and its live-call visibility. Row indices
   below must stay in lockstep with the grid templates in
   transfer-ux-polish.css (all of which now carry an explicit LABS row).
   ========================================================================== */

/* Both hosts: never widen a grid column; a tall parse never blows the page. */
#tcLabsPanel,
#tcVitalsPanel {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    /* FIX (2026-08-11): NOW aside flickered/resized forever on classic-
       scrollbar machines. BUG: VitalsPanel's ResizeObserver re-renders on
       density-tier changes (S/XS boundary = 340px); at the rail width the
       host is ~348px bare and ~335px with a classic scrollbar. S-tier rows
       overflow the max-height cap (scrollbar appears -> width < 340 -> XS
       dots render -> content fits -> scrollbar vanishes -> width > 340 ->
       S rows render -> ...). ROOT CAUSE: scrollbar presence fed back into
       the width the tier derives from. FIX: reserve the gutter permanently
       so scrollbar appearance can never change content width. Overlay-
       scrollbar platforms are unaffected (gutter is zero there). */
    scrollbar-gutter: stable;
}
/* Definite height once mounted (the panel's internals size against their
   host; an auto grid row let the box collapse to 5px with content inside —
   caught by screenshot, not by geometry probes). :empty = pre-mount/no
   engine: no reserved space. */
#tcLabsPanel:not(:empty) { height: clamp(11rem, 26vh, 18rem); }
#tcLabsPanel { max-height: clamp(12rem, 28vh, 20rem); }
/* Vitals live inside the NOW aside (no grid impact); cap so a long packet
   never buries the projection summary below it. The cap stands in LIVE
   (mid-call the projection summary is the decision surface) and sub-desktop;
   the at-rest desktop state releases it below (owner ruling 2026-08-03). */
#tcVitalsPanel { max-height: clamp(10rem, 24vh, 16rem); margin: 0.3rem 0 0.45rem; }

/* Zero-vitals placeholder costs ~170px of dash rows in the NOW aside, which
   row 4 then charges to the labs band beside it (owner screenshot
   2026-08-16: post-call "empty well"). Outside a live call an all-dash
   panel carries no signal — collapse it until the feed stamps real vitals
   ([data-has-vitals], instruments.js). Mid-call placeholders stay: live
   assembly is the thesis, and the grid unlocks key on the ATTRIBUTE, so
   visibility here changes no template. */
body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live)
    #tcVitalsPanel:not([data-has-vitals]) {
    display: none;
}

/* Owner ruling 2026-08-03 — "no clipped vitals": when the instruments carry
   REAL vitals (feed-stamped #tcVitalsPanel[data-has-vitals] in
   instruments.js — the panel's own DOM renders placeholder slots for
   context-primary keys, so :empty/[data-vital] probes both misfire), the
   at-rest desktop form unlocks: the canvas+NOW row goes content-sized, the
   workspace becomes the scroll container, and the fold moves down (fold
   growth owner-ruled acceptable, same date). LIVE and the expanded survey
   keep their templates untouched — mid-call the summary stays in view.
   Rows stay in LOCKSTEP with the live template in transfer-ux-polish.css.
   Engines without :has() keep the shipped windowed behavior (degrade, not
   break). Measured 2026-08-03: pre-fix the aside showed a 62px sliver of
   556px of content at 1280x900; post-fix 720/720 and 584/584 at 1920.
   Extended 2026-08-15 (owner report: post-call NOW + vitals "smushed into a
   tiny vertical scroller"): a settled NOW summary (persisted projection
   facts render .tc-episode-now__fact nodes in ANY lifecycle state,
   including "assembling" after a reload re-run) also unlocks — the instruments
   don't hydrate at rest (Stage-2 gap), so the vitals stamp alone missed a
   NOW aside holding 883px of real content inside A1's minmax(4rem,1fr) row.
   Empty/listening/starved states keep the A1 clamp: not-yet-known is the
   product there. */
@media (min-width: 1200px) {
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]),
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact) {
        height: auto;
        min-height: 100%;
        overflow: visible;
        grid-template-rows:
            auto                            /* 1 topbar */
            auto                            /* 2 origin strip */
            clamp(9rem, 24vh, 20rem)        /* 3 one well */
            auto                            /* 4 labs fishbone */
            auto                            /* 5 canvas + NOW: content-sized */
            clamp(13.5rem, 30.5vh, 18.5rem) /* 6 decision keeps its floor */
            auto;                           /* 7 footer */
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        .tc-workspace:has(#tcVitalsPanel[data-has-vitals]),
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        .tc-workspace:has(#tcEpisodeNowSummary .tc-episode-now__fact) {
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcVitalsPanel[data-has-vitals],
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact) #tcVitalsPanel {
        max-height: none;
    }
}

/* Commit V (visual pass, 2026-08-03) — hot-fishbone scale-to-host. Measured
   on a synthetic 10-abnormal panel (Σ 7.63, 10/10): at the rail width the
   engine's fixed 720-unit viewBox renders value digits at ~7px, and the
   wrapped chip bar (173px) + stage (221px) + provenance (31px) = 425px
   scroll-clipped inside the 244px host (owner's real-call defect). Two
   HOST-side remedies; the panels still style themselves (no .fbp-* rules),
   the live and expanded-survey grid templates stay untouched:
   (a) once the engine HAS values (.fbp-values exists only then — the empty
       state replaces the stage), the host sizes to content in every
       non-expanded AT-REST state. Live is now excluded (2026-08-04): row 4
       is auto, so a hot panel would grow the row mid-call and re-open the
       column-1 geometry the live grid depends on — live keeps the base
       clamp above. The 55vh/32rem cap is the short-viewport escape hatch —
       the panel's own scroll remains the shipped fallback there. The EMPTY
       state keeps the sparse clamp above: not-yet-known is the product.
       Expanded keeps the windowed host.
   (b) AT REST the vitals-room unlock above extends to a hot LABS panel
       (rows/overflow identical): the workspace scrolls (fold growth
       owner-ruled 2026-08-03) and the LABS row takes the full grid width —
       the one-well spans with it so no rail hole opens, the bottom panel
       yields rows 3-4 — so the viewBox renders at ~1.27 scale (~21px
       digits) instead of 0.43. A vitals-only unlock keeps the shipped
       col-2 placement exactly (this block only fires on labs ink). */
@media (min-width: 1200px) {
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcLabsPanel:has(.fbp-values) {
        height: auto;
        max-height: clamp(24rem, 55vh, 32rem);
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) {
        height: auto;
        min-height: 100%;
        overflow: visible;
        grid-template-rows:
            auto                            /* 1 topbar */
            auto                            /* 2 origin strip */
            clamp(9rem, 24vh, 20rem)        /* 3 one well (full width) */
            auto                            /* 4 labs fishbone (full width) */
            auto                            /* 5 canvas + NOW: content-sized */
            clamp(13.5rem, 30.5vh, 18.5rem) /* 6 decision keeps its floor */
            auto;                           /* 7 footer */
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        .tc-workspace:has(#tcLabsPanel .fbp-values) {
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > .tc-one-well {
        grid-column: 1 / -1;
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > #tcLabsPanel {
        grid-column: 1 / -1;
        max-height: none;             /* the workspace scrolls; never clipped */
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > .tc-bottom-panel {
        grid-row: 5 / 8;              /* yields rows 3-4 to the instruments */
    }
}

/* Polish path: #tcLabsPanel is a #tcWorkspaceForm col-2 child. EXPLICIT row
   in every state — this page has been bitten by implicit grid rows. */
@media (min-width: 1200px) {
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]
        #tcWorkspaceForm > #tcLabsPanel {
        grid-column: 2;
        grid-row: 4;             /* base AND expanded AND live (non-expanded) */
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"].tc-clinical-live.tc-one-well-expanded
        #tcWorkspaceForm > #tcLabsPanel {
        grid-row: 6;             /* expanded-live: under the NOW rail */
    }
}

/* Live call (prod flags): the fishbone keeps assembling mid-call — restore
   against the canvas child sweep ((0,5,0) !important in
   transfer-clinical-canvas.css). Visibility only; what may be DIALED is
   JS-governed (A2) and untouched here. */
body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"].tc-clinical-live
    #tcWorkspaceForm.tc-workspace-form > #tcLabsPanel {
    display: block !important;
}

/* Non-polish path: the host sits INSIDE the origin strip (not a form child —
   no grid row to pin); it fills the strip's cross axis and stays capped. */
body.tc-page[data-tc-episode-tapestry="1"]:not(.tc-ux-polish)
    .tc-origin-strip #tcLabsPanel {
    flex: 1 1 100%;
    width: 100%;
}

/* Renderer-failure fallback mid-call strips the origin-strip internals —
   the fishbone yields with them (explicit hide, mirrors the rules above). */
body[data-tc-episode-fallback="1"].tc-clinical-live #tcLabsPanel {
    display: none !important;
}

/* Σ severity chip on the decision spine: one right-aligned mono line ABOVE
   the 4-way buttons, [hidden] until labs parse so an empty chip costs the
   spine zero height. If real-call screenshots show it competing with the
   buttons or folding the accept block, that is an OWNER call — do not grow
   or reposition it silently (plan §3 item 1). */
.tc-instrument-sigma {
    display: block;
    /* The spine is an over-full column flex with scrolling — an unshrinkable
       basis keeps the chip from being flex-shrunk to 0 height. */
    flex: 0 0 auto;
    margin: 0 0 0.25rem;
    font-family: var(--term-font-mono, monospace);
    font-size: 0.6875rem; /* adjudicate F-4: Σ severity chip was 0.62rem (9.9px) on the decision spine -> 11px floor */
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: right;
    color: var(--term-gold, #D4A857);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-instrument-sigma[hidden] { display: none; }

/* Transfer-list triage glyph: thumbnail fishbone + Σ dot per card, from the
   read-time lab_preview payload (resolved values only, husks carry none). */
.tc-card-labs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin-top: 0.2rem;
}
.tc-card-fishbone {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 9.5rem;
    overflow: hidden;
}
.tc-card-fishbone svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 2.1rem;
}
.tc-card-sigma {
    flex: 0 0 auto;
    font-family: var(--term-font-mono, monospace);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--term-gold, #D4A857);
    white-space: nowrap;
}
.tc-card-sigma[data-crit="1"] { color: var(--term-red, #E55A50); }

/* ── Post-Stop finalizing chip (2026-08-06) ─────────────────────────────────
   Shown by call-recorder.js when the authoritative close outlives the 8s
   session_complete wait; resolved/cleared by every finalizer exit path.
   Presentation only — never a gate. Sits beside #tcTwilioStatus in the
   recorder band; deliberately NOT .tc-call-setup-control (it must survive
   the live-call setup collapse if a next call starts while visible). */
.tc-finalizing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--term-font-mono, monospace);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--term-gold, #D4A857);
    white-space: nowrap;
    padding: 0.15rem 0.5rem;
    border: 1px solid color-mix(in srgb, var(--term-gold, #D4A857) 35%, transparent);
    border-radius: 3px;
}
.tc-finalizing-indicator[hidden] { display: none; }
.tc-finalizing-indicator::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--term-gold, #D4A857);
    animation: tc-finalizing-pulse 1.4s ease-in-out infinite;
    flex: 0 0 auto;
}
.tc-finalizing-indicator--done {
    color: var(--term-severity-stable, #7FB069);
    border-color: color-mix(in srgb, var(--term-severity-stable, #7FB069) 35%, transparent);
}
.tc-finalizing-indicator--done::before {
    background: var(--term-severity-stable, #7FB069);
    animation: none;
}
@keyframes tc-finalizing-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* ==========================================================================
   REGION 6 · ROUTING CONFIRMATION LANE (Series 2, 2026-08-07)
   The ONE implementation of the routing advisor lane + recommendation card.
   Replaces the deleted transfer-center.css blocks S15 (routing card, rows,
   notes, alternates, Apply button) and S16's .tc-capability-warning +
   .tc-routing-pretransport — moved here in the same logical series that
   relocates the advisor from the hidden .tc-columns grid into #tcAcceptBlock
   (templates/transfer.html #tcRoutingLane). .tc-urgency-badge is SHARED
   queue/card chrome and deliberately STAYS in transfer-center.css.

   Authority contract (doc 2026-08-07-001 §2B): everything this lane renders
   is presentation-only until the doctor clicks Apply — the Apply button is
   the only element that writes. The authority line must always tell the
   truth: "Routing recommendation — not applied" / "Physician confirmed via
   Apply Recommendation" / "Applied recommendation Tier N · current
   physician tier M".
   ========================================================================== */

/* The lane itself: a full-width row inside the accept block's flex-wrap strip
   (under the tapestry single-column grid it is simply the next cell). */
.tc-accept-advisor {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    min-width: 0;
}
.tc-accept-advisor .tc-input {
    flex: 1 1 240px;
    min-width: 160px;
    max-width: 430px;
    width: auto;
}
.tc-accept-advisor .tc-routing-result {
    flex: 1 1 100%;
    min-width: 0;
    margin-top: 0;
}

.tc-routing-result {
    margin-top: var(--term-space-md);
}

.tc-routing-card {
    background: var(--term-bg-surface);
    border: 1px solid var(--term-border-subtle);
    padding: var(--term-space-lg);
    margin-top: var(--term-space-md);
    position: relative;
}

/* Stepped ziggurat corners — top-right */
.tc-routing-card::before {
    content: '';
    position: absolute;
    top: var(--term-corner-offset);
    right: var(--term-corner-offset);
    width: var(--term-corner-size);
    height: var(--term-corner-size);
    border-top: var(--term-corner-width) solid var(--term-gold-dim);
    border-right: var(--term-corner-width) solid var(--term-gold-dim);
    opacity: 0.35;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 60% 100%, 60% 40%, 0 40%);
    pointer-events: none;
}

/* Stepped ziggurat corners — bottom-left */
.tc-routing-card::after {
    content: '';
    position: absolute;
    bottom: var(--term-corner-offset);
    left: var(--term-corner-offset);
    width: var(--term-corner-size);
    height: var(--term-corner-size);
    border-bottom: var(--term-corner-width) solid var(--term-gold-dim);
    border-left: var(--term-corner-width) solid var(--term-gold-dim);
    opacity: 0.35;
    clip-path: polygon(0 0, 40% 0, 40% 60%, 100% 60%, 100% 100%, 0 100%);
    pointer-events: none;
}

/* Key/value rows inside routing card */
.tc-routing-row {
    display: flex;
    align-items: baseline;
    gap: var(--term-space-lg);
    padding: var(--term-space-xs) 0;
}

.tc-routing-key {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    letter-spacing: var(--term-tracking-wide);
    text-transform: uppercase;
    color: var(--term-fg-muted);
    min-width: 120px;
    flex-shrink: 0;
}

.tc-routing-value {
    font-family: var(--term-font-body);
    font-size: var(--term-text-base);
    color: var(--term-fg-primary);
}

.tc-routing-notes {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    color: var(--term-fg-secondary);
    margin-top: var(--term-space-sm);
    padding-top: var(--term-space-sm);
    border-top: 1px solid var(--term-border-subtle);
}

.tc-routing-notes::before {
    content: '// ';
    color: var(--term-fg-muted);
}

/* Alternate-matches list under the primary routing card (mono + xs + muted). */
.tc-routing-alternates {
    margin-top: var(--term-space-md);
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
}

.tc-apply-routing-btn {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wide);
    text-transform: uppercase;
    color: var(--term-fg-primary);
    background: transparent;
    border: 1px solid var(--term-boundary);
    padding: var(--term-space-sm) var(--term-space-lg);
    cursor: pointer;
    margin-top: var(--term-space-md);
    transition: all var(--term-duration-normal) var(--term-easing);
    display: inline-block;
}

.tc-apply-routing-btn:hover {
    background: var(--term-gold-ghost);
    box-shadow: var(--term-glow-gold);
}

/* Persistence in flight or recommendation not applicable: no hover glow, no
   second write. Disabled is a truthful state, not decoration. */
.tc-apply-routing-btn:disabled {
    opacity: 0.5;
    cursor: default;
    background: transparent;
    box-shadow: none;
}

/* Truthful authority line under the card. data-state mirrors what the DOM
   actually persisted: not-applied | applied | overridden | stale-rule. */
.tc-routing-authority {
    margin-top: var(--term-space-sm);
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    letter-spacing: 0.04em;
    color: var(--term-fg-muted);
}
.tc-routing-authority[data-state="applied"] {
    color: var(--term-severity-stable, #7FB069);
}
.tc-routing-authority[data-state="overridden"] {
    color: var(--term-status-warning);
}
.tc-routing-authority[data-state="stale-rule"] {
    color: var(--term-status-warning);
}

.tc-capability-warning {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 3px solid var(--term-status-error);
    padding: var(--term-space-md);
    margin-top: var(--term-space-md);
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    color: var(--term-status-error);
}

/* Pre-transport asks inside the routing card: terse checklist from
   rule.pre_transport — deterministic data, no LLM. Amber = actionable,
   not an error (red stays for capability warnings). */
.tc-routing-pretransport {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 3px solid var(--term-status-warning);
    padding: var(--term-space-md);
    margin-top: var(--term-space-md);
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
}

.tc-routing-pretransport-label {
    font-size: var(--term-text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--term-status-warning);
    margin-bottom: var(--term-space-sm);
}

.tc-routing-pretransport-list {
    margin: 0;
    padding-left: 1.2em;
    color: var(--term-fg-secondary);
}

.tc-routing-pretransport-list li {
    margin-bottom: 2px;
}

/* ==========================================================================
   REGION 7 · NOW/ARC CURATION (Series 3, 2026-08-07 — A3 rulings P1/P2/P3)
   Styles OWNED by the Series 3 behavior: the pertinent-negative tags (P1),
   the transient moment-highlight a cluster click paints (P3), and the
   collapsed-during-live Loom ribbon (P2). The river/nucleus/rail bases stay
   in their existing sheets — Series 3 adds behavior, not a re-skin.
   ========================================================================== */

/* P1 — the all-negated headline never silently reads as an active problem. */
.tc-now-nucleus__pertinent-negative,
.tc-episode-now__pertinent-negative {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--term-status-warning);
    border: 1px solid color-mix(in srgb, var(--term-status-warning) 45%, transparent);
    border-radius: 999px;
    padding: 1px 8px;
    margin: 2px 0;
}

/* P3 — cluster activation flashes the complete moment in the story below. */
.tc-clinical-knot.is-moment-highlight {
    outline: 2px solid var(--term-gold, #D4A857);
    outline-offset: 2px;
    transition: outline-color 0.3s ease;
}

/* P2 — counts-only Loom while live: the strand grid is omitted from the DOM;
   tighten the ribbon so the rail reads as pure glance chrome. */
.tc-episode-now__loom[data-loom-collapsed="1"] {
    padding-block: 2px;
}

/* ==========================================================================
   QUEUE ↔ ENCOUNTER CONNECTION  (2026-08-10, owner "reconnect" + "go both")
   M1 flattened the rail and M2 gave the selected card a gold continuity edge.
   These two finish the through-line so the queue and the encounter read as one
   instrument, undoing the rest of the 2026-05-28 "3-step ramp" (void rail <
   surface workspace < elevated) the same way M1 did on the rail side.
   Desktop, AT REST only — live capture and the note-drawer keep their own
   focused treatments (scoped :not(.tc-clinical-live), and the note-open grid
   overrides win by their own specificity).
   ========================================================================== */

/* M2b/M3 are DESKTOP, AT-REST ONLY (adjudicate F-1, 2026-08-10). Originally
   gated only on :not(.tc-clinical-live), which leaked two ways: (1) the note
   drawer collapses the rail column to 0 and hides .tc-list-panel, but the
   .selected card stays in the DOM (selection is a pure class toggle), so a bare
   :has() kept matching and the workspace painted a gold stripe connecting to
   nothing while the doctor proofread; (2) below 1200px the rail stacks ABOVE the
   workspace, yet both rules still fired. A grid override does not reset a
   box-shadow, so the earlier "note-open grid wins by specificity" reasoning was
   wrong. Wrap both in the 1200px gate + :not(.tc-note-open); live already
   excluded. Four-state matrix (none / selected / selected+live / selected+note-
   open) + a sub-desktop case are pinned in
   tests/playwright/test_tc_queue_seam_connection_2026_08_10.py. */
@media (min-width: 1200px) {
    /* M3 — the encounter shares the rail's field instead of a lifted plane.
       (Base .tc-workspace still lifts to --term-bg-surface elsewhere.) */
    body.tc-clinical-canvas-on:not(.tc-clinical-live):not(.tc-note-open) .tc-workspace {
        background: transparent;
    }

    /* M2b — gold receiver on the encounter's seam edge while a card is selected. */
    body.tc-clinical-canvas-on:not(.tc-clinical-live):not(.tc-note-open):has(.tc-transfer-card.selected) .tc-workspace {
        box-shadow: inset 3px 0 0 0 var(--term-gold, #c79a3b);
    }

    /* F-2 (adjudicate, 2026-08-10) — gold the rail's hairline under a selected
       card. Without this the seam is gold | 1px transparent | 1px hairline |
       gold — a 2px two-ink break at the exact pixel the connection exists to
       fuse. The page grid has NO column-gap (verified), so tinting the hairline
       closes the boundary to ONE continuous gold line (card edge -> seam ->
       receiver). Reverts to the neutral --term-border-subtle when nothing is
       selected. */
    body.tc-clinical-canvas-on:not(.tc-clinical-live):not(.tc-note-open) .tc-list-panel:has(.tc-transfer-card.selected) {
        border-right-color: var(--term-gold, #c79a3b);
    }
}

/* F-3 (adjudicate, 2026-08-10): at >=1200px the live call must COLLAPSE the
   queue rail so the conversation and the Transfer Arc own the viewport
   (transfer-clinical-canvas.css hides it + zeroes its column by design). An
   episode-tapestry restore (display:block !important at (0,4,1), + the desktop
   grid at (0,2,1)) accidentally re-showed the rail at desktop purely by cascade
   order, contradicting the design and leaving the selected card's gold edge
   dead-ending mid-call (the M2b receiver is already live-gated off). Re-assert
   the collapse here (unified loads LAST): the display rule matches the tapestry
   restore's selector exactly so it wins by order; the column rule adds
   .tc-clinical-live for strictly higher specificity than the tapestry desktop
   grid, so the outcome no longer depends on <link> order. Sub-desktop keeps the
   tapestry stacked live layout untouched. Pinned in
   tests/playwright/test_tc_queue_seam_connection_2026_08_10.py (live case). */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-list-panel {
        display: none !important;
    }
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live {
        grid-template-columns: 0 minmax(0, 1fr);
    }
}

/* ==========================================================================
   REGION 8 · LIVE CANVAS HIERARCHY (2026-08-11, owner screenshot review)
   Four owner findings on the mid-call surface, one at-rest finding:
     8a  recorder controls wrapped into three half-empty rows (~137px for one
         row of content);
     8b  the Conversation/Patient-arc switcher read as body copy, not tabs;
     8c  the "Patient story" header floated BELOW the bedside rail — chrome
         split from chrome (tabs / bedside / header -> tabs / header / bedside);
     8d  bedside signal values (spoken phrases) set in 11.5px mono were hard
         to read;
     8e  the selected-card <-> encounter gold seam (2026-08-10) was too quiet —
         "visual linkage" asked for again;
     8m  mid-call NOW + evidence-river stacked ~300px of glance chrome
         above the story, forcing form-scroll during the call.
   ========================================================================== */

/* 8a — one control row during live. The chooser ships flex-basis:100% for
   the at-rest capture picker (REGION 1); mid-call only the two phone boxes
   survive inside it, so forcing its own row orphaned "LIVE CALL" above it
   and pushed REC/timer/Stop to a third row. Sharing the row reclaims the
   dead space; flex-wrap stays on, so narrow widths still wrap gracefully. */
.tc-clinical-canvas-on.tc-clinical-live .tc-recorder-controls > .tc-capture-chooser {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
}

/* 8b — the switcher is the canvas's ONE navigation control; it must read as
   tabs at a glance. Stays inside the B2 flat-terminal ruling (2026-07-30:
   square corners, token-teal accent, no glow pills) — hierarchy comes from
   mono caps, a real tab strip with its own hairline, and an active tab that
   is boxed + top-accented instead of only underlined. Selectors mirror the
   ux-polish B2/content-sized blocks exactly so these win by load order. */
body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"] .tc-clinical-canvas__switcher {
    gap: 0.4rem;
    align-items: end;
    padding: 0.5rem 0.75rem 0;
    border-bottom: 1px solid var(--tc-arc-line-strong);
    background: linear-gradient(180deg, rgb(7 16 20 / 90%), rgb(10 21 25 / 55%));
}

body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"] .tc-clinical-canvas__switcher button {
    min-height: 2.5rem;
    padding: 0.55rem 1.3rem 0.6rem;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--tc-arc-faint, #637878);
    border: 1px solid transparent;
    border-bottom: 0;
}

body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]
    .tc-clinical-canvas__switcher button:hover {
    color: var(--tc-arc-muted, #98aaa9);
}

body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]
    .tc-clinical-canvas__switcher button[aria-pressed="true"] {
    color: var(--tux-fg-strong, #E8E2D9);
    border-color: var(--tc-arc-line-strong);
    background: linear-gradient(180deg, rgb(76 196 180 / 12%), transparent 80%);
    box-shadow: inset 0 2px 0 var(--term-accent, #4CC4B4);
}

/* 8c — chrome with chrome, content with content: tabs, then the Patient-story
   header, THEN the bedside rail, then the stage. The header is rendered by
   clinical-story-map.js INSIDE the story pane, so the pane and the story-map
   root become display:contents in story view and the header/stage are
   promoted to canvas grid items. Scoped to [data-clinical-view="story"]: in
   transcript view the pane keeps its box and the existing display:none rule
   (episode-tapestry.css) hides it exactly as before; the arc-header row is
   then empty and collapses to 0. The stage inherits the pane's scroll duty
   and gradient (a display:contents element paints nothing). */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas {
        grid-template-rows: auto auto auto minmax(0, 1fr) auto;
        grid-template-areas: "switcher" "arc-header" "bedside" "stage" "agenda";
    }

    body.tc-page[data-tc-episode-tapestry="1"]
        .tc-clinical-canvas[data-clinical-view="story"] .tc-clinical-canvas__story-pane,
    body.tc-page[data-tc-episode-tapestry="1"]
        .tc-clinical-canvas[data-clinical-view="story"] .tc-clinical-canvas__story-pane > .tc-story-map {
        display: contents;
    }

    /* Compact single-row header: eyebrow + title inline left, fact-count
       status right. Shares the switcher strip's tone so tabs + header read
       as one chrome unit above the bedside rail. */
    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas .tc-transfer-arc__header {
        grid-area: arc-header;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: baseline;
        min-height: 0;
        gap: 0 1rem;
        padding: 0.5rem 1.1rem;
        background: rgb(10 21 25 / 78%);
    }

    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas .tc-transfer-arc__identity {
        display: flex;
        align-items: baseline;
        gap: 0.65rem;
        min-width: 0;
    }

    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas .tc-transfer-arc__eyebrow {
        margin-bottom: 0;
    }

    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas .tc-transfer-arc__title {
        font-size: 0.92rem;
    }

    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas .tc-transfer-arc__status {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
        white-space: nowrap;
    }

    body.tc-page[data-tc-episode-tapestry="1"]
        .tc-clinical-canvas[data-clinical-view="story"] .tc-transfer-arc__stage {
        grid-area: stage;
        min-width: 0;
        min-height: 0;
        overflow-y: auto;
        /* No overscroll-behavior here — see 8h: contain on an inner scroller
           swallows wheel input even when it has nothing to scroll. */
        scrollbar-gutter: stable;
        background: linear-gradient(180deg, rgb(14 27 32 / 72%), rgb(7 16 20 / 44%));
    }
}

/* 8d — bedside signals hold spoken clinical phrases (sentence-length
   trend statements), not identifiers: body face at a readable size,
   roomier tiles. Labels/timestamps stay mono chrome. */
.tc-bedside {
    min-height: 3.6rem;
    padding: 0.5rem 1rem;
}

.tc-bedside__signal {
    min-width: 9.5rem;
    max-width: 17rem;
    gap: 0.22rem;
    padding: 0.42rem 0.7rem;
}

.tc-bedside__signal-label {
    font-size: 0.6875rem; /* F-4 floor; 8d shipped 0.6rem without updating the burn-in */
}

.tc-bedside__signal-value {
    font-family: var(--term-font-body, 'DM Sans', sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
}

.tc-bedside__signal-time {
    font-size: 0.6875rem; /* F-4 floor; 8d shipped 0.58rem without updating the burn-in */
}

/* 8e — louder queue <-> encounter linkage (owner asked again 2026-08-11).
   Same gates as the 2026-08-10 QUEUE ↔ ENCOUNTER block (desktop, at rest,
   no note drawer): the selected card gains a gold wash concentrated at its
   seam edge, and the workspace answers with a matching wash bleeding in
   from its receiver edge — the 3px lines stay, the shared ink is what makes
   the two panels read as one instrument. */
@media (min-width: 1200px) {
    body.tc-clinical-canvas-on:not(.tc-clinical-live):not(.tc-note-open)
        .tc-list-panel .tc-transfer-card.selected {
        background:
            linear-gradient(270deg, color-mix(in srgb, var(--term-gold, #c79a3b) 10%, transparent), transparent 60%),
            var(--dr-inkwash, color-mix(in srgb, var(--term-fg-primary) 4%, transparent));
    }

    body.tc-clinical-canvas-on:not(.tc-clinical-live):not(.tc-note-open):has(.tc-transfer-card.selected)
        .tc-workspace {
        background: linear-gradient(90deg, color-mix(in srgb, var(--term-gold, #c79a3b) 5%, transparent), transparent 15rem);
        box-shadow: inset 3px 0 0 0 var(--term-gold, #c79a3b);
    }
}

/* 8f — hot fishbone: snug the panel around the engine's content (owner
   screenshot, 2026-08-12). The Commit-V full-width unlock was measured at
   1280-1440, where the spanned row IS the fishbone's width; at ultra-wide
   the engine still caps its stage at ~916px, so the panel stretched to
   ~1672px with dead flanks on both sides and the header strip detached
   from the drawing it labels. Cap the hot panel near the engine's own
   maximum and center it in the spanned row — the owner-approved ~21px
   digit scale is untouched, only the empty margin goes. Empty state and
   sub-1200 keep their shipped boxes.
   AMENDED same day (owner: "NOT supposed to be this GIGANTIC"): the 64rem
   cap still let the engine reach its internal ~916px stage (the Commit-V
   1.27x scale target measured on 1280-1440 screens) — on a 2056px monitor
   that is a 633px-tall instrument. The cap now pins the drawing at its
   NATURAL 720-unit scale (~1.0x, ~16px value digits — the 2026-08-03
   complaint was 7px, so legibility keeps a >2x margin). This one width is
   THE size dial for the hot fishbone; screens narrower than the cap keep
   scale-to-row behavior unchanged. */
/* TOMBSTONE (2026-08-15): the 47rem/center rule that lived here was 8f's
   size dial for the FULL-SPAN fishbone banner. 8n (2026-08-14, below at the
   :has(.fbp-values) child block) reseated labs into column 1, where the
   story column itself is the size — its width:100%/stretch declarations
   share this selector at equal specificity and win by order, so the rule
   was dead weight that read as live. History stays in the comment above;
   do not resurrect without re-reading 8n. */

/* 8g — vitals rail tier (owner: "too small to read", 2026-08-12). The
   VitalsPanel engine picks its density tier from host width; rows with
   values/sparklines need >=340px of CONTENT width, and the NOW aside's
   23.5rem column cap left the host at ~333px after the scrollbar gutter —
   7px short, so the rail rendered the no-value dot strip even WITH data.
   Raise only the CAP (floors untouched, so the 1200px-gate fit measured
   2026-08-06 is unchanged): at >=~1750px viewports the aside takes 25rem
   and the vitals host clears the tier boundary with margin. Narrower
   desktops keep the shipped dots. */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"] #tcWorkspaceForm {
        grid-template-columns: minmax(33rem, 1fr) clamp(17rem, 23vw, 25rem);
    }
}

/* 8h — wrap-up scroll trap (owner: "navigation vertically IMPOSSIBLE",
   2026-08-12). In the post-call unlocked state the WORKSPACE is the page's
   one scroller (fold growth owner-ruled 2026-08-03), but the inner panels —
   the NOW rail, the canvas panes, the arc stage — were overflow-y:auto
   scroll containers with `overscroll-behavior: contain`. Per spec, contain
   on a scroll container blocks scroll chaining EVEN WHEN the container has
   nothing to scroll, so every content-sized panel was a dead zone for the
   wheel: the page only moved when the cursor sat in the seams between
   panels (reproduced with real wheel events: workspace scrollTop froze over
   the stage and the aside, moved over the labs panel, whose
   overscroll-behavior was auto). Contain on these panels only ever mattered
   mid-call, where nothing above them scrolls anyway — so chaining is
   restored unconditionally; `.tc-workspace` keeps its own contain (it is
   the intended scroller, and that one stops chaining to the BODY). */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"] .tc-episode-now,
    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas__transcript-pane,
    body.tc-page[data-tc-episode-tapestry="1"] .tc-clinical-canvas__story-pane,
    /* The stage's contain ships in its BASE rule (transfer-clinical-canvas.css),
       not only in the 8c desktop promotion — override it here too. */
    body.tc-page[data-tc-episode-tapestry="1"] .tc-transfer-arc__stage {
        overscroll-behavior: auto;
    }
}

/* 8i — decision spine height in the unlocked states (owner: "too small to
   see anything", 2026-08-12). The REGION 3 unlock templates pinned row 6 to
   clamp(13.5rem, 30.5vh, 18.5rem) — right for the viewport-fit at-rest form
   (A1 rebalance, untouched here), wrong once the workspace itself scrolls:
   the spine's post-call content (sigma line, 3-way decision, bed-type chips,
   routing card, preview) runs ~2.5x that cap, so the page's most important
   control became a ~286px box with internal scroll. In the unlocked states
   only, the row keeps its floor and loses its ceiling; every other row
   matches the REGION 3 templates verbatim. Same selectors, later in file —
   wins by order at equal (very high, :has-carrying) specificity. */
@media (min-width: 1200px) {
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]),
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values),
    /* 2026-08-15 pt 2: the fact-keyed unlock (REGION 3) must lift the ceiling
       too — without this line a facts-only workspace gets the scroll-page
       unlock but keeps the 18.5rem row cap, and the spine renders 849px of
       decision content inside a 294px internal scroller (measured, 2560px). */
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact) {
        grid-template-rows:
            auto                     /* 1 topbar */
            auto                     /* 2 origin strip */
            clamp(9rem, 24vh, 20rem) /* 3 one well */
            auto                     /* 4 labs fishbone */
            auto                     /* 5 canvas + NOW: content-sized */
            minmax(13.5rem, auto)    /* 6 decision: floor kept, cap lifted —
                                        the workspace scrolls, the spine
                                        renders whole */
            auto;                    /* 7 footer */
    }
}

/* 8j — note-drawer rail parity (owner screenshot, 2026-08-12: "does this
   look fixed to you!?"). The note-open form template caps the rail column at
   20rem (320px), under the vitals engine's 340px rows tier — so the drawer
   state regressed to the dot strip 8g had just fixed, with >1100px of slack
   sitting in the canvas column. Same treatment as 8g: floors untouched (the
   2026-08-06 1200px-gate slack math is preserved — a minmax cap only binds
   when space allows), cap raised to match the at-rest rail. */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"].tc-note-open #tcWorkspaceForm {
        grid-template-columns: minmax(23rem, 1fr) minmax(17rem, 25rem);
    }
}

/* 8k — an EMPTY chart box must not spend the hot-state's prime viewport
   (owner screenshot, 2026-08-12: 290px of blank "Chart materials" above the
   fold while the 31-fact story sat below it). Only in the unlocked states —
   where real data exists and the story is the page — an untouched one well
   (canonical #tcChartMaterials still showing its placeholder; the slab view
   keeps that textarea as the ONE data element, so :placeholder-shown remains
   true while hidden) drops row 3 to a compact header+compose strip. Typing
   or pasting un-matches the selector and the clamp returns live. The plain
   at-rest template keeps its clamp everywhere: not-yet-known is the product
   there (owner ruling, REGION 3). */
@media (min-width: 1200px) {
    /* Vitals-only empty well: labs host stays the sparse col-2 row.
       2026-08-15 pt 2: fact-keyed branch added — same reasoning as 8i. */
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]):has(#tcChartMaterials:placeholder-shown),
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact):has(#tcChartMaterials:placeholder-shown) {
        grid-template-rows:
            auto                     /* 1 topbar */
            auto                     /* 2 origin strip */
            minmax(5.5rem, auto)     /* 3 one well: EMPTY — header + compose */
            auto                     /* 4 labs (col 2, empty costs nothing) */
            auto                     /* 5 canvas + NOW */
            minmax(13.5rem, auto)    /* 6 decision (8i) */
            auto;                    /* 7 footer */
    }
    /* Labs ink + empty well: labs stay at row 4 (top of the story column,
       8n) so an empty chart box cannot dump the fishbone under the arc. */
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values):has(#tcChartMaterials:placeholder-shown) {
        grid-template-rows:
            auto                     /* 1 topbar */
            auto                     /* 2 origin strip */
            minmax(5.5rem, auto)     /* 3 one well: EMPTY — header + compose */
            auto                     /* 4 labs | NOW */
            auto                     /* 5 story | sticky decision */
            auto                     /* 6 decision span */
            auto;                    /* 7 footer */
    }
}

/* 8l — Episode Loom strands readable at rail width (owner screenshots,
   2026-08-12, note open AND closed): four strand tiles across a ~370px rail
   left ~88px per tile — label + status both ellipsized to noise. Two-up at
   desktop rail width; the sub-desktop stacked aside keeps the shipped 4-up
   (it spans the page there). */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"] .tc-episode-now__strands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 8m — live-call vertical budget (owner 2026-08-14: "too much vertical
   scrolling becomes necessary during the call"; NOW nucleus ~193px +
   evidence river ~107px called out as the summary + statement timeline).
   Scoped to .tc-clinical-live + desktop story view so post-call wrap-up
   keeps the editorial stacked blocks (Phase 3c 70ch measure, orb, key).
   Nucleus | river share one sticky glance row; the stage remains the
   scroller (8c). Tone key / provenance hint / decorative orb are
   instructional chrome, not clinical content — hide them mid-call. */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-clinical-canvas[data-clinical-view="story"] .tc-transfer-arc__stage {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 1fr);
        grid-auto-rows: auto;
        align-content: start;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus,
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-evidence-river {
        position: sticky;
        top: 0;
        z-index: 2;
        /* 2026-08-15 pt 2: both bases are translucent (nucleus = gradients
           with no base color, river = 36% alpha), so story/transcript lines
           scrolled visibly THROUGH the pinned glance row mid-call. Opaque
           base in the sticky context only; matches the canvas's own top-edge
           gradient color. */
        background-color: var(--tc-arc-deep, #0a1519);
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus {
        display: grid;
        grid-column: 1;
        grid-row: 1;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.12rem 0.65rem;
        align-items: baseline;
        padding: 0.4rem 0.85rem 0.45rem;
        overflow: hidden;
        border-bottom: 1px solid var(--tc-arc-line);
        border-right: 1px solid var(--tc-arc-line);
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus::after {
        display: none;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__label {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__pertinent-negative {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        margin: 0;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__fact,
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__movement {
        max-width: none;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__fact {
        grid-column: 2;
        grid-row: 1;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-now-nucleus:has(.tc-now-nucleus__pertinent-negative) .tc-now-nucleus__fact {
        grid-row: 2;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-now-nucleus:has(.tc-now-nucleus__pertinent-negative) .tc-now-nucleus__movement {
        grid-row: 3;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-now-nucleus__fact .tc-clinical-knot__value {
        font-size: 1.05rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__movement {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-now-nucleus__movement .tc-clinical-knot__copy {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.35rem 0.55rem;
        align-items: baseline;
        min-width: 0;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-now-nucleus__movement .tc-clinical-knot__value {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.78rem;
        line-height: 1.3;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-now-nucleus__provenance {
        display: none;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-evidence-river {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        padding: 0.35rem 0.85rem 0.4rem;
        background: rgb(7 16 20 / 92%);
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-evidence-river__header {
        margin-bottom: 0.18rem;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-evidence-river__track {
        height: 1.7rem;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-evidence-river__key {
        display: none;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-transfer-flow,
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-transfer-horizon,
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-transfer-arc__empty {
        grid-column: 1 / -1;
    }

    /* Bedside is chrome above the stage (8c). 8d made tiles roomier for
       readability; mid-call that budget belongs to the story. Values stay
       at 0.8rem (8d) — only the tile chrome tightens. */
    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-bedside {
        min-height: 0;
        padding: 0.28rem 0.75rem;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live .tc-bedside__signal {
        padding: 0.28rem 0.55rem;
    }

    body.tc-page[data-tc-episode-tapestry="1"].tc-clinical-live
        .tc-clinical-canvas .tc-transfer-arc__header {
        padding: 0.32rem 0.85rem;
    }
}

/* 8n — wrap-up fishbone seating (amended 2026-08-14 twice). First cut
   parked labs AFTER the story (5000px down). Second cut put labs at the
   top of the story column but left #tcLabsPanel stretching to the NOW
   rail's content height (~1200px) around a ~328-unit drawing — the
   "ungodly" empty well. Grid default align-self:stretch ignores
   height:auto, so the host MUST be start-aligned.
   NOW spans labs+story so its height is distributed and row 4 hugs the
   instrument; the card is CAPPED at 47rem and centered (owner screenshot
   2026-08-16 overruled "the story column IS the size" — a full-column
   render put ~28-37px digits around a ~350-unit BMP drawing; 47rem is the
   8f dial the owner already blessed, restoring the engine's ~17px design
   scale). Stage max-width:none is moot under the cap but kept so the
   padding block stays one unit. Decision stays sticky beside the story. NOW is confined to row 4
   (2026-08-15, owner report + 9-FOUND): its old 4/6 span ran under the
   spine's grid area, so at rest the decision floated over the vitals
   instrument's lower half and the whole NOW summary, while
   .tc-episode-now__status painted through between the spine's cards.
   Cost accepted: when NOW outruns the labs card, row 4 grows and the
   story starts below NOW's bottom edge — visible air under labs, but
   nothing covered and the spine keeps its full sticky travel.
   Live/expanded untouched. */
@media (min-width: 1200px) {
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) {
        grid-template-rows:
            auto                     /* 1 topbar */
            auto                     /* 2 origin strip */
            clamp(9rem, 24vh, 20rem) /* 3 one well — 8k still wins when empty */
            auto                     /* 4 labs | NOW (taller of the two) */
            minmax(12rem, auto)      /* 5 story | sticky decision */
            auto                     /* 6 decision span */
            auto;                    /* 7 footer */
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > #tcLabsPanel {
        grid-column: 1;
        grid-row: 4;
        width: 100%;
        max-width: 47rem;
        justify-self: center;
        align-self: start;
        height: auto;
        max-height: none;
        overflow-y: hidden;
    }

    /* Host rhythm, not a theme fork: the engine's stage caps at 960px and
       pads 26/22, so a column-width card still left the drawing floating
       in a dark well. Fill the card; keep legend inset in lockstep. */
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > #tcLabsPanel.fbp > .fbp-stage {
        max-width: none;
        padding: 12px 14px 10px;
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > #tcLabsPanel.fbp > .fbp-bar {
        padding: 10px 14px;
    }
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > #tcLabsPanel.fbp .fbp-legend,
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > #tcLabsPanel.fbp .fbp-legend-light {
        inset: 12px 14px 10px;
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > .tc-episode-now {
        grid-column: 2;
        grid-row: 4;                 /* whole aside above the spine — never under it */
        align-self: start;
        min-width: 0;
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > .tc-bottom-panel {
        grid-column: 1;
        grid-row: 5 / 7;             /* story immediately under labs */
        height: auto;
        min-height: 12rem;
        overflow: visible;           /* workspace scrolls the arc; do not clip */
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcLabsPanel .fbp-values) > .tc-decision-spine {
        grid-column: 2;
        grid-row: 5 / 7;
        position: sticky;
        top: 0.75rem;
        align-self: start;
        z-index: 2;                  /* paint safety while sticky; NOW no longer shares this area */
        background: var(--term-bg-void, #0B120D);
        max-height: calc(100vh - 5.5rem);
        overflow-y: auto;
    }
}

/* 8o — sticky decision rail WITHOUT labs ink (owner follow-up 2026-08-16:
   "fix the sticky spine on the no-labs calls too"). The fact/vitals unlock
   branches kept A1's seating: the story spanned rows 3/8, so grid
   distributed the arc's height EQUALLY across every spanned auto row —
   the spine's row landed mid-column, unsticky, a full arc-length scroll
   from the decision buttons, with the right rail running empty. The only
   deterministic geometry is 8n's: story and spine share an IDENTICAL row
   span (distribution inside it cannot matter), NOW confined above. Mirror
   it minus the labs card: one-well full-span (Commit V's labs-state
   reseat), NOW into the empty labs cell (row 4 — #tcLabsPanel is :empty
   here, zero-size), story + sticky spine at 5/7. Cost accepted, same as
   8n's: col-1 air beside NOW before the story starts. Disjoint from 8n by
   :not(:has(.fbp-values)) — labs seating untouched. Rows templates are
   untouched: REGION 3/8i/8k all keep row 5 auto + row 6 growable, which
   is all this seating needs. */
@media (min-width: 1200px) {
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]):not(:has(#tcLabsPanel .fbp-values)) > .tc-one-well,
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact):not(:has(#tcLabsPanel .fbp-values)) > .tc-one-well {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]):not(:has(#tcLabsPanel .fbp-values)) > .tc-episode-now,
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact):not(:has(#tcLabsPanel .fbp-values)) > .tc-episode-now {
        grid-column: 2;
        grid-row: 4;                 /* whole aside above the spine — never under it */
        align-self: start;
        min-width: 0;
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]):not(:has(#tcLabsPanel .fbp-values)) > .tc-bottom-panel,
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact):not(:has(#tcLabsPanel .fbp-values)) > .tc-bottom-panel {
        grid-column: 1;
        grid-row: 5 / 7;             /* story spans EXACTLY the spine's rows */
        height: auto;
        min-height: 12rem;
        overflow: visible;           /* workspace scrolls the arc; do not clip */
    }

    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcVitalsPanel[data-has-vitals]):not(:has(#tcLabsPanel .fbp-values)) > .tc-decision-spine,
    body.tc-page.tc-ux-polish[data-tc-episode-tapestry="1"]:not(.tc-clinical-live):not(.tc-one-well-expanded)
        #tcWorkspaceForm:has(#tcEpisodeNowSummary .tc-episode-now__fact):not(:has(#tcLabsPanel .fbp-values)) > .tc-decision-spine {
        grid-column: 2;
        grid-row: 5 / 7;
        position: sticky;
        top: 0.75rem;
        align-self: start;
        z-index: 2;                  /* paint safety while sticky; NOW never shares this area */
        background: var(--term-bg-void, #0B120D);
        max-height: calc(100vh - 5.5rem);
        overflow-y: auto;
    }
}

/* ==========================================================================
   REGION 9 · ENCOUNTER POLISH PASS (2026-08-14, session 3 — pre/in/post-call
   sweep at 1536×900 as dr_smith on a synthetic NSTEMI workspace; every rule
   below was injected live and screenshot-verified before landing here)
   ========================================================================== */

/* 9a — mid-call LABS legibility. The engine header (LABS · Σ chip · count
   chip · LEGEND/PAPER) wrapped into a 173px stack inside the 236px live
   panel, crushing the fishbone to a clipped 75px smear at the panel's
   bottom edge — "labs stays VISIBLE mid-call" rendered as an unreadable
   sliver. One compact row instead: browse chrome (LEGEND/PAPER) and the
   chip sublabels ("deviation" / "outside range") are reading aids, not
   call-time controls, so they hide during a live call and the drawing gets
   the panel back. Host-side presentation only — engine files untouched;
   the at-rest render is byte-identical. */
@media (min-width: 1200px) {
    body.tc-clinical-live #tcLabsPanel .fbp-bar {
        flex-wrap: nowrap;
        min-width: 0;
        overflow: hidden;
    }
    body.tc-clinical-live #tcLabsPanel .fbp-controls { display: none; }
    body.tc-clinical-live #tcLabsPanel .fbp-chips,
    body.tc-clinical-live #tcLabsPanel .fbp-chips > * {
        flex-wrap: nowrap;
        white-space: nowrap;
        min-width: 0;
    }
    body.tc-clinical-live #tcLabsPanel .fbp-chip i { display: none; }
}

/* 9b — the Σ recompute line ("Updating live · Σ … out … critical") sat 4px
   off the ACCEPT card's top edge and read as part of the button. Its own
   breathing room. */
#tcInstrumentSigma { margin-bottom: 0.5rem; }

/* 9c — the accept-lane rows (bed chips, destination/tier selects, routing
   advisor, census link) sat flush against the lane's left hairline, so the
   first bed chip's border merged with the lane edge and read as clipped.
   A small inset detaches them; margins shrink the row, so nothing can
   overflow the spine's overflow-x:hidden. */
#tcBedChips,
.tc-accept-routing,
.tc-accept-advisor,
.tc-census-link { margin-left: 4px; }

/* 9d — the call-agenda rail (#tcNegativeSpace) is a horizontal scroll row
   whose last chip simply cut off at the edge with no affordance that more
   exists. A thin scrollbar makes it read as scrollable; content untouched. */
#tcNegativeSpace { scrollbar-width: thin; }

/* 9e (2026-08-15 pt 2) — footer overflow with a saved note + closed drawer.
   The rail footer (col 2, 400px at the 25rem cap) lays the reopen tab
   (#tcNoteTab, ~217px) and the Generate/View button (~210-236px) on one
   nowrap flex line, pushing the button 31-57px past the workspace edge —
   the whole page grew a horizontal scrollbar (measured on 3 of 11 real
   workspaces at 2560x1440). Wrap instead: with both visible they stack,
   each full rail width; with the tab hidden (no note, or drawer open)
   nothing changes. */
@media (min-width: 1200px) {
    body.tc-page[data-tc-episode-tapestry="1"] .tc-workspace-footer {
        flex-wrap: wrap;
    }
    body.tc-page[data-tc-episode-tapestry="1"] .tc-workspace-footer #tcNoteTab {
        flex: 1 1 100%;
        min-width: 0;
    }
}
