/* regime_core.css — shared styles for ALL six shells (NQ/ES × v1/v2 live +
   regime.html / es.html replay). One stylesheet: ZERO drift.
   Layout (GOAL_TOGGLES 2026-06-12, Part 2): the PAGE scrolls vertically when the
   bottom lane stack outgrows the viewport; the chart pane is STICKY (pinned at
   the viewport top, height = --chartH set by the draggable #splitter, persisted
   in the shared profile) and the lanes scroll beneath it; the legend row sticks
   to the viewport bottom. Slide-over DRAWER (☰) + ▾/▴ collapse unchanged. */
:root { --bg:#0e0e12; --panel:#14141b; --ink:#e0e0e6; --muted:#9aa0a6; --line:#2c2c38;
        --long:#22e07a; --short:#ff4d4d; --micro:#e8f0ff; --flip:#ffd000; --conf:#f0a020; }
* { box-sizing:border-box; }
html,body { margin:0; height:auto; min-height:100%; background:var(--bg); color:var(--ink);
            font-family:ui-monospace,Menlo,Consolas,monospace; font-size:13px; }
#wrap { min-height:100vh; display:flex; flex-direction:column; }

/* ── header bar ── */
#bar { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center;
       padding:6px 12px; background:var(--panel); border-bottom:1px solid var(--line); }
#bar b { color:var(--ink); } #bar .mut, .mut { color:var(--muted); }
#daysel { background:#0b0b10; color:var(--flip); border:1px solid var(--line); border-radius:3px;
          font-family:inherit; font-size:12px; padding:2px 6px; cursor:pointer; }
#daysel:hover { border-color:#4c4c5e; }
/* (TRY-036) instrument selector — unified page only (chart.html); same chrome as the day picker */
#instbox { display:inline-flex; gap:5px; align-items:center; white-space:nowrap; }
#instsel { background:#0b0b10; color:var(--long); border:1px solid #3a4a40; border-radius:3px;
           font-family:inherit; font-size:12px; font-weight:600; padding:2px 6px; cursor:pointer; }
#instsel:hover { border-color:#4c8c66; }
#instsel optgroup { color:var(--muted); font-style:normal; font-weight:600; background:#0b0b10; }
#instsel option { color:var(--ink); font-weight:400; }
#studychecks { display:inline-flex; flex-wrap:wrap; gap:3px 10px; align-items:center; }
#studychecks label { color:var(--muted); white-space:nowrap; cursor:pointer; font-size:12px; }
#studychecks input { vertical-align:-2px; }
/* groups: master tri-state checkbox + label, then the group's studies (one row
   order, identical on all six pages) */
#studychecks .grp { display:inline-flex; flex-wrap:wrap; gap:3px 8px; align-items:center;
                    padding:1px 8px 1px 6px; border-left:1px solid var(--line); }
.grphead { color:#c8ccd2; font-weight:600; white-space:nowrap; cursor:pointer; font-size:11.5px;
           letter-spacing:.2px; }
.grphead input { vertical-align:-2px; }
label.noavail, .st-row.noavail { opacity:.42; }
/* preset controls */
#presetbox { display:inline-flex; gap:5px; align-items:center; white-space:nowrap; }
#presetSel { background:#0b0b10; color:var(--conf); border:1px solid var(--line); border-radius:3px;
             font-family:inherit; font-size:12px; padding:2px 6px; cursor:pointer; }
#presetSel:hover { border-color:#4c4c5e; }
#presetSave, #presetReset { background:#0b0b10; color:var(--muted); border:1px solid var(--line);
             border-radius:3px; font:inherit; font-size:10.5px; padding:1px 6px; cursor:pointer; }
#presetSave:hover, #presetReset:hover { border-color:#4c4c5e; color:var(--ink); }
#presetTag { font-size:10px; color:#f0c84a; }
#status { color:var(--muted); margin-left:auto; }
#drawerBtn { background:#0b0b10; color:var(--ink); border:1px solid var(--line); border-radius:4px;
             font:inherit; font-size:14px; line-height:1.3; padding:1px 9px; cursor:pointer; }
#drawerBtn:hover { border-color:#4c4c5e; }

