/* Phosphor icon font — sidebar card icons (stethoscope/hospital/clock/spinner).
   templates/transfer.html does not link phosphor-icons.css; import here so the
   icon spans render without touching the template. Defines only .ph classes +
   @font-face — no effect on existing elements. */
@import url("phosphor-icons.css");

/* ==========================================================================
   SOMANOTES / SOMACURA — TRANSFER CENTER TERMINAL THEME
   ==========================================================================

   Location:  /static/css/transfer-center.css
   Activator: .tc-page class on <body>
   Version:   1.0.0

   Design DNA:
   Same Phosphor Theatre terminal theme as the note rail, scoped to
   .tc-page for standalone page usage. Two-panel layout: transfer list
   (360px) + workspace (flex: 1).

   Font Dependencies (loaded via Google Fonts in template):
     - JetBrains Mono 300..700       (labels, metadata, code, status)
     - Outfit 200..600               (display headings, section titles)
     - DM Sans 300..500              (clinical body text, form fields)

   ========================================================================== */


/* ==========================================================================
   S1  RESET & PAGE LAYOUT
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* FIX (2026-08-06, responsive audit Stage 1): was overflow:hidden — every
       layout overflow was silently CLIPPED, which is why the page read as
       "usable only within a few px of the right width". Let the page scroll
       on overflow so a wrong-width viewport degrades visibly instead. At
       fitting widths nothing changes (content is exactly 100vh, no overflow,
       no scrollbar); internal panels keep their own scroll regions either
       way. Recorder/canvas internal clips are Stage 2 scope. */
    overflow: auto;
}

:root {
    --tc-motion-fast: 120ms;
    --tc-motion-base: 200ms;
    --tc-motion-slow: 400ms;
    --tc-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --tc-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --tc-type-title: 1.5rem;
    --tc-type-group: 1rem;
    --tc-type-body: 0.9375rem;
    --tc-type-meta: 0.6875rem;
}

.tc-page {
    --term-bg-void:       #0C0B0A;
    /* FIX (2026-05-28): elevation-ramp widening — follow-up to the contrast
       pass (46c65185/297b4f5d). That pass fixed boundary visibility (3:1 edges)
       but left the fill ramp sub-1.2:1, so void/surface/elevated were
       perceptually one near-black plane — panels separated only by hairlines,
       never by tone. Widen the three lifted steps so cards read as raised
       tiles and input wells read as fillable, not as outlined holes in the
       void. void stays the darkest anchor; elevated lands ~1.45:1 vs void
       (still phosphor-dark, now perceptibly above the page). */
    --term-bg-surface:    #1B1916;
    --term-bg-elevated:   #2E2A21;
    --term-bg-header:     #0E0D0B;
    --term-bg-input:      #262218;
    --term-fg-primary:    #E8E4DC;
    --term-fg-secondary:  #A09888;
    --term-fg-muted:      #8A8278;
    --term-fg-inverse:    #0C0B0A;
    --term-border-subtle:  #1E1C18;
    --term-border-default: #2A2720;
    --term-border-strong:  #3A3630;
    /* FIX (2026-05-28): UI/UX review — "too dark / UI hidden".
       ROOT CAUSE: no border token reached the 3:1 WCAG 1.4.11 minimum on
       near-black, so every container edge (cards, input wells, panel seams)
       was invisible. --term-boundary is the load-bearing interactive-edge
       token: #6A655C = 3.40:1 vs --term-bg-void. Use it on any edge the
       doctor must perceive; keep --term-border-* for subordinate hairlines. */
    --term-boundary:       #6A655C;
    /* FIX (2026-08-13): these tokens were referenced throughout (call recorder,
       Twilio controls, transcript, clear-day button) but never defined, so the
       var() fallbacks silently carried the values. Defined here with the exact
       fallback values so behavior is preserved and the theme stays tokenized. */
    --term-red:           #E55A50;
    --term-blue:          #5B9BD5;
    --term-warning:       #FF9C5E;
    --term-border:        #3A352F;
    --term-bg-elev:       #2a2a2a;
    --term-accent:        #00FFD0;
    --term-accent-dim:    rgba(0, 255, 208, 0.40);
    --term-accent-subtle: rgba(0, 255, 208, 0.10);
    --term-accent-ghost:  rgba(0, 255, 208, 0.05);
    /* INC-1 semantic aliases (2026-05-29): one color = one meaning on this surface.
       --term-live  = actively streaming / just-changed only.
       --term-block = hard-stop / error (maps to status-error).
       --term-attention = amber attention signal (maps to status-editing). */
    --term-live:          #00FFD0;
    --term-live-dim:      rgba(0, 255, 208, 0.40);
    --term-live-subtle:   rgba(0, 255, 208, 0.10);
    --term-live-ghost:    rgba(0, 255, 208, 0.05);
    --term-block:         var(--term-status-error);
    --term-attention:     var(--term-status-editing);
    --term-gold:          #D4A857;
    --term-gold-dim:      rgba(212, 168, 87, 0.35);
    --term-gold-subtle:   rgba(212, 168, 87, 0.10);
    --term-gold-ghost:    rgba(212, 168, 87, 0.05);
    --term-status-error:      #EF4444;
    --term-status-ready:      #22C55E;
    --term-status-editing:    #F59E0B;
    --term-status-generating: #3B82F6;
    /* Disposition decision palette (2026-05-29): a parallel SOFTER red/blue (NOT the canonical
       --term-status-error #EF4444 / -generating #3B82F6). Single source of truth so the
       decline/local-mgmt decision-board colors can't drift across the ~20 callsites that
       previously smuggled these as inline var() fallbacks. */
    --term-red:               #E55A50;
    --term-blue:              #5B9BD5;
    --term-glow-accent:       0 0 8px rgba(0, 255, 208, 0.25), 0 0 24px rgba(0, 255, 208, 0.08);
    --term-glow-accent-intense: 0 0 12px rgba(0, 255, 208, 0.40), 0 0 36px rgba(0, 255, 208, 0.12);
    --term-glow-gold:         0 0 10px rgba(212, 168, 87, 0.15), 0 0 24px rgba(212, 168, 87, 0.06);
    --term-font-mono:    'JetBrains Mono', 'SF Mono', monospace;
    --term-font-display: 'Outfit', 'Inter', sans-serif;
    --term-font-body:    'DM Sans', 'Inter', sans-serif;
    --term-text-xs:   0.6875rem;
    --term-text-sm:   0.8125rem;
    --term-text-base: 0.9375rem;
    --term-text-lg:   1.125rem;
    --term-tracking-wide:   0.05em;
    --term-tracking-wider:  0.10em;
    --term-tracking-widest: 0.20em;
    --term-tracking-display: 0.15em;
    --term-space-xs:  4px;
    --term-space-sm:  8px;
    --term-space-md:  12px;
    --term-space-lg:  16px;
    --term-space-xl:  24px;
    --term-space-2xl: 32px;
    --term-corner-size:   16px;
    --term-corner-offset: 6px;
    --term-corner-width:  2px;
    --term-duration-normal: 300ms;
    --term-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --term-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.018'/%3E%3C/svg%3E");

    background: var(--term-bg-void);
    color: var(--term-fg-primary);
    font-family: var(--term-font-body);
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 360px 1fr;
    height: 100vh;
    position: relative;
}


/* ==========================================================================
   S2  FILM GRAIN OVERLAY
   ========================================================================== */

.tc-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--term-grain);
    background-size: 512px 512px;
    pointer-events: none;
    z-index: 9999;
}


/* ==========================================================================
   S3  SECTION SWITCHER
   ========================================================================== */

.tc-section-switcher {
    display: flex;
    align-items: center;
    gap: var(--term-space-xl);
    margin-left: var(--term-space-xl);
}

.tc-section-link {
    font-family: var(--term-font-display);
    font-size: var(--term-text-sm);
    font-weight: 400;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--term-fg-muted);
    padding: var(--term-space-sm) 0;
    border-bottom: 2px solid transparent;
    transition: color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease);
}

.tc-section-link:hover {
    color: var(--term-fg-secondary);
    border-bottom-color: var(--term-border-default);
}

.tc-section-link.active {
    color: var(--term-fg-primary);
    border-bottom: 2px solid var(--term-fg-primary);
    text-shadow: none;
}

.tc-section-prefix {
    color: var(--term-gold);
    font-family: var(--term-font-mono);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(212, 168, 87, 0.30);
    margin-right: 2px;
}


/* ==========================================================================
   S4  HEADER
   ========================================================================== */

/* FIX (2026-03-09): Header pinned to bottom of viewport
   BUG: Header rendered below the main content at the bottom of the page
   ROOT CAUSE: <div class="tc-grain-overlay"> (no CSS) participates in the
   grid as the first child, occupying row 1 col 1. The header had no explicit
   grid-row, so auto-placement pushed it to an implicit row after row 2.
   FIX: Explicit grid-row: 1 forces header into the correct position. */
.tc-header {
    grid-row: 1;
    grid-column: 1 / -1;
    background: var(--term-bg-header);
    border-bottom: 1px solid var(--term-border-default);
    padding: var(--term-space-md) var(--term-space-xl);
    display: flex;
    align-items: center;
    gap: var(--term-space-xl);
    position: relative;
    z-index: 10;
    min-height: 52px;
}

/* Gold accent line under header */
.tc-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--term-gold-dim),
        transparent
    );
    pointer-events: none;
}

/* Brand block */
.tc-header-brand {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm);
    flex-shrink: 0;
}

.tc-logo-mark {
    font-size: 1.25rem;
    color: var(--term-gold);
    text-shadow: var(--term-glow-gold);
}

.tc-logo-link {
    font-family: var(--term-font-display);
    font-size: var(--term-text-lg);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--term-fg-primary);
    text-decoration: none;
    transition: none;
}

.tc-logo-link:hover {
    text-shadow: var(--term-glow-accent);
}

.tc-logo-accent {
    color: var(--term-gold);
    font-weight: 500;
}

/* Header controls (right side) */
.tc-header-controls {
    display: flex;
    align-items: center;
    gap: var(--term-space-lg);
    margin-left: auto;
}

/* Date filter */
.tc-date-filter {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm);
}

.tc-date-filter .tc-field-label {
    margin-bottom: 0;
}

.tc-date-input {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    color: var(--term-fg-primary);
    background: var(--term-bg-input);
    border: 1px solid var(--term-border-default);
    padding: var(--term-space-xs) var(--term-space-sm);
    outline: none;
    transition: border-color var(--tc-motion-base) var(--tc-ease);
    color-scheme: dark;
}

.tc-date-input:focus {
    border-color: var(--term-gold);
    box-shadow: var(--term-glow-gold);
}

/* New Transfer button */
.tc-new-btn {
    font-family: var(--term-font-display);
    font-size: var(--term-text-sm);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    color: var(--term-fg-primary);
    background: var(--term-bg-elevated);
    border: 1px solid var(--term-boundary);
    padding: var(--term-space-sm) var(--term-space-lg);
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    white-space: nowrap;
}

.tc-new-btn:hover {
    box-shadow: var(--term-glow-accent-intense);
    transform: translateY(-1px);
}

.tc-new-btn:active {
    transform: translateY(0);
}

/* Clear-day button — destructive sibling to + New Transfer.
   Outlined/dim by default so it doesn't compete; warms on hover. */
.tc-clear-btn {
    font-family: var(--term-font-display);
    font-size: var(--term-text-sm);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    color: var(--term-fg-muted);
    background: transparent;
    /* FIX (2026-05-29): was var(--term-border) — an UNDEFINED token (no fallback), so the
       border fell back to currentColor (muted) and this destructive control (soft-clears the
       whole day) had a sub-3:1 invisible edge — a regression of the 2026-05-28 boundary pass.
       --term-boundary is the load-bearing 3.40:1 interactive-edge token. */
    border: 1px solid var(--term-boundary);
    padding: var(--term-space-sm) var(--term-space-md);
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    white-space: nowrap;
}

.tc-clear-btn:hover {
    /* FIX (2026-05-29): --term-warning was undefined project-wide (only the inline #ff9c5e
       fallback worked — an off-palette orange). Unify on the system amber used everywhere else
       for attention signals; amber-on-hover is the right severity for a soft, reversible action. */
    color: var(--term-status-editing);
    border-color: var(--term-status-editing);
}

.tc-clear-btn:active {
    transform: translateY(1px);
}

.tc-clear-btn:focus-visible {
    outline: 2px solid var(--term-gold);
    outline-offset: 2px;
}

/* Doctor Guide — permanent, labeled route to the full public orientation.
   This intentionally outranks the cryptic `?` reminder without competing
   with + New Transfer, the page's primary clinical action. */
.tc-doctor-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: var(--term-space-sm) var(--term-space-md);
    color: var(--term-gold);
    background:
        linear-gradient(135deg, rgba(212, 168, 87, 0.12), rgba(212, 168, 87, 0.035));
    border: 1px solid var(--term-gold-dim);
    border-radius: 2px;
    font-family: var(--term-font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease);
}

.tc-doctor-guide-arrow {
    font-size: 13px;
    line-height: 0.7;
    transition: transform var(--tc-motion-base) var(--tc-ease);
}

.tc-doctor-guide-link:hover {
    color: var(--term-fg-primary);
    background: rgba(212, 168, 87, 0.16);
    border-color: var(--term-gold);
    box-shadow: var(--term-glow-gold);
    transform: translateY(-1px);
}

.tc-doctor-guide-link:hover .tc-doctor-guide-arrow {
    transform: translate(1px, -1px);
}

.tc-doctor-guide-link:focus-visible {
    outline: 2px solid var(--term-gold);
    outline-offset: 2px;
}

/* Smaller variant for empty state in list */
.tc-new-btn-sm {
    font-family: var(--term-font-display);
    font-size: var(--term-text-xs);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    color: var(--term-fg-primary);
    background: transparent;
    border: 1px solid var(--term-boundary);
    padding: var(--term-space-xs) var(--term-space-md);
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

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

/* User menu placeholder */
.tc-user-menu {
    display: flex;
    align-items: center;
}


/* ==========================================================================
   S5  TRANSFER LIST PANEL (LEFT 360px)
   ========================================================================== */

.tc-body {
    display: contents;
}

.tc-list-panel {
    grid-row: 2;
    grid-column: 1;
    overflow-y: auto;
    /* FIX (2026-08-09): the rail read as a detached slab floating over the
       encounter screen. The 2026-05-28 decision below deliberately promoted the
       seam to a "load-bearing boundary spine + hard shadow" so the rail would
       visibly SEPARATE from the workspace — that intent is superseded: the queue
       and the encounter are one instrument, so the click-through from a card to
       its transfer should read as continuous, not as crossing a wall. Drop the
       cast-shadow spine (the floating cue) and soften the divider to a single
       hairline; the rail shares the page field with the workspace instead of a
       void-black fill. Card selection language is unchanged (owner ruling
       2026-08-06, neutral inner ring). */
    border-right: 1px solid var(--term-border-subtle);
    background: transparent;
    position: relative;
    z-index: 2;
}

.tc-transfer-list {
    list-style: none;
    margin: 0;
    padding: var(--term-space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--term-space-sm);
}

/* List empty state */
.tc-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--term-space-2xl) var(--term-space-lg);
    gap: var(--term-space-lg);
    min-height: 200px;
}

/* The empty-state is toggled via the `hidden` attribute by transfer-list.js.
   Author `display: flex` above beats the UA `[hidden] { display: none }` rule,
   so without this guard the "No transfers for this date" placeholder stayed
   visible even when transfers exist (documented bug class; see the note tab's
   .tc-note-tab[hidden] restore). Attribute+class specificity (0,2,0) wins. */
.tc-list-empty[hidden] {
    display: none;
}

.tc-list-empty-text {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    color: var(--term-fg-muted);
    letter-spacing: var(--term-tracking-wide);
}


/* S6 TRANSFER CARD: MIGRATED to transfer-unified.css (slice 2, 2026-08-02) —
   card surface, ziggurat corners, hover/selected, name/diagnosis/meta. */


/* ==========================================================================
   S7  URGENCY BADGES
   ========================================================================== */

.tc-urgency-badge {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    font-weight: 600;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid currentColor;
    display: inline-block;
    line-height: 1.4;
}

/* Tier 1 — Immediate (red, pulsing) */
.tc-urgency-badge[data-urgency="1"] {
    color: #EF4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.5);
    animation: tc-urgency-pulse calc(var(--tc-motion-slow) * 5) var(--tc-ease-soft) infinite;
}

@keyframes tc-urgency-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Tier 2 — Before Acceptance (amber) */
.tc-urgency-badge[data-urgency="2"] {
    color: #F59E0B;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.5);
}

/* Tier 3 — 3-Way Call (blue) */
.tc-urgency-badge[data-urgency="3"] {
    color: #3B82F6;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Tier 4 — FYI Before Arrival (purple) */
.tc-urgency-badge[data-urgency="4"] {
    color: #A78BFA;
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.3);
    border-color: rgba(167, 139, 250, 0.4);
}

/* Tier 5 — After Arrival (green) */
.tc-urgency-badge[data-urgency="5"] {
    color: #22C55E;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.4);
}

/* Unclassified */
.tc-urgency-badge:not([data-urgency]),
.tc-urgency-badge[data-urgency=""] {
    color: var(--term-fg-muted);
    border-color: var(--term-border-default);
}


/* S8 STATUS BADGES: MIGRATED to transfer-unified.css (slice 2, 2026-08-02). */


/* ==========================================================================
   S9  WORKSPACE PANEL (RIGHT)
   ========================================================================== */

.tc-workspace {
    grid-row: 2;
    grid-column: 2;
    overflow-y: auto;
    /* FIX (2026-05-28): workspace inherited the void, so header/list/workspace
       were one flat plane. Lift it to the surface step so the work area
       advances above the void list rail (3-step ramp: void < surface < elevated). */
    background: var(--term-bg-surface);
    padding: var(--term-space-xl);
    position: relative;
    z-index: 2;
}

/* WHY: Removed max-width: 800px — compact dashboard layout needs full workspace width
   for two-column grid to breathe. The grid columns themselves handle proportion.
   FIX (2026-04-12): Make form a flex column with min-height: 100% so the
   sticky footer sits at the bottom when content is short, eliminating the
   dead space below the Generate button that doctors reported. `margin-top:
   auto` on the footer pushes it to the bottom of the flex container. */
.tc-workspace-form {
    max-width: none;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tc-workspace-form[hidden] {
    display: none;
}


/* ==========================================================================
   S10  SECTION TITLES
   ========================================================================== */

/* --- Collapsible section wrappers --- */
.tc-section {
    border-bottom: 1px solid var(--term-border-subtle);
}

.tc-section-title {
    font-family: var(--term-font-display);
    font-size: var(--term-text-sm);
    font-weight: 300;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--term-gold);
    padding: var(--term-space-lg) 0 var(--term-space-sm);
    display: flex;
    align-items: center;
    gap: var(--term-space-sm);
    text-shadow: 0 0 16px rgba(212, 168, 87, 0.20);
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.tc-section-title:hover {
    color: var(--term-fg-primary);
}

/* Chevron rotates open/closed */
.tc-section-title::before {
    content: '>';
    font-family: var(--term-font-mono);
    font-weight: 700;
    font-size: var(--term-text-base);
    color: var(--term-gold);
    text-shadow: 0 0 10px rgba(212, 168, 87, 0.30);
    flex-shrink: 0;
    display: inline-block;
    transition: transform var(--tc-motion-base) var(--tc-ease);
    transform: rotate(0deg);
}

.tc-section.is-open > .tc-section-title::before {
    transform: rotate(90deg);
}

.tc-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--term-gold-dim), transparent 80%);
    margin-left: var(--term-space-md);
}

/* Inline summary shown when collapsed */
.tc-section-summary {
    font-family: var(--term-font-body);
    font-size: var(--term-text-xs);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--term-fg-muted);
    text-shadow: none;
    margin-left: var(--term-space-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    opacity: 1;
    transition: opacity var(--tc-motion-base) var(--tc-ease);
}

.tc-section.is-open > .tc-section-title > .tc-section-summary {
    opacity: 0;
    pointer-events: none;
}

/* Section body — collapse via max-height + overflow */
.tc-section-body {
    overflow: hidden;
    max-height: 2000px; /* generous upper bound for open state */
    transition: opacity var(--tc-motion-base) var(--tc-ease);
    opacity: 1;
}

.tc-section:not(.is-open) > .tc-section-body {
    max-height: 0;
    opacity: 0;
    /* Prevent tabbing into hidden fields */
    visibility: hidden;
    transition: opacity var(--tc-motion-base) var(--tc-ease);
}

