        :root {
            --void: #000000;
            --abyss: #050505;
            --structure: #0c0c0c;
            --bulk: #111111;
            --panel: #0e0e0e;
            --wall: #161616;
            --partition: #1c1c1c;
            --rebar: #242424;
            --dust: #333333;
            --ash: #555555;
            --concrete: #888888;
            --terminal: #b0b0b0;
            --netsphere: #00e5ff;
            --netsphere-dim: #007a8a;
            --netsphere-glow: rgba(0, 229, 255, 0.15);
            --gravity: #ff1744;
            --gravity-dim: #7a0020;
            --silicon: #e0e0e0;
            --amber: #ffab00;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* ═══ HIDE SCROLLBAR GLOBALLY ═══ */
        html {
            scrollbar-width: none;
        }
        html::-webkit-scrollbar {
            display: none;
        }

        /* Scanline overlay */
        body::before {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: repeating-linear-gradient(
                0deg,
                transparent,
                transparent 2px,
                rgba(0, 0, 0, 0.18) 2px,
                rgba(0, 0, 0, 0.18) 4px
            );
            pointer-events: none;
            z-index: 9999;
        }

        /* Architectural grid background */
        body::after {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background-image:
                linear-gradient(rgba(0,229,255,0.025) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0,229,255,0.025) 1px, transparent 1px);
            background-size: 48px 48px;
            pointer-events: none;
            z-index: 0;
        }

        body {
            font-family: 'Share Tech Mono', 'Courier New', monospace;
            background-color: var(--void);
            color: var(--terminal);
            min-height: 100vh;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        /* ═══ HEADER ═══ */
        .header {
            text-align: center;
            margin-bottom: 0;
            padding: 32px 20px 24px;
            border: 1px solid var(--partition);
            border-top: 3px solid var(--netsphere);
            background: var(--abyss);
            position: relative;
            clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
        }

        .header::before {
            content: 'NETSPHERE RESEARCH DIVISION // MEGASTRUCTURE ANALYSIS UNIT 09';
            display: block;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.65rem;
            color: var(--netsphere-dim);
            letter-spacing: 0.2em;
            margin-bottom: 20px;
            text-transform: uppercase;
        }

        .header::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--netsphere), transparent);
        }

        .title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 4rem;
            font-weight: 400;
            color: var(--silicon);
            letter-spacing: 0.12em;
            margin-bottom: 8px;
            text-shadow: 0 0 40px rgba(0, 229, 255, 0.2);
            position: relative;
        }

        /* Glitch effect */
        .title::before {
            content: attr(data-text);
            position: absolute;
            left: 2px; top: 0;
            color: var(--netsphere);
            opacity: 0.3;
            clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
            animation: glitch 6s infinite;
        }

        .title::after {
            content: attr(data-text);
            position: absolute;
            left: -2px; top: 0;
            color: var(--gravity);
            opacity: 0.2;
            clip-path: polygon(0 65%, 100% 65%, 100% 80%, 0 80%);
            animation: glitch 6s infinite reverse;
        }

        @keyframes glitch {
            0%, 90%, 100% { transform: translateX(0); opacity: 0; }
            91% { transform: translateX(3px); opacity: 0.3; }
            93% { transform: translateX(-2px); opacity: 0.2; }
            95% { transform: translateX(0); opacity: 0; }
        }

        .subtitle {
            font-family: 'Rajdhani', sans-serif;
            font-size: 0.95rem;
            color: var(--ash);
            margin-bottom: 24px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .controls {
            margin-bottom: 0;
        }

        /* ═══ TOGGLE BUTTON ═══ */
        .toggle-btn {
            background: transparent;
            color: var(--netsphere);
            border: 1px solid var(--netsphere);
            padding: 10px 28px;
            border-radius: 0;
            cursor: pointer;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.8rem;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            transition: all 0.2s;
            clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
            position: relative;
        }

        .toggle-btn::before {
            content: '> ';
            color: var(--netsphere-dim);
        }

        .toggle-btn:hover {
            background: var(--netsphere-glow);
            color: var(--silicon);
            box-shadow: 0 0 16px rgba(0, 229, 255, 0.3), inset 0 0 16px rgba(0, 229, 255, 0.05);
        }

        /* ═══ MONITOR NAV TABS ═══ */
        .monitor-nav {
            display: flex;
            gap: 3px;
            padding: 12px 16px 0;
            background: var(--abyss);
            border: 1px solid var(--partition);
            border-top: none;
            border-bottom: none;
            position: relative;
            z-index: 2;
        }

        .monitor-tab {
            background: transparent;
            color: var(--ash);
            border: 1px solid var(--rebar);
            border-bottom: none;
            padding: 9px 22px;
            cursor: pointer;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.7rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            transition: color 0.2s, border-color 0.2s, background 0.2s;
            position: relative;
            bottom: -1px;
        }

        .monitor-tab:hover {
            color: var(--terminal);
            border-color: var(--netsphere-dim);
            background: rgba(0, 229, 255, 0.03);
        }

        .monitor-tab.active {
            color: var(--netsphere);
            border-color: var(--netsphere-dim);
            background: rgba(0, 229, 255, 0.06);
            border-bottom: 1px solid var(--abyss);
            z-index: 3;
        }

        .monitor-tab::before {
            content: '// ';
            color: var(--rebar);
            transition: color 0.2s;
        }

        .monitor-tab.active::before {
            color: var(--netsphere-dim);
        }

        /* ═══ MONITOR STAGE ═══ */
        .monitor-stage {
            position: relative;
            width: 100%;
            height: 680px;
            overflow: hidden;
            background: var(--void);
            border: 1px solid var(--netsphere-dim);
            border-top: none;
            margin-bottom: 24px;
            perspective: 2200px;
        }

        /* ═══ MONITOR PANELS ═══ */
        .monitor {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--abyss);
            overflow: hidden;          /* NO scroll here — scroll lives in .monitor-scroll */
            transform-origin: center center;
            will-change: transform, opacity, filter;
            transition:
                transform  0.55s cubic-bezier(0.34, 1.12, 0.64, 1),
                opacity    0.45s ease,
                filter     0.45s ease,
                border-color 0.3s ease,
                box-shadow 0.45s ease;
        }

        /* Non-scrolling corner bracket overlay — sits above the scroll content */
        .monitor-corners {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 10;
        }

        /* Scrollable inner content area */
        .monitor-scroll {
            position: absolute;
            inset: 0;
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: none;
            padding: 20px;
        }

        .monitor-scroll::-webkit-scrollbar {
            display: none;
        }

        /* Active / center monitor */
        .monitor[data-pos="center"] {
            transform: translateX(0) scale(1) rotateY(0deg);
            opacity: 1;
            z-index: 3;
            pointer-events: all;
            filter: none;
            border: 1px solid var(--netsphere-dim);
            border-left: 3px solid var(--netsphere-dim);
            box-shadow: 0 0 50px rgba(0, 229, 255, 0.06), inset 0 0 60px rgba(0,0,0,0.4);
        }

        /* Top-right corner bracket — on the overlay, NOT the scrollable div */
        .monitor[data-pos="center"] .monitor-corners::before {
            content: '';
            position: absolute;
            top: 0; right: 0;
            width: 20px; height: 20px;
            border-top: 2px solid var(--netsphere);
            border-right: 2px solid var(--netsphere);
        }

        /* Bottom-left corner bracket — stays locked to monitor frame */
        .monitor[data-pos="center"] .monitor-corners::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0;
            width: 20px; height: 20px;
            border-bottom: 2px solid var(--netsphere-dim);
            border-left: 2px solid var(--netsphere-dim);
        }

        /* Left idle monitor */
        .monitor[data-pos="left"] {
            transform: translateX(-82%) scale(0.38) rotateY(20deg);
            opacity: 0.55;
            z-index: 1;
            pointer-events: all;
            cursor: pointer;
            filter: grayscale(1) brightness(0.3) contrast(0.8);
            border: 2px solid #333;
        }

        /* Right idle monitor */
        .monitor[data-pos="right"] {
            transform: translateX(82%) scale(0.38) rotateY(-20deg);
            opacity: 0.55;
            z-index: 1;
            pointer-events: all;
            cursor: pointer;
            filter: grayscale(1) brightness(0.3) contrast(0.8);
            border: 2px solid #333;
        }

        /* Hover state on idle monitors */
        .monitor[data-pos="left"]:hover,
        .monitor[data-pos="right"]:hover {
            filter: grayscale(0.6) brightness(0.55);
            opacity: 0.72;
        }

        /* Activation flash — brief netsphere glow when monitor comes to center */
        @keyframes monitor-boot {
            0%   { box-shadow: 0 0 0px rgba(0, 229, 255, 0); }
            25%  { box-shadow: 0 0 80px rgba(0, 229, 255, 0.35), inset 0 0 40px rgba(0, 229, 255, 0.08); }
            100% { box-shadow: 0 0 50px rgba(0, 229, 255, 0.06), inset 0 0 60px rgba(0,0,0,0.4); }
        }

        .monitor.booting {
            animation: monitor-boot 0.5s ease-out forwards;
        }

        /* ═══ MONITOR HEADER LABEL ═══ */
        .monitor-header {
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.72rem;
            letter-spacing: 0.25em;
            text-transform: uppercase;
            color: var(--netsphere);
            margin-bottom: 16px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--partition);
        }

        .monitor-header.amber {
            color: var(--amber);
        }

        /* ═══ SVG CHARTS ═══ */
        #chartSvg {
            width: 100%;
            height: 555px;
            background: var(--void);
            border: 1px solid var(--rebar);
        }

        #linearChartSvg {
            width: 100%;
            height: 520px;
            background: var(--void);
            border: 1px solid var(--rebar);
        }

        /* ═══ INFO PANEL ═══ */
        .info-panel {
            background: var(--structure);
            border: 1px solid var(--partition);
            border-top: 2px solid var(--netsphere-dim);
            padding: 20px;
            margin-bottom: 20px;
            display: none;
        }

        .info-panel.visible {
            display: block;
        }

        .info-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.6rem;
            font-weight: 400;
            letter-spacing: 0.12em;
            margin-bottom: 15px;
            color: var(--netsphere);
            text-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            font-size: 0.85rem;
        }

        .info-item {
            display: flex;
            flex-direction: column;
            border-left: 2px solid var(--rebar);
            padding-left: 10px;
        }

        .info-label {
            color: var(--ash);
            margin-bottom: 4px;
            font-size: 0.7rem;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .info-value {
            color: var(--silicon);
            font-weight: 600;
        }

        /* ═══ INSIGHTS ═══ */
        .insights-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .insight-box {
            background: var(--abyss);
            border: 1px solid var(--partition);
            padding: 20px;
            position: relative;
        }

        .insight-box::before {
            content: '';
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 2px;
            background: linear-gradient(90deg, var(--netsphere-dim), transparent);
        }

        .insight-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.1rem;
            font-weight: 400;
            letter-spacing: 0.15em;
            margin-bottom: 16px;
            color: var(--netsphere);
            text-transform: uppercase;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--partition);
        }

        .insight-list {
            list-style: none;
        }

        .insight-list li {
            margin-bottom: 10px;
            color: var(--ash);
            font-size: 0.82rem;
            line-height: 1.6;
            padding-left: 14px;
            position: relative;
        }

        .insight-list li::before {
            content: '─';
            position: absolute;
            left: 0;
            color: var(--netsphere-dim);
        }

        .insight-list li strong {
            color: var(--terminal);
            font-weight: normal;
        }

        /* ═══ FOOTER ═══ */
        .footer-note {
            text-align: center;
            color: var(--dust);
            font-size: 0.75rem;
            line-height: 2;
            padding: 20px;
            border-top: 1px solid var(--partition);
            letter-spacing: 0.05em;
        }

        /* ═══ SVG OBJECT STYLES ═══ */
        .object-marker {
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .object-marker:hover {
            stroke-width: 3;
            filter: drop-shadow(0 0 4px var(--netsphere));
        }

        .grid-line {
            stroke: var(--rebar);
            stroke-width: 1;
            opacity: 0.4;
        }

        .grid-text {
            fill: var(--ash);
            font-size: 12px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
        }

        .connection-line {
            opacity: 0.5;
            stroke-width: 1;
        }

        .object-label {
            fill: var(--terminal);
            font-size: 11px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
        }

        .megastructure-region {
            fill: url(#megastructureGradient);
            stroke: var(--netsphere-dim);
            stroke-width: 1;
            stroke-dasharray: 8, 4;
            opacity: 0.3;
        }

        .megastructure-label {
            fill: var(--netsphere);
            font-size: 13px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
            letter-spacing: 0.08em;
        }

        .scale-label {
            fill: var(--ash);
            font-size: 13px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
        }

        /* ═══ LINEAR SCALE ═══ */
        .scale-selector {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 6px;
            margin-bottom: 15px;
        }

        .scale-btn {
            background: transparent;
            color: var(--ash);
            border: 1px solid var(--rebar);
            padding: 7px 16px;
            border-radius: 0;
            cursor: pointer;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.72rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            transition: all 0.2s;
        }

        .scale-btn:hover {
            border-color: var(--netsphere-dim);
            color: var(--terminal);
            background: rgba(0, 229, 255, 0.04);
        }

        .scale-btn.active {
            background: rgba(0, 229, 255, 0.08);
            border-color: var(--netsphere);
            color: var(--netsphere);
            box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
        }

        .scale-description {
            text-align: center;
            color: var(--dust);
            font-size: 0.75rem;
            margin-bottom: 12px;
            min-height: 20px;
            letter-spacing: 0.06em;
        }

        .linear-object-marker {
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .linear-object-marker:hover {
            stroke-width: 3;
            filter: drop-shadow(0 0 4px var(--netsphere));
        }

        .linear-grid-line {
            stroke: var(--rebar);
            stroke-width: 1;
            opacity: 0.35;
        }

        .linear-grid-text {
            fill: var(--dust);
            font-size: 11px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
        }

        .linear-connection-line {
            opacity: 0.6;
            stroke-width: 1;
        }

        .linear-object-label {
            fill: var(--terminal);
            font-size: 10px;
            font-family: 'Share Tech Mono', monospace;
            font-weight: 500;
            text-anchor: middle;
        }

        .linear-scale-label {
            fill: var(--ash);
            font-size: 11px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
        }

        .linear-title {
            fill: var(--silicon);
            font-size: 14px;
            font-family: 'Share Tech Mono', monospace;
            text-anchor: middle;
            letter-spacing: 0.1em;
        }

        /* ═══ ORBITAL ═══ */
        .orbital-controls {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 6px;
            margin-bottom: 12px;
        }

        .orbital-btn {
            background: transparent;
            color: var(--ash);
            border: 1px solid var(--rebar);
            padding: 7px 16px;
            border-radius: 0;
            cursor: pointer;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.72rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            transition: all 0.2s;
        }

        .orbital-btn:hover {
            border-color: var(--amber);
            color: var(--terminal);
            background: rgba(255, 171, 0, 0.04);
        }

        .orbital-btn.active {
            background: rgba(255, 171, 0, 0.08);
            border-color: var(--amber);
            color: var(--amber);
            box-shadow: 0 0 8px rgba(255, 171, 0, 0.2);
        }

        .orbital-scale-description {
            text-align: center;
            color: var(--dust);
            font-size: 0.75rem;
            margin-bottom: 10px;
            min-height: 18px;
            letter-spacing: 0.06em;
        }

        #orbitalCanvas {
            display: block;
            margin: 0 auto;
            background: var(--void);
            border: 1px solid var(--rebar);
            width: min(100%, 680px);
            aspect-ratio: 1 / 1;
        }

        .orbital-legend {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 8px;
            margin-top: 16px;
            padding-top: 14px;
            border-top: 1px solid var(--partition);
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.72rem;
            color: var(--ash);
            letter-spacing: 0.06em;
        }

        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 0;
            border: 1px solid rgba(255,255,255,0.2);
            flex-shrink: 0;
        }

        /* ═══ GRAPH WRAP ═══ */
        .graph-wrap {
            position: relative;
        }

        /* ═══ CHAT BUTTON ═══ */
        .chat-btn {
            position: absolute;
            top: 6px;
            right: 6px;
            z-index: 20;
            background: transparent;
            border: 1px solid var(--netsphere-dim);
            color: var(--netsphere-dim);
            font-size: 0.7rem;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
            padding: 0;
            line-height: 1;
        }

        .chat-btn:hover {
            background: var(--netsphere-glow);
            color: var(--netsphere);
            border-color: var(--netsphere);
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
        }

        .insight-box {
            position: relative;
        }

        /* ═══ CHAT POPUP ═══ */
        .chat-popup {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: rgba(0, 0, 0, 0.55);
            align-items: center;
            justify-content: center;
        }

        .chat-popup.open {
            display: flex;
        }

        .chat-popup-box {
            background: var(--structure);
            border: 1px solid var(--netsphere-dim);
            border-top: 2px solid var(--netsphere);
            padding: 28px 32px 24px;
            min-width: 260px;
            max-width: 420px;
            position: relative;
            clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
            box-shadow: 0 0 40px rgba(0, 229, 255, 0.12);
            font-family: 'Share Tech Mono', monospace;
            font-size: 0.85rem;
            color: var(--terminal);
            letter-spacing: 0.05em;
        }

        .chat-popup-close {
            position: absolute;
            top: 8px;
            right: 10px;
            background: transparent;
            border: none;
            color: var(--ash);
            font-size: 0.75rem;
            cursor: pointer;
            font-family: 'Share Tech Mono', monospace;
            transition: color 0.15s;
            padding: 2px 4px;
        }

        .chat-popup-close:hover {
            color: var(--netsphere);
        }

        /* ═══ RESPONSIVE ═══ */
        @media (max-width: 768px) {
            .title { font-size: 2.8rem; }
            .subtitle { font-size: 0.85rem; }
            .monitor-stage { height: 560px; }
            .monitor[data-pos="left"]  { transform: translateX(-88%) scale(0.3) rotateY(20deg); }
            .monitor[data-pos="right"] { transform: translateX(88%) scale(0.3) rotateY(-20deg); }
            #chartSvg { height: 460px; }
            #linearChartSvg { height: 400px; }
            #orbitalCanvas { width: min(100%, 500px); }
            .insights-grid { grid-template-columns: 1fr; }
            .scale-selector, .orbital-controls { flex-direction: column; align-items: center; }
            .scale-btn, .orbital-btn { width: 200px; text-align: center; }
            .monitor-tab { padding: 7px 12px; font-size: 0.6rem; }
        }