/* legacy top strips: data still computed/written, never shown (operator 2026-06-09 rule). */
#verify,#forward,#prog,#lvlstrip,#aprstrip,#vqstrip,#revstrip,#selstrip,#accept { display:none !important; }

/* ── main area: sticky chart pane on top, natural-height lane stack below.
   --chartH = chart pane height (splitter-set, shared-profile persisted); the
   default leaves room for the trader-preset lane stack on a 1080p viewport. ── */
#mid { flex:1 0 auto; display:flex; }
#leftcol { flex:1; min-width:0; display:flex; flex-direction:column; }
#chartwrap { flex:none; height:var(--chartH, calc(100vh - 360px)); min-height:220px;
             position:sticky; top:0; z-index:4; background:var(--bg); }
#chart { position:absolute; inset:0; }
#shade { position:absolute; inset:0; pointer-events:none; z-index:3; }
/* splitter: sticky directly under the chart pane — grabbable at any scroll */
#splitter { flex:none; height:7px; position:sticky; top:var(--chartH, calc(100vh - 360px));
            z-index:5; cursor:row-resize; touch-action:none; background:#14141b;
            border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
#splitter:hover, #splitter:active { background:#23232e; border-color:#4c4c5e; }
#adaptwrap { flex:none; height:0; position:relative; background:#0b0b10; }
#adapt { position:absolute; inset:0; }

/* ── legend: single compact line, sticky at the viewport bottom ── */
#legend { display:flex; flex-wrap:nowrap; align-items:center; padding:3px 10px;
          background:#101018; border-top:1px solid var(--line);
          position:sticky; bottom:0; z-index:6; margin-top:auto;
          font-size:11.5px; line-height:1.5; overflow-x:auto; white-space:nowrap; }
#legend::-webkit-scrollbar { height:4px; }
#legdyn { display:inline-flex; gap:0 14px; align-items:center; }
#legend .it { white-space:nowrap; }
#adaptBtn { flex:none; background:#0b0b10; color:var(--muted); border:1px solid var(--line);
            border-radius:3px; font:inherit; font-size:10px; padding:0 6px; margin-right:12px; cursor:pointer; }
#adaptBtn:hover { border-color:#4c4c5e; color:var(--ink); }
.sw { display:inline-block; width:14px; height:0; border-top-width:3px;
      border-top-style:solid; vertical-align:middle; margin-right:5px; }
.box { display:inline-block; width:11px; height:11px; vertical-align:middle; margin-right:5px;
       border-radius:2px; }

/* ── ⚡ FAST APPROACH-ALERT HUD (corner, pointer-events:none) ──
   #hudstack = ONE positioned flex column (HUD + bracket strip) so the bracket
   widget stacks DIRECTLY under the HUD at any HUD height — no collision with
   the HUD's steam/thought lines, and it survives the alert study being off. */
#hudstack { position:absolute; top:8px; left:8px; width:262px; z-index:5; pointer-events:none;
            display:flex; flex-direction:column; gap:4px; }
#alertHUD { position:static; width:auto;
            font-size:11px; line-height:1.45; color:var(--ink); display:none;
            background:rgba(10,10,16,0.88); border:1.5px solid #2c2c38; border-radius:7px;
            padding:7px 9px 8px; box-shadow:0 2px 10px rgba(0,0,0,0.5);
            transition:border-color .15s, box-shadow .15s; }
#alertHUD.on { display:block; }
#alertHUD.idle { opacity:0.55; border-color:#23232c; box-shadow:none; }
#alertHUD .ah-hd { display:flex; align-items:center; gap:6px; font-weight:bold; font-size:12px; }
#alertHUD .ah-bolt { font-size:13px; }
#alertHUD .ah-badge { margin-left:auto; padding:1px 7px; border-radius:3px; font-size:9.5px;
                      font-weight:bold; letter-spacing:.6px; }
#alertHUD .ah-lvl { color:#c8ccd2; margin:3px 0 1px; } #alertHUD .ah-lvl b { color:var(--ink); }
#alertHUD .ah-spd { color:var(--muted); font-size:10.5px; margin-bottom:5px; }
#alertHUD .ah-meter { position:relative; height:14px; border-radius:3px; overflow:hidden;
                      background:#16161c; border:1px solid #23232c; }