.tc-section.is-open > .tc-section-body {
    visibility: visible;
    transition: opacity var(--tc-motion-base) var(--tc-ease);
}


/* ==========================================================================
   S11  DIVIDERS — Art Deco Fan Motif
   ========================================================================== */

.tc-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--term-gold-dim) 20%,
        var(--term-gold-dim) 80%,
        transparent
    );
    margin: var(--term-space-lg) 0;
    position: relative;
}

/* Decorative fan motif at center */
.tc-divider::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 9px;
    background: var(--term-gold-dim);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    opacity: 0.5;
}


/* ==========================================================================
   S12  FIELD LABELS
   ========================================================================== */

.tc-field-label {
    font-family: var(--term-font-display);
    /* FIX (2026-05-28): these label the inputs (Date, Transfer Status, etc.) yet
       were the least legible text on the page — gold @ opacity:0.6 + weight-300
       + 11px ≈ 3.8:1. Carry contrast with a fixed full-alpha gold (#C9A050 =
       7.7:1 vs surface) so contrast stays auditable, and bump weight/size. */
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    /* ACCENT BUDGET (2026-07-01 design pass): gold marked labels + borders +
       buttons + emphasis, so it marked nothing. Generic field labels demote
       to the neutral secondary (~6.5:1 on the well rungs, still auditable);
       gold now means SECTION-GRADE or decision-critical only — the existing
       .tc-decision-detail / .tc-disposition-* / .tc-recorder--split overrides
       already re-assert it exactly there. */
    color: var(--term-fg-secondary, #A09888);
    opacity: 1;
    margin-bottom: var(--term-space-xs);
    display: block;
}

.tc-field-label::before {
    content: '$ ';
    font-family: var(--term-font-mono);
    color: var(--term-gold-dim);
}


/* ==========================================================================
   S13  INPUTS / TEXTAREAS / SELECTS
   ========================================================================== */

.tc-input,
.tc-textarea,
.tc-select {
    font-family: var(--term-font-body);
    font-size: var(--term-text-base);
    color: var(--term-fg-primary);
    /* FIX (2026-05-28): wells were dark-on-dark (input #17160F on void, 1.08:1)
       with only a bottom hairline — undetectable as inputs. Lift to the elevated
       plane (raised vs the surface workspace) and give a full 4-side boundary
       edge so each field reads as a fillable well. .tc-select keeps its arrow
       background-image (set later, higher specificity). */
    background: var(--term-bg-elevated);
    border: 1px solid var(--term-boundary);
    border-radius: 3px;
    padding: var(--term-space-sm) var(--term-space-md);
    width: 100%;
    outline: none;
    transition: border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    box-sizing: border-box;
}

.tc-input::placeholder,
.tc-textarea::placeholder {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    /* FIX (2026-05-28): placeholder was fg-muted @ opacity:0.5 (~2.1:1) — on
       near-invisible wells the hint was often the only marker a field existed,
       yet it read as blank black. Fixed muted token at full alpha = ~4.0:1
       (visible hint, still subordinate to typed fg-primary). */
    color: #7A7268;
    opacity: 1;
}

.tc-input:focus,
.tc-textarea:focus,
.tc-select:focus {
    /* FIX (2026-05-28): now that wells have a full boundary border, the old
       bottom-only teal line rendered as an asymmetric focus state and was easy
       to lose while tabbing (WCAG 2.4.7). Promote focus to a full gold border
       + faint inset/outer ring. (INC-1: teal reserved for live/streaming only.) */
    border-color: var(--term-gold);
    box-shadow: 0 0 0 1px var(--term-gold-dim) inset, 0 0 0 2px var(--term-gold-ghost);
}

.tc-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.tc-textarea.tc-notes-large {
    min-height: 160px;
}

.tc-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23A09888'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

.tc-select option {
    background: var(--term-bg-elevated);
    color: var(--term-fg-primary);
}

/* Field layout helpers */
.tc-field-group {
    margin-bottom: var(--term-space-md);
}

.tc-field-row {
    display: flex;
    gap: var(--term-space-lg);
}

.tc-field-grow {
    flex: 1;
    min-width: 0;
}

.tc-field-narrow {
    flex: 0 0 100px;
}


/* ==========================================================================
   S14  BED TYPE CHIPS
   ========================================================================== */

.tc-bed-chips {
    display: flex;
    gap: var(--term-space-sm);
    flex-wrap: wrap;
}

.tc-bed-chip,
.tc-dest-chip {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wide);
    text-transform: uppercase;
    /* FIX (2026-05-28, high-tier): resting chips read as a string of dim words
       (fg-muted on transparent, 1.32:1 border) — only .active looked like a control,
       risking a missed level-of-care (ICU vs floor). Harden the border to the
       boundary token + lift the resting text; the teal .active state still wins. */
    color: var(--term-fg-secondary);
    background: transparent;
    border: 1px solid var(--term-boundary);
    padding: var(--term-space-xs) var(--term-space-lg);
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-bed-chip:hover,
.tc-dest-chip:hover {
    border-color: var(--term-gold-dim);
    color: var(--term-fg-secondary);
}

.tc-bed-chip.active,
.tc-dest-chip.active {
    border-color: var(--term-gold);
    color: var(--term-gold);
    background: var(--term-gold-ghost);
    box-shadow: var(--term-glow-gold);
}


/* ==========================================================================
   S15  ROUTING ADVISOR CARD — MIGRATED (Series 2, 2026-08-07)
   All routing-card / Apply / capability-warning / pre-transport rules moved
   to transfer-unified.css REGION 6 in the same series that relocated the
   advisor into #tcAcceptBlock. .tc-urgency-badge below is SHARED queue/card
   chrome and stays here on purpose.
   ========================================================================== */

/* ==========================================================================
   S16  CAPABILITY WARNING — .tc-capability-warning MIGRATED with S15 (above)
   ========================================================================== */

/*
 * UAT header pill (2026-07-04, temporary). Amber outline to read as
 * "attention, action item for the doctor" without competing with the
 * primary New Transfer button. Remove with the UAT checklist
 * (static/uat/tc-uat-2026-07-04.html).
 */
.tc-uat-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    color: var(--term-status-warning);
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    letter-spacing: 0.08em;
    text-decoration: none;
}

.tc-uat-link:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* .tc-routing-pretransport* rules MIGRATED with S15 (Series 2, 2026-08-07) —
   see transfer-unified.css REGION 6. */


/* ==========================================================================
   S16b  IMAGING ADVISOR CARD
   WHY: Companion to routing advisor — surfaces imaging protocol recommendations
        during transfer acceptance. Teal accent distinguishes from gold routing card.
   ARCHITECTURE: Same terminal aesthetic, same row structure. Two-row contrast
        pattern (recommended vs avoid) validated by aviation/pharma CDS research.
   ========================================================================== */

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

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

/* WHY: Teal ziggurat corner — same pattern as routing card but teal accent
   to visually distinguish imaging from routing at a glance. */
.tc-imaging-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    border-top: 1px solid rgba(76, 196, 180, 0.35);
    border-right: 1px solid rgba(76, 196, 180, 0.35);
    clip-path: polygon(33% 0, 100% 0, 100% 100%, 66% 100%, 66% 66%, 33% 66%, 33% 33%, 0 33%, 0 0);
    opacity: 0.35;
    pointer-events: none;
}

.tc-imaging-header {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm);
    margin-bottom: var(--term-space-md);
}

.tc-imaging-label {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(76, 196, 180, 0.8);
}

.tc-imaging-modality-badge {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tc-imaging-modality-badge--ct {
    background: rgba(230, 154, 76, 0.15);
    color: #E69A4C;
    border: 1px solid rgba(230, 154, 76, 0.3);
}

.tc-imaging-modality-badge--mri {
    background: rgba(76, 196, 180, 0.15);
    color: #4CC4B4;
    border: 1px solid rgba(76, 196, 180, 0.3);
}

.tc-imaging-urgency-badge {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 2px;
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: tc-pulse-subtle calc(var(--tc-motion-slow) * 5) var(--tc-ease-soft) infinite;
}

@media (prefers-reduced-motion: reduce) {
    .tc-imaging-urgency-badge { animation: none; }
}

@keyframes tc-pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Recommended study section — teal left stripe */
.tc-imaging-recommend {
    border-left: 3px solid rgba(76, 196, 180, 0.6);
    padding-left: var(--term-space-md);
    margin-bottom: var(--term-space-md);
}

/* Avoid section — red left stripe (matches tc-capability-warning pattern) */
.tc-imaging-avoid {
    border-left: 3px solid var(--term-status-error);
    padding-left: var(--term-space-md);
    margin-bottom: var(--term-space-md);
    background: rgba(239, 68, 68, 0.04);
    padding: var(--term-space-sm) var(--term-space-md);
}

.tc-imaging-avoid-reason {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
    margin-top: var(--term-space-xs);
    line-height: 1.5;
}

/* Row internals — same pattern as tc-routing-row */
.tc-imaging-row {
    display: flex;
    align-items: baseline;
    gap: var(--term-space-lg);
    padding: var(--term-space-xs) 0;
}

.tc-imaging-key {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--term-fg-muted);
    min-width: 90px;
    flex-shrink: 0;
}

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

.tc-imaging-value--primary {
    font-weight: 600;
    color: rgba(76, 196, 180, 0.95);
}

.tc-imaging-value--avoid {
    color: var(--term-status-error);
    font-weight: 500;
}

.tc-imaging-rationale {
    font-family: var(--term-font-body);
    font-size: var(--term-text-sm);
    color: var(--term-fg-secondary);
    line-height: 1.6;
    margin-bottom: var(--term-space-md);
}

/* Alternatives — collapsed by default via <details> */
.tc-imaging-alternatives {
    margin-bottom: var(--term-space-md);
}

.tc-imaging-alt-toggle {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
    cursor: pointer;
    list-style: none;
    padding: var(--term-space-xs) 0;
}

.tc-imaging-alt-toggle::before {
    content: '▸ ';
}

details[open] > .tc-imaging-alt-toggle::before {
    content: '▾ ';
}

.tc-imaging-alt-toggle::-webkit-details-marker {
    display: none;
}

.tc-imaging-alt-list {
    padding: var(--term-space-sm) 0 0 var(--term-space-md);
}

.tc-imaging-alt-item {
    font-family: var(--term-font-body);
    font-size: var(--term-text-xs);
    color: var(--term-fg-secondary);
    padding: var(--term-space-xs) 0;
    line-height: 1.5;
}

.tc-imaging-alt-condition {
    font-weight: 500;
    color: var(--term-fg-primary);
}

.tc-imaging-alt-study {
    color: rgba(76, 196, 180, 0.8);
}

.tc-imaging-alt-note {
    color: var(--term-fg-muted);
}

/* Reference citation — same // prefix as routing alternates */
.tc-imaging-ref {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
    padding-top: var(--term-space-sm);
    border-top: 1px solid var(--term-border-subtle);
}


/* ==========================================================================
   S17  NOTIFICATION CHECKBOXES
   ========================================================================== */

.tc-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--term-space-sm);
}

.tc-check-item {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm);
    font-family: var(--term-font-body);
    font-size: var(--term-text-base);
    color: var(--term-fg-secondary);
    cursor: pointer;
}

.tc-check-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--term-border-default);
    background: var(--term-bg-input);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-check-item input[type="checkbox"]:checked {
    border-color: var(--term-gold);
    background: var(--term-gold);
}

/* Checkmark via pseudo-element */
.tc-check-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid var(--term-fg-inverse);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tc-check-item input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--term-gold);
    outline-offset: 2px;
}


/* ==========================================================================
   S18  GENERATE BUTTON
   ========================================================================== */

.tc-generate-btn {
    width: 100%;
    background: var(--term-gold);
    border: none;
    color: var(--term-fg-inverse);
    font-family: var(--term-font-display);
    font-size: var(--term-text-sm);
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: var(--term-space-lg) var(--term-space-xl);
    min-height: 48px;
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-generate-btn:hover {
    box-shadow: var(--term-glow-accent-intense);
    transform: translateY(-1px);
}

.tc-generate-btn:active {
    transform: translateY(0);
}

.tc-generate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary button style */
.tc-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-secondary);
    background: transparent;
    border: 1px solid var(--term-border-default);
    padding: var(--term-space-sm) var(--term-space-lg);
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-btn:hover {
    border-color: var(--term-gold-dim);
    color: var(--term-fg-primary);
}

.tc-btn-primary {
    font-family: var(--term-font-display);
    font-size: var(--term-text-sm);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wider);
    text-transform: uppercase;
    color: var(--term-fg-inverse);
    background: var(--term-gold);
    border: none;
    padding: var(--term-space-sm) var(--term-space-lg);
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-btn-primary:hover {
    box-shadow: var(--term-glow-accent-intense);
}

/* Workspace footer layout — sticky so Generate is always reachable.
   FIX (2026-04-12): `margin-top: auto` pushes the footer to the bottom of
   the .tc-workspace-form flex column when content is shorter than the
   workspace height, closing the dead-space gap below Generate Transfer
   Note. Sticky positioning still kicks in when the workspace is tall
   enough to scroll. */
.tc-workspace-footer {
    display: flex;
    align-items: flex-end;
    gap: var(--term-space-lg);
    padding: var(--term-space-lg) var(--term-space-xl);
    border-top: 1px solid var(--term-border-default);
    position: static;
    background: var(--term-bg-surface);
    margin: var(--term-space-md) calc(-1 * var(--term-space-xl)) 0;
    /* Subtle top shadow so it "floats" above scrolled content */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.tc-status-field {
    flex: 0 0 180px;
}

.tc-workspace-footer .tc-generate-btn {
    /* FIX (2026-05-28): the base rule sets width:100% and this footer rule set
       flex:1, so the primary action stretched the entire remaining footer width
       (~1080px) into a teal banner. Size it to its content instead, keep a
       confident min-width so it stays the obvious primary action (not a tiny
       chip), and right-align it past the status field. Height/gradient/48px
       touch target unchanged — this is a width fix only. */
    flex: 0 0 auto;
    width: auto;
    min-width: 260px;
    margin-left: auto;
}


/* ==========================================================================
   S19  AUTO-SAVE INDICATOR
   ========================================================================== */

.tc-save-status {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    letter-spacing: var(--term-tracking-wide);
    color: var(--term-fg-muted);
    text-align: right;
    margin-bottom: var(--term-space-sm);
}


/* ==========================================================================
   S20  EMPTY STATE
   ========================================================================== */

/* FIX (2026-03-09): Empty state overlay visible when workspace loaded
   BUG: "Select a transfer" overlay stayed visible even after selecting a transfer
   ROOT CAUSE: `display: flex` has higher specificity than HTML `hidden` attribute.
   The hidden attribute sets `display: none` at UA-stylesheet level, but any explicit
   display value in author CSS overrides it.
   FIX: Added [hidden] selector to restore display: none when attribute is set. */
.tc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: var(--term-space-lg);
    text-align: center;
}

.tc-empty-state[hidden] {
    display: none;
}

.tc-empty-icon {
    font-size: 3rem;
    color: var(--term-fg-muted);
    opacity: 0.4;
}

.tc-empty-title {
    font-family: var(--term-font-display);
    font-size: var(--term-text-lg);
    font-weight: 300;
    letter-spacing: var(--term-tracking-wide);
    color: var(--term-fg-secondary);
    margin: 0;
}

/* Shared TC accent: consumed by BOTH the empty-state guide below and the
   capture-band styles in transfer-capture-first.css (#tcWorkspaceForm is a
   SIBLING of #tcEmptyState, so a token scoped to .tc-empty-guide can never
   reach it — the capture band was silently riding its hardcoded fallback). */
:root {
    --tc-guide-green: #78A88F;
}

/* First-class doctor orientation — occupies the otherwise squandered
   no-workspace canvas and stays paired with a direct + New Transfer action. */
.tc-empty-guide {
    --tc-guide-fg: #F0E9DC;
    --tc-guide-muted: #B7AD9D;
    --tc-guide-dim: #8C8376;
    --tc-guide-gold: #D4A857;
    --tc-guide-edge: rgba(212, 168, 87, 0.28);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    width: min(100%, 980px);
    overflow: hidden;
    color: var(--tc-guide-fg);
    background:
        radial-gradient(circle at 90% 12%, rgba(0, 255, 208, 0.06), transparent 22rem),
        linear-gradient(145deg, rgba(46, 42, 33, 0.96), rgba(22, 20, 17, 0.98));
    border: 1px solid rgba(232, 228, 220, 0.26);
    border-top-color: var(--tc-guide-edge);
    border-radius: 4px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(232, 228, 220, 0.05);
    text-align: left;
}

.tc-empty-guide::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--tc-guide-gold), transparent);
}

.tc-empty-guide-copy {
    padding: clamp(30px, 5vw, 58px);
}

.tc-empty-guide-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: var(--tc-guide-gold);
    font-family: var(--term-font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tc-empty-guide-mark {
    font-size: 15px;
    text-shadow: var(--term-glow-gold);
}

.tc-empty-guide-time {
    margin-left: auto;
    padding: 4px 7px;
    color: var(--tc-guide-muted);
    border: 1px solid rgba(232, 228, 220, 0.2);
    border-radius: 2px;
    font-size: 9px;
    letter-spacing: 0.08em;
}

.tc-empty-guide-title {
    margin: 0;
    color: var(--tc-guide-fg);
    font-family: var(--term-font-display);
    font-size: clamp(2rem, 4vw, 3.65rem);
    font-weight: 200;
    letter-spacing: -0.035em;
    line-height: 0.98;
}

.tc-empty-guide-lede {
    max-width: 560px;
    margin: 22px 0 0;
    color: var(--tc-guide-muted);
    font-family: var(--term-font-body);
    font-size: 15px;
    line-height: 1.62;
}

.tc-empty-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.tc-empty-guide-open {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 0 17px;
    color: #111411;
    background: var(--tc-guide-gold);
    border: 1px solid var(--tc-guide-gold);
    border-radius: 2px;
    font-family: var(--term-font-mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: box-shadow var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease);
}

.tc-empty-guide-open:hover {
    box-shadow: 0 0 18px rgba(212, 168, 87, 0.25);
    transform: translateY(-1px);
}

.tc-empty-guide-open:focus-visible {
    outline: 2px solid var(--term-fg-primary);
    outline-offset: 3px;
}

.tc-empty-guide-new {
    min-height: 42px;
    color: var(--tc-guide-fg);
    background: #332F28;
    border-color: rgba(232, 228, 220, 0.42);
}

.tc-empty-guide-new:hover {
    color: #111411;
    background: var(--tc-guide-fg);
    border-color: var(--tc-guide-fg);
}

.tc-empty-guide-safety {
    margin: 18px 0 0;
    color: var(--tc-guide-green);
    font-family: var(--term-font-mono);
    font-size: 9px;
    letter-spacing: 0.055em;
    line-height: 1.5;
    text-transform: uppercase;
}

.tc-empty-guide-path {
    display: grid;
    margin: 0;
    padding: 0;
    background: rgba(8, 12, 11, 0.7);
    border-left: 1px solid var(--tc-guide-edge);
    list-style: none;
}

.tc-empty-guide-path li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 22px 26px;
    border-bottom: 1px solid var(--tc-guide-edge);
}

.tc-empty-guide-path li:last-child {
    border-bottom: 0;
}

