/* ============================================================================
   NOTE EVOLUTION — SHIFT WORKSPACE V2  ("the tapestry is the face")
   ----------------------------------------------------------------------------
   Design source: Claude Design project cf6a41fd, "Note Evolution Workspace
   v2.dc.html" Turn 6. Rollout plan: .claude/plans/we-can-not-lose-pure-ladybug.md

   EVERY rule in this file is namespaced under
       #noteEvolutionTakeover[data-nev-v2]
   The attribute is only stamped when ENABLE_NE_WORKSPACE_V2 (nested under
   ENABLE_THREE_SUBSTRATE_TAKEOVER + ENABLE_EPISODE_TAPESTRY) is ON, so this
   sheet is inert for the flag-OFF daily driver. No legacy sheet is modified.

   Token policy: Dark Roast (--dr-*) remains canonical — the v2 mock's palette
   is byte-identical to it. This file adds ONLY a six-step surface ramp
   (--nev2-surface-*) that canonicalizes the mock's near-black backgrounds,
   and re-points the --dr-font-* stack at the self-hosted IBM Plex faces
   (fonts.css §Course Tapestry) for the v2 surface. Plex Mono has no 700 face
   on disk — bold mono is ALWAYS 600 here.
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] {
    /* surface ramp — deepest well → raised plane */
    --nev2-surface-0: #0D0805;   /* recessed wells, settled history      */
    --nev2-surface-1: #0F0A06;   /* note column, finalize bar            */
    --nev2-surface-2: #110B07;   /* update column, tapestry board        */
    --nev2-surface-3: #120C06;   /* card base (== --dr-void)             */
    --nev2-surface-4: #160E08;   /* raised plane low (== --dr-obsidian)  */
    --nev2-surface-5: #1B120B;   /* raised plane high / identity strip   */

    /* one type voice for the whole v2 surface: the tapestry's Plex system */
    --dr-font-heading: 'IBM Plex Sans', -apple-system, sans-serif;
    --dr-font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    --dr-font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

    font-variant-numeric: tabular-nums;
}

/* ============================================================================
   1. GRID — working note is the primary plane; Course + Update are context.
   Legacy 3-column template stays in the DOM (hidden hosts below); this
   re-grids the SAME .nev-takeover-body without touching the legacy rule.
   Drawer tracks keep the shipped 0fr push-open animation contract.

   2026-07-13 doctor correction: the full-width Course band forced Today's
   Note into the lower-right quadrant. The note now spans the full working
   height at right. A bounded context rail at left stacks Course Tapestry,
   its legend, and Today's Update. Context may scroll; the note may not be
   sacrificed to keep every substrate simultaneously visible.
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] .nev-takeover-body {
    grid-template-columns:
        /* The context rail is deliberately capped. The NOTE owns every
           remaining pixel and retains a real reading-width floor.
           13a port (2026-07-14): container-relative % instead of vw — the
           workspace is capped at 2280px and centered, so % tracks follow
           the desk, not the monitor. Wide-desk rebalance lives in the
           min-width:1600px block at the end of this sheet. */
        /* 2026-07-17 proportion fix: the context rail was over-wide at
           mid desks (34% of a 1400px desk ≈ 476px) and starved the note.
           Narrow + lower the cap so the working note owns more of the desk. */
        clamp(320px, 29%, 470px)        /* left  — Course + Update context */
        minmax(600px, 1fr)              /* right — primary working note   */
        var(--nev-evidence-drawer-width, 0fr)
        var(--nev-audit-drawer-width, 0fr);
    grid-template-rows:
        /* Band height = rendered weave content, capped — set as a CSS var
           by _nev2SyncBandHeight() on every repaint. It sizes only the
           context rail now; the spanning note keeps the entire row budget. */
        var(--nev2-band-h, 240px)       /* tapestry context                */
        auto                            /* legend / as-of strip            */
        minmax(0, 1fr)                  /* Today's Update context          */
        auto;                           /* finalize bar                    */
    grid-template-areas:
        "tapestry right    evidence audit"
        "legend   right    evidence audit"
        "left     right    evidence audit"
        "finalize finalize evidence audit";
    gap: 0;
    padding: 0;
}

#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] {
    grid-area: tapestry;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--dr-crater, #5A453A);
    background: var(--nev2-surface-2);
    /* Proportion contract (2026-07-11, outOfProportion.png): the band is
       sized by its CONTENT, bounded by the doctor's working-note hierarchy
       — a D1 patient gets a short
       band and the doctor's working row takes the freed space; a D51
       stay caps and scrolls internally. Never a fixed viewport fraction:
       that dead-spaced tall monitors AND crushed laptops simultaneously. */
    max-height: clamp(280px, 34vh, 420px);
    min-height: 0;
    overflow: hidden;
}
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="left"] {
    grid-area: left;
    min-width: 0;
    border-right: 1px solid var(--dr-crater, #5A453A);
    background: var(--nev2-surface-2);
}
#noteEvolutionTakeover[data-nev-v2] #nevNoteDiffPanel {
    grid-area: right;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--nev2-surface-1);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-legend {
    grid-area: legend;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 6px 18px;
    border-bottom: 1px solid var(--dr-crater, #5A453A);
    background: var(--nev2-surface-1);
    font: 400 10px/1.4 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host {
    grid-area: finalize;
    position: static;               /* pinned by grid, not by right shell */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--dr-crater, #5A453A);
    background: var(--nev2-surface-1);
}
#noteEvolutionTakeover[data-nev-v2] .nev-evidence-drawer { grid-area: evidence; }
#noteEvolutionTakeover[data-nev-v2] .nev-audit-drawer    { grid-area: audit; }

/* ============================================================================
   2. HIDDEN LEGACY HOSTS — still mounted, still painted (the projection
   reads #nevBaseNote's DOM; the dormant queue is the flag-OFF fallback),
   never displayed under v2. Read-through gate is rebound to .nev2-note-scroll
   in JS, so the zero-height auto-pass path is closed.
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] .nev-base-note-host,
#noteEvolutionTakeover[data-nev-v2] .nev-review-queue-host,
#noteEvolutionTakeover[data-nev-v2] #nevFullNotePanel,
#noteEvolutionTakeover[data-nev-v2] .nev-right-shell,
#noteEvolutionTakeover[data-nev-v2] .nev-problem-review,
#noteEvolutionTakeover[data-nev-v2] .nev-view-switch,
#noteEvolutionTakeover[data-nev-v2] .nev-provenance-overlay,
#noteEvolutionTakeover[data-nev-v2] .nev-provenance-dock-top,
#noteEvolutionTakeover[data-nev-v2] .nev-provenance-dock-bottom {
    display: none !important;   /* defense-in-depth: hidden surfaces must never
                                   paint over v2 (mirrors body[data-takeover-active]
                                   rail-hide convention) */
}

/* Under v2 the takeover runs in pinned `full-note` review mode so the
   read-through gate + finalize logic keep working unmodified. But the
   legacy full-note rules (note-evolution-takeover.css:659-676) HIDE the
   middle column and reposition the legacy right column — under v2 the
   middle column IS the tapestry face and must stay visible. This sheet
   loads after the legacy one at equal specificity, so these win by source
   order and restore the v2 layout. */
#noteEvolutionTakeover[data-nev-v2][data-review-mode="full-note"]
    .nev-column[data-column="middle"] {
    display: flex;
    flex-direction: column;
}
#noteEvolutionTakeover[data-nev-v2][data-review-mode="full-note"]
    .nev-column[data-column="right"] {
    /* legacy full-note spans the old right column across cols 2-4; under v2
       #nevFullNotePanel is hidden entirely, but neutralize the reposition
       so it can never claim the tapestry's grid area. */
    grid-column: auto;
    grid-row: auto;
}

/* ============================================================================
   3. TAPESTRY FACE — full-composition geometry for the promoted band.
   Overrides the embedded 220/84 compaction; all interaction contracts
   (day spine, knots, ledger bridge, keyboard XOR) are untouched JS.
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] .nev-tap-wv {
    --wv-label-w: 240px;
    --wv-now-w: 120px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] .nev-column-body {
    overflow: auto;
    min-height: 0;
    /* Legacy body is flex-basis 0 (fill the fixed grid row). Under v2's
       auto/content-sized band that collapses to header height — size by
       CONTENT instead; the column's bounded max-height provides the cap. */
    flex: 0 1 auto;
}