#alertHUD .ah-hold  { position:absolute; left:0;  top:0; bottom:0; background:rgba(38,166,91,0.55); }
#alertHUD .ah-break { position:absolute; right:0; top:0; bottom:0; background:rgba(224,27,36,0.62); }
#alertHUD .ah-mlab { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
                     font-size:9.5px; font-weight:bold; color:#fff; text-shadow:0 1px 2px #000; }
#alertHUD .ah-read { margin-top:5px; font-size:11px; font-weight:bold; line-height:1.3; }
#alertHUD .ah-read b { color:#fff; }
#alertHUD .ah-sub { margin-top:5px; color:#7e828a; font-size:9.5px; font-style:italic; line-height:1.3; }
/* study "steamhud": ONE ellipsized losing-steam line appended below (never wraps) */
#alertHUD .ah-steam { margin-top:4px; padding-top:3px; border-top:1px solid #23232c;
                      color:#9fb4c8; font-size:10px; white-space:nowrap; overflow:hidden;
                      text-overflow:ellipsis; }
#alertHUD .ah-steam b { font-weight:bold; }
/* study "thoughts": ONE ellipsized machine-thought line below the steam line
   (sev glyph · / ! / ‼ coloured; full feed lives in the drawer) */
#alertHUD .ah-thought { margin-top:4px; padding-top:3px; border-top:1px solid #23232c;
                        color:#a8adb6; font-size:10px; white-space:nowrap; overflow:hidden;
                        text-overflow:ellipsis; }
#alertHUD .ah-thought b { font-weight:bold; }
/* study "liq": ONE ellipsized liquidity vacuum/withdrawal line in the HUD
   (liq_hud, EXACTLY the steam-line treatment) */
#alertHUD .ah-liq { margin-top:4px; padding-top:3px; border-top:1px solid #23232c;
                    color:#b6a3d8; font-size:10px; white-space:nowrap; overflow:hidden;
                    text-overflow:ellipsis; }
#alertHUD .ah-liq b { color:#c084fc; font-weight:bold; }
/* study "heatg": ONE ellipsized heat-gauge (wiggle calibrator) line in the HUD */
#alertHUD .ah-heat { margin-top:4px; padding-top:3px; border-top:1px solid #23232c;
                     color:#d9b08c; font-size:10px; white-space:nowrap; overflow:hidden;
                     text-overflow:ellipsis; }
#alertHUD .ah-heat b { color:#f59e0b; font-weight:bold; }
#alertHUD .ah-holdc { margin-top:4px; padding-top:3px; border-top:1px solid #23232c;
                      color:#cbd5e1; font-size:10px; white-space:nowrap; overflow:hidden;
                      text-overflow:ellipsis; }
#alertHUD .ah-holdc b { font-weight:bold; }
#alertHUD .ah-qty { margin-top:4px; padding-top:3px; border-top:1px solid #23232c;
                    color:#cbd5e1; font-size:10px; white-space:nowrap; overflow:hidden;
                    text-overflow:ellipsis; }
#alertHUD .ah-qty b { font-weight:bold; }
#alertHUD .mut { color:var(--muted); }
#alertHUD.slow { border-color:#2a7d52; box-shadow:0 0 7px rgba(42,125,82,0.25); }
#alertHUD.med  { border-color:#f0a020; box-shadow:0 0 9px rgba(240,160,32,0.30); }
#alertHUD.fast { border-color:#ff4d4d; box-shadow:0 0 14px rgba(255,77,77,0.45);
                 animation:ahpulse 1.1s ease-in-out infinite; }
#alertHUD.fast.strong { border-width:2px; }
@keyframes ahpulse { 0%,100%{ box-shadow:0 0 10px rgba(255,77,77,0.35); }
                     50%{ box-shadow:0 0 20px rgba(255,77,77,0.7); } }

/* ── bracket tug-of-war strip (study "bracket") — one ≤18px glanceable line
      directly under the ⚡ HUD: ▲up-cv/cls · conviction-split bar · cls/cv▼ · weak flag */
