
        /* ═══ FULL-BLEED — grid removed for readability ═══ */
        .replica-hud-body-scope {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: var(--bg-base);
            transition: background 0.4s ease;
        }

        /* ═══ SCOPED RESET — only affect HUD elements, not Beehiiv page ═══ */
        #onyx-dashboard *,
        #onyx-dashboard *::before,
        #onyx-dashboard *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        #onyx-dashboard {
            background: transparent;
            width: 100%;
            height: 100vh;
            height: 100dvh;
            margin: 0;
            padding: 0;
            overflow: hidden;
            font-family: var(--font-header);
        }

        /* ═══ MOBILE GATE — desktop-only message ═══ */
        .mobile-gate {
            display: none;
            width: 100% !important;
            min-height: 100vh !important;
            min-height: 100dvh !important;
            min-height: max(100dvh, 900px) !important;
            background: var(--bg-base) !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
            padding: 24px !important;
            margin: 0 !important;
            font-family: var(--font-header) !important;
            box-sizing: border-box !important;
        }
        .mobile-gate * {
            box-sizing: border-box !important;
        }
        .mobile-gate-logo {
            font-family: var(--font-header) !important;
            font-weight: 700 !important;
            font-size: 28px !important;
            color: #555 !important;
            letter-spacing: 0.3em !important;
            margin: 0 0 8px 0 !important;
            padding: 0 !important;
            line-height: 1.2 !important;
        }
        .mobile-gate-version {
            font-family: var(--font-tech) !important;
            font-size: 11px !important;
            color: #999 !important;
            margin: 0 0 40px 0 !important;
            padding: 0 !important;
            line-height: 1.2 !important;
        }
        .mobile-gate-icon {
            width: 64px !important;
            height: 64px !important;
            min-width: 64px !important;
            min-height: 64px !important;
            border: 1.5px solid #999 !important;
            border-radius: 8px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            margin: 0 auto 24px auto !important;
            padding: 0 !important;
            background: rgba(255,255,255,0.3) !important;
        }
        .mobile-gate-icon svg {
            width: 32px !important;
            height: 32px !important;
            min-width: 32px !important;
            min-height: 32px !important;
        }
        .mobile-gate-title {
            font-family: var(--font-header) !important;
            font-weight: 600 !important;
            font-size: 18px !important;
            color: #444 !important;
            margin: 0 0 12px 0 !important;
            padding: 0 !important;
            line-height: 1.3 !important;
        }
        .mobile-gate-msg {
            font-family: var(--font-tech) !important;
            font-size: 12px !important;
            color: #777 !important;
            line-height: 1.8 !important;
            max-width: 280px !important;
            margin: 0 auto !important;
            padding: 0 !important;
        }
        .mobile-gate-line {
            width: 60px !important;
            height: 1px !important;
            background: #BBB !important;
            margin: 24px auto !important;
            padding: 0 !important;
        }
        .mobile-gate-url {
            font-family: var(--font-tech) !important;
            font-size: 11px !important;
            color: #999 !important;
            letter-spacing: 0.05em !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        /* ═══ RESPONSIVE: mobile gate trigger ═══ */
        @media (max-width: 1024px) {
            .replica-hud-body-scope {
                overflow: visible !important;
                height: auto !important;
            }
            .mobile-gate { display: flex !important; }
            .hud-container { display: none !important; }
            .boot-overlay { display: none !important; }
            #onyx-dashboard {
                display: none !important;
            }
        }

        /* ═══ CONTAINER — holds SVG wireframe layer ═══ */
        .hud-container {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        /* ═══ LAYER 1: SVG WIREFRAME ═══ */
        .wireframe-layer {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 1;
        }

        .wireframe-layer svg {
            width: 100%;
            height: 100%;
        }

        /* ══════ BOOT ANIMATION ══════ */
        .hud-container {
            opacity: 0;
        }

        .hud-container.booted {
            opacity: 1;
            transition: opacity 0.3s ease;
        }

        /* ══════ BOOT OVERLAY ══════ */
        .boot-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            width: 100dvw;
            height: 100vh;
            height: 100dvh;
            z-index: 9999;
            background: #1a1a1a;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            cursor: pointer;
            transition: opacity 0.5s ease;
        }

        .boot-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .boot-overlay .boot-title {
            font-family: var(--font-header);
            font-size: 28px;
            font-weight: 300;
            letter-spacing: 8px;
            color: #888;
            text-transform: uppercase;
            margin-bottom: 12px;
        }

        .boot-overlay .boot-sub {
            font-family: var(--font-tech);
            font-size: 12px;
            letter-spacing: 4px;
            color: #555;
            animation: bootPulse 2s ease-in-out infinite;
        }

        @keyframes bootPulse {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 1; }
        }

        /* ══════════════════════════════════════════════════════════════
           BEEHIIV FULL-BLEED OVERRIDE — Desktop (≥1024px)
           ══════════════════════════════════════════════════════════════ */
        @media (min-width: 1024px) {
            #onyx-dashboard.px-beehiiv {
                width: 100% !important;
                max-width: 100% !important;
                overflow: hidden !important;
                box-sizing: border-box !important;
            }
        }

        /* ══════ DESKTOP — scoped HUD dimensions ══════ */
        @media (min-width: 1025px) {
            .replica-hud-body-scope {
                /* removed forced 100vh locks to allow the parent landing page to dictate height */
            }
            .replica-hud-body-scope *::-webkit-scrollbar {
                display: none !important;
            }
            .replica-hud-body-scope * {
                scrollbar-width: none !important;
            }
        }

        /* ══════════════════════════════════════════════════════════════
           PRECISION DRAFTING HUD — CSS Variables & Utility Classes
           ══════════════════════════════════════════════════════════════ */
        :root {
            /* ── Default Fonts ── */
            --font-display: 'Saira', sans-serif;
            --font-tech: 'JetBrains Mono', monospace;
            --font-header: 'Saira', sans-serif;

            /* ── Light Mode (default) ── */
            --bg-base: #E2E2E2;
            --grid-line: #D4D4D4; /* Reverted to lighter/fainter grid lines */
            --bg-paper: #E6E7E8;
            --grid-dim: rgba(0,0,0,0.06);
            --dot-opac: 0.45; /* Much heavier contrast inside SVG grids */
            --line-solid: #3D3D40;
            --line-sec: #6B6D70;
            --line-faint: #9A9C9F;
            --fill-trans: rgba(0,0,0,0.04);
            --fill-mid: rgba(0,0,0,0.08);
            --card-face: #E2E2E2;
            --card-side: #D8D8D8;
            --card-tab: #D4D4D4;
            --card-inner: #C8C8C8;
            --text-up: #5C8A65;
            --text-dn: #A65252;
            --accent-gold: #9E9580;
            --text-gold: #9E9580;
            --pos-muted: hsl(140, 18%, 55%);
            --neg-muted: hsl(0, 18%, 55%);
            --boot-bg: #1a1a1a;
        }

        /* ── Dark Mode (AEROSPACE STANDARD - STRICT NEUTRAL) ── */
        html.dark-mode {
            --bg-base: #121212;       /* Material Matte Charcoal (No Blue Cast) */
            --grid-line: rgba(255, 255, 255, 0.05);
            --bg-paper: #1A1A1A;      /* Elevated Matte Card */
            --grid-dim: rgba(255, 255, 255, 0.02);
            --dot-opac: 0.2; 
            --line-solid: rgba(255, 255, 255, 0.8);
            --line-sec: rgba(255, 255, 255, 0.35);
            --line-faint: rgba(255, 255, 255, 0.12);
            --fill-trans: rgba(255,255,255,0.04);
            --fill-mid: rgba(255,255,255,0.08);
            --card-face: #1E1E1E;
            --card-side: #121212;
            --card-tab: #181818;
            --card-inner: #222222;
            --text-up: #00E676;       /* Material Flat Green */
            --text-dn: #F44336;       /* Material Flat Red */
            --accent-gold: #9B8F6C;   /* Deep Stealth Ash-Gold */
            --text-gold: #9B8F6C;
            --pos-muted: hsl(140, 22%, 38%);
            --neg-muted: hsl(0, 22%, 38%);
            --boot-bg: #121212;
        }

        /* ── Boot overlay ── */
        html.dark-mode .boot-overlay { background: #000 !important; }
        html.dark-mode .boot-overlay .boot-title { color: #666 !important; }
        html.dark-mode .boot-overlay .boot-sub { color: #444 !important; }

        /* ═══ NUCLEAR DARK MODE OVERRIDES ═══
           Forces ALL SVG elements to invert in dark mode.
           This catches elements with no explicit fill (SVG default = black)
           as well as any hardcoded hex colors.
        */

        /* ── ALL SVG text → light color in dark mode ── */
        html.dark-mode #schematic-svg text {
            fill: var(--line-solid) !important;
        }
        /* Muted text stays muted (uses var already, but ensure opacity-based muting) */
        html.dark-mode #schematic-svg text[fill="var(--line-faint)"],
        html.dark-mode #schematic-svg text.rail-label,
        html.dark-mode #schematic-svg text[opacity] {
            fill: var(--line-sec) !important;
        }

        /* ── ALL SVG lines/paths → light strokes in dark mode ── */
        html.dark-mode #schematic-svg line:not([stroke^="var"]):not([class*="s-"]),
        html.dark-mode #schematic-svg path:not([stroke^="var"]):not([class*="s-"]) {
            stroke: var(--line-solid) !important;
        }

        /* ── ALL rectangles with hardcoded light fills → dark in dark mode ── */
        html.dark-mode #schematic-svg rect:not([fill^="var"]):not([fill^="url"]):not([fill="none"]):not([fill="transparent"]):not(.rail-bg) {
            fill: var(--bg-paper) !important;
        }

        /* ── Nav rail ── */
        html.dark-mode .nav-rail-item:hover .rail-bg { fill: rgba(255,255,255,0.08) !important; }
        html.dark-mode .nav-rail-item.active .rail-bg { fill: rgba(255,255,255,0.1) !important; }

        /* ── Ticker tape HTML text ── */
        html.dark-mode #layer-ticker foreignObject div,
        html.dark-mode #layer-ticker foreignObject span {
            color: var(--line-solid) !important;
        }

        /* ── Preserve accent colors (green/red for gains/losses) ── */
        html.dark-mode #schematic-svg text[fill="#2d9d5c"],
        html.dark-mode #schematic-svg text[fill="#16a34a"],
        html.dark-mode #schematic-svg text[fill="#15803d"],
        html.dark-mode #schematic-svg text[fill="#1a8a4a"],
        html.dark-mode #schematic-svg text[fill="#22c55e"] {
            fill: #4ade80 !important;  /* brighter green for dark bg */
        }
        html.dark-mode #schematic-svg text[fill="#dc2626"],
        html.dark-mode #schematic-svg text[fill="#cc2233"],
        html.dark-mode #schematic-svg text[fill="#cc3344"],
        html.dark-mode #schematic-svg text[fill="#ef4444"],
        html.dark-mode #schematic-svg text[fill="#C0392B"] {
            fill: #f87171 !important;  /* brighter red for dark bg */
        }
        /* Gold/amber accents */
        html.dark-mode #schematic-svg text[fill="#AA9052"],
        html.dark-mode #schematic-svg text[fill="#B8860B"],
        html.dark-mode #schematic-svg text[fill="#d4a03c"] {
            fill: #d4a03c !important;
        }

        /* ── Hatch/dot patterns ── */
        html.dark-mode line[stroke="rgba(0,0,0,0.15)"] { stroke: rgba(255,255,255,0.08) !important; }
        html.dark-mode circle[fill="rgba(0,0,0,0.15)"] { fill: rgba(255,255,255,0.1) !important; }

        /* ── Globe ── */
        html.dark-mode .globe-group circle[fill="#000000"] { fill: #0A0A0C !important; }

        /* ═══ NAV WRAPPER — flush docked extrusion ═══ */
        #nav-wrapper {
            position: absolute;
            top: calc(6.875% - 34px);
            left: 50%;
            transform: translateX(-50%);
            z-index: 10000;
            pointer-events: all;
            background: var(--bg-paper);
            border-top: 1px solid var(--line-faint);
            border-left: 1px solid var(--line-faint);
            border-right: 1px solid var(--line-faint);
            border-bottom: none;
            padding: 0 16px;
            height: 34px;
            display: flex;
        }
        
        /* ═══ TOP NAVIGATION BAR — void bounds ═══ */
        #hud-top-nav {
            position: relative;
            display: inline-flex;
            align-items: center;
            background: transparent;
            border: none;
            overflow: visible;
        }

        .nav-tabs {
            display: inline-flex;
            align-items: center;
            height: 100%;
            flex-shrink: 0;
            gap: 32px;
            padding-left: 24px;
            padding-right: 24px;
        }

        .nav-tab {
            position: relative;
            background: transparent;
            border: none;
            color: var(--line-sec);
            font-family: var(--font-tech);
            font-size: 12px;
            letter-spacing: 4px;
            padding: 8px 12px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            white-space: nowrap;
            flex-shrink: 0;
            opacity: 0.6;
        }
        .nav-tab:hover {
            opacity: 0.8;
            color: var(--line-solid);
        }
        .nav-tab.active {
            opacity: 1;
            color: var(--line-solid); 
            text-shadow: 0 0 12px rgba(255,255,255,0.3);
        }
        .nav-tab::before {
            content: '// ';
            opacity: 0.3;
        }
        .nav-tab.active::before {
            content: '// ';
            opacity: 1;
            color: var(--line-solid);
        }

        /* ═══ THEME TOGGLE — independent top-right ═══ */
        #nav-archive-btn {
            position: fixed;
            top: 10px;
            right: 52px;
            z-index: 10001;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            cursor: pointer;
            opacity: 0.4;
            transition: opacity 0.3s ease, border-color 0.3s ease;
            border: 1px solid var(--line-faint);
            border-radius: 2px;
            background: var(--bg-paper);
            padding: 0;
        }
        #nav-archive-btn:hover { opacity: 1; border-color: var(--line-solid); }
        #nav-archive-btn svg {
            width: 14px;
            height: 14px;
            fill: none;
            stroke: var(--accent-gold);
            stroke-width: 1.5;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        #nav-theme-btn {
            position: fixed;
            top: 10px;
            right: 14px;
            z-index: 10001;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            cursor: pointer;
            opacity: 0.4;
            transition: opacity 0.3s ease;
            border: 1px solid var(--line-faint);
            border-radius: 2px;
            background: var(--bg-paper);
            padding: 0;
        }
        #nav-theme-btn:hover { opacity: 1; border-color: var(--line-solid); }
        #nav-theme-btn svg {
            width: 14px;
            height: 14px;
            fill: none;
            stroke: var(--line-solid);
            stroke-width: 1.5;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: stroke 0.3s ease;
        }

        /* SVG Global Styles for ultra-crisp lines */
        .crisp { shape-rendering: crispEdges; }
        .sw-superfaint { stroke-width: 0.35; }
        .sw-faint { stroke-width: 0.7; }
        .sw-thin { stroke-width: 1.25; }
        .sw-med { stroke-width: 2; }
        .sw-line { stroke-width: 3; }

        .s-dark { stroke: var(--line-solid); }
        .s-mid { stroke: var(--line-sec); }
        .s-light { stroke: var(--line-faint); }

        /* Holdings Panel — Aerospace Row Design */
        .holding-row { cursor: crosshair; }
        .holding-row .hover-slab { fill: transparent; stroke: none; transition: fill 0.1s ease; }
        .holding-row:hover .hover-slab { fill: #0c0d10; }
        .holding-row .accent-bar { fill: #333642; stroke: none; transition: fill 0.1s ease; }
        .holding-row:hover .accent-bar { fill: #e6edf3; }
        .h-pri { fill: #6a6e7b; stroke: none; font-size: 11px; font-weight: 700; letter-spacing: 1px; transition: fill 0.1s; font-family: var(--font-tech); }
        .holding-row:hover .h-pri { fill: #ffffff; }
        .h-sub { fill: #484c59; stroke: none; font-size: 8px; font-weight: 500; letter-spacing: 0.5px; font-family: var(--font-tech); }
        .h-mic { fill: #333642; stroke: none; font-size: 7px; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; font-family: var(--font-tech); }
        .h-ghs { fill: #1c1e23; stroke: none; font-size: 6px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; font-family: var(--font-tech); }
        .h-val { fill: #4a4e5c; stroke: none; font-size: 10px; font-weight: 500; letter-spacing: 2px; font-family: var(--font-tech); }
        .s-h-faint { stroke: #16181d; stroke-width: 0.5px; fill: none; }
        .s-h-sec { stroke: #2a2e39; stroke-width: 0.8px; fill: none; }

        /* Slow, precise mechanical animations */
        .pulse { animation: pulse 4s ease-in-out infinite alternate; }
        .pulse-fast { animation: pulse 1.5s ease-in-out infinite alternate; }
        .blink { animation: blink 1s step-end infinite; }
        .blink-fast { animation: blink 0.15s step-end infinite; }

        /* Path drawing simulation */
        .anim-draw {
            stroke-dasharray: 8000;
            stroke-dashoffset: 8000;
            animation: drawLine 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        }
        .anim-draw-delay {
            stroke-dasharray: 8000;
            stroke-dashoffset: 8000;
            animation: drawLine 5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s;
        }

        /* Sweeping scanner bar */
        .scan-bar {
            animation: sweep 6s linear infinite;
        }

        @keyframes pulse { 0% { opacity: 0.2; } 100% { opacity: 1; } }
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
        @keyframes drawLine { 100% { stroke-dashoffset: 0; } }
        @keyframes sweep { 0% { transform: translateX(0px); opacity: 0; } 10% { opacity: 0.8; } 90% { opacity: 0.8; } 100% { transform: translateX(1600px); opacity: 0; } }

        /* Slide Out Interactive Styles */
        .btn-interact { cursor: pointer; pointer-events: all; }
        .btn-interact .bg { transition: fill 0.2s; }
        .btn-interact text { transition: fill 0.2s; }
        .btn-interact:hover .bg { fill: var(--line-solid); }
        .btn-interact:hover text { fill: var(--bg-paper); }

        .slide-panel {
            transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.4s ease;
        }
        .slide-closed { transform: translateX(350px); opacity: 0; pointer-events: none; }
        .slide-open { transform: translateX(0px); opacity: 1; pointer-events: all; }

        /* ══════ TICKER TAPE ══════ */
        @keyframes tickerScroll {
            0%   { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }


        /* ══════ SCAN LINE ANIMATION ══════ */
        @keyframes scanDrift {
            0% { transform: translateY(-100%); opacity: 0; }
            5% { opacity: 0.12; }
            95% { opacity: 0.12; }
            100% { transform: translateY(1600px); opacity: 0; }
        }

        /* ══════ CHART TOGGLE CONTROLS ══════ */
        .chart-toggle { cursor: pointer; pointer-events: all; }

        /* ══════ IDLE PRIVACY SHIELD ══════ */
        #privacy-shield {
            position: absolute;
            left: 4.8%; top: 7.8%;    
            width: 90.4%; height: 83.7%; 
            z-index: 99999;
            background: var(--bg-paper); /* Solid background effectively blanks out the HUD interior */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 1; /* Locked on boot */
            transition: opacity 0.5s ease-out;
            pointer-events: auto;
        }
        #privacy-shield.unlocked {
            opacity: 0;
            pointer-events: none;
        }
        #privacy-canvas {
            display: block;
            margin-bottom: 40px;
        }
        .pin-container {
            display: flex;
            gap: 16px;
        }
        .pin-slot {
            width: 40px; height: 50px;
            border: 1px solid var(--line-faint);
            background: var(--bg-surface);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: var(--font-tech);
            font-size: 24px;
            font-weight: 700;
            color: var(--line-faint);
            box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
            transition: all 0.2s ease;
        }
        .pin-slot.filled {
            color: var(--ghost);
            border-color: var(--ghost);
            text-shadow: 0 0 8px rgba(255,255,255,0.4);
        }
        .pin-slot.success { 
            border-color: var(--text-up); 
            color: var(--text-up); 
            box-shadow: 0 0 15px var(--text-up); 
            text-shadow: 0 0 8px var(--text-up);
        }
        .pin-slot.error { 
            border-color: var(--text-dn); 
            color: var(--text-dn); 
            box-shadow: 0 0 15px var(--text-dn); 
            text-shadow: 0 0 8px var(--text-dn);
        }

        /* ══════ SETTINGS OVERLAY ══════ */
        #cfg-overlay {
            position: absolute;
            inset: 0;
            z-index: 40;
            display: none;
            pointer-events: auto;
            overflow-y: auto;
            overflow-x: hidden;
        }
        #cfg-overlay .cfg-content {
            position: absolute;
            top: 11.5%;
            left: 5%;
            right: 5%;
            bottom: 5%;
            pointer-events: auto;
        }
        #cfg-overlay .cfg-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 18px;
            margin-bottom: 18px;
        }
        #cfg-overlay .cfg-panel {
            border: 0.5px solid var(--line-faint);
            background: rgba(255,255,255,0.008);
            padding: 0;
            position: relative;
        }
        #cfg-overlay .cfg-panel-hdr {
            border-bottom: 0.5px solid var(--line-faint);
            padding: 8px 16px;
            display: flex; justify-content: space-between; align-items: center;
        }
        #cfg-overlay .cfg-panel-hdr .cfg-title {
            font-family: var(--font-header);
            font-size: 11px; letter-spacing: 4px; font-weight: 700;
            color: var(--line-solid);
        }
        #cfg-overlay .cfg-panel-hdr .cfg-sub {
            font-family: var(--font-tech);
            font-size: 9px; letter-spacing: 2px;
            color: var(--line-faint);
        }
        #cfg-overlay .cfg-panel-.replica-hud-body-scope {
            padding: 14px 16px;
        }
        #cfg-overlay .cfg-row {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 14px;
        }
        #cfg-overlay .cfg-row:last-child { margin-bottom: 0; }
        #cfg-overlay .cfg-label {
            font-family: var(--font-tech);
            font-size: 13px; font-weight: 600; letter-spacing: 2px;
            color: var(--line-solid);
        }
        #cfg-overlay .cfg-desc {
            font-family: var(--font-tech);
            font-size: 9px; letter-spacing: 1px;
            color: var(--line-faint); margin-top: 2px;
        }
        #cfg-overlay .cfg-radio-group {
            display: flex; gap: 4px;
        }
        #cfg-overlay .cfg-radio-btn {
            background: transparent; border: 0.5px solid var(--line-faint);
            color: var(--line-sec); cursor: pointer;
            font-family: var(--font-header); font-size: 10px;
            letter-spacing: 2px; font-weight: 500;
            padding: 6px 16px; transition: all 0.15s ease;
        }
        #cfg-overlay .cfg-radio-btn:hover {
            border-color: var(--line-sec);
        }
        #cfg-overlay .cfg-radio-btn.active {
            border-color: var(--accent-gold); color: var(--accent-gold);
            font-weight: 700; background: rgba(201,164,74,0.06);
            border-width: 1.2px;
        }
        #cfg-overlay .cfg-toggle {
            display: flex; align-items: center; gap: 10px; cursor: pointer;
        }
        #cfg-overlay .cfg-toggle-track {
            width: 44px; height: 20px; border: 1px solid var(--line-faint);
            position: relative; transition: all 0.2s ease;
        }
        #cfg-overlay .cfg-toggle-track.on {
            border-color: var(--accent-gold);
            background: rgba(201,164,74,0.1);
        }
        #cfg-overlay .cfg-toggle-thumb {
            position: absolute; top: 2px; width: 16px; height: 16px;
            background: var(--line-sec); transition: all 0.2s ease;
        }
        #cfg-overlay .cfg-toggle-track.on .cfg-toggle-thumb {
            left: auto; right: 2px;
            background: var(--accent-gold);
        }
        #cfg-overlay .cfg-toggle-track:not(.on) .cfg-toggle-thumb {
            left: 2px;
        }
        #cfg-overlay .cfg-toggle-state {
            font-family: var(--font-tech);
            font-size: 10px; letter-spacing: 2px; font-weight: 600;
        }
        #cfg-overlay .cfg-toggle-state.on { color: var(--accent-gold); }
        #cfg-overlay .cfg-toggle-state.off { color: var(--line-faint); }
        #cfg-overlay .cfg-input {
            background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.15);
            color: #e6edf3; font-family: var(--font-tech); font-size: 13px;
            letter-spacing: 2px; padding: 4px 12px; outline: none;
            width: 320px; height: 28px; box-sizing: border-box;
            transition: border-color 0.2s ease;
        }
        #cfg-overlay .cfg-input:focus {
            border-color: var(--accent-gold);
        }
        #cfg-overlay .cfg-input::placeholder {
            color: var(--line-faint); opacity: 0.5;
        }
        #cfg-overlay .cfg-action-btn {
            background: transparent; cursor: pointer;
            font-family: var(--font-header); font-size: 11px;
            letter-spacing: 2px; font-weight: 600; padding: 6px 20px;
            transition: all 0.15s ease;
        }
        #cfg-overlay .cfg-action-btn.danger {
            border: 1px solid var(--text-dn); color: var(--text-dn);
        }
        #cfg-overlay .cfg-action-btn.danger:hover {
            background: rgba(255,85,85,0.08);
        }
        #cfg-overlay .cfg-action-btn.neutral {
            border: 1px solid var(--line-faint); color: var(--line-sec);
        }
        #cfg-overlay .cfg-action-btn.neutral:hover {
            border-color: var(--accent-gold); color: var(--accent-gold);
        }
        #cfg-overlay .cfg-header {
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 0.5px dashed var(--line-faint);
            display: flex; justify-content: space-between; align-items: flex-end;
        }
        #cfg-overlay .cfg-header-left h1 {
            font-family: var(--font-header); font-weight: 300;
            font-size: 38px; letter-spacing: 8px; color: var(--line-solid); margin: 0;
        }
        #cfg-overlay .cfg-header-left h1 span {
            font-weight: 200; color: var(--line-sec);
        }
        #cfg-overlay .cfg-header-right {
            font-family: var(--font-tech); font-size: 10px;
            letter-spacing: 3px; color: var(--line-faint); text-align: right;
            line-height: 1.6;
        }
        #cfg-overlay .cfg-footer {
            margin-top: 18px;
            display: flex; justify-content: space-between;
            font-family: var(--font-tech); font-size: 10px;
            letter-spacing: 3px; color: var(--line-faint);
        }
        /* Corner brackets on panels */
        #cfg-overlay .cfg-panel::before,
        #cfg-overlay .cfg-panel::after {
            content: ''; position: absolute; width: 12px; height: 12px;
            border-color: var(--line-solid); border-style: solid; border-width: 0;
        }
        #cfg-overlay .cfg-panel::before {
            top: -1px; left: -1px;
            border-top-width: 1.2px; border-left-width: 1.2px;
        }
        #cfg-overlay .cfg-panel::after {
            bottom: -1px; right: -1px;
            border-bottom-width: 1.2px; border-right-width: 1.2px;
        }
        .chart-toggle .toggle-bg { transition: fill 0.2s ease; }
        .chart-toggle .toggle-indicator { transition: fill 0.2s ease, opacity 0.2s ease; }
        .chart-toggle:hover .toggle-bg { fill: rgba(0,0,0,0.08) !important; }
        .chart-toggle.off .toggle-indicator { fill: transparent !important; }
        .chart-toggle.off text { fill: var(--line-faint) !important; opacity: 0.5; }

        /* Live price pulse ring */
        @keyframes livePulse {
            0% { opacity: 0.6; transform: scale(1); }
            100% { opacity: 0; transform: scale(2.5); }
        }
        .live-ring {
            transform-origin: center;
            animation: livePulse 2s ease-out infinite;
        }

        /* Slow CW spin for animated elements */
        @keyframes spin-cw-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        @keyframes scanRingSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        @keyframes glowPulse { 0%,100% { opacity: 0.08; } 50% { opacity: 0.2; } }
        @keyframes orbitDot { 0% { transform: rotate(0deg) translateX(120px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(120px) rotate(-360deg); } }
        @keyframes ekgPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

        /* ══════ CAPITAL HIGH-DENSITY SCROLLABLE QUEUE ══════ */
        #cap-queue-viewport {
            width: 100%; height: 100%; 
            display: block;
            overflow-y: auto;
            overflow-x: hidden;
            pointer-events: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* 1px Sci-fi Laser Scrollbar */
        #cap-queue-viewport::-webkit-scrollbar {
            width: 4px;
        }
        #cap-queue-viewport::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.02);
            border-left: 1px dashed var(--line-faint);
        }
        #cap-queue-viewport::-webkit-scrollbar-thumb {
            background: var(--line-solid);
            border-radius: 0;
            opacity: 0.8;
        }
        #cap-queue-viewport:hover::-webkit-scrollbar-thumb {
            box-shadow: 0 0 10px var(--line-solid);
        }

        .cap-queue-row {
            display: flex;
            align-items: center;
            width: 100%;
            height: 60px;
            border-bottom: 0.5px dashed rgba(255,255,255,0.08);
            font-family: var(--font-tech);
            padding-right: 20px;
            cursor: pointer;
            transition: background 0.15s ease;
            box-sizing: border-box;
        }
        .cap-queue-row:hover {
            background: rgba(255,255,255,0.04);
        }
        
        .cap-col { display: flex; flex-direction: column; justify-content: center; }
        .cap-col-data { width: 15%; padding-left: 20px; }
        .cap-col-comp { width: 20%; }
        .cap-col-status { width: 15%; }
        .cap-col-started { width: 20%; }
        .cap-col-time { width: 15%; }
        .cap-col-weight { width: 15%; align-items: flex-end; }

        .cq-primary { font-size: 16px; font-weight: 500; color: var(--line-solid); letter-spacing: 2px; }
        .cq-secondary { font-size: 11px; color: var(--line-sec); opacity: 0.6; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px;}
        .cq-metric-up { color: var(--text-up); font-size: 16px; font-weight: 600; font-family: var(--font-tech);}
        .cq-metric-dn { color: var(--text-dn); font-size: 16px; font-weight: 600; font-family: var(--font-tech);}
        .cq-weight-bar-bg { width: 120px; height: 4px; background: rgba(255,255,255,0.08); margin-top: 8px; position: relative;}
        .cq-weight-bar-fill { height: 100%; background: var(--line-solid); position: absolute; left:0; top:0; }

        /* ══════ BOTTOM NAVIGATION BARS (Dual Flush-Dock) ══════ */
        #bottom-nav-wrapper-left, #bottom-nav-wrapper-right {
            position: absolute;
            bottom: 31px; 
            z-index: 10000;
            pointer-events: all;
            background: var(--bg-paper);
            border-bottom: 1px solid var(--line-faint);
            border-top: none;
            padding: 0 16px;
            height: 34px;
            display: flex;
        }
        #bottom-nav-wrapper-left {
            left: 22%;
            border-left: 1px solid var(--line-faint);
            border-right: 1px solid var(--line-faint);
        }
        #bottom-nav-wrapper-right {
            right: 22%;
            border-left: 1px solid var(--line-faint);
            border-right: 1px solid var(--line-faint);
        }
        #hud-bottom-nav-left, #hud-bottom-nav-right {
            position: relative;
            display: inline-flex;
            align-items: center;
            background: transparent;
            border: none;
            overflow: visible;
        }
        .bottom-nav-tabs {
            display: inline-flex;
            align-items: center;
            height: 100%;
            flex-shrink: 0;
            gap: 32px;
            padding-left: 24px;
            padding-right: 24px;
        }
        .bottom-nav-tab {
            position: relative;
            background: transparent;
            border: none;
            color: var(--line-sec);
            font-family: var(--font-tech);
            font-size: 11px;
            letter-spacing: 4px;
            padding: 8px 12px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
            white-space: nowrap;
            flex-shrink: 0;
            opacity: 0.6;
        }
        .bottom-nav-tab:hover {
            opacity: 0.8;
            color: var(--line-solid);
        }
        .bottom-nav-tab.active, #global-watchlist-btn.watch-active {
            opacity: 1;
            color: var(--line-solid); 
            text-shadow: 0 0 12px rgba(255,255,255,0.3);
        }
        .bottom-nav-tab::before {
            content: '// ';
            opacity: 0.3;
        }
        .bottom-nav-tab.active::before, #global-watchlist-btn.watch-active::before {
            content: '// ';
            opacity: 1;
            color: var(--line-solid);
        }


        #cap-topo-viewport {
            position: absolute;
            left: 35.7%; top: 16%; 
            width: 31.4%; height: 33%; /* Precisely mapped to Y=270 - Y=800 void */
            z-index: 9999;
            display: none; overflow: hidden;
            pointer-events: auto; /* allows interactive orbiting */
        }

        /* ══════ RESEARCH WIREFRAME LOGO VIEWPORT ══════ */
        #res-logo-viewport {
            position: absolute;
            left: 12%; top: 27%;
            width: 24%; height: 24%;
            z-index: 48;
            display: none; overflow: hidden;
            pointer-events: none;
            clip-path: inset(0 0 0 0); /* hard ceiling — nothing escapes */
        }
        #res-logo-webgl {
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: auto; /* MUST be auto for OrbitControls grab-to-rotate */
            cursor: grab;
        }
        #res-logo-webgl:active { cursor: grabbing; }
        #res-logo-viewport canvas { width: 100% !important; height: 100% !important; pointer-events: auto; }

        /* ══════ UPD GLOBE VIEWPORT ══════ */
        #upd-globe-viewport {
            position: absolute; inset: 0;
            z-index: 45;
            display: none; overflow: hidden;
            pointer-events: none;
        }
        #upd-globe-webgl {
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: auto;
        }
        #upd-globe-viewport canvas { width: 100% !important; height: 100% !important; }


        #cap-webgl { 
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: auto;
        }
        #cap-topo-viewport canvas { width: 100% !important; height: 100% !important; }
        #cap-topo-viewport .cap-vignette {
            display: none;
        }
        #cap-topo-viewport .cap-labels {
            position: absolute; inset: 0;
            pointer-events: none; z-index: 10;
        }
        .mountain-label {
            position: absolute;
            transform: translate(-50%, -100%);
            padding-bottom: 20px;
            display: flex; flex-direction: column; align-items: center;
            opacity: 0; transition: opacity 0.5s ease;
            pointer-events: none;
        }
        .mountain-label::after {
            content: ''; position: absolute; bottom: 0; left: 50%;
            width: 1px; height: 15px; background: var(--line-solid);
            transform: translateX(-50%); opacity: 0.5;
        }
        .ml-sys { font-size: 13px; letter-spacing: 4px; color: var(--line-sec); margin-bottom: 4px; font-family: var(--font-tech); }
        .ml-val { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--line-solid); font-family: var(--font-tech); }
        #cap-btn-back {
            position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 20;
            cursor: pointer; pointer-events: auto;
            font-family: var(--font-tech); background: rgba(255,255,255,0.03);
            color: var(--line-sec); border: 1px solid var(--line-faint);
            padding: 6px 16px; font-size: 11px; letter-spacing: 3px;
            transition: all 0.3s; opacity: 0;
        }
        #cap-btn-back:hover { color: var(--line-solid); border-color: var(--line-solid); background: rgba(255,255,255,0.06); }

        /* PROTOCOL PANEL STYLES (NEW) */
        /* ══════ PROTOCOL MINIMAL AEROSPACE (NOTES + CALENDAR) ══════ */
        .prt-minimal-form {
            display: flex; flex-direction: column; height: 100%; width: 100%;
            pointer-events: auto; padding: 20px; box-sizing: border-box;
        }
        .prt-journal-title {
            font-family: var(--font-header); font-size: 16px; font-weight: 500;
            color: var(--line-solid); letter-spacing: 6px; text-transform: uppercase;
            margin-bottom: 40px; padding-bottom: 20px; border-bottom: 0.3px solid var(--line-faint);
            display: flex; justify-content: space-between;
        }
        .prt-journal-meta {
            font-family: var(--font-tech); font-size: 10px; color: var(--line-sec); letter-spacing: 2px;
        }
        textarea.prt-minimal-input {
            width: 100%; flex-grow: 1; background: transparent; border: none; 
            font-family: var(--font-tech); font-size: 14px; 
            color: var(--line-solid); outline: none; resize: none;
            line-height: 2.0; letter-spacing: 0.5px;
        }
        textarea.prt-minimal-input::placeholder { color: var(--line-sec); opacity: 0.4; }
        .prt-cal-cell {
            font-family: var(--font-tech); font-size: 12px;
            fill: var(--line-sec); text-anchor: middle; dominant-baseline: middle;
            transition: all 0.3s ease;
        }
        .prt-cal-cell.today {
            fill: var(--accent-gold); font-weight: 700;
        }
        .prt-cal-header {
            font-family: var(--font-header); font-size: 10px; fill: var(--line-faint);
            letter-spacing: 4px; text-anchor: middle;
        }
    

                        #lynx-target-modal {
                            position: fixed; inset: 0; z-index: 99999;
                            background: transparent; /* NO BLUR, NO BKG TINT */
                            font-family: var(--font-tech); color: var(--line-solid);
                            display: flex; align-items: center; justify-content: center;
                            opacity: 0; transition: opacity 0.3s ease;
                        }
                        #lynx-target-modal.active { opacity: 1; }
                        
                        /* The 800px Surgical Minimalist Chassis */
                        .ltm-container {
                            position: relative;
                            width: 800px; height: 380px;
                            background: var(--bg-base); /* Pure block */
                            border: 0.3px solid var(--line-faint);
                            display: flex; box-shadow: 0 30px 80px rgba(0,0,0,0.9);
                        }

                        /* Razor Thin 2px Coordinate Tracker Dots */
                        .ltm-dot { position: absolute; width: 2px; height: 2px; background: var(--line-solid); border-radius: 50%; opacity: 0.6; }
                        .ltm-dot.tl { top: 8px; left: 8px; }
                        .ltm-dot.tr { top: 8px; right: 8px; }
                        .ltm-dot.br { bottom: 8px; right: 8px; }
                        .ltm-dot.bl { bottom: 8px; left: 8px; }

                        /* Minimalist Close Box */
                        .ltm-close {
                            position: absolute; top: 16px; right: 16px; width: 24px; height: 24px;
                            border: 0.3px solid var(--line-faint); cursor: pointer; display: flex;
                            align-items: center; justify-content: center; font-size: 12px; transition: all 0.2s ease;
                            z-index: 10; color: var(--line-sec);
                        }
                        .ltm-close:hover { background: var(--line-solid); color: var(--bg-base); }
                        
                        .ltm-left { flex: 1; padding: 40px 60px; display: flex; flex-direction: column; justify-content: center; border-right: 0.3px solid var(--line-faint); }
                        .ltm-right { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; }
                        
                        /* Technical, Suppressed Typography Emulating Print Schematics */
                        .ltm-title { font-size: 28px; font-weight: 600; letter-spacing: 1px; line-height: 1; margin-bottom: 8px; font-family: var(--font-tech); }
                        .ltm-val { font-size: 32px; font-weight: 300; letter-spacing: 0px; margin-bottom: 30px; font-family: var(--font-tech); }
                        .ltm-sub { font-size: 10px; color: var(--line-faint); letter-spacing: 2px; line-height: 1.6; }
                        
                        /* Razor Thin Right Target Crosshair */
                        .ltm-cross { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); opacity: 0.3; pointer-events: none; }
                        .ltm-cross::before, .ltm-cross::after { content: ''; position: absolute; background: var(--line-faint); }
                        .ltm-cross::before { top: 50%; left: 0; right: 0; height: 0.3px; transform: translateY(-50%); }
                        .ltm-cross::after { left: 50%; top: 0; bottom: 0; width: 0.3px; transform: translateX(-50%); }

                        /* Grid for the data telemetry */
                        .ltm-data-grid {
                            display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; margin-bottom: 32px;
                        }
                        .ltm-data-block { display: flex; flex-direction: column; }
                        .ltm-data-label { font-size: 9px; color: var(--line-faint); letter-spacing: 1px; margin-bottom: 4px; }
                        .ltm-data-val { font-size: 14px; font-weight: 500; color: var(--line-solid); letter-spacing: 0.5px; }

                        /* Institutional Aerospace Button */
                        .ltm-btn {
                            width: 100%; border: 0.3px solid var(--line-faint); padding: 12px 0;
                            text-align: center; color: var(--line-sec); font-size: 11px; letter-spacing: 2px;
                            cursor: pointer; transition: all 0.2s ease; background: transparent;
                        }
                        .ltm-btn:hover { background: var(--line-solid); color: var(--bg-base); border-color: var(--line-solid); }

                        .ltm-frame { position: absolute; width: 340px; height: 340px; }
                        #ltm-canvas { width: 100%; height: 100%; position: relative; z-index: 5; }
                    

.replica-hud-body-scope {
    position: relative;
    width: 1400px; height: 935px;
    background: #000;
    overflow: hidden;
    transform-origin: top left;
}
.boot-overlay { display: none !important; }