/* The inner Course Tapestry already owns the title, source ladder, hospital
   day, toolbar, and day spine. The legacy outer "Hospital Course" strip is
   duplicate nesting under v2, so flatten it and tighten only the surrounding
   chrome. Type scale and all lane/day geometry remain unchanged. */
#noteEvolutionTakeover[data-nev-v2]
    .nev-column[data-column="middle"] > .nev-column-header {
    display: none;
}
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-header {
    padding: 8px 14px 7px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-hd-id { gap: 3px; }
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv .nev-tap-toolbar {
    padding: 5px 14px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-day {
    padding: 4px 2px 6px;
}

/* Historical focus: honest full-band recede + banner (positional partial
   veil deliberately rejected — fragile under horizontal day scroll). */
#noteEvolutionTakeover[data-nev-v2][data-temporal-mode="historical"]
    .nev-column[data-column="middle"] {
    opacity: 0.82;
    box-shadow: inset 0 0 0 1px rgba(230, 154, 76, 0.28);
}
#noteEvolutionTakeover[data-nev-v2][data-temporal-mode="historical"]
    .nev2-legend .nev2-legend-live { display: none; }
#noteEvolutionTakeover[data-nev-v2] .nev2-asof {
    display: none;
    align-items: center;
    gap: 10px;
    font: 600 10px/1.4 var(--dr-font-mono);
    letter-spacing: 0.05em;
    color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2][data-temporal-mode="historical"] .nev2-asof {
    display: inline-flex;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-asof::before {
    content: "READ-ONLY HISTORICAL PROJECTION · AS OF " attr(data-asof-day);
    border: 1px dashed rgba(230, 154, 76, 0.45);
    border-radius: 2px;
    padding: 3px 7px;
}

/* ============================================================================
   4. LEFT COLUMN — Today's Update raised plane. Pure skin over the
   LivingUpdateColumn's shipped class hooks; zero LUC markup changes.
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="left"] .nev-column-body {
    /* The unified voice bar remains fixed and visible below this column.
       Reserve its footprint inside the flex content box so the composer
       actions finish above the bar rather than painting underneath it. */
    padding: 13px 14px 84px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-living-update {
    border-radius: 5px;
    border: 1px solid rgba(230, 154, 76, 0.3);
    background: linear-gradient(170deg, #211510, #170E09);
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.8),
                0 0 20px rgba(230, 154, 76, 0.05);
    padding: 12px 13px 11px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-entry-textarea {
    background: var(--nev2-surface-0);
    border: 1px solid var(--dr-crater-deep, #3C2A21);
    border-radius: 2px;
    color: var(--dr-bone, #EBE1D7);
    font: 400 10.5px/1.5 var(--dr-font-mono);
}
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: baseline;
    padding: 5px 8px 5px 6px;
    border-radius: 2px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card.is-traceability-source,
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card.is-fanin-spotlight {
    background: rgba(230, 154, 76, 0.07);
    box-shadow: inset 2px 0 0 var(--dr-amber, #E69A4C);
}
/* Turn-8 deferred item — VOICE STRIP ONLY-WHILE-DICTATING. The strip's
   status text has no live producer ("Voice idle." forever) and the mic
   bars pulsed while idle: a false LISTENING signal on the doctor's
   working surface. The live-dictation truth signal is the ghost's
   .is-active class (interim transcript flowing) — the strip is its
   adjacent sibling, so this is pure CSS, zero LUC edits. */
#noteEvolutionTakeover[data-nev-v2] .nev-voice-strip {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 1px dashed rgba(230, 154, 76, 0.45);
    border-radius: 2px;
    background: rgba(230, 154, 76, 0.04);
}
#noteEvolutionTakeover[data-nev-v2] .nev-voice-ghost.is-active + .nev-voice-strip {
    display: flex;
}
/* The dead "Voice idle." string never paints under v2; the strip's only
   visible state IS dictation, so the label states it. */
#noteEvolutionTakeover[data-nev-v2] .nev-voice-strip .nev-voice-status {
    display: none;
}
#noteEvolutionTakeover[data-nev-v2] .nev-voice-strip::after {
    content: "LISTENING";
    font: 600 8.5px/1 var(--dr-font-mono);
    letter-spacing: 0.14em;
    color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev-voice-strip::before {
    content: "";
    width: 2px;
    height: 12px;
    background: var(--dr-amber, #E69A4C);
    box-shadow: 5px 0 0 var(--dr-amber, #E69A4C), 10px 0 0 var(--dr-amber, #E69A4C);
    animation: nev2MicBar 0.9s ease-in-out infinite;
    transform-origin: bottom;
}
#noteEvolutionTakeover[data-nev-v2] .nev-voice-ghost {
    font-style: italic;
    color: var(--dr-warm, #F0E6D0);
}
@keyframes nev2MicBar {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1); }
}

/* Open Loops panel (display-only; ENABLE_OPEN_LOOPS) */
#noteEvolutionTakeover[data-nev-v2] .nev2-open-loops {
    margin-top: 11px;
    padding: 0 3px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-open-loops[hidden] { display: none; }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font: 600 8.5px/1 var(--dr-font-mono);
    letter-spacing: 0.1em;
    color: var(--dr-brass, #BFA162);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-sub {
    font: 400 8px/1 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
    letter-spacing: 0;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 8px 3px 6px;
    border-radius: 2px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row[data-loop-state="closed"] { opacity: 0.62; }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row.is-lit {
    opacity: 1;
    background: rgba(230, 154, 76, 0.07);
    box-shadow: inset 2px 0 0 var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-glyph {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex: none;
    align-self: center;
    display: grid;
    place-items: center;
    font: 600 7.5px/1 var(--dr-font-mono);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row[data-loop-state="closed"] .nev2-ol-glyph {
    color: var(--dr-teal, #4CC4B4);
    border: 1px solid var(--dr-teal, #4CC4B4);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row[data-loop-state="open"] .nev2-ol-glyph {
    color: var(--dr-amber, #E69A4C);
    border: 1px dashed var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-plan {
    font: 400 9px/1.4 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40%;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-result {
    font: 400 9.5px/1.4 var(--dr-font-body);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row[data-loop-state="closed"] .nev2-ol-result { color: var(--dr-bone, #EBE1D7); }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row[data-loop-state="open"] .nev2-ol-result { color: var(--dr-mocha, #8B7355); }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-more {
    background: transparent;
    border: 0;
    padding: 2px 6px;
    color: var(--dr-brass, #BFA162);
    font: 400 8px/1 var(--dr-font-mono);
    text-decoration: underline;
    cursor: pointer;
}
#noteEvolutionTakeover[data-nev-v2][data-temporal-mode="historical"] .nev2-open-loops {
    display: none;   /* loops are today-semantics */
}

/* ============================================================================
   5. NOTE-AS-DIFF COLUMN — v2 section chrome wrapping the shipped
   renderProblemBandNote output. Patch-state visuals ride data-state.
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] .nev2-note-head {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 11px 14px 9px;
    border-bottom: 1px solid var(--dr-crater-deep, #3C2A21);
    font: 600 9px/1 var(--dr-font-mono);
    letter-spacing: 0.08em;
    color: var(--dr-mocha, #8B7355);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-head .nev2-arrow { color: var(--dr-amber, #E69A4C); font-weight: 700; }
#noteEvolutionTakeover[data-nev-v2] .nev2-note-head .nev2-today { color: var(--dr-brass, #BFA162); }
#noteEvolutionTakeover[data-nev-v2] .nev2-progress {
    height: 3px;
    border-radius: 2px;
    background: rgba(107, 86, 74, 0.25);
    position: relative;
    overflow: hidden;
    margin: 7px 14px 0;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-progress > span {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--dr-teal, #4CC4B4);
    opacity: 0.75;
    transition: width 240ms ease-out;
}

#noteEvolutionTakeover[data-nev-v2] .nev2-note-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 12px;
    display: grid;
    gap: 8px;
    align-content: start;
}

#noteEvolutionTakeover[data-nev-v2] .nev2-section {
    border-left: 2px solid transparent;
    border-radius: 0 2px 2px 0;
    padding: 7px 10px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"] {
    border-left-color: rgba(230, 154, 76, 0.67);
    background: rgba(230, 154, 76, 0.04);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"][data-high-risk] {
    border-left-color: rgba(218, 165, 32, 0.67);
    background: rgba(218, 165, 32, 0.04);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="accepted"],
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="accepted-edit"] {
    border-left-color: rgba(76, 196, 180, 0.67);
    background: rgba(76, 196, 180, 0.04);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="rejected"] {
    opacity: 0.6;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="carried"] {
    opacity: 0.8;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section.is-lit {
    background: rgba(230, 154, 76, 0.06);
    border-left-color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section.is-flash {
    animation: nev2FlashPulse 0.9s ease-in-out 2;
}
@keyframes nev2FlashPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 154, 76, 0); }
    50%      { box-shadow: 0 0 0 3px rgba(230, 154, 76, 0.35); }
}

#noteEvolutionTakeover[data-nev-v2] .nev2-section-title-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section-title {
    font: 600 11px/1.2 var(--dr-font-heading);
    color: var(--dr-crema, #FFF7EE);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tag {
    font: 600 7px/1 var(--dr-font-mono);
    border: 1px solid var(--dr-crater, #5A453A);
    border-radius: 2px;
    padding: 2px 4px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    color: var(--dr-mocha, #8B7355);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tag[data-tag="pending"]  { color: var(--dr-amber, #E69A4C);  border-color: rgba(230, 154, 76, 0.45); }
#noteEvolutionTakeover[data-nev-v2] .nev2-tag[data-tag="amended"]  { color: var(--dr-teal, #4CC4B4);   border-color: rgba(76, 196, 180, 0.4); }
#noteEvolutionTakeover[data-nev-v2] .nev2-tag[data-tag="edited"]   { color: var(--dr-gold, #DAA520);   border-color: rgba(218, 165, 32, 0.45); }
#noteEvolutionTakeover[data-nev-v2] .nev2-tag[data-tag="rejected"] { color: var(--dr-mocha, #8B7355);  border-color: var(--dr-crater, #5A453A); }
#noteEvolutionTakeover[data-nev-v2] .nev2-tag[data-tag="new"]      { color: var(--dr-sienna, #C75B39); border-color: rgba(199, 91, 57, 0.5); }
#noteEvolutionTakeover[data-nev-v2] .nev2-tag[data-tag="high-risk"]{ color: var(--dr-gold, #DAA520);   border-color: rgba(218, 165, 32, 0.5); font-weight: 700; }
#noteEvolutionTakeover[data-nev-v2] .nev2-entry-ref {
    margin-left: auto;
    font: 400 8px/1 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
    white-space: nowrap;
}

/* diff typography: strikethrough prior, plus-line today, "was:" memory */
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"] .nev-bn-old-line,
#noteEvolutionTakeover[data-nev-v2] .nev2-prior {
    font: 400 9.5px/1.5 var(--dr-font-body);
    color: var(--dr-mocha, #8B7355);
    text-decoration: line-through;
    opacity: 0.7;
    margin-top: 4px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section .nev-bn-patch-line--projection {
    font: 400 10px/1.55 var(--dr-font-body);
    color: var(--dr-warm, #F0E6D0);
    margin-top: 3px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"]
    .nev-bn-patch-line--projection::before {
    content: "+ ";
    font: 700 9px/1 var(--dr-font-mono);
    color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-was {
    font: 400 8.5px/1.5 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
    opacity: 0.75;
    margin-top: 3px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-no-prior {
    font: 400 8.5px/1.4 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
    opacity: 0.8;
    margin-top: 4px;
}

/* partial claim-support strip (role=alert; bulk always skips) */
#noteEvolutionTakeover[data-nev-v2] .nev-claim-partial-strip,
#noteEvolutionTakeover[data-nev-v2] .nev2-partial {
    margin-top: 5px;
    border: 1px dashed rgba(218, 165, 32, 0.5);
    border-radius: 2px;
    padding: 4px 7px;
    font: 400 8px/1.5 var(--dr-font-mono);
    color: var(--dr-gold, #DAA520);
}

/* unanchored tray */
#noteEvolutionTakeover[data-nev-v2] .nev2-tray {
    margin: 6px 12px 10px;
    border: 1px dashed rgba(230, 154, 76, 0.5);
    border-radius: 3px;
    background: rgba(13, 9, 6, 0.5);
    padding: 9px 11px;
    display: grid;
    gap: 6px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tray-head {
    font: 700 8px/1 var(--dr-font-mono);
    letter-spacing: 0.07em;
    color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tray .nev-target-picker { margin-top: 2px; }

/* action rows: restyle the shipped .nev-bn-ab-row buttons */
#noteEvolutionTakeover[data-nev-v2] .nev2-section .nev-bn-ab-row button,
#noteEvolutionTakeover[data-nev-v2] .nev2-tray .nev-bn-ab-row button {
    border-radius: 2px;
    font: 600 8.5px/1 var(--dr-font-mono);
    letter-spacing: 0.05em;
    padding: 5px 10px;
    cursor: pointer;
}

/* pane notices pinned at column top (failed/empty round — never silent) */
#noteEvolutionTakeover[data-nev-v2] .nev2-pane-notice {
    margin: 8px 12px 0;
    padding: 6px 9px;
    border-radius: 2px;
    font: 400 9px/1.5 var(--dr-font-mono);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-pane-notice[data-kind="error"] {
    border: 1px solid rgba(196, 76, 76, 0.5);
    color: var(--dr-scarlet, #C44C4C);
    background: rgba(196, 76, 76, 0.05);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-pane-notice[data-kind="empty"] {
    border: 1px solid var(--dr-crater, #5A453A);
    color: var(--dr-mocha, #8B7355);
}

/* column header controls: bulk, filters, skipped, audit */
#noteEvolutionTakeover[data-nev-v2] .nev2-note-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 12px;
    border-bottom: 1px solid var(--dr-crater-deep, #3C2A21);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-controls button {
    background: transparent;
    border: 1px solid var(--dr-crater, #5A453A);
    border-radius: 2px;
    color: var(--dr-mocha, #8B7355);
    font: 400 8.5px/1 var(--dr-font-mono);
    padding: 4px 8px;
    cursor: pointer;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-controls button:hover { color: var(--dr-bone, #EBE1D7); }
#noteEvolutionTakeover[data-nev-v2] .nev2-note-controls button[aria-pressed="true"] {
    color: var(--dr-amber, #E69A4C);
    border-color: rgba(230, 154, 76, 0.5);
    background: rgba(230, 154, 76, 0.08);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section.is-filtered-out { opacity: 0.25; }

/* footer contract line */
#noteEvolutionTakeover[data-nev-v2] .nev2-note-foot {
    padding: 8px 14px;
    border-top: 1px solid var(--dr-crater-deep, #3C2A21);
    font: 400 8px/1.5 var(--dr-font-mono);
    color: var(--dr-mocha, #8B7355);
}

/* ============================================================================
   6. HEADER + FINALIZE BAR STATES
   ========================================================================= */

#noteEvolutionTakeover[data-nev-v2] .nev-takeover-header {
    background: linear-gradient(180deg, var(--nev2-surface-5), #130D08);
}
#noteEvolutionTakeover[data-nev-v2] .nev-state-chip {
    border-radius: 9px;
    padding: 3px 8px;
    font: 700 8px/1 var(--dr-font-mono);
    letter-spacing: 0.07em;
}
#noteEvolutionTakeover[data-nev-v2] .nev-state-chip[data-nev-state="review"] {
    color: var(--dr-amber, #E69A4C);
    border: 1px solid rgba(230, 154, 76, 0.55);
    background: rgba(230, 154, 76, 0.08);
    animation: nev2DotPulse 1.5s ease-in-out infinite;
}
#noteEvolutionTakeover[data-nev-v2] .nev-state-chip[data-nev-state="finalize-ready"] {
    color: var(--dr-teal, #4CC4B4);
    border: 1px solid rgba(76, 196, 180, 0.45);
}
@keyframes nev2DotPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host[data-state="blocked"] .nev-finalize-status {
    color: var(--dr-sienna, #C75B39);
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host[data-state="blocked"]::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dr-sienna, #C75B39);
    animation: nev2DotPulse 1.5s ease-in-out infinite;
    flex: none;
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host[data-state="ready"] {
    box-shadow: 0 0 18px rgba(76, 196, 180, 0.12);
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host[data-state="ready"] .nev-finalize-cta-btn:not(:disabled) {
    background: var(--dr-teal, #4CC4B4);
    color: #120C06;
    border: 1px solid var(--dr-teal, #4CC4B4);
    font-weight: 700;
    letter-spacing: 0.07em;
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host .nev-jump-blocker-btn {
    border: 1px solid var(--dr-crater, #5A453A);
    background: transparent;
    color: var(--dr-bone, #EBE1D7);
    border-radius: 2px;
    font: 400 8.5px/1 var(--dr-font-mono);
    padding: 7px 10px;
}

/* ============================================================================
   7. NARROW FALLBACKS — mirror the legacy breakpoints' intent
   ========================================================================= */

/* ============================================================================
   8. PROPORTION & DENSITY CONTRACT (EVOLUTION-PROPORTION-HANDOFF.md, Turn 8)
   "The design is a fixed-density instrument; the app rendered it as a
   fluid page." Reference render: Day One Skeleton.dc.html.
   ========================================================================= */

/* §1 The instrument sits centered on the desk — but the desk is THE
   DOCTOR'S (2026-07-12 override of the 1560px handoff cap): on a 2560px
   display the workspace uses the width. Interior density stays fixed —
   the day axis never stretches; the freed width goes to the note area,
   where sections SPREAD into columns like sheets laid out on a desk. */
#noteEvolutionTakeover[data-nev-v2] {
    max-width: 2280px;
    margin: 0 auto;
    width: 100%;
}

/* The desk spread: at wide widths, note sections tile side by side
   (each problem a sheet); full-width surfaces (BHC band, round notices,
   unanchored tray, anything non-section) span the whole desk. */
#noteEvolutionTakeover[data-nev-v2] .nev2-note-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
    gap: 10px 16px;
    align-content: start;
    align-items: start;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-scroll > :not(.nev2-section) {
    grid-column: 1 / -1;
}

/* §1 The time axis is EARNED: field width = max(display units,14) × 28px,
   board sits left. Exact days use one unit; the long-stay admission/range
   disclosures use weighted units from the renderer. Cap the lane middle
   track instead of letting 1fr smear a short course across the screen. */
/* 2026-07-12 review fix (Codex finding 1): the middle-track cap must hit
   every label|track|now ROW — lane, day SPINE, and PHASES band — never
   .nev-tap-wv-days (that is the day-CELL container inside the spine's
   middle column; giving it the 3-col template handed its first three day
   cells the label/track/now widths and left the header misaligned with
   the lane ink). With the spine capped, the day cells (real + inert
   future fillers) divide the same 28px field the segments divide. */
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] .nev-tap-wv-lane,
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] .nev-tap-wv-spine,
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] .nev-tap-wv-phases {
    grid-template-columns:
        var(--wv-label-w)
        minmax(0, calc(max(var(--wv-days, 14), 14) * 28px))
        var(--wv-now-w);
    justify-content: start;
}

/* §1 follow-up — onset-stub ink rule support. Day-header cells beyond the
   stay are the empty future field: inert spans the renderer appends so the
   header grid stays aligned with the track's per-day gradient. No label,
   no affordance — the field simply continues ahead of the ink. */
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-day.future {
    pointer-events: none;
    background: none;
    border: 0;
}

/* §Z4 follow-up — patient-level fold. The fold button reuses the shipped
   .nev-tap-wv-fold chrome (chronic fold); expanded quiet rows sit in a
   slightly recessed plane so they read as background context, not board. */
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-pfold {
    opacity: 0.75;
}

/* §1 Type floor: "AI agents default tiny; the project does not." Keep the
   ratios, raise the floor. One uniform raise for the embedded weave
   (preserves the 28px-grid alignment because zoom scales all px). */
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] .nev-tap {
    zoom: 1.15;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-scroll {
    font: 400 15px/1.55 var(--dr-font-body);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section .nev-bn-problem-title,
#noteEvolutionTakeover[data-nev-v2] .nev2-section-title {
    font: 600 16px/1.3 var(--dr-font-heading);
    color: var(--dr-crema, #FFF7EE);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section .nev-bn-patch-line--projection,
#noteEvolutionTakeover[data-nev-v2] .nev2-prior {
    font-size: 15px;
    line-height: 1.55;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-legend,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-foot,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-head,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-counts,
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-plan,
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-sub {
    font-size: 10.5px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-result { font-size: 11.5px; }
#noteEvolutionTakeover[data-nev-v2] .nev-entry-textarea {
    font: 400 15px/1.55 var(--dr-font-body);
    min-height: 96px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card .nev-entry-text {
    font-size: 13px;
    line-height: 1.5;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tag { font-size: 9.5px; padding: 3px 5px; }

/* §5 Chrome leaks: internal zone names never print in the UI. */
#noteEvolutionTakeover[data-nev-v2] .nev-column-eyebrow { display: none; }

/* §4 Color discipline: teal is LIVE-STATE only — the Rx Coverage button
   is chrome, not state. */
#noteEvolutionTakeover[data-nev-v2] .nev-formulary-toggle {
    border: 1px solid var(--dr-crater, #5A453A);
    color: var(--dr-bone, #EBE1D7);
    background: transparent;
    border-radius: 2px;
}

/* §4 System gates are GOLD one-liners, not scarlet panels. Covers the BHC
   safety rejection and keeps the claim-partial strip consistent. */
#noteEvolutionTakeover[data-nev-v2] [data-mount="note-diff"] [role="alert"] {
    background: transparent;
    border: 1px dashed rgba(218, 165, 32, 0.5);
    border-radius: 2px;
    color: var(--dr-gold, #DAA520);
    padding: 7px 10px;
    font: 400 11px/1.5 var(--dr-font-mono);
}
#noteEvolutionTakeover[data-nev-v2] [data-mount="note-diff"] [role="alert"] button {
    border: 1px solid rgba(218, 165, 32, 0.55);
    color: var(--dr-gold, #DAA520);
    background: transparent;
    border-radius: 2px;
    font: 600 10px/1 var(--dr-font-mono);
    padding: 5px 10px;
}

@media (max-width: 1180px) {
    /* The bounded overview keeps both bookends in the initial viewport:
       Admission/D1 at left and the exact recent week/Today at right. At this
       width all day units remain the full 28px; only the identity rails narrow.
       Short exact axes and passive Census preserve their existing scale. */
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"] .nev-tap-wv[data-wv-axis="adaptive"] {
        --wv-label-w: 220px;
        --wv-now-w: 84px;
        min-width: calc(304px + var(--wv-track-min, 644px));
    }
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-lane,
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-spine,
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-phases {
        grid-template-columns:
            var(--wv-label-w)
            minmax(0, var(--wv-track-min, 644px))
            var(--wv-now-w);
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-takeover-body {
        grid-template-columns: 1fr var(--nev-evidence-drawer-width, 0fr) var(--nev-audit-drawer-width, 0fr);
        /* One column cannot show three full clinical substrates at once.
           Scroll the context instead of crushing the note. Every named area
           gets an explicit track so the legacy 320px grid-auto-row can never
           turn Finalize into a giant implicit row. */
        grid-template-rows:
            minmax(420px, 55vh)          /* primary note                   */
            auto                         /* finalize immediately follows  */
            minmax(280px, auto)          /* Today's Update                 */
            clamp(180px, 30vh, 320px)    /* Course Tapestry context        */
            auto;                        /* legend / as-of strip           */
        grid-template-areas:
            "right    evidence audit"
            "finalize evidence audit"
            "left     evidence audit"
            "tapestry evidence audit"
            "legend   evidence audit";
        grid-auto-rows: auto;
        align-content: start;
        overflow-y: auto;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="left"] {
        border-right: 0;
        border-bottom: 1px solid var(--dr-crater, #5A453A);
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] {
        max-height: clamp(180px, 30vh, 320px);
    }
    #noteEvolutionTakeover[data-nev-v2] #nevNoteDiffPanel {
        min-height: 420px;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev2-note-scroll {
        grid-template-columns: minmax(0, 1fr);
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-finalize-host {
        position: sticky;
        bottom: 0;
        z-index: 6;
    }
}

@media (max-width: 900px) {
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"] .nev-tap-wv[data-wv-axis="adaptive"] {
        --wv-label-w: 155px;
        --wv-now-w: 60px;
        min-width: calc(215px + var(--wv-track-compact, 552px));
    }
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-lane,
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-spine,
    #noteEvolutionTakeover[data-nev-v2]
        .nev-column[data-column="middle"]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-phases {
        grid-template-columns:
            var(--wv-label-w)
            minmax(0, var(--wv-track-compact, 552px))
            var(--wv-now-w);
    }
    #noteEvolutionTakeover[data-nev-v2]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-day:not(.range) .d {
        font-size: 10px;
    }
    #noteEvolutionTakeover[data-nev-v2]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-day.long-day .d {
        font-size: 9px;
    }
    #noteEvolutionTakeover[data-nev-v2]
        .nev-tap-wv[data-wv-axis="adaptive"] .nev-tap-wv-day:not(.range) .dt {
        font-size: 6.5px;
    }
}

/* Inline EDIT textarea (workspace-v2 deferred follow-up, 2026-07-12).
   Replaces the browser prompt() for proposed-patch edits under v2 only.
   The editor renders inside the decision block; state-driven, so repaints
   preserve typing. Legacy surfaces keep prompt() untouched. */
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--dr-amber, #E69A4C);
    border-radius: 2px;
    background: var(--nev2-surface-0, #0D0805);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit-text {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 8px 10px;
    border: 1px solid var(--dr-crater, #5A453A);
    border-radius: 2px;
    background: var(--nev2-surface-2, #110B07);
    color: var(--dr-crema, #FFF7EE);
    font: 400 15px/1.55 var(--dr-font-body);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit-text:focus {
    outline: none;
    border-color: var(--dr-amber, #E69A4C);
    box-shadow: 0 0 0 1px rgba(230, 154, 76, 0.35);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit-hint {
    margin-left: auto;
    font: 400 9px/1 var(--dr-font-mono);
    letter-spacing: 0.06em;
    color: var(--dr-mocha, #8B7355);
}

/* Turn-8 §Z1/Z2 short-viewport band budget (2026-07-12, live-measured on a
   1280x720 laptop: header 111px + toolbar 41px + spine 63px consumed 215px
   of the 280px band — ZERO problem lifelines visible; the face showed
   chrome, not course). On short screens the in-band header compresses to
   essentials: the meta line folds (the source-ladder pill keeps the tier
   honesty signal) and the big day numeral drops to inline scale. Tall
   monitors keep the full header. */
@media (max-height: 860px) {
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-hd-meta { display: none; }
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-dayblk .n {
        font: 700 15px/1 var(--dr-font-heading);
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-dayblk {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-header {
        padding: 5px 14px 4px;
    }
}

/* Floating dictation bar (2026-07-12, live-measured overlap: the bar sat ON
   the composer textarea at 1280x720). Two causes, two fixes:
   1. The rail-open horizontal shift (voice-layer.css) still applied while
      the takeover HIDES the rail — re-center on the actual viewport.
   2. At short viewports the v2 grid's row minimums already exceed the
      viewport, so wherever the bar floats it covers working surfaces —
      the short-viewport block below reserves a real bottom strip and
      docks the bar into it. */
/* Desktop-only: the four explicit tracks below match the four-row desktop
   area map. Narrow mode has five intentional rows and its own scroll budget;
   applying this override there used to put Today’s Note on an `auto` row and
   Finalize on the legacy implicit 320px row. */
@media (min-width: 1181px) and (max-height: 860px) {
    /* Band share: the JS clamp floors the band at 280px, which is MORE
       than 34vh on short screens — cap the painted band and its grid row
       together so the working surfaces keep their share. */
    /* Budget reality (live-measured at 1280x720): census chrome + takeover
       header leave the grid body just ~452px. ANY working-row floor
       overflows that and pushes the finalize bar (the safety surface) off
       screen. So on short screens the band slims to 20vh and the working
       row is FLOORLESS — the columns' own overflow scrolling absorbs the
       squeeze, and every surface (band, composer, note, finalize) stays
       on screen and uncovered. */
    #noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] {
        max-height: 20vh;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-takeover-body {
        grid-template-rows:
            min(var(--nev2-band-h, 240px), 20vh) /* tapestry face          */
            auto                                 /* legend / as-of strip   */
            minmax(0, 1fr)                       /* Update; note spans all */
            auto;                                /* finalize bar           */
    }
    /* In-band chrome yields to RIBBONS — at 20vh the band has room for
       the day spine plus one or two lanes, so everything that is not ink
       or scrub folds away: toolbar (view toggles live comfortably on
       taller screens), section labels, and the quiet scaffold/readiness
       rows (the finalize bar and note column carry the same signals). */
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv .nev-tap-toolbar,
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-section,
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-lane.tier-scaffold,
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-fold[data-wv-pfold],
    /* The in-band header too: patient identity lives in the banner, the
       state chip in the takeover header, and the spine itself ends at
       D<today> · NOW — the header row was pure void at this height. */
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-header {
        display: none;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-day {
        padding: 2px 2px 3px;
    }
}

/* Dictation-bar placement is independent of the desktop/narrow grid map.
   Keep it centered on every short viewport; otherwise the legacy rail-open
   shift leaves half the control off-screen in the note-first narrow stack. */
@media (max-height: 860px) {
    body[data-takeover-active="true"] .voice-command-bar {
        left: 50%;
        transform: translateX(-50%);
        bottom: 6px;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-finalize-host {
        justify-content: space-between;
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-finalize-host > :first-child {
        max-width: 30%;
    }
}

/* IDENTITY RAIL (2026-07-12) — ribbons never render without their names.
   The embedded scroller stamps --wv-scroll-x (rAF-synced, v2 face only);
   labels, the spine corner, section captions, and fold rows translate by
   it, visually pinned at the viewport edge while the ink scrolls beneath.
   At rest (wide screens, no scroll) the var is 0px and nothing moves. */
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-label,
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-corner,
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-section,
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-fold {
    transform: translateX(var(--wv-scroll-x, 0px));
    position: relative;
    z-index: 3;
}
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-label,
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-corner {
    background: var(--nev2-surface-2, #110B07);
    box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.65);
}

/* NEW SECTION retarget choice (deferred follow-up #1, 2026-07-12) — the
   unanchored tray's explicit "this is a new problem" option. Dashed NEW
   accent, visually distinct from lane radios: creating is not linking. */
#noteEvolutionTakeover[data-nev-v2] .nev-target-new-section {
    border: 1px dashed var(--dr-magenta, #C45AB3);
    color: var(--dr-magenta, #C45AB3);
    background: rgba(196, 90, 179, 0.06);
}
#noteEvolutionTakeover[data-nev-v2] .nev-target-new-section:hover {
    background: rgba(196, 90, 179, 0.14);
}

/* ROUND IN FLIGHT (2026-07-12, doctor feedback: "the faded propose button
   is too little"). While a propose round streams, the WORKSPACE says so:
   zero JS — every rule keys off the existing state chip via :has(). */
@keyframes nev2ProposeSweep { to { background-position: -200% 0; } }
@keyframes nev2ChipPulse { 50% { box-shadow: 0 0 0 5px rgba(230, 154, 76, 0.22); } }

/* 1. The Propose button works at FULL presence — animated amber sweep,
      never a faded ghost. */
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    .nev-propose-amendments-btn {
    opacity: 1;
    color: var(--dr-void, #120C06);
    border-color: var(--dr-amber, #E69A4C);
    background: linear-gradient(90deg,
        var(--dr-amber, #E69A4C) 0%, #F2C88A 50%, var(--dr-amber, #E69A4C) 100%);
    background-size: 200% 100%;
    animation: nev2ProposeSweep 1.4s linear infinite;
}

/* 2. The note column announces the round across its full width. */
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    #nevNoteDiffPanel::before {
    content: "COMPILING AMENDMENTS — weighing your update against the chart";
    display: flex;
    align-items: center;
    padding: 9px 16px;
    font: 600 10.5px/1 var(--dr-font-mono);
    letter-spacing: 0.14em;
    color: var(--dr-amber, #E69A4C);
    border-bottom: 1px dashed rgba(230, 154, 76, 0.5);
    background: linear-gradient(90deg,
        transparent 0%, rgba(230, 154, 76, 0.12) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: nev2ProposeSweep 1.6s linear infinite;
}

/* 3. The state chip stops whispering. */
#noteEvolutionTakeover[data-nev-v2] .nev-state-chip[data-nev-state="streaming"] {
    color: var(--dr-void, #120C06);
    background: var(--dr-amber, #E69A4C);
    font-weight: 700;
    animation: nev2ChipPulse 1.2s ease-in-out infinite;
}

/* 4. The composer visibly hands off while the round runs. */
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    .nev-entry-composer {
    border-color: rgba(230, 154, 76, 0.45);
}

/* ============================================================================
   9. 2026-07-14 VISUAL POLISH PORT (13a → live 5a) — craft only.
   Source: .handoffs/visual-polish-2026-07-14/HANDOFF.md ("Polish system" +
   "Evolution Workspace port"). Every rule overrides by SOURCE ORDER at equal
   specificity, so nothing here may redeclare a property the narrow-viewport
   media queries above also set on the same selector (grid maps stay put).
   ========================================================================= */

/* --- 9.1 Hairline system: rgba(107,86,74,.22) row dividers,
       rgba(90,69,58,.4) structural zone borders. ------------------------- */
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] {
    border-bottom-color: rgba(90, 69, 58, 0.4);
}
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="left"] {
    border-right-color: rgba(90, 69, 58, 0.4);
    border-bottom-color: rgba(90, 69, 58, 0.4);   /* narrow stack divider */
}
#noteEvolutionTakeover[data-nev-v2] .nev2-legend {
    border-bottom-color: rgba(90, 69, 58, 0.4);
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host {
    border-top-color: rgba(90, 69, 58, 0.4);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-head,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-controls {
    border-bottom-color: rgba(107, 86, 74, 0.22);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-foot {
    border-top-color: rgba(107, 86, 74, 0.22);
}

/* --- 9.2 Legibility floor: nothing meaning-bearing below 11px; secondary
       prose lifts from mocha #8B7355 to warm mid #B9A88F; primary prose
       toward crema #FFF7EE. Timestamps/ids may stay 9.5-10px mono. ------- */
#noteEvolutionTakeover[data-nev-v2] .nev2-legend,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-foot,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-head,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-counts,
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-plan,
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-sub,
#noteEvolutionTakeover[data-nev-v2] .nev2-tag,
#noteEvolutionTakeover[data-nev-v2] .nev2-tray-head,
#noteEvolutionTakeover[data-nev-v2] .nev2-was,
#noteEvolutionTakeover[data-nev-v2] .nev2-no-prior,
#noteEvolutionTakeover[data-nev-v2] .nev2-asof,
#noteEvolutionTakeover[data-nev-v2] .nev-state-chip,
#noteEvolutionTakeover[data-nev-v2] .nev-claim-partial-strip,
#noteEvolutionTakeover[data-nev-v2] .nev2-partial {
    font-size: 11px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-pane-notice { font-size: 11.5px; }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-result   { font-size: 12.5px; }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-head     { font-size: 10px; }
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-more     { font-size: 10px; min-height: 32px; padding: 6px 8px; }
#noteEvolutionTakeover[data-nev-v2] .nev2-entry-ref   { font-size: 9.5px; }  /* id — true metadata */
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit-hint { font-size: 10px; }
#noteEvolutionTakeover[data-nev-v2] .nev-state-chip   { padding: 4px 10px; border-radius: 11px; }
#noteEvolutionTakeover[data-nev-v2] .nev-voice-strip::after {
    font-size: 10px;
    letter-spacing: 0.12em;
}
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    #nevNoteDiffPanel::before {
    font-size: 11px;
}
/* journal entries read at 14px; entry status is meaning-bearing */
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card .nev-entry-text { font-size: 14px; }
#noteEvolutionTakeover[data-nev-v2] .nev-entry-status  { font-size: 11px; }
#noteEvolutionTakeover[data-nev-v2] .nev-entry-time    { font-size: 10px; }
#noteEvolutionTakeover[data-nev-v2] .nev-routing-chip  { font-size: 11px; }
/* secondary prose color lift (mocha stays for decorative/metadata only) */
#noteEvolutionTakeover[data-nev-v2] .nev2-legend,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-head,
#noteEvolutionTakeover[data-nev-v2] .nev2-note-foot,
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-plan,
#noteEvolutionTakeover[data-nev-v2] .nev2-was,
#noteEvolutionTakeover[data-nev-v2] .nev2-no-prior,
#noteEvolutionTakeover[data-nev-v2] .nev2-pane-notice[data-kind="empty"],
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row[data-loop-state="open"] .nev2-ol-result {
    color: #B9A88F;
}

/* --- 9.3 Diff cards (13a item 5) — one calm card per problem.
       Prior: 15px mocha strike + 3px scarlet left rule.
       Proposed: 15px crema + 3px teal (gold when high-risk) left rule.
       Card state = border tint; focal card = tinted gradient. ------------ */
#noteEvolutionTakeover[data-nev-v2] .nev2-section {
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: 3px;
    padding: 9px 12px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"] {
    border-color: rgba(230, 154, 76, 0.28);
    border-left-color: rgba(230, 154, 76, 0.75);
    background: linear-gradient(165deg, rgba(230, 154, 76, 0.07), rgba(230, 154, 76, 0.015));
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"][data-high-risk] {
    border-color: rgba(218, 165, 32, 0.32);
    border-left-color: rgba(218, 165, 32, 0.75);
    background: linear-gradient(165deg, rgba(218, 165, 32, 0.07), rgba(218, 165, 32, 0.015));
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="accepted"],
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="accepted-edit"] {
    border-color: rgba(76, 196, 180, 0.25);
    border-left-color: rgba(76, 196, 180, 0.7);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section.is-lit {
    border-left-color: var(--dr-amber, #E69A4C);
    box-shadow: 0 0 0 3px rgba(230, 154, 76, 0.26);   /* focal accent ring */
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"] .nev-bn-old-line,
#noteEvolutionTakeover[data-nev-v2] .nev2-prior {
    color: var(--dr-mocha, #8B7355);
    border-left: 3px solid rgba(196, 76, 76, 0.7);
    padding-left: 9px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"] .nev-bn-patch-line--projection,
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="accepted"] .nev-bn-patch-line--projection,
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="accepted-edit"] .nev-bn-patch-line--projection {
    color: var(--dr-crema, #FFF7EE);
    border-left: 3px solid var(--dr-teal, #4CC4B4);
    padding-left: 9px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section[data-state="proposed"][data-high-risk]
    .nev-bn-patch-line--projection {
    border-left-color: var(--dr-gold, #DAA520);
}
/* evidence/taxonomy chips: outlined, never filled; floor 11px */
#noteEvolutionTakeover[data-nev-v2] .nev-tax-chip,
#noteEvolutionTakeover[data-nev-v2] .nev-evidence-state,
#noteEvolutionTakeover[data-nev-v2] .nev-origin-badge {
    background: transparent;
    border: 1px solid;             /* currentColor keeps the semantic hue */
    border-radius: 2px;
    padding: 3px 7px;
    font-size: 11px;
}

/* --- 9.4 Hit targets: decision buttons >=40px, primary CTAs 42-44px. --- */
#noteEvolutionTakeover[data-nev-v2] .nev2-section .nev-bn-ab-row button,
#noteEvolutionTakeover[data-nev-v2] .nev2-tray .nev-bn-ab-row button {
    min-height: 40px;
    font-size: 11px;
    padding: 0 14px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-controls button {
    min-height: 40px;
    font-size: 11px;
    padding: 0 12px;
    color: #B9A88F;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-inline-edit-btns button,
#noteEvolutionTakeover[data-nev-v2] .nev-entry-retry-btn,
#noteEvolutionTakeover[data-nev-v2] .nev-target-new-section,
#noteEvolutionTakeover[data-nev-v2] .nev-target-radio,
#noteEvolutionTakeover[data-nev-v2] [data-mount="note-diff"] [role="alert"] button {
    min-height: 40px;
    font-size: 11px;
}
#noteEvolutionTakeover[data-nev-v2] .nev-target-picker-row {
    min-height: 40px;
    align-items: center;
}
#noteEvolutionTakeover[data-nev-v2] .nev-propose-amendments-btn,
#noteEvolutionTakeover[data-nev-v2] .nev-add-entry-btn {
    min-height: 42px;
    font-size: 11.5px;
}

/* --- 9.5 Finalize bar (13a item 8): 44px primary; visibly-disabled keeps
       its label; blocked line is ONE dominant amber statement. ----------- */
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host { min-height: 56px; }
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-cta-btn {
    min-height: 44px;
    font-size: 12px;
    padding: 0 22px;
    letter-spacing: 0.06em;
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-cta-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;          /* label retained — never a silent no-op */
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-status { font-size: 12px; }
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host[data-state="blocked"] .nev-finalize-status {
    color: var(--dr-amber, #E69A4C);   /* amber = acts-on-you-now (was sienna) */
    font-weight: 600;
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host[data-state="blocked"]::before {
    background: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev-finalize-host .nev-jump-blocker-btn {
    min-height: 40px;
    font-size: 11px;
    padding: 0 14px;
}

/* --- 9.6 Docked blocker banner (13a item 3) — amber, top of review, 40px
       jump. Styled here so the moment the banner renders inside the v2
       note column it lands dressed; today it paints in #nevReviewSummary. */
#noteEvolutionTakeover[data-nev-v2] .nev-blocker-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border: 1px solid rgba(230, 154, 76, 0.5);
    border-left: 3px solid var(--dr-amber, #E69A4C);
    border-radius: 2px;
    background: rgba(230, 154, 76, 0.08);
    color: var(--dr-amber, #E69A4C);
    font: 600 12px/1.4 var(--dr-font-body);
    position: sticky;
    top: 0;
    z-index: 5;
}
#noteEvolutionTakeover[data-nev-v2] .nev-blocker-banner .nev-blocker-banner-jump {
    min-height: 40px;
    padding: 0 14px;
    font-size: 11px;
    border: 1px solid rgba(230, 154, 76, 0.55);
    background: transparent;
    color: var(--dr-amber, #E69A4C);
    border-radius: 2px;
    cursor: pointer;
}

/* --- 9.7 Zebra on stacked row lists (journal thread, open loops).
       Guards keep the amber spotlight/traceability washes untouched. ----- */
#noteEvolutionTakeover[data-nev-v2]
    .nev-entry-card:nth-child(even):not(.is-traceability-source):not(.is-fanin-spotlight):not(.is-unanchored) {
    background: rgba(255, 247, 238, 0.015);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-ol-row:nth-child(even):not(.is-lit) {
    background: rgba(255, 247, 238, 0.015);
}

/* --- 9.7b Unanchored journal entry (13a item 4). A still-pending update
       that anchored to no problem flags amber — the doctor routes or
       dismisses it here, never discovers it at Finalize. Hook is stamped
       presentation-only in LivingUpdateColumn._renderEntryCard; mirrors
       the .is-traceability-source wash pattern (§4), 3px left cap per the
       polish system's amber = acts-on-you-now discipline. ---------------- */
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card[data-routing="unanchored"] {
    background: rgba(230, 154, 76, 0.06);
    box-shadow: inset 3px 0 0 var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card[data-routing="unanchored"] .nev-entry-status {
    color: var(--dr-amber, #E69A4C);
    font-weight: 600;
}
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card[data-routing="unanchored"] .nev-entry-meta,
#noteEvolutionTakeover[data-nev-v2] .nev-entry-card[data-routing="unanchored"] .nev-entry-time {
    font-size: 11px;   /* the flagged entry's meta line must be readable */
}

/* --- 9.8 Wide-desk rebalance (F8 groundwork, 13a item 1). Course breathes
       on real monitors; the note NEVER drops below its reading floor.
       min-height guard keeps the short-viewport (<=860px) budget authority.
       NOTE: _nev2SyncBandHeight() caps --nev2-band-h at 420px in JS — the
       raised max-height below is groundwork until the lead raises that
       clamp for wide viewports. ----------------------------------------- */
@media (min-width: 1600px) and (min-height: 861px) {
    #noteEvolutionTakeover[data-nev-v2] .nev-takeover-body {
        grid-template-columns:
            clamp(360px, 27%, 560px)        /* context rail gets real air  */
            minmax(640px, 1fr)              /* note keeps the working plane */
            var(--nev-evidence-drawer-width, 0fr)
            var(--nev-audit-drawer-width, 0fr);
    }
    #noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] {
        max-height: clamp(320px, 40vh, 560px);
    }
}

/* ============================================================================
   10. 2026-07-17 — GENERATING / PRESENTING / MAP-CUE / ENLARGE.
   Doctor feedback: "clinical updates have nearly zero visual cue when
   generating proposals and again when proposals are presented; no cue which
   problems the update maps to; tapestry can't be enlarged."
   ========================================================================= */

/* --- 10a. GENERATING (composer in-flight) — escalate beyond the faint
   border. The composer card itself breathes amber + the textarea recedes;
   both key off the existing state chip via :has() (zero JS state needed). */
@keyframes nev2ComposerGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(230,154,76,.55), 0 0 22px rgba(230,154,76,.10); }
    50%      { box-shadow: 0 0 0 1px rgba(230,154,76,.95), 0 0 34px rgba(230,154,76,.24); }
}
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    .nev-living-update {
    animation: nev2ComposerGlow 1.5s ease-in-out infinite;
    border-color: rgba(230,154,76,.85);
}
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    .nev-entry-composer .nev-entry-textarea,
#noteEvolutionTakeover[data-nev-v2]:has(.nev-state-chip[data-nev-state="streaming"])
    .nev-entry-textarea {
    border-color: rgba(230,154,76,.7);
    background:
        repeating-linear-gradient(115deg,
            rgba(230,154,76,.07) 0 14px, rgba(230,154,76,.02) 14px 28px);
}
/* Composer status line ("compiling…") injected by JS next to the actions. */
#noteEvolutionTakeover[data-nev-v2] .nev2-composer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 600 11px/1 var(--dr-font-mono);
    letter-spacing: .1em;
    color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-composer-status::before {
    content: "";
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--dr-amber, #E69A4C);
    animation: nev2DotPulse 1.1s ease-in-out infinite;
}

/* --- 10b. PRESENTING (proposals arrive) — sections cascade in with a rise
   + settle; the FIRST review render after streaming gets a count banner.
   .is-arriving is stamped by JS only on the streaming→review transition. */
@keyframes nev2SectionIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
#noteEvolutionTakeover[data-nev-v2] .nev2-note-scroll.is-arriving
    .nev2-section[data-state="proposed"] {
    animation: nev2SectionIn .38s cubic-bezier(.2,.7,.3,1) both;
    animation-delay: calc(var(--i, 0) * 55ms);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-present-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font: 600 11px/1.3 var(--dr-font-mono);
    letter-spacing: .1em;
    color: var(--dr-amber, #E69A4C);
    border-bottom: 1px solid rgba(230,154,76,.4);
    background: linear-gradient(90deg, rgba(230,154,76,.14), rgba(230,154,76,.02));
}

/* Language-contract review banner (degrade-not-annihilate, 2026-07-20).
   Unprefixed on purpose: review cards render both inside the v2 takeover and
   the workspace panel. Previously unstyled — the role=alert banner rendered
   as bare inline text with default <mark> yellow. */
.nev-lang-contract-banner {
    display: block;
    margin: 6px 0 8px;
    padding: 7px 12px;
    font: 500 12px/1.45 var(--dr-font-body, inherit);
    color: var(--dr-amber, #E69A4C);
    border: 1px solid rgba(230,154,76,.45);
    border-left: 3px solid var(--dr-amber, #E69A4C);
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(230,154,76,.12), rgba(230,154,76,.03));
}
.nev-lang-contract-banner .nev-lang-phrase {
    background: rgba(230,154,76,.22);
    color: inherit;
    padding: 0 4px;
    border-radius: 3px;
    font-family: var(--dr-font-mono, monospace);
    font-size: 11px;
}

/* --- 10c. MAP-CUE — the current update's mapped problems light up on BOTH
   the tapestry lanes and the note sections. .is-mapped stamped by JS. */
@keyframes nev2LanePulse {
    0%, 100% { box-shadow: inset 3px 0 0 rgba(230,154,76,.9), 0 0 0 0 rgba(230,154,76,.0); }
    50%      { box-shadow: inset 3px 0 0 rgba(230,154,76,.9), 0 0 14px 2px rgba(230,154,76,.28); }
}
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-lane.is-mapped {
    background: rgba(230,154,76,.10);
    animation: nev2LanePulse 1.6s ease-in-out infinite;
}
#noteEvolutionTakeover[data-nev-v2] .nev-tap-wv-lane.is-mapped .nev-tap-wv-label .nm {
    color: var(--dr-amber, #E69A4C);
    font-weight: 600;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-section.is-mapped {
    box-shadow: 0 0 0 2px rgba(230,154,76,.5);
}

/* --- 10d. ENLARGE tapestry — expand affordance on the middle column +
   a lightbox overlay that re-mounts the same weave at full geometry. */
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-expand-btn {
    position: absolute;
    top: 8px; right: 10px;
    z-index: 6;
    min-height: 28px;
    padding: 0 10px;
    font: 600 10px/1 var(--dr-font-mono);
    letter-spacing: .08em;
    color: var(--dr-mocha, #8B7355);
    background: rgba(13,8,5,.72);
    border: 1px solid var(--dr-crater, #5A453A);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .16s ease-out, color .16s, border-color .16s;
}
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"]:hover .nev2-tap-expand-btn,
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-expand-btn:focus-visible {
    opacity: 1;
    color: var(--dr-amber, #E69A4C);
    border-color: rgba(230,154,76,.6);
}
#noteEvolutionTakeover[data-nev-v2] .nev-column[data-column="middle"] { position: relative; }
@keyframes nev2OverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes nev2OverlayCardIn {
    from { opacity: 0; transform: scale(.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8,5,3,.82);
    backdrop-filter: blur(2px);
    animation: nev2OverlayIn .18s ease-out both;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-card {
    width: min(96vw, 1800px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--nev2-surface-2, #110B07);
    border: 1px solid var(--dr-crater, #5A453A);
    border-radius: 4px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
    animation: nev2OverlayCardIn .22s cubic-bezier(.2,.7,.3,1) both;
    overflow: hidden;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--dr-crater, #5A453A);
    font: 600 11px/1 var(--dr-font-mono);
    letter-spacing: .1em;
    color: var(--dr-amber, #E69A4C);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-close {
    margin-left: auto;
    min-height: 32px;
    padding: 0 14px;
    font: 600 11px/1 var(--dr-font-mono);
    color: var(--dr-bone, #EBE1D7);
    background: transparent;
    border: 1px solid var(--dr-crater, #5A453A);
    border-radius: 2px;
    cursor: pointer;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-close:hover {
    color: var(--dr-amber, #E69A4C);
    border-color: rgba(230,154,76,.6);
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-body {
    overflow: auto;
    min-height: 0;
    flex: 1 1 auto;
}
/* The overlay weave reads at full geometry, not the compact band budget. */
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-body .nev-tap-wv {
    --wv-label-w: 300px;
    --wv-now-w: 160px;
}
#noteEvolutionTakeover[data-nev-v2] .nev2-tap-overlay-body .nev-tap-wv-lane {
    min-height: 44px;
}

/* ══ Section 11 — Live-round ghost strip (WS-C3 2026-07-18) ══════════
   Non-canonical pending tiles streamed during a propose round. Torn down
   in proposeAmendments' finally on every exit path; the canonical review
   queue below is untouched until the diff_complete replay. */
.nev2-ghost-strip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px dashed rgba(139, 115, 85, .45);
    border-radius: 6px;
    background: rgba(139, 115, 85, .07);
}
.nev2-ghost-strip:empty { display: none; }
.nev2-ghost-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 11px/1.5 var(--wv-mono, ui-monospace, monospace);
    color: var(--dr-fg-muted, #A89680);
}
.nev2-ghost-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dr-brass, #BFA162);
    flex: none;
}
.nev2-ghost-row.is-working .nev2-ghost-dot {
    animation: nev2-ghost-pulse 1.1s ease-in-out infinite;
}
.nev2-ghost-row.is-arrived .nev2-ghost-dot { background: var(--dr-teal, #4FA8A0); }
.nev2-ghost-row.is-skipped .nev2-ghost-dot { background: rgba(139, 115, 85, .5); }
.nev2-ghost-title {
    color: var(--dr-fg-body, #D8CCBA);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nev2-ghost-state {
    margin-left: auto;
    flex: none;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 9px;
}
.nev2-ghost-row.is-arrived .nev2-ghost-state { color: var(--dr-teal, #4FA8A0); }
@keyframes nev2-ghost-pulse {
    0%, 100% { opacity: .35; }
    50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .nev2-ghost-row.is-working .nev2-ghost-dot { animation: none; }
}

/* B2 pre-propose route map (2026-07-18) */
.nev-route-map {
    min-height: 0;
    font: 10px/1.5 var(--wv-mono, ui-monospace, monospace);
    color: var(--dr-fg-muted, #A89680);
}
.nev-route-map:empty { display: none; }
.nev-route-map .nev-route-count { color: var(--dr-fg-body, #D8CCBA); }
.nev-route-map .nev-route-unanchored {
    color: var(--dr-amber, #C9A227);
    border-bottom: 1px dotted currentColor;
    cursor: help;
}