#bracketHUD { display:none; align-items:center; gap:6px; height:18px; padding:2px 8px;
              font-size:10px; line-height:1; color:var(--ink); white-space:nowrap; overflow:hidden;
              background:rgba(10,10,16,0.88); border:1px solid #2c2c38; border-radius:6px;
              box-shadow:0 2px 10px rgba(0,0,0,0.5); }
#bracketHUD.on { display:flex; }
#bracketHUD .bk-t { font-weight:bold; flex:none; }
#bracketHUD .bk-bar { flex:1 1 40px; min-width:34px; height:8px; display:flex; overflow:hidden;
                      border-radius:2px; background:#16161c; border:1px solid #23232c; }
#bracketHUD .bk-up, #bracketHUD .bk-dn { height:100%; opacity:0.8; }
#bracketHUD .bk-weak { flex:none; color:#f87171; font-weight:bold; }

/* ── LIVE badge — top-right overlay (live shell only) ── */
#liveBadge { position:absolute; top:8px; right:8px; z-index:6; pointer-events:none;
             font-family:ui-monospace,Menlo,Consolas,monospace; font-size:10.5px; line-height:1.4;
             color:#cfeede; background:rgba(8,12,10,0.86); border:1px solid #1d6b4f;
             border-radius:6px; padding:5px 9px 6px; box-shadow:0 2px 10px rgba(0,0,0,0.5);
             white-space:nowrap; min-width:120px; }
#liveBadge .lb-hd { display:flex; align-items:center; gap:6px; font-weight:bold; color:#34d399; }
#liveBadge .lb-dot { color:#34d399; font-size:11px; animation:livepulse 1.4s ease-in-out infinite; }
#liveBadge.stale { border-color:#7a5b1f; } #liveBadge.stale .lb-hd { color:#fbbf24; }
#liveBadge.stale .lb-dot { color:#fbbf24; animation:none; }
#liveBadge.err { border-color:#7a2230; } #liveBadge.err .lb-hd { color:#f87171; }
#liveBadge.err .lb-dot { color:#f87171; animation:none; }
#liveBadge.standby { border-color:#3b4664; } #liveBadge.standby .lb-hd { color:#8fa3c0; }
#liveBadge.standby .lb-dot { color:#8fa3c0; animation:none; }
#liveBadge .lb-feed { color:#9aa0a6; } #liveBadge .lb-clock { color:#e8f0ff; font-weight:bold; }
#liveBadge .lb-meta { color:#7e828a; margin-top:2px; }
#liveBadge .lb-meta b { color:#c8ccd2; font-weight:normal; }
@keyframes livepulse { 0%,100%{ opacity:1; } 50%{ opacity:0.25; } }

/* ── ACTIVE/MUTED feature chip — top-right NEXT TO the live badge (was top-left,
      where it overlapped the ⚡ alert HUD) ── */
#featBadge { position:absolute; top:8px; right:170px; left:auto; z-index:6; cursor:pointer;
             font-family:ui-monospace,Menlo,Consolas,monospace; font-size:10px; line-height:1.45;
             color:#9aa0a6; background:rgba(8,10,16,0.86); border:1px solid #2c2c38;
             border-radius:6px; padding:4px 8px 5px; max-width:340px;
             box-shadow:0 2px 10px rgba(0,0,0,0.5); }
#featBadge .fb-chip { white-space:nowrap; }
#featBadge .fb-on { color:#34d399; } #featBadge .fb-off { color:#c78bff; }
#featBadge .fb-full { display:none; margin-top:4px; }
#featBadge.open .fb-full { display:block; } #featBadge.open .fb-chip .fb-arrow { transform:rotate(90deg); display:inline-block; }
#featBadge .fb-row { margin:1px 0; }
#featBadge .fb-row .fb-lab { font-weight:bold; }
#featBadge .fb-sub { color:#6f7178; font-style:italic; margin-top:3px; max-width:320px; white-space:normal; }
#featBadge .fb-arrow { color:#7e828a; }