.tc-empty-guide-path li > span {
    color: var(--tc-guide-gold);
    font-family: var(--term-font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tc-empty-guide-path li > div {
    min-width: 0;
}

.tc-empty-guide-path strong,
.tc-empty-guide-path small {
    display: block;
}

.tc-empty-guide-path strong {
    color: var(--tc-guide-fg);
    font-family: var(--term-font-display);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.tc-empty-guide-path small {
    margin-top: 4px;
    color: var(--tc-guide-green);
    font-family: var(--term-font-mono);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 1200px) {
    .tc-empty-guide {
        grid-template-columns: 1fr;
    }

    .tc-empty-guide-copy {
        padding: 34px;
    }

    .tc-empty-guide-path {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid var(--tc-guide-edge);
        border-left: 0;
    }

    .tc-empty-guide-path li:nth-child(odd) {
        border-right: 1px solid var(--tc-guide-edge);
    }

    .tc-empty-guide-path li:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}

@media (max-width: 760px) {
    .tc-empty-state {
        justify-content: flex-start;
        min-height: 0;
    }

    .tc-empty-guide-copy {
        padding: 28px 24px;
    }

    .tc-empty-guide-title {
        font-size: 2.35rem;
    }

    .tc-empty-guide-path {
        grid-template-columns: 1fr;
    }

    .tc-empty-guide-path li,
    .tc-empty-guide-path li:nth-child(odd),
    .tc-empty-guide-path li:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--tc-guide-edge);
    }

    .tc-empty-guide-path li:last-child {
        border-bottom: 0;
    }
}


/* ==========================================================================
   S21  NOTE OUTPUT MODAL
   ========================================================================== */

/* FIX (2026-06-07): the transfer note was a full-screen blocking modal —
   the doctor couldn't see/touch the rest of the page while it generated, and
   after Save the note vanished (no persistent home; the `notes` field was
   stripped from the template). Reworked into a NON-BLOCKING docked drawer that
   stays open after save and re-renders the saved note on workspace load, so a
   completed transfer's note is always findable. No backdrop → form stays live. */
.tc-note-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* T5 R4: width shares --tc-note-drawer-w (defined :root, section S-NT) with
       the ≥1560px body.tc-note-open docking margin so the two can never drift. */
    width: min(var(--tc-note-drawer-w, 480px), 94vw);
    z-index: 900;
    display: flex;
    flex-direction: column;
    background: var(--term-bg-elevated);
    border-left: 1px solid var(--term-border-default);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.45);
    transform: translateX(0);
    transition: transform var(--tc-motion-base) var(--tc-ease);
}

.tc-note-modal[hidden] {
    display: none;
}

/* FIX (2026-07-30, A3): the drawer overlays the page header, so with the note
   open the header's right-hand controls (date, + New Transfer, Clear Day,
   Doctor Guide, skin) slid UNDER it and clipped mid-button. The workspace has
   a docking margin (episode/redesign sheets); give the header the same one,
   sharing --tc-note-drawer-w so the three can never drift. */
/* GUARD (2026-08-06, responsive audit Stage 1): this dock originally applied
   at EVERY viewport width while the workspace dock (transfer-redesign.css
   S-NT) is gated at ≥1560px — header docked, workspace overlaid, a built-in
   mismatch band. Gate the header dock at the same 1560px so both dock
   together; below 1560 the drawer is an overlay by design (S-NT comment). */
@media (min-width: 1560px) {
    body.tc-note-open .tc-header {
        margin-right: min(var(--tc-note-drawer-w, 480px), 94vw);
        transition: none;
    }
}

/* Backdrop element retained in CSS for safety but no longer rendered (removed
   from the template) — the drawer is intentionally non-modal. */
.tc-note-modal-backdrop {
    display: none;
}

.tc-note-modal-content {
    position: relative;
    background: transparent;
    border: none;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Saved-state stamp in the drawer header (e.g. "Saved 14:32"). */
.tc-note-status {
    margin-left: auto;
    margin-right: var(--term-space-md);
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 0.72rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--term-fg-muted);
    white-space: nowrap;
}

.tc-note-status.is-saved { color: var(--term-success, #4caf50); }
.tc-note-status.is-generating { color: var(--term-live, #2dd4bf); }
.tc-note-status.is-unsaved { color: var(--term-gold, #C9A227); }
.tc-note-status.is-error { color: var(--term-status-error, #EF4444); }

.tc-note-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--term-space-lg);
    border-bottom: 1px solid var(--term-border-subtle);
}

.tc-note-modal-title {
    font-family: var(--term-font-display);
    font-size: var(--term-text-lg);
    font-weight: 300;
    letter-spacing: var(--term-tracking-display);
    text-transform: uppercase;
    color: var(--term-gold);
    margin: 0;
}

.tc-note-modal-close {
    font-size: 1.25rem;
    color: var(--term-fg-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--term-space-xs);
    transition: color var(--tc-motion-base) var(--tc-ease);
}

.tc-note-modal-close:hover {
    color: var(--term-fg-primary);
}

.tc-note-output {
    flex: 1;
    overflow-y: auto;
    padding: var(--term-space-xl);
    font-family: var(--term-font-body);
    font-size: var(--term-text-base);
    line-height: 1.7;
    color: var(--term-fg-primary);
    white-space: pre-wrap;
}

.tc-note-output.is-error {
    color: var(--term-status-error, #EF4444);
    font-family: var(--term-font-mono, monospace);
}

/* Generated-note rhythm (2026-06-07): formatNoteOutput renders the note as
   per-section blocks (header / body line / bullet) so spacing is owned by CSS
   margins, not the model's stray blank lines — sections breathe and the note
   scans top-down. Copy/Save read the raw text (workspace.js _noteRawText), so
   collapsing blank lines here doesn't touch the pasted/saved note. */
.tc-note-section {
    display: block;
    margin: 1.25em 0 0.3em;
    font-weight: 600;
    font-size: var(--term-text-sm, 0.82rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--term-gold, #C9A227);
}

/* First header sits flush with the top of the drawer body. */
.tc-note-output > .tc-note-section:first-child {
    margin-top: 0;
}

/* Body lines / paragraphs under a header. */
.tc-note-line {
    white-space: pre-wrap;
    margin: 0 0 0.35em;
}

/* RECOMMENDED NEXT STEPS bullets — hang-indented with a gold marker so wrapped
   lines align under the text, not back at the margin. */
.tc-note-bullet {
    position: relative;
    padding-left: 1.15em;
    margin: 0 0 0.3em;
}

.tc-note-bullet::before {
    content: "•";
    position: absolute;
    left: 0.15em;
    color: var(--term-gold, #C9A227);
}

.tc-note-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--term-space-md);
    padding: var(--term-space-lg);
    border-top: 1px solid var(--term-border-subtle);
}


/* ==========================================================================
   S22  SCROLLBARS
   ========================================================================== */

.tc-list-panel::-webkit-scrollbar,
.tc-workspace::-webkit-scrollbar,
.tc-note-output::-webkit-scrollbar {
    width: 6px;
}

.tc-list-panel::-webkit-scrollbar-track,
.tc-workspace::-webkit-scrollbar-track,
.tc-note-output::-webkit-scrollbar-track {
    background: var(--term-bg-void);
}

.tc-list-panel::-webkit-scrollbar-thumb,
.tc-workspace::-webkit-scrollbar-thumb,
.tc-note-output::-webkit-scrollbar-thumb {
    background: var(--term-border-default);
    border-radius: 3px;
}

.tc-list-panel::-webkit-scrollbar-thumb:hover,
.tc-workspace::-webkit-scrollbar-thumb:hover,
.tc-note-output::-webkit-scrollbar-thumb:hover {
    background: var(--term-border-strong);
}

/* Firefox scrollbar */
.tc-list-panel,
.tc-workspace,
.tc-note-output {
    scrollbar-width: thin;
    scrollbar-color: var(--term-border-default) var(--term-bg-void);
}


/* ==========================================================================
   S23  FOCUS STATES
   ========================================================================== */

.tc-page *:focus-visible {
    outline: 2px solid var(--term-gold);
    outline-offset: 2px;
}

.tc-input:focus-visible,
.tc-textarea:focus-visible,
.tc-select:focus-visible {
    outline: none;
}


/* ==========================================================================
   S24  REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    /* .tc-transfer-card motion overrides: MIGRATED to transfer-unified.css
       (slice 2, 2026-08-02); the urgency badge stays (S7 is shared). */
    .tc-urgency-badge[data-urgency="1"] {
        animation: none;
    }

    .tc-new-btn:hover,
    .tc-generate-btn:hover {
        transform: none;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}


/* §25 COMMUNICATION LOG — RETIRED 2026-08-08 (owner ruling A6.2; UI + routes removed, column + retention sweep untouched). */
/* ==========================================================================
   §26  COORDINATION CHECKLIST — Transfer readiness tracker
   ==========================================================================
   Five boolean items (specialist confirmed, bed requested, etc.) each with
   an optional note textarea that appears when the item is checked.
   ========================================================================== */

.tc-coord-checklist {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tc-coord-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    padding: var(--term-space-sm) 0;
    border-bottom: 1px solid var(--term-border-subtle);
}

.tc-coord-item:last-child {
    border-bottom: none;
}

.tc-coord-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--term-border-default);
    background: var(--term-bg-input);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.2rem;
    position: relative;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-coord-item input[type="checkbox"]:checked {
    border-color: var(--term-gold);
    background: var(--term-gold);
}

.tc-coord-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid var(--term-fg-inverse);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tc-coord-item input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--term-gold);
    outline-offset: 2px;
}

.tc-coord-item label {
    cursor: pointer;
    flex: 1;
    font-family: var(--term-font-body);
    font-size: var(--term-text-base);
    color: var(--term-fg-secondary);
    line-height: 1.4;
}

.tc-coord-item.is-checked label {
    color: var(--term-fg-muted);
    text-decoration: line-through;
}

.tc-coord-note {
    display: none;
    width: 100%;
    margin-top: var(--term-space-xs);
    background: var(--term-bg-input);
    color: var(--term-fg-primary);
    border: 1px solid var(--term-border-subtle);
    padding: var(--term-space-xs) var(--term-space-sm);
    resize: vertical;
    font-family: var(--term-font-body);
    font-size: var(--term-text-sm);
    min-height: 36px;
    outline: none;
    transition: border-color var(--tc-motion-base) var(--tc-ease);
}

.tc-coord-note::placeholder {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    color: var(--term-fg-muted);
    opacity: 0.5;
}

.tc-coord-note:focus {
    border-color: var(--term-gold);
}

.tc-coord-item.is-checked .tc-coord-note {
    display: block;
}


/* Empty log state */
.tc-comm-empty {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    color: var(--term-fg-muted, #8A8278);
    text-align: center;
    padding: var(--term-space-lg, 16px);
    letter-spacing: var(--term-tracking-wide, 0.05em);
}


/* ==========================================================================
   S12  CALL RECORDER (Phase 1 — Transfer Voice)
   ========================================================================== */

/* ==========================================================================
   ELEVATION LADDER (2026-07-01 design pass — Transfer Center pilot)

   MEASURED DEFECT: four nesting levels (page 11 / card ~16 / nested panel ~14
   / wells ~12 effective luminance) lived within ~5 RGB points of each other —
   below the ~10-15pt threshold a dark UI needs for planes to separate. Every
   nested surface was a TRANSLUCENT wash of the page color over the card
   (rgba(12,11,10,0.3-0.5)), so nesting made things DARKER-or-same, never
   raised. The page read as one black sheet with hairlines = "flat/blending"
   (user UAT, repeated).

   THE LADDER — opaque steps ~8 RGB pts apart, each raised step reinforced by
   a shadow cue (drop for cards, top-light for chips); the paste-well steps
   DOWN (recessed = "dump raw source here", distinct from raised outputs):

     elev-0  #0C0B0A  page void (terminal-core --term-bg-primary, reference)
     elev-1  #15130F  section card       + shadow-1 (drop)
     elev-2  #1E1B16  nested panel       + shadow-2 (drop + top-light)
     elev-3  #272319  header / chip      + shadow-3 (top-light only)
     (inputs #2E2A21  --term-bg-elevated: existing top rung, interactive)
     well    #0B0A08  recessed paste-well + shadow-well (deep inset)

   Scoped to transfer-center ONLY (own custom props, not --term-* overrides):
   the rail/census daily driver must not inherit an unreviewed re-skin.
   ========================================================================== */
:root {
    --tc-elev-1: #15130F;
    --tc-elev-2: #1E1B16;
    --tc-elev-3: #272319;
    --tc-well:   #0B0A08;
    --tc-shadow-1: 0 4px 20px rgba(0, 0, 0, 0.40);
    --tc-shadow-2: 0 2px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    --tc-shadow-3: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --tc-shadow-well: inset 0 2px 10px rgba(0, 0, 0, 0.55);
}

.tc-recorder {
    /* elev-1: was a gradient ending in a translucent wash — indistinguishable
       from the page. Solid card + drop shadow. */
    background: var(--tc-elev-1);
    border: 1px solid var(--term-border-default);
    border-radius: 6px;
    padding: var(--term-space-lg);
    box-shadow: var(--tc-shadow-1);
    margin-bottom: var(--term-space-md, 12px);
    position: relative;
    overflow: hidden;
}

.tc-recorder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 168, 87, 0.30) 50%, transparent 100%);
}

.tc-recorder--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.tc-recorder-controls {
    display: flex;
    align-items: center;
    gap: var(--term-space-md, 12px);
    flex-wrap: wrap;
    position: relative;
    min-height: 38px;
}

/* Capture chooser: MIGRATED to transfer-unified.css (slice 1, 2026-08-01,
   PLAN-transfer-center.md) — .tc-capture-chooser / .tc-capture-option and the
   dock states live there ONLY. Do not re-add rules for them here. */

.tc-live-control-rail-label {
    display: none;
}

.tc-call-end-controls {
    display: inline-flex;
    align-items: center;
    gap: var(--term-space-sm, 8px);
}

.tc-recorder [hidden] {
    display: none !important;
}

/* Record button — dormant terminal control (matches .tc-btn secondary) */
.tc-record-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.72rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--term-fg-secondary);
    background: transparent;
    border: 1px solid var(--term-border-default);
    border-radius: 6px;
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-record-btn:hover {
    color: var(--term-red, #E55A50);
    border-color: rgba(229, 90, 80, 0.5);
    background: rgba(229, 90, 80, 0.06);
}

.tc-record-btn:active {
    transform: translateY(1px);
}

.tc-record-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--term-fg-muted);
    transition: background var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease);
}