/* ── RIGHT DRAWER (slide-over; replaces the old fixed #side column) ── */
#drawer { position:fixed; top:0; right:0; bottom:0; width:380px; max-width:92vw;
          background:#0b0b10; border-left:1px solid var(--line); z-index:30;
          display:flex; flex-direction:column; transform:translateX(103%);
          transition:transform .16s ease; box-shadow:-6px 0 18px rgba(0,0,0,0.45); }
#drawer.open { transform:none; }
#drawerHead { display:flex; align-items:center; gap:8px; padding:7px 10px;
              border-bottom:1px solid var(--line); color:var(--ink); flex:none; }
#drawerClose { margin-left:auto; background:none; border:1px solid var(--line); color:var(--muted);
               border-radius:3px; font:inherit; cursor:pointer; padding:0 7px; }
#drawerClose:hover { color:var(--ink); border-color:#4c4c5e; }

/* studies panel: checkbox + one-line description per study (the registry renders this) */
#studypanel { flex:none; max-height:40%; overflow:auto; padding:6px 10px 8px;
              border-bottom:1px solid var(--line); }
#studypanel h4 { margin:2px 0 5px; font-size:11.5px; color:var(--muted); font-weight:normal; }
#studypanel .st-grp { margin:7px 0 2px; padding-top:5px; border-top:1px solid var(--line); }
#studypanel .st-grp .grphead b { color:#c8ccd2; font-size:11.5px; }
#studypanel .st-row { margin:3px 0; font-size:11px; line-height:1.45; }
#studypanel .st-row label { cursor:pointer; }
#studypanel .st-row b { color:var(--ink); font-weight:600; }
#studypanel .st-desc { color:#8a8f97; margin:0 0 2px 22px; }

/* machine-thoughts feed (drawer; full narration list — the compact HUD line's
   off-screen big-text surface; click a row → crosshair jumps there) */
#thoughtlist { flex:none; max-height:26%; overflow:auto; border-bottom:1px solid var(--line);
               padding:6px 10px 8px; display:none; }
#thoughtlist h4 { margin:0 0 5px; font-size:12px; color:#9fb4c8; }
#thoughtlist table { border-collapse:collapse; width:100%; font-size:11px; }
#thoughtlist td { padding:1px 6px 1px 0; vertical-align:top; }
#thoughtlist td.tm { color:var(--muted); white-space:nowrap; }
#thoughtlist td.tx { color:#a8adb6; line-height:1.4; }
#thoughtlist .s1 { color:#8a8f97; } #thoughtlist .s2 { color:#fbbf24; } #thoughtlist .s3 { color:#ff6b6b; }
#thoughtlist .s2t { color:#c2c7cf; } #thoughtlist .s3t { color:#e8caca; }
#thoughtlist tr:hover { background:#141420; cursor:pointer; }
#thoughtlist tr.sel { background:#1a1a28; }

/* (TRY-018) compact vanishing-queue verdict (drawer) */
#vqside { flex:none; padding:7px 9px; border-bottom:1px solid var(--line); font-size:11px;
          line-height:1.5; color:var(--muted); background:#0f0a14; }
#vqside h4 { margin:0 0 4px; font-size:11.5px; color:#c78bff; font-weight:bold; }
#vqside b { color:var(--ink); }
#vqside .q { display:inline-block; padding:1px 6px; margin:1px 4px 1px 0; border-radius:3px; border:1px solid var(--line); }
#vqside .ok { color:#34d399; border-color:#1d6b4f; } #vqside .meh { color:#fbbf24; border-color:#7a5b1f; }
#vqside .bad { color:#f87171; border-color:#7a2230; } #vqside .cav { color:#8a8f97; font-style:italic; }

/* salvo-eval panel (drawer; study "salvoview") — HINDSIGHT tables only */
#salvopanel { flex:none; max-height:30%; overflow:auto; padding:6px 10px 8px;
              border-bottom:1px solid var(--line); font-size:11px; display:none;
              line-height:1.5; }