.tc-record-btn:hover .tc-record-dot {
    background: var(--term-red, #E55A50);
    box-shadow: 0 0 4px rgba(229, 90, 80, 0.4);
    transform: scale(1.1);
}

/* Stop button — clear, high-contrast, active stop state */
.tc-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.72rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #FFFFFF;
    background: var(--term-red, #E55A50);
    border: 1px solid var(--term-red, #E55A50);
    border-radius: 6px;
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    box-shadow: 0 0 10px rgba(229, 90, 80, 0.3);
}

.tc-stop-btn:hover {
    background: #D24B41;
    border-color: #D24B41;
    box-shadow: 0 0 14px rgba(229, 90, 80, 0.45);
}

.tc-stop-btn:active {
    transform: translateY(1px);
}

/* FIX (2026-05-28): Stop button visually transitions to a desaturated "stopping"
   state on click so the doctor sees feedback instantly even though the server
   session_complete handshake takes a few seconds. */
.tc-stop-btn[aria-busy="true"] {
    background: var(--term-bg-elev, #2a2a2a);
    color: var(--term-fg-muted, #888);
    border-color: var(--term-border, #444);
    box-shadow: none;
    cursor: progress;
    pointer-events: none;
}

.tc-stop-btn[aria-busy="true"] .tc-stop-btn-label::after {
    content: '';
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin-left: 6px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tc-stop-spin calc(var(--tc-motion-slow) * 2) var(--tc-ease-soft) infinite;
    vertical-align: -2px;
}

@keyframes tc-stop-spin {
    to { transform: rotate(360deg); }
}

/* Twilio Call Dispatch button — dormant terminal control (blue semantic on hover only) */
.tc-twilio-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    /* FIX (2026-05-28, high-tier): "Call Dispatch" — the action that starts the
       whole intake/recording flow — was byte-for-byte the dormant Record button
       (fg-secondary on a neutral border), its telephony-blue identity appearing only
       on :hover. Give it a STANDING dim-blue cue, distinct from the red-tinted record
       button. :hover (brighter blue) and :disabled (neutral grey) are unchanged. */
    border: 1px solid rgba(91, 155, 213, 0.45);
    border-radius: 6px;
    background: transparent;
    color: rgba(91, 155, 213, 0.90);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.72rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-twilio-call-btn:hover {
    color: var(--term-blue, #5B9BD5);
    border-color: rgba(91, 155, 213, 0.5);
    background: rgba(91, 155, 213, 0.06);
}

.tc-twilio-call-btn:active {
    transform: translateY(1px);
}

.tc-twilio-call-btn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
    background: transparent;
    border-color: var(--term-border-default);
    color: var(--term-fg-muted);
}

/* Direct Call — explicit second-leg destination on the desktop call rail. */
.tc-recorder-controls > .tc-doctor-phone {
    flex: 0 1 190px;
    width: 190px;
    min-width: 165px;
}

.tc-direct-call-control {
    display: inline-flex;
    align-items: stretch;
    flex: 0 1 450px;
    /* Phase 1 (2026-08-01): widened so the input's placeholder copy fits inside
       its own pill ("Direct number · or callback" clipped at 330px — the
       mono face + letter-spacing needs ~250px of field). */
    min-width: 385px;
}

.tc-direct-call-number {
    width: auto;
    min-width: 235px;
    flex: 1 1 260px;
    border-radius: 6px 0 0 6px;
    border-right: 0;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.72rem);
}

.tc-twilio-direct-call-btn {
    flex: 0 0 auto;
    border-radius: 0 6px 6px 0;
    border-color: rgb(89 225 207 / 48%);
    color: rgb(89 225 207 / 92%);
    white-space: nowrap;
}

.tc-twilio-direct-call-btn:hover {
    color: #73f2e2;
    border-color: rgb(89 225 207 / 72%);
    background: rgb(89 225 207 / 8%);
}

.tc-direct-call-control:focus-within .tc-direct-call-number {
    border-color: rgb(89 225 207 / 68%);
    box-shadow: 0 0 0 1px rgb(89 225 207 / 16%) inset;
}

/* Twilio hangup button — solid, high-contrast, active hangup state */
.tc-twilio-hangup-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--term-red, #E55A50);
    border-radius: 6px;
    background: var(--term-red, #E55A50);
    color: #FFFFFF;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.72rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    box-shadow: 0 0 10px rgba(229, 90, 80, 0.3);
}

.tc-twilio-hangup-btn:hover {
    background: #D24B41;
    border-color: #D24B41;
    box-shadow: 0 0 14px rgba(229, 90, 80, 0.45);
}

.tc-twilio-hangup-btn:active {
    transform: translateY(1px);
}

/* Twilio call status indicator */
.tc-twilio-status {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    color: var(--term-fg-secondary, #A09888);
    background: rgba(138, 130, 120, 0.06);
    border: 1px solid var(--term-border-subtle);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.tc-twilio-status--dialing {
    color: var(--term-gold, #DABA6A);
    border-color: rgba(212, 168, 87, 0.25);
    background: rgba(212, 168, 87, 0.04);
}

.tc-twilio-status--active {
    color: var(--term-red, #E55A50);
    border-color: rgba(229, 90, 80, 0.25);
    background: rgba(229, 90, 80, 0.04);
    font-weight: 600;
}

.tc-twilio-status--error {
    color: var(--term-red, #E55A50);
    border-color: rgba(229, 90, 80, 0.25);
    background: rgba(229, 90, 80, 0.04);
}

/* REC indicator — clean, steady status badge (only visible while recording) */
.tc-rec-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6875rem;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--term-red, #E55A50);
    border: 1px solid var(--term-red, #E55A50);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 0 6px rgba(229, 90, 80, 0.25);
}

.tc-rec-dot-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FFFFFF;
}

/* (legacy pulse/glow keyframes removed — idle controls are now flat; active states use static emphasis) */

/* Timer — LIVE element: active recording in progress */
.tc-record-timer {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-sm, 0.8125rem);
    color: var(--term-live);
    background: rgba(0, 255, 208, 0.05);
    border: 1px solid rgba(0, 255, 208, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
    min-width: 4.2em;
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow: 0 0 4px rgba(0, 255, 208, 0.2);
}

/* Audio level meter */
.tc-audio-meter {
    width: 80px;
    height: 8px;
    background: rgba(138, 130, 120, 0.15);
    border: 1px solid var(--term-border-subtle);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.tc-audio-meter::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--audio-level, 0%);
    background: var(--term-live, #00FFD0);
    border-radius: 4px;
    transition: none;
}

/* Live Structured Intake — high-signal mirror of real-time extraction */
.tc-live-intake {
    margin-top: var(--term-space-md, 12px);
    border: 1px solid var(--term-border-default);
    border-radius: 6px;
    /* elev-2: was a translucent PAGE-color wash over the card (darker than its
       parent = anti-elevation). Nested panel now steps UP the ladder. */
    background: var(--tc-elev-2);
    box-shadow: var(--tc-shadow-2);
    overflow: hidden;
}

.tc-live-intake-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--term-space-md, 12px);
    padding: 10px 12px;
    border-bottom: 1px solid var(--term-border-subtle);
    background: var(--tc-elev-3);   /* header chip: one rung above its panel */
    box-shadow: var(--tc-shadow-3);
}

.tc-live-intake-kicker {
    display: block;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    /* FIX (2026-08-13): was 0.62rem — below the token xs floor the 2026-05-28
       pass established for the live-intake region. */
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--term-gold);
}

.tc-live-intake-title {
    display: block;
    margin-top: 2px;
    font-family: var(--term-font-body, 'DM Sans', sans-serif);
    font-size: var(--term-text-xs, 0.6875rem);
    color: var(--term-fg-muted);
}

.tc-live-intake-summary {
    flex-shrink: 0;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    color: var(--term-fg-secondary);
}

.tc-live-intake-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--term-border-subtle);
}

.tc-live-card {
    min-height: 70px;
    padding: 10px 12px;
    background: var(--tc-elev-3);   /* chip rung, one above the intake panel */
    box-shadow: var(--tc-shadow-3); /* top-light chip cue, same as the header rungs */
    border-left: 3px solid transparent;
    transition: background var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-live-card-label,
.tc-live-card-meta {
    display: block;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    /* FIX (2026-05-28, high-tier): the live-call scoreboard is the best-delineated
       region, but its slot labels (CLINICAL PROBLEM / REFERRING / ...) and
       Missing/captured meta were 0.58rem (~9px) — the smallest text on the page,
       unreadable at a glance mid-call. Raise to the token xs floor; lift the label
       color one step for scannability. */
    font-size: var(--term-text-xs, 0.6875rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tc-live-card-label {
    color: var(--term-fg-secondary);
}

.tc-live-card-value {
    display: block;
    margin: 5px 0 3px;
    overflow: hidden;
    color: var(--term-fg-primary);
    font-family: var(--term-font-body, 'DM Sans', sans-serif);
    font-size: var(--term-text-sm, 0.8125rem);
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tc-live-card-meta {
    color: var(--term-fg-muted);
}

.tc-live-card-evidence {
    display: inline-flex;
    max-width: 100%;
    margin-top: 6px;
    overflow: hidden;
    padding: 2px 6px;
    border: 1px solid var(--term-border-default);
    border-radius: 3px;
    color: var(--term-fg-secondary);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    /* FIX (2026-08-13): was 0.56rem (~9px) — an interactive evidence chip,
       smallest text on the page. Raised to the token xs floor. */
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.tc-live-card-evidence.is-preview {
    border-color: rgba(91, 155, 213, 0.35);
    color: var(--term-blue, #5B9BD5);
}

.tc-live-card-evidence.is-manual {
    border-color: rgba(212, 168, 87, 0.35);
    color: var(--term-gold);
}

.tc-live-card[data-evidence-transcript-id] {
    cursor: pointer;
}

.tc-live-card.is-evidence-focus,
.tc-live-card[data-evidence-transcript-id]:hover {
    box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.30),
                0 0 18px rgba(0, 255, 208, 0.10);
}

.tc-live-card.is-missing {
    border-left-color: rgba(229, 90, 80, 0.36);
}

.tc-live-card.is-missing .tc-live-card-value {
    color: var(--term-fg-muted);
}

.tc-live-card.is-preview {
    border-left-color: var(--term-blue, #5B9BD5);
    background: rgba(91, 155, 213, 0.08);
}

.tc-live-card.is-preview .tc-live-card-meta {
    color: var(--term-blue, #5B9BD5);
}

/* Calm semantic system (2026-06-07): a machine-captured + settled value is DONE,
   so it rests in neutral and doesn't compete for attention. Reserves gold for the
   doctor's own hand (.is-manual) so confirmed-vs-manual is distinguishable at a
   glance, and only red (missing) / blue (preview, verify) / teal (live motion)
   carry accent. Was: confirmed shared gold with manual → indistinguishable. */
.tc-live-card.is-confirmed,
.tc-live-card.is-captured {
    border-left-color: var(--term-border-default, #2A2720);
    background: rgba(255, 255, 255, 0.018);
}

.tc-live-card.is-confirmed .tc-live-card-meta,
.tc-live-card.is-captured .tc-live-card-meta {
    color: var(--term-fg-secondary);
}

/* The doctor typed/edited this by hand — the one gold thing in the console
   (gold = authored, matching the .tc-provenance--manual field badge). */
.tc-live-card.is-manual {
    border-left-color: var(--term-gold);
    background: rgba(212, 168, 87, 0.06);
}

.tc-live-card.is-manual .tc-live-card-meta {
    color: var(--term-gold);
}

.tc-live-card.is-updating {
    animation: tc-live-card-update calc(var(--tc-motion-slow) * 2.25) var(--tc-ease-soft);
}

@keyframes tc-live-card-update {
    0% {
        transform: translateY(-1px);
        box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.35),
                    0 0 18px rgba(0, 255, 208, 0.16);
    }
    100% {
        transform: translateY(0);
        box-shadow: none;
    }
}

.tc-live-intake-footer {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 0.9fr);
    gap: var(--term-space-md, 12px);
    padding: 9px 12px;
    border-top: 1px solid var(--term-border-subtle);
    background: var(--tc-elev-2);   /* footer stays on the panel's own rung */
}

.tc-live-gaps,
.tc-live-feed {
    overflow: hidden;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.64rem;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tc-live-gaps {
    color: var(--term-red, #E55A50);
}

.tc-live-gaps.is-clear {
    color: var(--term-status-ready);
}

.tc-live-feed {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    color: var(--term-fg-muted);
}

.tc-live-feed-item {
    max-width: 100%;
    overflow: hidden;
    padding: 2px 6px;
    border: 1px solid var(--term-border-default);
    border-radius: 3px;
    text-overflow: ellipsis;
}

.tc-live-feed-item--preview {
    color: var(--term-blue, #5B9BD5);
    border-color: rgba(91, 155, 213, 0.35);
}

.tc-live-feed-item--authoritative,
.tc-live-feed-item--voice {
    color: var(--term-live);
    border-color: rgba(0, 255, 208, 0.25);
}

.tc-live-feed-item--manual {
    color: var(--term-gold);
    border-color: rgba(212, 168, 87, 0.35);
}

.tc-live-feed-empty {
    color: var(--term-fg-muted);
}

/* Transcript panel */
.tc-transcript-panel {
    margin-top: var(--term-space-md, 12px);
    border: 1px solid var(--term-border-default);
    border-radius: 6px;
    /* elev-2: was page-wash + inset (read as a hole in the card). It's a
       nested OUTPUT panel — raised like the intake panel, not recessed. */
    background: var(--tc-elev-2);
    overflow: hidden;
    box-shadow: var(--tc-shadow-2);
}

.tc-transcript-header {
    padding: 8px 14px;
    border-bottom: 1px solid var(--term-border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--tc-elev-3);   /* header chip rung */
    box-shadow: var(--tc-shadow-3);
}

.tc-transcript-label {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    color: var(--term-fg-secondary, #A09888);
    text-transform: uppercase;
    letter-spacing: var(--term-tracking-wide, 0.05em);
    font-weight: 600;
}

.tc-transcript-status {
    margin-left: auto;
    padding: 2px 7px;
    border: 1px solid var(--term-border-default);
    border-radius: 999px;
    color: var(--term-fg-muted);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tc-transcript-status.is-live {
    color: var(--term-live);
    border-color: rgba(0, 255, 208, 0.25);
    background: rgba(0, 255, 208, 0.06);
}

.tc-transcript-status.is-waiting {
    color: var(--term-gold);
    border-color: rgba(212, 168, 87, 0.28);
    background: rgba(212, 168, 87, 0.06);
}

.tc-transcript-status.is-warning {
    color: var(--term-red, #E55A50);
    border-color: rgba(229, 90, 80, 0.35);
    background: rgba(229, 90, 80, 0.07);
}

.tc-transcript-content {
    padding: 14px;
    min-height: 140px;
    max-height: 40vh;
    overflow-y: auto;
    resize: vertical;
    font-family: var(--term-font-body, 'DM Sans', sans-serif);
    font-size: var(--term-text-sm, 0.8125rem);
    line-height: 1.65;
    color: var(--term-fg-primary, #E8E4DC);
}

/* Partial transcript — dimmed, in-progress text */
.tc-transcript-partial {
    color: var(--term-fg-muted, #8A8278);
    font-style: italic;
}

/* Final transcript — committed text */
.tc-transcript-final {
    color: var(--term-fg-primary, #E6DED1);
}

.tc-transcript-final--flux {
    color: var(--term-gold, #D4A857);
    text-decoration: underline dotted rgba(212, 168, 87, 0.45);
    text-underline-offset: 2px;
}

.tc-transcript-final.has-evidence,
.tc-transcript-final.is-evidence-focus {
    border-radius: 3px;
    background: rgba(0, 255, 208, 0.07);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.12);
}

.tc-transcript-final.is-evidence-focus {
    animation: tc-evidence-line-focus calc(var(--tc-motion-slow) * 5.5) var(--tc-ease-soft);
}

@keyframes tc-evidence-line-focus {
    0% {
        background: rgba(0, 255, 208, 0.20);
        box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.45),
                    0 0 16px rgba(0, 255, 208, 0.14);
    }
    100% {
        background: rgba(0, 255, 208, 0.07);
        box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.12);
    }
}

.tc-transcript-evidence-marker {
    margin: 0 4px 0 2px;
    padding: 1px 5px;
    border: 1px solid var(--term-border-default);
    border-radius: 3px;
    background: transparent;
    color: var(--term-fg-secondary);
    cursor: pointer;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    /* FIX (2026-08-13): was 0.56rem (~9px) — clickable transcript evidence
       marker below legibility floor. Raised to the token xs floor. */
    font-size: var(--term-text-xs, 0.6875rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tc-transcript-evidence-marker:hover {
    border-color: var(--term-gold-dim);
    background: var(--term-gold-ghost);
}

/* Utterance break marker */
.tc-transcript-break {
    color: var(--term-border, #3A352F);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
}

/* Provenance badges (Phase 2 — field extraction source indicators) */
.tc-provenance {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    border-radius: 3px;
    white-space: nowrap;
}

.tc-provenance--voice {
    color: var(--term-fg-secondary, #A09888);
    background: transparent;
    border: 1px solid var(--term-border-default, #2A2720);
}

/* Provenance badge re-hydrated from the saved record on load (workspace.js
   rehydrateProvenanceBadges), not minted by a live extraction — muted so it
   reads as history. */
.tc-provenance--loaded {
    opacity: 0.7;
}

/* Manual = the doctor's own hand → gold, matching .tc-live-card.is-manual so the
   field badge and the live-console card tell ONE color story (2026-06-07). Voice
   (machine, settled) stays neutral grey above; the two were previously both grey
   and indistinguishable, and contradicted the console's gold manual. */
.tc-provenance--manual {
    color: var(--term-gold, #C9A227);
    background: transparent;
    border: 1px solid rgba(201, 162, 39, 0.35);
}

/* Field flash animation — plays when a field is auto-populated */
@keyframes tc-field-flash {
    0% {
        background-color: rgba(0, 255, 208, 0.16);
        box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.35),
                    0 0 14px rgba(0, 255, 208, 0.12);
    }
    100% { background-color: transparent; }
}

.tc-field-flash {
    animation: tc-field-flash calc(var(--tc-motion-slow) * 2.5) var(--tc-ease-soft);
}

/* Provenance badge pulse — subtle highlight when confidence upgrades without value change */
@keyframes tc-provenance-pulse {
    0% { background-color: rgba(0, 255, 208, 0.28); }
    100% { background-color: rgba(0, 255, 208, 0.08); }
}

.tc-provenance-pulse {
    animation: tc-provenance-pulse calc(var(--tc-motion-slow) * 2) var(--tc-ease-soft);
}

/* Preview field — tentative extraction from fast layer (Sonnet 5) */
.tc-field-preview {
    border: 1px solid var(--term-blue, #5B9BD5) !important;
    box-shadow: inset 0 0 0 1px rgba(91, 155, 213, 0.14),
                0 0 10px rgba(91, 155, 213, 0.10);
    opacity: 0.94;
}

/* Field confirmed by authoritative layer (Sonnet) — brief green flash */
.tc-field-confirmed {
    animation: tc-field-confirm calc(var(--tc-motion-slow) * 1.5) var(--tc-ease-soft);
}

@keyframes tc-field-confirm {
    0% { box-shadow: inset 0 0 0 1px rgba(0, 255, 208, 0.45), 0 0 16px rgba(0, 255, 208, 0.18); }
    100% { box-shadow: none; }
}

/* Preview provenance badge — dotted border + reduced opacity to signal tentative */
.tc-provenance--preview {
    color: var(--term-blue, #5B9BD5);
    background: rgba(91, 155, 213, 0.10);
    border: 1px solid rgba(91, 155, 213, 0.35);
    opacity: 1;
}

/* Extract Now button — inside transcript header */
.tc-extract-btn {
    padding: 4px 10px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--term-fg-secondary, #A09888);
    background: transparent;
    border: 1px solid var(--term-boundary, #6A655C);
    border-radius: 4px;
    cursor: pointer;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}
.tc-extract-btn:hover:not(:disabled) {
    background: var(--term-bg-elevated, #2E2A21);
    border-color: var(--term-gold, #D4A857);
    box-shadow: none;
}
.tc-extract-btn:disabled {
    opacity: 0.4;
    cursor: wait;
    pointer-events: none;
}

/* ============================================================================
   Post-call Deepgram enhancement pill (2026-04-14)
   Three states, driven by transcript_enhancement_status:
     processing → "Enhancing..." with subtle pulse, not clickable
     ready      → "⚡ Enhanced version ready" clickable
     hidden     → pill element [hidden]
   Inline with transcript header — terminal aesthetic, low-vis until ready.
   ============================================================================ */
.tc-enhance-pill {
    padding: 3px 10px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    color: var(--term-fg-muted, #8b857e);
    cursor: default;
    margin-right: 6px;
}
/* Processing: muted color + pulse. Not clickable until ready. */
.tc-enhance-pill[data-state="processing"] {
    color: var(--term-fg-muted, #8b857e);
    border-color: rgba(139, 133, 126, 0.25);
    animation: tc-enhance-pulse calc(var(--tc-motion-slow) * 4.5) var(--tc-ease-soft) infinite;
}
@keyframes tc-enhance-pulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}
/* Ready: clickable, cyan-ish accent. */
.tc-enhance-pill[data-state="ready"] {
    color: var(--term-info, #8ecae6);
    border-color: rgba(142, 202, 230, 0.45);
    cursor: pointer;
}
.tc-enhance-pill[data-state="ready"]:hover {
    background: rgba(142, 202, 230, 0.08);
    border-color: rgba(142, 202, 230, 0.7);
}
/* Viewing-enhanced mode: pill becomes the "showing enhanced" label. */
.tc-enhance-pill[data-state="viewing"] {
    color: var(--term-success, #b5c68d);
    border-color: rgba(181, 198, 141, 0.45);
    cursor: default;
}

/* Footer "Back to original" link — only visible in enhanced view. */
.tc-transcript-footer {
    padding: 6px 12px;
    border-top: 1px solid rgba(139, 133, 126, 0.2);
    display: flex;
    justify-content: flex-end;
}
.tc-enhance-revert {
    padding: 2px 8px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--term-fg-muted, #8b857e);
    background: transparent;
    border: 1px solid rgba(139, 133, 126, 0.3);
    border-radius: 3px;
    cursor: pointer;
    transition: opacity var(--tc-motion-fast) var(--tc-ease), transform var(--tc-motion-fast) var(--tc-ease), color var(--tc-motion-fast) var(--tc-ease), background var(--tc-motion-fast) var(--tc-ease), background-color var(--tc-motion-fast) var(--tc-ease), border-color var(--tc-motion-fast) var(--tc-ease), box-shadow var(--tc-motion-fast) var(--tc-ease);
}
.tc-enhance-revert:hover {
    color: var(--term-fg, #d8cfbf);
    border-color: rgba(139, 133, 126, 0.6);
    background: rgba(139, 133, 126, 0.08);
}

/* Inline word-diff marks when enhanced view is showing.
   WHY subtle: "some sort of diff viewer" — marker without being visually
   overwhelming. Additions in the enhanced version get a dotted underline;
   deletions from the original are rendered small+muted+strikethrough so
   the doctor can see what got corrected without losing readability. */
.tc-enhance-add {
    text-decoration: underline dotted rgba(142, 202, 230, 0.6);
    text-underline-offset: 3px;
}
.tc-enhance-del {
    font-size: 0.85em;
    color: var(--term-fg-muted, #8b857e);
    text-decoration: line-through;
    opacity: 0.7;
    margin: 0 2px;
}

/* ============================================================================
   Phase 4: Speaker Diarization
   WHY: Transfer calls have two speakers — color-coding makes it easy to
   visually separate who said what. Referring physician in warm gold,
   accepting physician in cool blue-grey.
   ============================================================================ */

/* Speaker-colored transcript text */
.tc-speaker--referring {
    color: var(--term-gold, #CEB888);
}

.tc-speaker--accepting {
    color: #8AAFCF;
}

.tc-speaker--unknown {
    color: var(--term-fg-primary, #E6DED1);
}

/* Speaker badges — inline labels before each speaker turn */
.tc-speaker-badge {
    display: inline-block;
    padding: 1px 6px;
    margin: 4px 4px 2px 0;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: background var(--tc-motion-fast) var(--tc-ease);
    vertical-align: middle;
}

.tc-speaker-badge--referring {
    color: var(--term-gold, #CEB888);
    background: rgba(206, 184, 136, 0.12);
    border: 1px solid rgba(206, 184, 136, 0.3);
}

.tc-speaker-badge--accepting {
    color: #8AAFCF;
    background: rgba(138, 175, 207, 0.12);
    border: 1px solid rgba(138, 175, 207, 0.3);
}

.tc-speaker-badge--unknown {
    color: var(--term-fg-muted, #8A8278);
    background: rgba(138, 130, 120, 0.08);
    border: 1px solid rgba(138, 130, 120, 0.2);
}

.tc-speaker-badge:hover {
    background: rgba(206, 184, 136, 0.2);
}

/* Speaker change divider — thin line between speaker turns */
.tc-speaker-divider {
    display: block;
    height: 1px;
    margin: 6px 0 4px;
    background: var(--term-border, #3A352F);
    opacity: 0.4;
}

/* Capture-attempt divider (2026-08-05, Q1 amendment) — the transcript panel
   continues across capture attempts in one workspace; this labeled rule marks
   each restart ("— capture 2 · mic · 14:32 —"). Never .tc-transcript-final:
   dividers must not enter the persisted record. */
.tc-transcript-divider {
    display: block;
    margin: 10px 0 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--term-border, #3A352F);
    color: var(--term-fg-muted, #8A8172);
    font-size: var(--term-text-xs, 0.72rem);
    letter-spacing: 0.05em;
    text-align: center;
    opacity: 0.75;
}

/* Cross-method capture lock (2026-08-05, D3/Q4 ruling) — during another
   method's capture the start controls stay VISIBLE, dimmed, reason on hover
   (title). Presentation only; the refusals live in the start-path claims. */
.tc-record-btn.tc-capture-locked,
.tc-iphone-pair-btn.tc-capture-locked,
.tc-twilio-call-btn.tc-capture-locked {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Speaker legend — small bar below transcript header showing speaker roles */
.tc-speaker-legend {
    display: flex;
    gap: 8px;
    padding: 4px 12px;
    border-bottom: 1px solid var(--term-border, #3A352F);
    background: rgba(26, 23, 20, 0.5);
}

.tc-speaker-legend-item {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: background var(--tc-motion-fast) var(--tc-ease);
}

.tc-speaker-legend--referring {
    color: var(--term-gold, #CEB888);
    background: rgba(206, 184, 136, 0.1);
}

.tc-speaker-legend--accepting {
    color: #8AAFCF;
    background: rgba(138, 175, 207, 0.1);
}

.tc-speaker-legend--unknown {
    color: var(--term-fg-muted, #8A8278);
    background: rgba(138, 130, 120, 0.06);
}

.tc-speaker-legend-item:hover {
    background: rgba(206, 184, 136, 0.15);
}


/* ============================================================================
   Phase 5: Protocol Hints Panel — Transfer Guidebook RAG results
   WHY: Surfaces relevant guidebook sections during live transfer calls
        when a diagnosis is extracted. Terminal aesthetic, collapsible cards.
   ============================================================================ */

.tc-protocol-hints-panel {
    margin-top: var(--term-space-md, 12px);
    border: 1px solid rgba(206, 184, 136, 0.15);
    border-radius: 4px;
    background: rgba(26, 23, 19, 0.6);
    max-height: 400px;
    overflow-y: auto;
}

.tc-protocol-hints-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--term-space-sm, 8px) var(--term-space-md, 12px);
    border-bottom: 1px solid rgba(206, 184, 136, 0.1);
    font-family: var(--term-font-mono, 'Berkeley Mono', 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 11px);
    color: var(--term-fg-muted, #8A8278);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tc-protocol-hints-label::before {
    content: '// ';
    opacity: 0.5;
}

.tc-protocol-hints-dismiss-all {
    background: none;
    border: 1px solid rgba(206, 184, 136, 0.2);
    color: var(--term-fg-muted, #8A8278);
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-sm, 13px);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
}

.tc-protocol-hints-dismiss-all:hover {
    color: var(--term-fg-primary, #E6DED1);
    border-color: rgba(206, 184, 136, 0.4);
}

.tc-protocol-hints-list {
    padding: var(--term-space-xs, 4px);
}

/* ── Hint Card ── */
.tc-hint-card {
    margin-bottom: var(--term-space-xs, 4px);
    border: 1px solid rgba(206, 184, 136, 0.12);
    border-radius: 3px;
    background: rgba(30, 27, 22, 0.8);
    transition: border-color var(--tc-motion-base) var(--tc-ease);
}

.tc-hint-card:hover {
    border-color: rgba(206, 184, 136, 0.25);
}

.tc-hint-card--pinned {
    border-color: rgba(206, 184, 136, 0.35);
    background: rgba(35, 31, 25, 0.9);
}

.tc-hint-card-header {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    padding: var(--term-space-xs, 4px) var(--term-space-sm, 8px);
    border-bottom: 1px solid rgba(206, 184, 136, 0.06);
}

.tc-hint-specialty {
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 11px);
    color: var(--term-gold, #CEB888);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
}

.tc-hint-similarity {
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    color: var(--term-fg-muted, #8A8278);
    opacity: 0.7;
}

.tc-hint-pin,
.tc-hint-dismiss {
    background: none;
    border: none;
    color: var(--term-fg-muted, #8A8278);
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity var(--tc-motion-fast) var(--tc-ease);
}

.tc-hint-pin:hover,
.tc-hint-dismiss:hover {
    opacity: 1;
    color: var(--term-fg-primary, #E6DED1);
}

.tc-hint-pin--active {
    color: var(--term-gold, #CEB888);
    opacity: 1;
}

/* ── Tier Badges ── */
.tc-hint-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px var(--term-space-sm, 8px) var(--term-space-xs, 4px);
}

.tc-hint-tier {
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    color: #D4A574;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 2px;
    padding: 1px 5px;
    white-space: nowrap;
}

/* ── Preview / Full Text ── */
.tc-hint-preview {
    padding: var(--term-space-xs, 4px) var(--term-space-sm, 8px);
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 11px);
    color: var(--term-fg-secondary, #B8AFA4);
    line-height: 1.5;
    cursor: pointer;
}

.tc-hint-preview:hover {
    color: var(--term-fg-primary, #E6DED1);
}

.tc-hint-full {
    padding: var(--term-space-sm, 8px);
    border-top: 1px solid rgba(206, 184, 136, 0.06);
}

.tc-hint-full-text {
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 11px);
    color: var(--term-fg-secondary, #B8AFA4);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

/* ==========================================================================
   GUIDELINE AGENT PANEL (2026-04-12)
   ==========================================================================

   Renders LiveRecommendation cards from the transcript-phrase trigger
   matcher. Shared surface for both browser-mic recording (WS events)
   and Twilio calls (polling). Action-type keyed border colors let the
   doctor scan severity at a glance without reading every card:
     REQUIRE  → amber     (do this now)
     BLOCK    → red       (stop)
     WARN     → amber
     RECOMMEND→ cyan      (consider)
     FLAG     → orange    (attention)
     PERMIT   → green     (ok to do)
     LOOKUP   → neutral   (informational table)
     INFO     → muted

   ========================================================================== */

.tc-guideline-panel {
    margin-top: var(--term-space-md, 12px);
    border: 1px solid rgba(206, 184, 136, 0.15);
    border-radius: 4px;
    background: rgba(26, 23, 19, 0.6);
    max-height: 500px;
    overflow-y: auto;
}

.tc-guideline-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--term-space-sm, 8px) var(--term-space-md, 12px);
    border-bottom: 1px solid rgba(206, 184, 136, 0.1);
    font-family: var(--term-font-mono, 'Berkeley Mono', 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 11px);
    color: var(--term-fg-muted, #8A8278);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    gap: 8px;
}

.tc-guideline-panel-label::before {
    content: '// ';
    opacity: 0.5;
}

.tc-guideline-panel-count {
    flex: 1;
    text-align: right;
    color: var(--term-fg-primary, #E6DED1);
    font-weight: 500;
    margin-right: 8px;
}

.tc-guideline-panel-count:empty {
    display: none;
}

.tc-guideline-panel-dismiss-all {
    background: none;
    border: 1px solid rgba(206, 184, 136, 0.2);
    color: var(--term-fg-muted, #8A8278);
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-sm, 13px);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
}

.tc-guideline-panel-dismiss-all:hover {
    color: var(--term-fg-primary, #E6DED1);
    border-color: rgba(206, 184, 136, 0.4);
}

.tc-guideline-list {
    padding: var(--term-space-xs, 4px);
}

/* ── Guideline Card ── */
.tc-gl-card {
    margin-bottom: var(--term-space-xs, 4px);
    border: 1px solid rgba(206, 184, 136, 0.12);
    border-left-width: 3px;
    border-radius: 3px;
    background: rgba(30, 27, 22, 0.85);
    transition: border-color var(--tc-motion-base) var(--tc-ease), opacity var(--tc-motion-slow) var(--tc-ease);
    padding: var(--term-space-sm, 8px) var(--term-space-md, 12px);
}

.tc-gl-card:hover {
    border-color: rgba(206, 184, 136, 0.3);
}

/* Action-type accent bar on the left */
.tc-gl-card--require   { border-left-color: #D99A3F; }   /* amber */
.tc-gl-card--warn      { border-left-color: #D99A3F; }
.tc-gl-card--block     { border-left-color: #CC5A4A; }   /* red */
.tc-gl-card--recommend { border-left-color: #4A9FCC; }   /* cyan */
.tc-gl-card--flag      { border-left-color: #D9813F; }   /* orange */
.tc-gl-card--permit    { border-left-color: #6FA96F; }   /* green */
.tc-gl-card--prompt    { border-left-color: #B08ACC; }   /* violet */
.tc-gl-card--lookup    { border-left-color: rgba(206, 184, 136, 0.3); }
.tc-gl-card--info      { border-left-color: rgba(206, 184, 136, 0.2); }

.tc-gl-card--resolved {
    opacity: 0.55;
}

.tc-gl-card-header {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 11px);
    margin-bottom: 4px;
}

.tc-gl-card-action {
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--term-fg-primary, #E6DED1);
    text-transform: uppercase;
}

.tc-gl-card-rule {
    color: var(--term-fg-muted, #8A8278);
    font-size: 10px;
}

.tc-gl-card-authority {
    color: var(--term-fg-muted, #8A8278);
    font-size: 10px;
    margin-left: auto;
    text-transform: lowercase;
    font-style: italic;
}

.tc-gl-card-dismiss {
    background: none;
    border: none;
    color: var(--term-fg-muted, #8A8278);
    font-family: var(--term-font-mono, monospace);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.tc-gl-card-dismiss:hover {
    color: var(--term-fg-primary, #E6DED1);
}

.tc-gl-card-section {
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    color: var(--term-fg-muted, #8A8278);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.tc-gl-card-message {
    font-family: var(--term-font-sans, 'Inter', sans-serif);
    font-size: var(--term-text-sm, 13px);
    color: var(--term-fg-primary, #E6DED1);
    line-height: 1.45;
    margin-bottom: 4px;
}

.tc-gl-card-intent {
    font-family: var(--term-font-sans, 'Inter', sans-serif);
    font-size: var(--term-text-xs, 11px);
    color: var(--term-fg-secondary, #B8AFA4);
    line-height: 1.45;
    border-top: 1px solid rgba(206, 184, 136, 0.07);
    padding-top: 4px;
    margin-top: 4px;
    font-style: italic;
}

.tc-gl-card-trigger {
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    color: var(--term-fg-muted, #8A8278);
    margin-top: 4px;
    opacity: 0.8;
}

.tc-gl-card-lookup {
    margin-top: 6px;
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    color: var(--term-fg-secondary, #B8AFA4);
}

.tc-gl-card-lookup summary {
    cursor: pointer;
    color: var(--term-fg-muted, #8A8278);
    padding: 2px 0;
    text-transform: lowercase;
    user-select: none;
}

.tc-gl-card-lookup summary:hover {
    color: var(--term-fg-primary, #E6DED1);
}

.tc-gl-card-lookup-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 10px;
}

.tc-gl-card-lookup-table th,
.tc-gl-card-lookup-table td {
    padding: 2px 6px;
    border-bottom: 1px solid rgba(206, 184, 136, 0.06);
    text-align: left;
}

.tc-gl-card-lookup-table th {
    color: var(--term-fg-muted, #8A8278);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.tc-gl-card-lookup-list {
    margin: 4px 0 4px 16px;
    padding: 0;
}

.tc-gl-card-lookup-list li {
    line-height: 1.5;
}

/* ==========================================================================
   PHASE 6: IPHONE PAIRING
   ========================================================================== */

.tc-iphone-pair-btn {
    background: transparent;
    border: 1px solid var(--term-border-default);
    color: var(--term-fg-secondary);
    font-size: var(--term-text-xs, 0.72rem);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-iphone-pair-btn:hover {
    color: var(--term-gold, #D4A857);
    border-color: rgba(212, 168, 87, 0.5);
    background: rgba(212, 168, 87, 0.06);
}

.tc-iphone-pair-btn:active {
    transform: translateY(1px);
}

.tc-pairing-popover {
    position: absolute;
    z-index: 1000;
    background: var(--term-bg-elevated, #1B1A16);
    border: 1px solid var(--term-border-default, #2A2720);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
    max-width: 280px;
    width: 280px;
    font-family: var(--term-font-body, 'DM Sans', sans-serif);
    color: var(--term-fg-primary, #E8E4DC);
    overflow: hidden;
    animation: tc-pair-fade-in var(--tc-motion-fast) var(--tc-ease-soft);
}

@keyframes tc-pair-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tc-pair-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--term-bg-header, #0E0D0B);
    border-bottom: 1px solid var(--term-border-subtle, #1E1C18);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tc-pair-close {
    background: none;
    border: none;
    color: var(--term-fg-muted, #8A8278);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.tc-pair-close:hover {
    color: var(--term-fg-primary, #E8E4DC);
}

.tc-pair-qr {
    display: flex;
    justify-content: center;
    padding: 16px 12px 8px;
}

.tc-pair-qr img {
    border-radius: 4px;
    background: #fff;
    padding: 6px;
}

.tc-pair-url {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 8px;
}

.tc-pair-url code {
    flex: 1;
    font-size: 10px;
    color: var(--term-fg-muted, #8A8278);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--term-font-mono, 'Fira Code', monospace);
}

.tc-pair-copy {
    background: var(--term-bg-input, #17160F);
    border: 1px solid var(--term-border-subtle, #1E1C18);
    color: var(--term-fg-secondary, #A09888);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.tc-pair-copy:hover {
    color: var(--term-fg-primary, #E8E4DC);
    border-color: var(--term-border-default, #2A2720);
}

.tc-pair-status {
    padding: 8px 12px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--term-fg-secondary, #A09888);
}

.tc-pair-status.connected {
    color: var(--term-status-ready, #22C55E);
}

/* Post-call field review — amber highlight for empty extractable fields */
.tc-field-needs-review {
    border-left: 2px solid #D4A857 !important;
    background: rgba(212, 168, 87, 0.05) !important;
}

.tc-field-needs-review::placeholder {
    color: #D4A857;
    opacity: 0.7;
}

.tc-review-banner {
    padding: 6px 12px;
    margin-bottom: 8px;
    font-size: var(--term-text-xs, 0.6875rem);
    color: #D4A857;
    border: 1px solid rgba(212, 168, 87, 0.2);
    border-radius: 4px;
    background: rgba(212, 168, 87, 0.06);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
}

/* Generate note modal — loading state */
.tc-note-loading {
    color: var(--term-fg-muted, #8A8278);
    font-style: italic;
    animation: tc-note-pulse calc(var(--tc-motion-slow) * 3.75) var(--tc-ease-soft) infinite;
}

@keyframes tc-note-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}


/* ==========================================================================
   §26  COMPACT DASHBOARD LAYOUT
   ==========================================================================
   WHY: The original vertical-stack with 9 collapsible sections was ~2700px.
   Users expanded everything anyway, defeating the purpose of collapsing.
   This layout shows all primary fields simultaneously in ~650px by using:
     1. A horizontal patient topbar
     2. A two-column grid for intake (left) + routing (right)
     3. A tabbed bottom panel for secondary tools (call, notes, checklist, comm)
   TRADEOFF: Tighter spacing per field, but zero expand/collapse clicks needed.
   ========================================================================== */

/* ---- Patient Topbar ---- */
.tc-topbar {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm);
    padding: var(--term-space-sm) 0 var(--term-space-md);
    border-bottom: 1px solid var(--term-border-default);
    margin-bottom: var(--term-space-md);
}

.tc-topbar .tc-input,
.tc-topbar .tc-select {
    margin-bottom: 0;
}

.tc-topbar-name {
    flex: 1;
    min-width: 0;
    font-size: var(--term-text-lg);
    font-weight: 500;
    font-family: var(--term-font-display);
}

.tc-topbar-sm {
    flex: 0 0 64px;
}

.tc-topbar-mrn {
    flex: 0 0 110px;
}


/* ---- Two-Column Grid ---- */
.tc-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* FIX (2026-05-28, high-tier): the Intake|Routing split bled into one field of
       inputs (divider was border-subtle, 1.10:1). Wider gutter does most of the
       separation; the divider rises to border-strong as a perceptible seam. We use
       whitespace + a restrained seam rather than a loud 3:1 line bisecting the form. */
    gap: var(--term-space-2xl);
    margin-bottom: var(--term-space-md);
}

.tc-col {
    min-width: 0;
}

/* Vertical divider between columns */
.tc-columns > .tc-col:first-child {
    border-right: 1px solid var(--term-border-strong);
    padding-right: var(--term-space-2xl);
}


/* ---- Column Section Labels ---- */
.tc-col-label {
    font-family: var(--term-font-display);
    /* FIX (2026-05-28, high-tier): these four words (REFERRING/CLINICAL/ROUTING/
       ACCEPTING) are the workspace's only IA map, but at weight-300 / 11px /
       0.20em the strokes thinned out and the wide tracking broke word silhouettes,
       and the glow made them read as ornament. Heavier + larger + tighter, with a
       real ~3:1 group rule (gold-dim, was gold-subtle ~1.1:1) and no glow. Gold on
       surface is already 8.5:1, so this is a legibility (weight/size) fix, not color. */
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--term-gold);
    padding: var(--term-space-xs) 0;
    margin-bottom: var(--term-space-xs);
    border-bottom: 1px solid var(--term-gold-dim);
}


/* ---- Static Sections (always-visible, never collapse) ---- */
.tc-section--static {
    border-bottom: none;
    margin-bottom: var(--term-space-sm);
}

.tc-section--static > .tc-section-body,
.tc-tab-pane .tc-section-body {
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible;
    transition: none;
}

/* Compact spacing for inputs in columns */
.tc-col .tc-input,
.tc-col .tc-textarea,
.tc-col .tc-select {
    margin-bottom: var(--term-space-sm);
}

/* Compact textarea */
.tc-textarea--compact {
    min-height: 56px;
}

/* FIX (2026-07-01): Chart materials is the paste target for whole referral
   messages + chart-dug labs, but rendered as a ~3.5-row keyhole spanning the
   full view width — scrolling dense data inside 56px at ~180 chars/line was
   the hardest-to-read surface on the page (UAT, first live backup call).
   Make it a real reading pane:
   - field-sizing:content (Chrome 123+) auto-grows the well with the paste,
     clamped to a viewport cap; engines without support keep the min-height
     floor from rows=10. resize:vertical stays for manual override.
   - mono at text-sm: pasted labs/vitals/prior notes are row-structured data;
     mono keeps columns aligned (the placeholder was already mono).
   - max-width on the FIELD caps line length so prose referral paragraphs stay
     readable; the lane still spans the grid row, the well just stops
     stretching past ~120 mono chars. */
#tcChartMaterials {
    field-sizing: content;
    min-height: 200px;
    max-height: 44vh;
    overflow-y: auto;
    font-family: var(--term-font-mono);
    font-size: var(--term-text-sm);
    line-height: 1.55;
}
#tcChartMaterialsField {
    max-width: 960px;
}

/* Recorder split (2026-07-01, UAT round 3 — replaces the first-cut "callband"
   which paired only the transcript with chart materials and left the recorder
   controls + live intake full-width above a half-empty band). The user's ask:
   split the DISPLAY between call machinery and chart materials. So the whole
   recorder card becomes a 2-col grid — every call tool (controls, live
   structured intake, transcript, protocol hints) stacks in the LEFT column;
   chart materials is pinned as a full-height RIGHT column. The class is
   emitted by the template only when the disposition flag renders the chart
   field, so there is no :has() dependency and no empty-column state. */
.tc-recorder--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--term-space-xl, 24px);
    align-items: start;
}
.tc-recorder--split > * {
    grid-column: 1;
    min-width: 0;
}
.tc-recorder--split > #tcChartMaterialsField {
    grid-column: 2;
    /* Full-height right rail: span far past the left column's row count —
       implicit rows an explicit span creates but nothing occupies are 0px.
       (`1 / -1` won't work: -1 is the last EXPLICIT line, and this grid's
       rows are all implicit.) */
    grid-row: 1 / span 40;
    max-width: none;          /* the 960px cap is for the full-width fallback */
    margin-bottom: 0;
}
/* In the split, the paste well is the whole right column — let it run tall. */
.tc-recorder--split #tcChartMaterials {
    min-height: 260px;
    max-height: 62vh;
}
/* Section-grade label dialect (gold, wide tracking, no "$ ") — the field
   renders outside .tc-decision-detail in the split layout. */
.tc-recorder--split > #tcChartMaterialsField .tc-field-label::before { content: none; }
.tc-recorder--split > #tcChartMaterialsField .tc-field-label {
    letter-spacing: 0.12em;
    color: var(--term-gold);
}
/* Below the page's existing single-column breakpoint, stack everything. */
@media (max-width: 1200px) {
    .tc-recorder--split { display: block; }
}


/* ---- Field Pair (two inputs side-by-side) ---- */
.tc-field-pair {
    display: flex;
    gap: var(--term-space-sm);
}

.tc-field-pair > * {
    flex: 1;
    min-width: 0;
}


/* ---- Inline Notification Checkboxes ---- */
.tc-notify-row {
    display: flex;
    gap: var(--term-space-lg);
    flex-wrap: wrap;
    padding-top: var(--term-space-xs);
}

.tc-check-inline {
    display: flex;
    align-items: center;
    gap: var(--term-space-xs);
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    letter-spacing: var(--term-tracking-wide);
    color: var(--term-fg-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--tc-motion-base) var(--tc-ease);
}

.tc-check-inline:hover {
    color: var(--term-fg-secondary);
}

.tc-check-inline input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--term-border-default);
    background: var(--term-bg-input);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: opacity var(--tc-motion-base) var(--tc-ease), transform var(--tc-motion-base) var(--tc-ease), color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), background-color var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
}

.tc-check-inline input[type="checkbox"]:checked {
    border-color: var(--term-gold);
    background: var(--term-gold);
}

.tc-check-inline input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 4px;
    height: 7px;
    border: solid var(--term-fg-inverse);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tc-check-inline input[type="checkbox"]:checked + span {
    color: var(--term-fg-primary);
}


/* ---- Tab Panel ---- */
.tc-tab-panel {
    border-top: 1px solid var(--term-border-default);
    margin-top: var(--term-space-md);
    margin-bottom: var(--term-space-sm);
}

/* Bottom panel replacement (no tabs) — same separator treatment */
.tc-bottom-panel {
    border-top: 1px solid var(--term-border-default);
    margin-top: var(--term-space-md);
    margin-bottom: var(--term-space-sm);
}

.tc-bottom-panel .tc-section {
    border-bottom: none;
}

.tc-bottom-panel .tc-section-body {
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible;
    transition: none;
}

.tc-tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--term-border-default);
    padding-top: var(--term-space-xs);
}

.tc-tab {
    font-family: var(--term-font-mono);
    font-size: var(--term-text-xs);
    font-weight: 500;
    letter-spacing: var(--term-tracking-wide);
    text-transform: uppercase;
    color: var(--term-fg-muted);
    background: rgba(19, 18, 15, 0.4);
    border: 1px solid var(--term-border-subtle);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 8px var(--term-space-lg);
    cursor: pointer;
    transition: color var(--tc-motion-base) var(--tc-ease), background var(--tc-motion-base) var(--tc-ease), border-color var(--tc-motion-base) var(--tc-ease), box-shadow var(--tc-motion-base) var(--tc-ease);
    display: flex;
    align-items: center;
    gap: var(--term-space-xs);
    position: relative;
    top: 1px;
}

.tc-tab:hover {
    color: var(--term-fg-primary);
    background: var(--term-gold-ghost);
    border-color: var(--term-gold-dim) var(--term-gold-dim) transparent var(--term-gold-dim);
}

.tc-tab.is-active {
    color: var(--term-fg-primary);
    background: var(--term-bg-elevated);
    border-color: var(--term-gold-dim) var(--term-gold-dim) transparent var(--term-gold-dim);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    text-shadow: none;
    font-weight: 600;
}

.tc-tab-icon {
    font-size: 0.9em;
    opacity: 0.65;
    transition: opacity var(--tc-motion-base) var(--tc-ease);
}

.tc-tab.is-active .tc-tab-icon {
    opacity: 1;
    color: var(--term-gold);
    filter: drop-shadow(0 0 4px rgba(212, 168, 87, 0.3));
}

/* Badge dot — shows when tab has content */
.tc-tab-badge {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--term-gold);
    box-shadow: 0 0 6px rgba(212, 168, 87, 0.40);
    flex-shrink: 0;
}

.tc-tab-badge[hidden] {
    display: none;
}

/* Tab panes — capped height keeps footer visible without scrolling the workspace */
.tc-tab-pane {
    display: none;
    padding: var(--term-space-md) 0;
    min-height: 80px;
    max-height: 240px;
    overflow-y: auto;
}

.tc-tab-pane.is-active {
    display: block;
}

.tc-tab-pane[hidden] {
    display: none !important;
}

/* Remove section borders inside tab panes */
.tc-tab-pane .tc-section {
    border-bottom: none;
}

/* Scrollbar styling for tab panes */
.tc-tab-pane::-webkit-scrollbar {
    width: 6px;
}

.tc-tab-pane::-webkit-scrollbar-track {
    background: transparent;
}

.tc-tab-pane::-webkit-scrollbar-thumb {
    background: var(--term-border-default);
    border-radius: 3px;
}

.tc-tab-pane::-webkit-scrollbar-thumb:hover {
    background: var(--term-border-strong);
}

.tc-tab-pane {
    scrollbar-width: thin;
    scrollbar-color: var(--term-border-default) transparent;
}


/* ==========================================================================
   QUICK-START POPOVER (2026-04-12)
   ==========================================================================

   Subtle `?` button in the header opens a compact orientation popover.
   Auto-shows once per browser profile via localStorage, then stays quiet
   until the doctor clicks `?` again. Terminal aesthetic, matches the
   protocol-hints panel visual DNA.
   ========================================================================== */

.tc-quick-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(206, 184, 136, 0.25);
    color: var(--term-fg-muted, #8A8278);
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--tc-motion-fast) var(--tc-ease), color var(--tc-motion-fast) var(--tc-ease), box-shadow var(--tc-motion-fast) var(--tc-ease);
    padding: 0;
    line-height: 1;
}

.tc-quick-start-btn:hover {
    color: var(--term-fg-primary, #E6DED1);
    border-color: var(--term-gold, #D4A857);
    box-shadow: 0 0 0 2px rgba(212, 168, 87, 0.08);
}

.tc-quick-start-btn:focus-visible {
    outline: none;
    border-color: var(--term-gold, #D4A857);
    box-shadow: var(--term-glow-gold, 0 0 0 2px rgba(212, 168, 87, 0.25));
}

/* Popover — absolutely positioned, anchored near the right edge of header. */
.tc-quick-start {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--term-space-xl, 24px);
    width: 380px;
    max-width: calc(100vw - 48px);
    background: rgba(22, 19, 15, 0.98);
    border: 1px solid rgba(206, 184, 136, 0.25);
    border-radius: 4px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 255, 208, 0.08);
    z-index: 90;
    padding: 0;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    color: var(--term-fg-primary, #E6DED1);
    animation: tc-quick-start-in var(--tc-motion-fast) var(--tc-ease-soft);
}

@keyframes tc-quick-start-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Little upward arrow pointing at the `?` button */
.tc-quick-start-arrow {
    position: absolute;
    top: -6px;
    right: 32px;
    width: 10px;
    height: 10px;
    background: rgba(22, 19, 15, 0.98);
    border-top: 1px solid rgba(206, 184, 136, 0.25);
    border-left: 1px solid rgba(206, 184, 136, 0.25);
    transform: rotate(45deg);
}

.tc-quick-start-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(206, 184, 136, 0.1);
}

.tc-quick-start-title {
    font-size: var(--term-text-xs, 11px);
    color: var(--term-gold, #D4A857);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

.tc-quick-start-title::before {
    content: '// ';
    opacity: 0.55;
    color: var(--term-fg-muted, #8A8278);
}

.tc-quick-start-close {
    background: none;
    border: none;
    color: var(--term-fg-muted, #8A8278);
    font-family: var(--term-font-mono, monospace);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.tc-quick-start-close:hover {
    color: var(--term-fg-primary, #E6DED1);
}

.tc-quick-start-steps {
    list-style: none;
    counter-reset: tc-qs;
    margin: 0;
    padding: 10px 14px 4px;
}

.tc-quick-start-steps > li {
    counter-increment: tc-qs;
    font-family: var(--term-font-sans, 'Inter', sans-serif);
    font-size: var(--term-text-sm, 13px);
    line-height: 1.5;
    color: var(--term-fg-secondary, #B8AFA4);
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    border-bottom: 1px dashed rgba(206, 184, 136, 0.08);
}

.tc-quick-start-steps > li:last-child {
    border-bottom: none;
}

.tc-quick-start-steps > li::before {
    content: counter(tc-qs, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 8px;
    font-family: var(--term-font-mono, monospace);
    font-size: 11px;
    color: var(--term-gold, #D4A857);
    opacity: 0.7;
}

.tc-quick-start-step-kbd {
    display: inline-block;
    font-family: var(--term-font-mono, monospace);
    font-size: 11px;
    color: var(--term-fg-primary, #E6DED1);
    background: rgba(206, 184, 136, 0.08);
    border: 1px solid rgba(206, 184, 136, 0.15);
    padding: 1px 6px;
    border-radius: 2px;
    margin-right: 6px;
    white-space: nowrap;
    vertical-align: baseline;
}

.tc-quick-start-steps em {
    color: var(--term-fg-primary, #E6DED1);
    font-style: normal;
    font-family: var(--term-font-mono, monospace);
    font-size: 12px;
}

.tc-quick-start-steps kbd {
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    padding: 1px 4px;
    background: var(--term-gold-ghost, rgba(212, 168, 87, 0.05));
    color: var(--term-gold, #D4A857);
    border: 1px solid var(--term-gold-dim, rgba(212, 168, 87, 0.35));
    border-radius: 2px;
    margin: 0 1px;
}

.tc-quick-start-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 14px 12px;
    border-top: 1px solid rgba(206, 184, 136, 0.08);
}

.tc-quick-start-full-guide {
    margin-right: auto;
    color: var(--term-gold, #D4A857);
    font-family: var(--term-font-mono, monospace);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    line-height: 1.35;
    text-decoration-color: var(--term-gold-dim, rgba(212, 168, 87, 0.35));
    text-underline-offset: 3px;
    text-transform: uppercase;
}

.tc-quick-start-full-guide:hover,
.tc-quick-start-full-guide:focus-visible {
    color: var(--term-fg-primary, #E6DED1);
    text-decoration-color: var(--term-gold, #D4A857);
}

.tc-quick-start-gotit {
    font-family: var(--term-font-mono, monospace);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--term-fg-inverse, #0A0908);
    background: var(--term-gold, #D4A857);
    border: none;
    padding: 5px 14px;
    cursor: pointer;
    border-radius: 2px;
    transition: box-shadow var(--tc-motion-fast) var(--tc-ease);
}

.tc-quick-start-gotit:hover {
    box-shadow: var(--term-glow-gold, 0 0 10px rgba(212, 168, 87, 0.15), 0 0 24px rgba(212, 168, 87, 0.06));
}

/* Ensure the header is a positioning context for the absolutely-positioned popover. */
.tc-header { position: relative; }

/* ---- Responsive: single column below 900px workspace width ---- */
@media (max-width: 1200px) {
    .tc-columns {
        grid-template-columns: 1fr;
        gap: var(--term-space-md);
    }

    .tc-columns > .tc-col:first-child {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--term-border-subtle);
        padding-bottom: var(--term-space-md);
    }
}

/* ==========================================================================
   IA PHASE 2 — Disposition control + list-card decision badge (flag-gated)
   Rendered only when ENABLE_TRANSFER_DISPOSITION is on (server-side {% if %}
   for the control; window.__ENABLE_TRANSFER_DISPOSITION for the badge). When
   the flag is off none of these elements exist, so the surface is unchanged.
   ========================================================================== */

/* Disposition <select> in the workspace footer — reuses .tc-select; a restrained
   teal edge marks it as the decision control without Phase-3 promote/dim. */
.tc-disposition-field { flex: 0 0 auto; }
.tc-disposition-select {
    /* The decision control reads a touch louder than promoted lanes (3px vs their 2px edge)
       and out-widths its neighbors — interim hierarchy cue pending the prominent 4-way
       control (open item F3 / design-sweep D1). */
    border-left: 3px solid var(--term-gold, #D4A857);
    min-width: 220px;
    font-weight: 600;
}

/* List-card disposition badge + .tc-card-gap: MIGRATED to
   transfer-unified.css (slice 2, 2026-08-02). */

/* ==========================================================================
   IA PHASE 3 — Always-mounted capture lanes + disposition-driven emphasis
   (flag-gated). The .tc-lane-* classes are toggled by applyDispositionEmphasis
   in workspace.js, which no-ops unless ENABLE_TRANSFER_DISPOSITION is on — so
   flag-OFF none of these classes are ever applied and the surface is unchanged.
   ========================================================================== */

/* New capture-lane block (pre-transport orders + inbound specialist input). */
.tc-decision-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* FIX (2026-05-29): the 32px col-gap was 2x the page rhythm, and the new chart_materials
       field made this a 3-item 2-col grid → a blank half-cell. Tighten the gap and span
       chart_materials full-width so the two narrow fields pair on the row below. */
    gap: var(--term-space-lg, 16px) var(--term-space-xl, 24px);
    margin: var(--term-space-md, 12px) 0;
    padding-top: var(--term-space-md, 12px);
    border-top: 1px solid var(--term-border-default, #2A2720);
}
.tc-decision-detail #tcChartMaterialsField { grid-column: 1 / -1; }
@media (max-width: 1200px) {
    .tc-decision-detail { grid-template-columns: 1fr; gap: var(--term-space-md, 12px); }
}

/* Promote: brighten the lane the current disposition makes decision-critical.
   FIX (2026-06-06, D3): a bare 2px gold left-border did not read as "lift" against
   the near-black palette — the promoted lane looked the same as a decorative edge
   while the dim lane (grayscale below) clearly receded, so the asymmetry was one-sided.
   Add a gold wash + full-perimeter inset ring (the same elevation vocabulary the active
   accept button uses) so the accept block unmistakably reads as the live decision field.
   Outer ambient glow intentionally omitted — held as the lever if UAT still finds it subtle. */
.tc-lane-promote {
    border-left: 3px solid var(--term-gold, #D4A857);
    padding-left: var(--term-space-sm, 8px);
    background: var(--term-gold-ghost, rgba(212, 168, 87, 0.06));
    box-shadow: inset 0 0 0 1px var(--term-gold-dim, rgba(212, 168, 87, 0.35));
    transition: opacity var(--tc-motion-fast) var(--tc-ease), border-color var(--tc-motion-fast) var(--tc-ease), box-shadow var(--tc-motion-fast) var(--tc-ease), background var(--tc-motion-fast) var(--tc-ease);
}
/* Dim: de-emphasize lanes the disposition makes irrelevant. Opacity ONLY —
   never display:none, never disabled — so capture is never dropped and an
   actively-edited (focus-guarded) lane is never yanked. */
.tc-lane-dim {
    /* FIX (2026-05-29): opacity-only was imperceptible on the near-black palette (~3/255
       luminance drop) — dimmed lanes read as "broken", not "backgrounded", while promote
       clearly shows. Add a grayscale/desaturate so gold labels + colored urgency text visibly
       recede, and reserve the same left gutter the promote state uses so promoted vs dimmed
       lanes don't horizontally jump. opacity kept >=0.6 so dimmed-but-readable inputs stay
       above the WCAG floor. */
    opacity: 0.6;
    filter: grayscale(0.4) saturate(0.7);
    border-left: 2px solid transparent;
    padding-left: var(--term-space-sm, 8px);
    transition: opacity var(--tc-motion-fast) var(--tc-ease);
}

/* FIX (2026-05-29 design sweep): type the decision control above body-field rank and unify the
   decision/lane labels with the col-label dialect. Every selector here targets a flag-ON-only
   element (.tc-disposition-field / .tc-decision-detail render only when the flag is on), so
   flag-OFF is byte-identical. Gold-on-surface ~8.5:1 — legibility, not a contrast change. */
.tc-disposition-field .tc-field-label::before,
.tc-decision-detail .tc-field-label::before { content: none; }   /* drop the "$ " prefix on decision/section-grade labels */
.tc-disposition-field .tc-field-label,
.tc-decision-detail .tc-field-label {
    letter-spacing: 0.12em;           /* match .tc-col-label tracking */
    color: var(--term-gold);          /* full-strength gold, not the dimmer #C9A050 */
}
.tc-disposition-field .tc-field-label { font-size: var(--term-text-sm, 0.875rem); }  /* the decision label out-ranks a field label */


/* ==========================================================================
   DECISION SPINE (D1+D2, 2026-06-05) — the masthead 4-way disposition control +
   co-located accept block. Every selector here targets a flag-ON-only element
   (#tcDisposition spine / #tcAcceptBlock render only under enable_transfer_disposition),
   so flag-OFF is byte-identical.
   ========================================================================== */
.tc-decision-spine {
    margin: var(--term-space-md, 12px) 0 var(--term-space-lg, 16px);
    padding-bottom: var(--term-space-md, 12px);
    border-bottom: 1px solid var(--term-border-default, #2A2720);
}
.tc-decision-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--term-space-sm, 8px);
}
.tc-decision-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: var(--term-space-sm, 8px) var(--term-space-md, 12px);
    min-height: 48px;
    background: var(--term-bg-elevated, #1B1A16);
    border: 1px solid var(--term-border-default, #2A2720);
    border-left: 3px solid var(--term-border, #3A352F);
    color: var(--term-fg-secondary, #A09888);
    cursor: pointer;
    text-align: left;
    transition: opacity var(--tc-motion-fast) var(--tc-ease), transform var(--tc-motion-fast) var(--tc-ease), color var(--tc-motion-fast) var(--tc-ease), background var(--tc-motion-fast) var(--tc-ease), background-color var(--tc-motion-fast) var(--tc-ease), border-color var(--tc-motion-fast) var(--tc-ease), box-shadow var(--tc-motion-fast) var(--tc-ease);
}
.tc-decision-btn:hover {
    background: var(--term-bg-elevated, #2E2A21);
    color: var(--term-fg-primary, #E8E4DC);
}
.tc-decision-btn:focus-visible {
    outline: 2px solid var(--term-gold, #D4A857);
    outline-offset: 1px;
}
.tc-decision-btn-main {
    font-family: var(--term-font-display, 'Outfit', sans-serif);
    font-size: var(--term-text-sm, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tc-decision-btn-sub {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.625rem;
    letter-spacing: 0.04em;
    color: var(--term-fg-muted, #8A8278);
}
/* Per-disposition accent — left edge on hover, full fill when active. */
.tc-decision-btn--accept:hover   { border-left-color: var(--term-status-ready, #22C55E); }
.tc-decision-btn--pending:hover  { border-left-color: var(--term-gold, #D4A857); }
.tc-decision-btn--roadside:hover { border-left-color: var(--term-attention, #F59E0B); }
.tc-decision-btn--decline:hover  { border-left-color: var(--term-block, #EF4444); }
.tc-decision-btn.is-active { color: var(--term-fg-primary, #E8E4DC); }
.tc-decision-btn--accept.is-active {
    border-left-color: var(--term-status-ready, #22C55E);
    box-shadow: inset 0 0 0 1px rgba(34,197,94,0.4), 0 0 12px rgba(34,197,94,0.18);
    background: rgba(34,197,94,0.10);
}
.tc-decision-btn--pending.is-active {
    border-left-color: var(--term-gold, #D4A857);
    box-shadow: inset 0 0 0 1px var(--term-gold-dim), 0 0 12px var(--term-gold-subtle);
    background: var(--term-gold-ghost);
}
.tc-decision-btn--roadside.is-active {
    border-left-color: var(--term-attention, #F59E0B);
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.4), 0 0 12px rgba(245,158,11,0.15);
    background: rgba(245,158,11,0.08);
}
.tc-decision-btn--decline.is-active {
    border-left-color: var(--term-block, #EF4444);
    box-shadow: inset 0 0 0 1px rgba(239,68,68,0.4), 0 0 12px rgba(239,68,68,0.15);
    background: rgba(239,68,68,0.08);
}
.tc-decision-btn.is-active .tc-decision-btn-sub { color: var(--term-fg-secondary, #A09888); }

/* Hidden canonical <select> — present for SELECT_FIELDS data binding, invisible. */
.tc-disposition-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* Accept block — unit + destination + tier co-located under the decision buttons.
   #tcAcceptBlock carries .tc-lane, so applyDispositionEmphasis toggles
   .tc-lane-promote / .tc-lane-dim on it (gold edge on accept, dimmed on decline). */
.tc-accept-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--term-space-sm, 8px) var(--term-space-lg, 16px);
    margin-top: var(--term-space-md, 12px);
    padding: var(--term-space-sm, 8px) var(--term-space-md, 12px);
    background: var(--term-bg-elevated, #1B1A16);
    border: 1px solid var(--term-border-subtle, #1E1C18);
}
.tc-accept-block-tag {
    font-family: var(--term-font-display, 'Outfit', sans-serif);
    font-size: var(--term-text-xs, 0.6875rem);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--term-gold, #D4A857);
}
.tc-accept-unit, .tc-accept-routing {
    display: flex;
    align-items: center;
    gap: var(--term-space-sm, 8px);
    flex: 0 1 auto;          /* size to content, allow shrink — never grow full-width */
}
/* Tighten the bed chips inside the accept block. Scoped to .tc-accept-unit, so the
   flag-OFF chips in the Clinical section are untouched (stays byte-identical). */
.tc-accept-unit .tc-bed-chips { gap: 4px; flex-wrap: nowrap; }
.tc-accept-unit .tc-bed-chip,
.tc-accept-routing .tc-dest-chip { padding: 3px 8px; }
.tc-accept-routing .tc-dest-chips { gap: 4px; }
/* Accept-capture (2026-08-29): the select is a hidden state carrier behind the chips. */
.tc-accept-routing #tcDestination[hidden] { display: none; }
.tc-accept-label {
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: var(--term-text-xs, 0.6875rem);
    letter-spacing: 0.06em;
    color: var(--term-fg-muted, #8A8278);
    text-transform: uppercase;
    white-space: nowrap;
    flex: 0 0 auto;
}
/* Compact, inline selects. The base .tc-select is width:100%, which made the
   Destination/Tier controls span the whole block and stack vertically (207px tall).
   Pin them to content-sized widths so the accept row reads as one tidy strip. */
.tc-accept-routing .tc-select { width: auto; min-width: 0; flex: 0 0 auto; }
.tc-accept-routing #tcDestination { width: 190px; }
.tc-accept-routing #tcUrgencyTier { width: 150px; }
.tc-accept-bedreq { margin-left: var(--term-space-xs, 4px); white-space: nowrap; }
@media (max-width: 1280px) {
    .tc-accept-routing #tcDestination { width: 160px; }
    .tc-accept-routing #tcUrgencyTier { width: 130px; }
}


/* ==========================================================================
   INC-2 (2026-05-29)  RECENCY HEAT DECAY  (AC#2)
   Afterglow on top of tc-field-flash. Class tc-field-heat + data-heat="hot|warm"
   are managed by the _heatDecayInterval in call-recorder.js.
   Transitions create a smooth step-down so hot→warm→settled reads as decay,
   not a blink. Does NOT alter @keyframes tc-field-flash or any existing flash rule.
   ========================================================================== */

.tc-field-heat {
    transition: box-shadow var(--tc-motion-slow) var(--tc-ease), background-color var(--tc-motion-slow) var(--tc-ease);
}

.tc-field-heat[data-heat="hot"] {
    box-shadow: inset 0 0 0 1px var(--term-live-dim),
                0 0 12px var(--term-live-subtle);
    background-color: var(--term-live-subtle);
}

.tc-field-heat[data-heat="warm"] {
    box-shadow: inset 0 0 0 1px var(--term-live-ghost);
    background-color: var(--term-live-ghost);
}

/* settled = class removed by JS; no rule needed */


/* ==========================================================================
   INC-2 (2026-05-29)  OLD→NEW DIFF MARKER  (AC#3)
   .tc-field-diff-old is appended after the field's container, auto-removed
   after 4s. Uses textContent only — no innerHTML injection risk.
   Position: block under the field, does not shift layout (zero height on
   remove via the fade-out animation).
   ========================================================================== */

.tc-field-diff-old {
    display: block;
    font-family: var(--term-font-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.04em;
    color: var(--term-fg-muted, #8A8278);
    text-decoration: line-through;
    opacity: 0;
    /* Fade in briefly then fade to invisible over 4s total lifecycle:
       0→0.3s appear, 0.3→3.5s hold, 3.5→4s fade out. */
    animation: tc-diff-old-fade calc(var(--tc-motion-slow) * 10) var(--tc-ease-soft) forwards;
    pointer-events: none;
    user-select: none;
    margin-top: 2px;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

@keyframes tc-diff-old-fade {
    0%   { opacity: 0; }
    7%   { opacity: 0.55; }
    85%  { opacity: 0.40; }
    100% { opacity: 0; }
}


/* ==========================================================================
   INC-2 (2026-05-29)  IDLE-AWARE RECEIVING PULSE  (AC#3)
   .tc-transcript-status.is-live     = events actively landing → pulse glow.
   .tc-transcript-status.is-live-idle = >6s since last event → static neutral.
   Existing is-waiting / is-warning rules are unchanged.
   ========================================================================== */

/* Active live state: add a pulsing glow on top of the existing is-live border/bg */
.tc-transcript-status.is-live {
    animation: tc-transcript-live-pulse calc(var(--tc-motion-slow) * 5) var(--tc-ease-soft) infinite;
}

@keyframes tc-transcript-live-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--term-live-ghost);
    }
    50% {
        box-shadow: 0 0 6px 2px var(--term-live-subtle);
    }
}

/* Idle state: muted neutral — keep same pill shape, drop the color/glow */
.tc-transcript-status.is-live-idle {
    color: var(--term-fg-muted, #8A8278);
    border-color: var(--term-border-default, #2A2720);
    background: transparent;
    animation: none;
    box-shadow: none;
}


/* ==========================================================================
   INC-3 (2026-05-29)  STRUCTURED FIELD-MAP AS TIER 1  (AC#4)
   Option A (user-locked): the REAL form fields ARE the field-map — no
   duplicate grid (P5 removed that as redundant; we do not re-add it). This
   block only:
     1. demotes the LIVE TRANSCRIPT to Tier 3 (strictly smaller, never wider
        or more central than the capture surface above it),
     2. gives each captured field its recency (INC-2 heat, already wired) and
        each MISSING critical field a gap marker on the field itself,
     3. kills truncation on the gaps line so the GAP map is fully legible.
   ALL selectors are scoped to .tc-disposition-on, which renders only when
   ENABLE_TRANSFER_DISPOSITION is on → flag-OFF is byte-identical.
   ========================================================================== */

/* (1) Demote the transcript: Tier 3. The capture columns above stay topmost +
   widest; the transcript must read as a subordinate reference, not the focus.
   Shrink its body and quiet its chrome — never collapse it (the doctor still
   reads it live), just make it clearly smaller than the field-map. */
.tc-disposition-on .tc-transcript-panel {
    margin-top: var(--term-space-sm, 8px);
    opacity: 0.92;
}
.tc-disposition-on .tc-transcript-content {
    min-height: 0;
    max-height: 22vh;          /* was 40vh — strictly subordinate to the field-map */
}
.tc-disposition-on .tc-transcript-label {
    color: var(--term-fg-muted);   /* de-rank the header below the gold col-labels */
}

/* (1b) Promote the capture surface: make the two-column field-map read as the
   primary panel. Restrained — a faint elevated fill + a little more air, no
   color-semantic change (INC-1 owns color). */
.tc-disposition-on .tc-columns {
    background: var(--tc-elev-1);   /* section-card rung, matches the recorder */
    border: 1px solid var(--term-border-subtle);
    border-radius: 6px;
    padding: var(--term-space-md, 12px);
    box-shadow: var(--tc-shadow-1);
}

/* (2) Per-field GAP state on the real inputs. A missing critical field carries
   the same red seam the removed grid's is-missing cards used, so "what's still
   open" is legible at the field, not just in the summary line. JS toggles
   .tc-field-gap in updateLiveIntakeFromDom (flag-gated). The seam sits on the
   field's box-shadow so it layers cleanly over INC-2 heat without fighting it. */
.tc-disposition-on .tc-field-gap {
    box-shadow: inset 3px 0 0 0 var(--term-red, #E55A50);
}
/* Heat wins while a field is actively changing — gap is the resting state. */
.tc-disposition-on .tc-field-gap.tc-field-heat[data-heat="hot"],
.tc-disposition-on .tc-field-gap.tc-field-heat[data-heat="warm"] {
    box-shadow: inset 3px 0 0 0 var(--term-red, #E55A50),
                0 0 12px var(--term-live-subtle);
}
/* bed_type gap marks the chip group container */
.tc-disposition-on #tcBedChips.tc-field-gap {
    box-shadow: inset 3px 0 0 0 var(--term-red, #E55A50);
    border-radius: 4px;
}

/* (3) Kill truncation on the gaps line so every open gap is readable (the GAP
   map must not hide behind an ellipsis). Wrap instead of clip. */
.tc-disposition-on .tc-live-gaps {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
}

/* ============================================================================
   BOLD WORKSPACE PASS (2026-06-06) — visual-spatial hierarchy for the LIVE
   (flag-ON) Transfer Center. Every rule is scoped under .tc-disposition-on so
   the flag-OFF surface stays byte-identical (rollback-safe). Intent:
     - a real elevation ramp (sections become lifted cards on the void)
     - a loud, labeled decision spine (ghosted unselected vs filled active)
     - a typographic hierarchy: GOLD = section headers / decisions,
       GREY = field labels (recede), BRIGHT = values (the content).
   ============================================================================ */

/* --- 1. Decision spine: the primary, labeled decision zone ----------------- */
.tc-disposition-on .tc-decision-spine {
    margin: 4px 0 18px;
    padding: 12px 14px 14px;
    background: var(--term-bg-surface, #1B1916);
    border: 1px solid var(--term-boundary, #6A655C);
    border-radius: 6px;
    position: relative;
}
.tc-disposition-on .tc-decision-spine::before {
    content: "DECISION";
    display: block;
    font-family: var(--term-font-display, 'Outfit', sans-serif);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--term-fg-muted, #8A8278);
    margin-bottom: 10px;
}
.tc-disposition-on .tc-decision-buttons { gap: 10px; }
.tc-disposition-on .tc-decision-btn {
    position: relative;                           /* anchor the ✓ selected-mark */
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 5px;
    background: var(--term-bg-void, #0E0D0B);     /* unselected reads as empty */
    border: 1px solid var(--term-border-default, #2A2720);
    border-left-width: 3px;
    opacity: 0.78;
    transition: opacity var(--tc-motion-fast) var(--tc-ease), transform var(--tc-motion-fast) var(--tc-ease), color var(--tc-motion-fast) var(--tc-ease), background var(--tc-motion-fast) var(--tc-ease), background-color var(--tc-motion-fast) var(--tc-ease), border-color var(--tc-motion-fast) var(--tc-ease), box-shadow var(--tc-motion-fast) var(--tc-ease);
}
.tc-disposition-on .tc-decision-btn:hover { opacity: 1; }
.tc-disposition-on .tc-decision-btn-main { font-size: 0.95rem; letter-spacing: 0.06em; }

/* DECISION-SPINE POLISH (2026-06-07): UAT #1 — "is the active state obvious near
   hang-up?". Before, all four sat at 0.78 even after a choice, so the picked
   disposition didn't dominate. Now, once a decision is locked, the chosen button
   lifts + carries a ✓, and the other three clearly recede (dim + desaturate) — so
   at a glance the doctor sees THE decision, not four similar boxes. */
.tc-disposition-on .tc-decision-btn.is-active {
    opacity: 1;
    transform: translateY(-1px);
}
.tc-disposition-on .tc-decision-btn.is-active .tc-decision-btn-main {
    font-weight: 700;
}
.tc-disposition-on .tc-decision-btn.is-active::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: var(--term-fg-primary, #E8E4DC);
}
/* Siblings of the chosen decision recede so the choice owns the row. */
.tc-disposition-on .tc-decision-buttons:has(.is-active) .tc-decision-btn:not(.is-active) {
    opacity: 0.4;
    filter: saturate(0.35);
}
/* …but stay re-selectable: hovering a receded sibling brings it back to read. */
.tc-disposition-on .tc-decision-buttons:has(.is-active) .tc-decision-btn:not(.is-active):hover {
    opacity: 0.85;
    filter: none;
}
/* Stronger active fills: full colored border + perceptible wash, so the chosen
   disposition owns the row and the other three clearly recede. */
.tc-disposition-on .tc-decision-btn--accept.is-active {
    border-color: var(--term-status-ready, #22C55E);
    background: rgba(34,197,94,0.16);
    box-shadow: inset 0 0 0 1px rgba(34,197,94,0.55), 0 0 16px rgba(34,197,94,0.20);
}
.tc-disposition-on .tc-decision-btn--pending.is-active {
    border-color: var(--term-gold, #D4A857);
    background: rgba(212,168,87,0.16);
    box-shadow: inset 0 0 0 1px rgba(212,168,87,0.55), 0 0 16px rgba(212,168,87,0.18);
}
.tc-disposition-on .tc-decision-btn--roadside.is-active {
    border-color: var(--term-attention, #F59E0B);
    background: rgba(245,158,11,0.15);
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.55), 0 0 16px rgba(245,158,11,0.18);
}
.tc-disposition-on .tc-decision-btn--decline.is-active {
    border-color: var(--term-block, #EF4444);
    background: rgba(239,68,68,0.15);
    box-shadow: inset 0 0 0 1px rgba(239,68,68,0.55), 0 0 16px rgba(239,68,68,0.18);
}

/* --- 2. Accept block: a real lift when promoted ---------------------------- */
.tc-disposition-on .tc-accept-block {
    background: var(--term-bg-surface, #1B1916);
    border: 1px solid var(--term-boundary, #6A655C);
    border-radius: 5px;
    padding: 10px 14px;
    margin-top: 12px;
}
.tc-disposition-on #tcAcceptBlock.tc-lane-promote {
    background: rgba(212,168,87,0.12);            /* visible warm wash, not the 0.05 token */
    border-color: var(--term-gold-dim, rgba(212,168,87,0.35));
    border-left: 4px solid var(--term-gold, #D4A857);
    box-shadow: inset 0 0 0 1px var(--term-gold-dim, rgba(212,168,87,0.35)), 0 2px 16px rgba(0,0,0,0.40);
}

/* --- 3. Columns become distinct lifted cards ------------------------------- */
.tc-disposition-on .tc-columns { gap: 16px; }
.tc-disposition-on .tc-columns > .tc-col {
    background: var(--term-bg-surface, #1B1916);
    border: 1px solid var(--term-boundary, #6A655C);
    border-radius: 6px;
    padding: 14px 16px;
}
.tc-disposition-on .tc-columns > .tc-col:first-child {
    border-right: 1px solid var(--term-boundary, #6A655C);  /* its own card edge, not the old strong divider */
    padding-right: 16px;
}

/* --- 4. Typographic hierarchy: gold = structure/decision, grey = labels,
         bright = values (retire gold-on-everything) ------------------------- */
.tc-disposition-on .tc-field-label {
    color: var(--term-fg-secondary, #A09888);     /* was gold — field labels now recede */
    font-weight: 500;
}
.tc-disposition-on .tc-input,
.tc-disposition-on .tc-textarea,
.tc-disposition-on .tc-select {
    color: var(--term-fg-primary, #E8E4DC);       /* values are the brightest layer */
}
/* Section headers (REFERRING / ROUTING / CLINICAL) keep gold and now read as
   the card title above the muted field labels. */
.tc-disposition-on .tc-col-label {
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
}

/* --- 5. Lower half: the "feeds the note" band (riders) --------------------- */
/* The decision-detail trio is what flows into the generated note. Group it as a
   labeled panel and differentiate BY FUNCTION instead of carding it uniformly:
   chart-materials is a recessed paste-well (raw source you dump in); the two
   riders are gold-ticked because they each become their own note section. */
.tc-disposition-on .tc-decision-detail {
    margin-top: 18px;
    padding: 14px 16px 6px;
    border: 1px solid var(--term-border-default, #2A2720);
    border-radius: 6px;
    background: var(--tc-elev-2);   /* nested panel rung inside the columns card */
    box-shadow: var(--tc-shadow-2);
    row-gap: 14px;
}
.tc-disposition-on .tc-decision-detail::before {
    content: "Feeds the note";
    grid-column: 1 / -1;
    font-family: var(--term-font-display, 'Outfit', sans-serif);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--term-fg-muted, #8A8278);
}
/* Rider labels stay gold (section-grade) — restore them from the blanket mute above. */
.tc-disposition-on .tc-decision-detail .tc-field-label { color: var(--term-gold, #D4A857); }
/* Chart materials = recessed paste-well: raw source you dump in, not a lifted output. */
.tc-disposition-on #tcChartMaterials {
    /* Recessed rung — the one surface that steps BELOW its parent (raw-source
       dump-well). Solid + deep inset so the recess is unmistakable. */
    background: var(--tc-well);
    box-shadow: var(--tc-shadow-well);
    border-color: var(--term-border-subtle, #1E1C18);
}
/* The two riders become note sections — a quiet gold tick marks "carries into the note". */
.tc-disposition-on #tcPreTransportField,
.tc-disposition-on #tcInboundSpecialistField {
    border-left: 2px solid var(--term-gold-dim, rgba(212, 168, 87, 0.35));
    padding-left: 10px;
}

/* --- 6. Lower half: the live CALL CONSOLE gets a teal identity ------------- */
/* Color semantics: GOLD = decision / note, TEAL (--term-live) = live capture.
   The recorder + intake + transcript are the live instrument, so bind them under
   the live accent (was gold) — it visually separates "the instrument" from
   "the note", instead of bathing the whole page in one undifferentiated gold. */
/* T5 R0: derive from --term-live (was hard-coded rgba(0,255,208,0.22)) so the
   recorder border follows skin remaps instead of staying stock neon-cyan. */
.tc-disposition-on .tc-recorder {
    border-color: color-mix(in srgb, var(--term-live, #00FFD0) 22%, transparent);
}
.tc-disposition-on .tc-recorder::before {
    background: linear-gradient(90deg, transparent 0%, var(--term-live, #00FFD0) 50%, transparent 100%);
    opacity: 0.55;
}
.tc-disposition-on .tc-live-intake-kicker { color: var(--term-live, #00FFD0); }

/* --- 7. Lower-half rhythm: deliberate gap between the decision/intake form,
         the note-inputs band, and the live console ------------------------- */
.tc-disposition-on .tc-bottom-panel { margin-top: 18px; }

/* T5 UX refinements (2026-07-06) live in transfer-redesign.css — that sheet
   only loads under ENABLE_TC_REDESIGN, which is the single T5 kill-switch.
   Only computed-identical touch-ups (note-modal width var with 480px fallback,
   recorder border color-mix) live in this always-loaded sheet. */

/* ── Responsive header reflow (2026-07-16, sweep finding 7) ──────────────
   The header and its right-side control group were a single non-wrapping
   flex row: at <=1200px the date/New Transfer/Clear/skin/UAT/Help controls
   extended past the right edge (verified live at 768px in the 2026-07-16
   general app sweep). Wrap both; controls keep their order and hit areas. */
/* FIX (2026-07-18, widened 2026-07-19): after the persistent Doctor Guide
   destination joined the control group, the single-row header needs ~1500px.
   Wrap before it compresses navigation labels or creates horizontal scroll. */
/* FIX (2026-08-06, responsive audit Stage 1): was max-width:1535.98px, which
   left a 24px dead band against the ≥1560px note-drawer dock
   (transfer-redesign.css S-NT) — in 1535.98–1560 neither the wrap nor the
   dock applied. Moved to 1559.98 so the compact header hands off to the dock
   threshold exactly. */
@media (max-width: 1559.98px) {
    .tc-header {
        flex-wrap: wrap;
        row-gap: var(--term-space-sm, 8px);
        padding: var(--term-space-sm) var(--term-space-md);
    }

    .tc-header-controls {
        flex-wrap: wrap;
        row-gap: var(--term-space-sm, 8px);
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

/* ============================================================================
   Phase 2 — Transfer → census continuity link (ENABLE_TC_CENSUS_LINK)
   Lives in the accept lane (#tcCensusLink). Token-based so the active skins
   (Night Dispatch / Phosphor) + roast themes restyle it for free. Flag-OFF
   the markup is absent, so none of this renders.
   ============================================================================ */
.tc-census-link {
  margin-top: var(--term-space-sm, 8px);
  display: flex;
  flex-direction: column;
  gap: var(--term-space-xs, 4px);
}
.tc-census-link[hidden] { display: none; }

.tc-census-link-btn {
  align-self: flex-start;
  font-family: var(--term-font-mono, monospace);
  font-size: var(--term-text-xs, 11px);
  letter-spacing: var(--term-tracking-wide, 0.02em);
  color: var(--term-fg-secondary, #b8c0c8);
  background: transparent;
  border: 1px dashed var(--term-border-default, #3a424a);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color var(--tc-motion-fast) var(--tc-ease), color var(--tc-motion-fast) var(--tc-ease);
}
.tc-census-link-btn:hover {
  color: var(--term-fg-primary, #e6ebef);
  border-color: var(--term-gold, #d8a657);
}
/* Once Accept is chosen, nudge the doctor toward linking (solid gold edge). */
.tc-census-link-btn.is-prompt {
  border-style: solid;
  border-color: var(--term-gold-dim, #9c7b43);
  color: var(--term-gold, #d8a657);
}

.tc-census-picker {
  border: 1px solid var(--term-border-default, #3a424a);
  background: var(--term-bg-elevated, #1a1f24);
  border-radius: 4px;
  padding: var(--term-space-xs, 4px);
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tc-census-picker-hint {
  font-size: var(--term-text-xs, 11px);
  color: var(--term-fg-muted, #7a848c);
  padding: 2px 6px 4px;
}
.tc-census-picker-search {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--term-border-default, #3a424a);
  border-radius: 3px;
  background: var(--term-bg-sunken, #11161a);
  color: var(--term-fg-primary, #e6ebef);
  padding: 5px 7px;
  font: var(--term-text-sm, 12px) var(--term-font-mono, monospace);
}
.tc-census-picker-search:focus {
  outline: 1px solid var(--term-gold, #d8a657);
  outline-offset: 1px;
}
.tc-census-picker-count,
.tc-census-picker-empty {
  padding: 3px 6px;
  color: var(--term-fg-muted, #7a848c);
  font-size: var(--term-text-xs, 11px);
}
.tc-census-picker-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tc-census-candidate {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--term-space-sm, 8px);
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 3px;
  padding: 5px 6px;
  cursor: pointer;
  color: var(--term-fg-primary, #e6ebef);
  font-size: var(--term-text-sm, 12px);
}
.tc-census-candidate:hover:not(:disabled) {
  background: color-mix(in srgb, var(--term-gold, #d8a657) 12%, transparent);
}
.tc-census-candidate:disabled { opacity: 0.45; cursor: not-allowed; }
.tc-census-candidate-name { font-weight: 600; }
.tc-census-candidate-meta {
  font-family: var(--term-font-mono, monospace);
  font-size: var(--term-text-xs, 11px);
  color: var(--term-fg-muted, #7a848c);
  white-space: nowrap;
}

.tc-census-linked {
  display: flex;
  align-items: center;
  gap: var(--term-space-sm, 8px);
  flex-wrap: wrap;
  font-size: var(--term-text-xs, 11px);
}
.tc-census-linked-chip {
  font-family: var(--term-font-mono, monospace);
  color: var(--term-status-ready, #22C55E);
  border: 1px solid color-mix(in srgb, var(--term-status-ready, #22C55E) 40%, transparent);
  border-radius: 3px;
  padding: 2px 8px;
}
.tc-census-open { color: var(--term-fg-secondary, #b8c0c8); text-decoration: underline; }
.tc-census-open:hover { color: var(--term-fg-primary, #e6ebef); }
.tc-census-unlink {
  background: transparent;
  border: none;
  color: var(--term-fg-muted, #7a848c);
  cursor: pointer;
  text-decoration: underline;
  font-size: var(--term-text-xs, 11px);
}
.tc-census-unlink:hover { color: var(--term-red, #e5484d); }

/* ============================================================================
   Phase 4 — transfer episode outcomes overlay (ENABLE_TC_EPISODES)
   Header-toggled per-call outcomes review. Token-based; flag-OFF renders none
   of this (no #tcOutcomesBtn, no JS-built overlay).
   ============================================================================ */
.tc-outcomes-btn {
  /* Lives at the top of the list panel (left rail), not the header. */
  display: block;
  margin: var(--term-space-sm, 8px) var(--term-space-md, 12px);
  font-family: var(--term-font-mono, monospace);
  font-size: var(--term-text-xs, 11px);
  letter-spacing: var(--term-tracking-wide, 0.02em);
  color: var(--term-fg-secondary, #b8c0c8);
  background: transparent;
  border: 1px solid var(--term-border-default, #3a424a);
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
}
.tc-outcomes-btn:hover { color: var(--term-fg-primary, #e6ebef); border-color: var(--term-gold, #d8a657); }

.tc-outcomes-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  z-index: 1000;
}
.tc-outcomes-overlay[hidden] { display: none; }
.tc-outcomes-panel {
  width: min(560px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--term-bg-elevated, #1a1f24);
  border: 1px solid var(--term-border-default, #3a424a);
  border-radius: 8px;
  overflow: hidden;
}
.tc-outcomes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--term-border-subtle, #2a3138);
}
.tc-outcomes-title {
  font-family: var(--term-font-display, sans-serif);
  font-size: var(--term-text-sm, 12px);
  letter-spacing: var(--term-tracking-wider, 0.04em);
  text-transform: uppercase;
  color: var(--term-fg-primary, #e6ebef);
}
.tc-outcomes-close {
  background: transparent; border: none; cursor: pointer;
  color: var(--term-fg-muted, #7a848c); font-size: 20px; line-height: 1;
}
.tc-outcomes-close:hover { color: var(--term-fg-primary, #e6ebef); }
.tc-outcomes-body { overflow-y: auto; padding: 6px 8px; }
.tc-outcomes-empty {
  color: var(--term-fg-muted, #7a848c);
  font-size: var(--term-text-sm, 12px);
  padding: 16px 10px;
  text-align: center;
}
.tc-outcomes-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--term-space-sm, 8px);
  padding: 8px 8px;
  border-bottom: 1px solid var(--term-border-subtle, #2a3138);
}
.tc-outcomes-meta {
  font-family: var(--term-font-mono, monospace);
  font-size: var(--term-text-xs, 11px);
  color: var(--term-fg-secondary, #b8c0c8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-outcomes-select {
  flex: 0 0 auto;
  font-size: var(--term-text-xs, 11px);
  color: var(--term-fg-primary, #e6ebef);
  background: var(--term-bg-elevated, #1a1f24);
  border: 1px solid var(--term-border-default, #3a424a);
  border-radius: 4px;
  padding: 3px 6px;
}
.tc-outcomes-select:disabled { opacity: 0.5; }

/* ═══════════════════════════════════════════════════════════════════════════
   Transfer note provenance (2026-07-21, ENABLE_TC_NOTE_PROVENANCE)
   Line-level trace tints in the note drawer + source popover + evidence flash.
   Advisory layer: markup only exists when the flag is on AND a provenance
   payload arrived; flag-OFF drawers carry none of these classes.
   Noise budget: grounded lines get a whisper (thin cool left seam) because
   MOST lines should be grounded; only unverified lines get amber weight —
   that is the entropy the doctor must see.
   ═══════════════════════════════════════════════════════════════════════════ */

.tc-prov-line {
    padding-left: 0.5em;
    border-left: 2px solid transparent;
    border-radius: 1px;
    cursor: pointer;
}

.tc-prov-grounded {
    border-left-color: color-mix(in srgb, var(--term-status-ready, #22C55E) 35%, transparent);
}

.tc-prov-partial {
    border-left-color: color-mix(in srgb, var(--term-status-editing, #F59E0B) 55%, transparent);
}

.tc-prov-unverified {
    border-left-color: var(--term-status-editing, #F59E0B);
    background: color-mix(in srgb, var(--term-status-editing, #F59E0B) 9%, transparent);
}

.tc-prov-line:hover {
    background: color-mix(in srgb, var(--term-fg-primary, #E5E9ED) 6%, transparent);
}

/* Source chip — small mono tag at the end of the line; the popover carries
   the full label + quote. */
.tc-prov-chip {
    display: inline-block;
    margin-left: 0.5em;
    padding: 0 0.4em;
    font-family: var(--term-font-mono, monospace);
    font-size: 0.62rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    color: var(--term-fg-muted, #8b949e);
    background: transparent;
    border: 1px solid var(--term-border-subtle, #2c333a);
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--tc-motion-fast) var(--tc-ease);
}

.tc-prov-line:hover .tc-prov-chip,
.tc-prov-chip:focus-visible {
    opacity: 1;
}

/* Unverified chips stay visible without hover — they are the review queue. */
.tc-prov-unverified .tc-prov-chip {
    opacity: 1;
    color: var(--term-status-editing, #F59E0B);
    border-color: color-mix(in srgb, var(--term-status-editing, #F59E0B) 55%, transparent);
}

/* Summary strip between drawer header and note body. */
.tc-prov-summary {
    display: flex;
    align-items: center;
    gap: var(--term-space-md, 12px);
    padding: var(--term-space-xs, 4px) var(--term-space-lg, 16px);
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 0.72rem);
    color: var(--term-fg-muted, #8b949e);
    border-bottom: 1px solid var(--term-border-subtle, #2c333a);
}

.tc-prov-summary-clean {
    color: var(--term-status-ready, #22C55E);
}

.tc-prov-summary-unverified {
    font-family: inherit;
    font-size: inherit;
    padding: 1px 8px;
    color: var(--term-status-editing, #F59E0B);
    background: color-mix(in srgb, var(--term-status-editing, #F59E0B) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--term-status-editing, #F59E0B) 55%, transparent);
    border-radius: 3px;
    cursor: pointer;
}

/* Source popover — fixed-position singleton on <body>. */
.tc-prov-popover {
    position: fixed;
    z-index: 1200;
    padding: var(--term-space-md, 12px);
    background: var(--tc-well, var(--term-bg-panel, #14181c));
    border: 1px solid var(--term-border-default, #3a424a);
    border-radius: 6px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    font-size: var(--term-text-sm, 0.82rem);
    color: var(--term-fg-primary, #E5E9ED);
}

.tc-prov-pop-head {
    display: flex;
    align-items: baseline;
    gap: var(--term-space-sm, 8px);
    margin-bottom: var(--term-space-xs, 4px);
}

.tc-prov-pop-title {
    font-weight: 600;
    font-size: var(--term-text-xs, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--term-gold, #C9A227);
}

.tc-prov-pop-title.is-unverified {
    color: var(--term-status-editing, #F59E0B);
}

.tc-prov-pop-conf {
    font-family: var(--term-font-mono, monospace);
    font-size: var(--term-text-xs, 0.72rem);
    color: var(--term-fg-muted, #8b949e);
}

.tc-prov-pop-close {
    margin-left: auto;
    padding: 0 4px;
    background: none;
    border: none;
    color: var(--term-fg-muted, #8b949e);
    cursor: pointer;
}

.tc-prov-pop-quote {
    margin: var(--term-space-xs, 4px) 0;
    padding: var(--term-space-xs, 4px) var(--term-space-sm, 8px);
    border-left: 2px solid var(--term-gold-dim, #7a6a2f);
    color: var(--term-fg-secondary, #b6bec6);
    font-style: normal;
    white-space: pre-wrap;
    max-height: 9em;
    overflow-y: auto;
}

.tc-prov-pop-warn {
    margin: var(--term-space-xs, 4px) 0;
    color: var(--term-fg-secondary, #b6bec6);
    max-width: 34ch;
}

.tc-prov-pop-go {
    margin-top: var(--term-space-xs, 4px);
}

/* Evidence flash — applied to the navigated form lane / textarea / transcript
   utterance. Motion budget: one 1.8s settle, no loop; dies under
   prefers-reduced-motion. */
.tc-prov-flash {
    animation: tc-prov-flash-pulse calc(var(--tc-motion-slow) * 4.5) var(--tc-ease-soft) 1;
}

@keyframes tc-prov-flash-pulse {
    0%   { box-shadow: 0 0 0 3px color-mix(in srgb, var(--term-status-editing, #F59E0B) 85%, transparent); }
    100% { box-shadow: 0 0 0 3px transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .tc-prov-flash {
        animation: none;
        outline: 2px solid var(--term-status-editing, #F59E0B);
    }
}

/* ── Open Loops (2026-07-29, ENABLE_TC_OPEN_LOOPS) ────────────────────────
   Calls with no disposition. Mirrors the Outcomes overlay geometry so the two
   accumulated-work surfaces read as one idiom. Urgency is a real deadline, not
   decoration: the 48h PHI sweep strips identity, so day 1 is genuinely the last
   day a call can still be characterised. */
.tc-open-loops-btn {
    display: block;
    width: 100%;
    margin: 0 0 0.4rem;
    padding: 0.3rem 0.5rem;
    font: 600 10px/1.4 var(--tc-mono, ui-monospace, monospace);
    letter-spacing: 0.05em;
    text-align: left;
    color: var(--tc-amber, #c8a45c);
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 3px;
    cursor: pointer;
}
.tc-open-loops-overlay[hidden] { display: none; }
.tc-open-loops-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 0.62);
}
.tc-open-loops-panel {
    box-sizing: border-box;
    width: min(46rem, 92vw);
    max-height: 82vh;
    overflow-y: auto;
    padding: 1rem 1.1rem 1.2rem;
    background: var(--tc-panel, #0e1a24);
    border: 1px solid var(--tc-amber, #c8a45c);
    border-radius: 4px;
}
.tc-open-loops__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}
.tc-open-loops__title {
    margin: 0;
    font: 600 13px/1.3 var(--tc-mono, ui-monospace, monospace);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tc-bone, #e8e2d4);
}
.tc-open-loops__close {
    padding: 0 0.35rem;
    font-size: 18px;
    line-height: 1;
    color: var(--tc-bone, #e8e2d4);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.tc-open-loops__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.42rem 0.5rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.tc-open-loops__row[data-urgency="today"]    { border-left-color: var(--tc-amber, #c8a45c); }
.tc-open-loops__row[data-urgency="expiring"] { border-left-color: var(--tc-scarlet, #b4442f); }
.tc-open-loops__line {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    color: var(--tc-bone, #e8e2d4);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tc-open-loops__age {
    font: 600 10px/1 var(--tc-mono, ui-monospace, monospace);
    color: var(--tc-mocha, #9a8b6f);
}
.tc-open-loops__open {
    padding: 0.2rem 0.55rem;
    font: 600 10px/1.4 var(--tc-mono, ui-monospace, monospace);
    color: var(--tc-amber, #c8a45c);
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 3px;
    cursor: pointer;
}
.tc-open-loops__empty,
.tc-open-loops__gone {
    margin: 0.7rem 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: var(--tc-mocha, #9a8b6f);
}
.tc-open-loops__gone {
    padding-top: 0.7rem;
    border-top: 1px solid rgb(255 255 255 / 0.08);
}

/* ==========================================================================
   Call Brief strip (ENABLE_TC_CALL_BRIEF, 2026-09-09)
   Three fixed lanes: ASKS (say this) · SITE (know this) · NOTE (one tap).
   Ambient: age underline is the urgency signal, not hue; empties toward nothing.
   ========================================================================== */
.tc-plan-advisor {
    margin: 8px 0;
    border: 1px solid var(--tc-edge, var(--term-border-default));
    border-top: 2px solid var(--term-gold, #CEB888);
    border-radius: 4px;
    background: var(--tc-plane-read, var(--term-bg-surface, #202624));
    color: var(--term-fg-primary, #E8DCC4);
    font: 400 15px/1.5 var(--term-font-sans, sans-serif);
    overflow-wrap: anywhere;
}
.tc-pa-head, .tc-pa-label, .tc-pa-card footer, .tc-pa-grounded {
    font: 400 11px/1.5 var(--term-font-mono, monospace);
    color: var(--tc-meta, #a6b0af);
}
.tc-pa-head { padding: 8px 12px; text-transform: uppercase; letter-spacing: .08em; }
.tc-pa-card { padding: 0 12px 12px; }
.tc-pa-card + .tc-pa-card { border-top: 1px solid var(--tc-edge, var(--term-border-default)); padding-top: 12px; }
.tc-pa-card h3 { margin: 0 0 8px; font: 600 15px/1.5 var(--term-font-sans, sans-serif); }
.tc-pa-line { padding: 6px 0; }
.tc-pa-actions, .tc-pa-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tc-pa-grounded { border: 1px solid var(--tc-edge, var(--term-border-default)); border-radius: 10px; padding: 0 6px; }
.tc-pa-actions button {
    font: 400 11px/1.5 var(--term-font-mono, monospace);
    padding: 5px 8px;
    border: 1px solid var(--tc-edge, var(--term-border-default));
    border-radius: 4px;
    background: transparent;
    color: var(--term-fg-primary, #E8DCC4);
    cursor: pointer;
    transition: background-color var(--tc-motion-fast) var(--tc-ease);
}
.tc-pa-actions button:hover { background: var(--tc-card, var(--term-bg-elevated)); }
.tc-pa-actions button:focus-visible { outline: 2px solid var(--term-gold, #CEB888); outline-offset: 2px; }
.tc-pa-added { color: var(--tc-meta, #a6b0af); font: 400 11px/1.5 var(--term-font-mono, monospace); }
.tc-pa-ask { margin: 6px 0; padding: 6px 8px; border-left: 2px solid #80b9c5; background: rgba(128, 185, 197, .08); }
.tc-pa-ask .tc-pa-label { color: #a4d4dd; text-transform: uppercase; }
.tc-pa-arrival { margin-top: 8px; }
.tc-pa-card footer { margin-top: 10px; }

.tc-call-brief {
    margin: var(--term-space-xs, 4px) 0;
    border: 1px solid var(--term-border-default, rgba(206, 184, 136, 0.15));
    border-radius: 4px;
    background: rgba(30, 27, 22, 0.85);
    font-family: var(--term-font-mono, ui-monospace, monospace);
    font-size: var(--term-text-sm, 13px);
    color: var(--term-fg-primary, #E8DCC4);
}
.tc-cb-head {
    display: flex;
    align-items: baseline;
    gap: var(--term-space-sm, 8px);
    padding: 4px var(--term-space-md, 12px);
    border-bottom: 1px solid var(--term-border-default, rgba(206, 184, 136, 0.12));
    font-size: var(--term-text-xs, 11px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--term-gold, #CEB888);
}
.tc-cb-site-tag { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--term-fg-secondary, #B8A88A); }
/* The strip lives in the workspace's right column (~380px at 1920), so lane layout keys
   off the STRIP's own width (container query), never the viewport: ASKS full width with
   SITE | NOTE beneath by default; three lanes across only when the strip is wide enough. */
.tc-call-brief { container-type: inline-size; }
.tc-cb-lanes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
}
.tc-cb-lane { padding: var(--term-space-sm, 8px) var(--term-space-md, 12px); min-width: 0; }
.tc-cb-lane--asks { grid-column: 1 / -1; }
.tc-cb-lane--site, .tc-cb-lane--note { border-top: 1px solid var(--term-border-default, rgba(206, 184, 136, 0.12)); }
.tc-cb-lane--note { border-left: 1px solid var(--term-border-default, rgba(206, 184, 136, 0.12)); }
@container (min-width: 720px) {
    .tc-cb-lanes { grid-template-columns: minmax(0, 3fr) minmax(0, 1.2fr) minmax(0, 1.4fr); }
    .tc-cb-lane--asks { grid-column: auto; }
    .tc-cb-lane--site, .tc-cb-lane--note { border-top: 0; border-left: 1px solid var(--term-border-default, rgba(206, 184, 136, 0.12)); }
}
.tc-cb-lane-title {
    font-size: var(--term-text-xs, 11px);
    letter-spacing: 0.08em;
    color: var(--term-fg-muted, #8A7F6A);
    margin-bottom: 6px;
}
.tc-cb-ask { padding: 4px 0 6px; }
.tc-cb-ask + .tc-cb-ask { border-top: 1px dashed rgba(206, 184, 136, 0.1); }
.tc-cb-ask-text { line-height: 1.35; }
.tc-cb-age { height: 2px; margin: 4px 0 3px; background: rgba(206, 184, 136, 0.12); border-radius: 1px; overflow: hidden; }
.tc-cb-age-fill { display: block; height: 100%; background: var(--term-gold, #CEB888); transition: none; }
.tc-cb-ask-foot { display: flex; align-items: center; gap: var(--term-space-sm, 8px); flex-wrap: wrap; }
.tc-cb-prov { font-size: var(--term-text-xs, 11px); color: var(--term-fg-muted, #8A7F6A); }
.tc-cb-verbs { margin-left: auto; display: inline-flex; gap: 4px; }
.tc-cb-verb {
    font: inherit;
    font-size: var(--term-text-xs, 11px);
    padding: 1px 7px;
    border: 1px solid rgba(206, 184, 136, 0.25);
    border-radius: 3px;
    background: transparent;
    color: var(--term-fg-secondary, #B8A88A);
    cursor: pointer;
}
.tc-cb-verb:hover { border-color: var(--term-gold, #CEB888); color: var(--term-fg-primary, #E8DCC4); }
.tc-cb-verb--answered, .tc-cb-verb--accept { border-color: rgba(111, 169, 111, 0.5); color: #9CCB9C; }
.tc-cb-ask--resolved { opacity: 0.6; }
.tc-cb-heard { font-size: var(--term-text-xs, 11px); color: #9CCB9C; margin-top: 2px; }
.tc-cb-more { font-size: var(--term-text-xs, 11px); color: var(--term-fg-muted, #8A7F6A); padding-top: 4px; }
.tc-cb-site-row { display: flex; justify-content: space-between; gap: 8px; font-size: var(--term-text-xs, 11px); line-height: 1.5; flex-wrap: wrap; }
.tc-cb-site-row b { font-weight: 600; color: var(--term-fg-primary, #E8DCC4); text-align: right; }
.tc-cb-note-text { line-height: 1.35; font-style: italic; }
.tc-cb-tail { padding: var(--term-space-sm, 8px) var(--term-space-md, 12px); border-top: 1px solid rgba(217, 154, 63, 0.35); }
.tc-cb-tail-title { font-size: var(--term-text-xs, 11px); letter-spacing: 0.08em; text-transform: uppercase; color: #D99A3F; margin-bottom: 4px; }
.tc-cb-tail-phone { margin-top: 6px; font-size: var(--term-text-xs, 11px); color: var(--term-fg-secondary, #B8A88A); }

.tc-cb-review-chip {
    font: inherit;
    font-family: var(--term-font-mono, ui-monospace, monospace);
    font-size: var(--term-text-xs, 11px);
    margin-left: var(--term-space-sm, 8px);
    padding: 2px 8px;
    border: 1px solid rgba(217, 154, 63, 0.45);
    border-radius: 3px;
    background: transparent;
    color: var(--term-fg-secondary, #B8A88A);
    cursor: pointer;
    align-self: center;
}
.tc-cb-review-chip[aria-pressed="true"] { background: rgba(217, 154, 63, 0.18); color: #D99A3F; border-color: #D99A3F; }
.tc-cb-review-chip:disabled { opacity: 0.5; cursor: wait; }