#salvopanel h4 { margin:0 0 4px; font-size:12px; color:#fbbf24; }
#salvopanel h4 .mut { font-weight:normal; font-size:10px; }
#salvopanel .sv-head { margin:1px 0 4px; color:var(--muted); }
#salvopanel .sv-head b { color:var(--ink); }
#salvopanel .pos { color:#34d399; } #salvopanel .neg { color:#f87171; }
#salvopanel table { border-collapse:collapse; font-size:10.5px; }
#salvopanel th { color:var(--muted); font-weight:normal; text-align:right; padding:1px 8px 2px 0; }
#salvopanel td { text-align:right; padding:1px 8px 1px 0; white-space:nowrap; }
#salvopanel td.hl { outline:1px solid #fde68a; outline-offset:-1px; }
#salvopanel .sv-list { width:100%; margin-top:5px; }
#salvopanel .sv-list th { text-align:left; position:sticky; top:0; background:#0b0b10; }
#salvopanel .sv-list td { text-align:left; }
#salvopanel .sv-list tr:hover { background:#161620; cursor:pointer; }
#salvopanel .sv-list tr.sel { background:#1d1d28; }

/* episode-cards panel (drawer; study "epcards") — UPGRADE 7d / IDEAS #31 */
#epcardspanel { flex:none; max-height:34%; overflow:auto; padding:6px 10px 8px;
                border-bottom:1px solid var(--line); font-size:11px; display:none;
                line-height:1.5; }
#epcardspanel h4 { margin:0 0 4px; font-size:12px; color:#7dd3fc; }
#epcardspanel h4 .mut { font-weight:normal; font-size:10px; }
#epcardspanel .pos { color:#34d399; } #epcardspanel .neg { color:#f87171; }
#epcardspanel .epc { border:1px solid var(--line); border-radius:3px; margin:2px 0; }
#epcardspanel .epc.open { background:#101018; }
#epcardspanel .epc-h { padding:1px 6px; cursor:pointer; white-space:nowrap;
                       overflow:hidden; text-overflow:ellipsis; }
#epcardspanel .epc-h:hover { background:#161620; }
#epcardspanel .epc-x { display:inline-block; width:11px; color:var(--muted); }
#epcardspanel .epc-b { padding:0 6px 3px 17px; }
#epcardspanel table { border-collapse:collapse; font-size:10.5px; width:100%; }
#epcardspanel td { text-align:left; padding:0 7px 0 0; white-space:nowrap; }
#epcardspanel td:last-child { white-space:normal; }
#epcardspanel .epc-l tr:hover { background:#161620; cursor:pointer; }
#epcardspanel .epc-l tr.sel { background:#1d1d28; }
#epcardspanel .epc-fr { font-size:9px; color:var(--muted); text-transform:uppercase; }
#epcardspanel .epc-sense .epc-fr { color:#86efac; }
#epcardspanel .epc-memory .epc-fr { color:#fbbf24; }
#epcardspanel .epc-policy .epc-fr { color:#7dd3fc; }

/* hedge weights panel (drawer; study "hedge") — final machine-trust mini bars */
#hedgepanel { flex:none; padding:6px 10px 8px; border-bottom:1px solid var(--line);
              font-size:11px; display:none; line-height:1.5; }
#hedgepanel h4 { margin:0 0 4px; font-size:11.5px; color:#9aa0a6; }
#hedgepanel h4 .mut { font-weight:normal; font-size:10px; }
#hedgepanel .hw-row { display:flex; align-items:center; gap:6px; margin:1px 0; }
#hedgepanel .hw-k { width:52px; color:var(--muted); flex:none; }
#hedgepanel .hw-bar { display:inline-block; height:7px; border-radius:1px; opacity:0.85; flex:none; }
#hedgepanel .hw-v { color:var(--ink); font-size:10px; }

/* entry/approach detail (drawer panel + the floating click-detail card share these rules) */
#flipdetail { flex:none; padding:8px 12px; border-bottom:1px solid var(--line); font-size:11.5px;
              line-height:1.6; min-height:90px; max-height:38%; overflow:auto; }
#flipdetail h4, #detailCard h4 { margin:0 0 6px; font-size:12px; color:var(--flip); }
#flipdetail .k, #detailCard .k { color:var(--muted); }
#flipdetail .v, #detailCard .v { color:var(--ink); }
#flipdetail .ok, #detailCard .ok { color:#34d399; } #flipdetail .bad, #detailCard .bad { color:#f87171; }
#flipdetail .row, #detailCard .row { margin:1px 0; }
#flipdetail .pos, #detailCard .pos { color:#34d399; } #flipdetail .neg, #detailCard .neg { color:#f87171; }
#flipdetail .ens, #detailCard .ens { margin:2px 0 7px; padding:6px 8px; border:1px solid var(--line);
                                     border-radius:4px; background:#0c0c15; }
#flipdetail .ens .note, #detailCard .ens .note { margin-top:4px; color:#8a8f97; font-size:10.5px; line-height:1.4; }
#flipdetail table.grid, #detailCard table.grid { border-collapse:collapse; width:100%; font-size:11px; margin-top:5px; }
#flipdetail table.grid th, #detailCard table.grid th { text-align:right; color:var(--muted); font-weight:normal; padding:2px 6px 3px 0; }
#flipdetail table.grid td, #detailCard table.grid td { text-align:right; padding:1px 6px 1px 0; white-space:nowrap; }
#flipdetail table.grid tr.best td, #detailCard table.grid tr.best td { color:#fde68a; }

/* ext-at-entry vs quality scatter (drawer) */
#extscatter { flex:none; padding:6px 8px; border-bottom:1px solid var(--line); }
#extscatter h4 { margin:0 0 4px; font-size:11px; color:var(--muted); font-weight:normal; }

/* reversal list (drawer) */
#revlist { flex:none; max-height:24%; overflow:auto; border-bottom:1px solid var(--line);
           padding:6px 12px 8px; }
#revlist h4 { margin:0 0 5px; font-size:12px; color:#f0a020; }
#revlist table { border-collapse:collapse; width:100%; font-size:11px; }
#revlist th { text-align:left; color:var(--muted); font-weight:normal; position:sticky; top:0;
              background:#0b0b10; padding:2px 8px 3px 0; }
#revlist td { padding:1px 8px 1px 0; white-space:nowrap; }
#revlist tr.top td.n { color:#ffb84d; font-weight:bold; }
#revlist tr.bot td.n { color:#ffd27a; font-weight:bold; }
#revlist tr:hover { background:#1a1410; cursor:pointer; }
#revlist tr.sel { background:#241a10; }
#revlist td.rev { color:#34d399; } #revlist td.revn { color:#f87171; }

/* entry list (drawer) */
#fliplist { flex:1; overflow:auto; padding:0 6px; }
#fliplist table { border-collapse:collapse; width:100%; font-size:11px; }
#fliplist th { text-align:left; color:var(--muted); font-weight:normal; position:sticky; top:0;
               background:#0b0b10; padding:3px 8px 4px 0; }
#fliplist td { padding:1px 8px 1px 0; white-space:nowrap; }
#fliplist tr.flip td.n { color:var(--flip); font-weight:bold; }
#fliplist tr.long td.n { color:var(--long); font-weight:bold; }
#fliplist tr.short td.n { color:var(--short); font-weight:bold; }
#fliplist tr.sup td { color:#6f7178; }
#fliplist tr.sup td.n { color:#9a6b6b; }
#fliplist tr:hover { background:#161620; cursor:pointer; }
#fliplist tr.sel { background:#1d1d28; }
#fliplist .mfebar { display:inline-block; height:8px; background:#22e07a; vertical-align:middle; border-radius:1px; min-width:1px; }
#fliplist .maebar { display:inline-block; height:8px; background:#ff4d4d; vertical-align:middle; border-radius:1px; min-width:1px; }
#fliplist td.mfe { color:#34d399; } #fliplist td.mae { color:#f87171; }

/* ── floating click-detail card (bottom-left over the chart) ── */
#detailCard { position:absolute; left:8px; bottom:8px; z-index:7; width:430px; max-width:60%;
              max-height:46%; overflow:auto; display:none; font-size:11.5px; line-height:1.55;
              background:rgba(10,10,16,0.94); border:1px solid #2c2c38; border-radius:7px;
              padding:8px 10px; box-shadow:0 2px 12px rgba(0,0,0,0.55); }
#detailCard.on { display:block; }
#detailCard .dc-close { float:right; background:none; border:1px solid var(--line); color:var(--muted);
                        border-radius:3px; cursor:pointer; font:inherit; padding:0 6px; margin:0 0 4px 8px; }
#detailCard .dc-close:hover { color:var(--ink); border-color:#4c4c5e; }

/* ── ?inference=1 — PRISTINE clean-render for the multi-modal vision LLM (GOAL_MULTIMODAL).
   Hides ALL top chrome (study/checkbox/preset bar), the legend, the live/feat badges,
   every HUD text overlay, the splitter and the drawer — leaving ONLY candles, the regime
   tide tint, ◆ levels/VPOC/session-H-L, consolidation/danger zones, the VWMA ribbon and
   the price line. ADDITIVE: inert unless body.inference-mode is set (only by ?inference=1).
   The study set is forced to the doctrine visuals in regime_core.js. ───────────────── */
body.inference-mode #bar,
body.inference-mode #legend,
body.inference-mode #liveBadge,
body.inference-mode #featBadge,
body.inference-mode #hudstack,
body.inference-mode #detailCard,
body.inference-mode #splitter,
body.inference-mode #drawer,
body.inference-mode #drawerBtn,
body.inference-mode #airead { display:none !important; }
/* chart pane takes the full viewport (the lane stack is empty — all lane studies off) */
body.inference-mode #chartwrap { height:100vh !important; }
body.inference-mode #adaptwrap { display:none !important; }

/* ── 🤖 AI read drawer (GOAL_MULTIMODAL) — display/advisory overlay, default-off study ── */
#airead{ position:absolute; top:8px; right:8px; z-index:8; width:340px; max-width:42%;
         max-height:72%; overflow:auto; display:none; background:rgba(11,11,18,0.95);
         border:1px solid #2c2c38; border-radius:8px; box-shadow:0 2px 14px rgba(0,0,0,0.55);
         font-size:11.5px; line-height:1.5; }
#airead .ar-h{ position:sticky; top:0; background:rgba(18,18,27,0.98); border-bottom:1px solid #272733;
         padding:6px 9px; font-weight:600; letter-spacing:.3px; }
#airead .ar-sub{ color:#8a8a9a; font-weight:400; font-size:10px; margin-left:6px; }
#airead .ar-pop{ float:right; color:#8a8a9a; text-decoration:none; font-size:13px; }
#airead .ar-pop:hover{ color:#e8e8f0; }
#airead .ar-body{ padding:8px 9px; }
#airead .ar-empty{ color:#8a8a9a; text-align:center; padding:18px 0; }
#airead .ar-badges{ display:flex; gap:6px; align-items:center; margin-bottom:7px; flex-wrap:wrap; }
#airead .ar-b{ padding:2px 8px; border-radius:5px; font-weight:600; border:1px solid #272733; text-transform:capitalize; }
#airead .ar-long{ background:rgba(34,224,122,.14); color:#22e07a; border-color:rgba(34,224,122,.4); }
#airead .ar-short{ background:rgba(255,77,77,.14); color:#ff4d4d; border-color:rgba(255,77,77,.4); }
#airead .ar-neutral{ background:rgba(138,138,154,.14); color:#aaaab8; }
#airead .ar-c-high{ background:rgba(122,162,255,.16); color:#7aa2ff; border-color:rgba(122,162,255,.4); }
#airead .ar-c-medium{ background:rgba(255,183,77,.14); color:#ffb74d; }
#airead .ar-c-low,#airead .ar-c-chop{ background:rgba(138,138,154,.14); color:#aaaab8; }
#airead .ar-meta{ color:#8a8a9a; margin-left:auto; font-size:10.5px; }
#airead .ar-s{ margin:6px 0; }
#airead .ar-s b{ color:#7aa2ff; font-size:10px; letter-spacing:.5px; margin-right:4px; }
#airead .ar-s ul{ margin:3px 0 0; padding-left:16px; }
#airead .ar-narr{ color:#cfcfda; border-top:1px solid #272733; padding-top:6px; margin-top:7px; }
