/* graph-shell.css - the chrome both graph pages share.
 *
 * Code Brain and Code Graph were built from a common ancestor and their
 * stylesheets were copies of each other. The copies then drifted: the rail is
 * 332px on one and 400px on the other, the deck scrolls differently, the hint
 * bar sits in a different place. Most of it did not drift at all - the nav, the
 * readout, the buttons, the legend, the loading state - and that half was
 * maintained twice.
 *
 * Twice meant not at all. A slider written against .cg-btn landed in the
 * stylesheet the page did not load and silently did nothing, which is how this
 * file came to exist.
 *
 * Only rules that were byte-identical in both files are here. Everything that
 * genuinely differs stays in the page stylesheet, which loads after this one and
 * overrides it. Adding a rule here is a claim that both pages want it.
 */
/* code-brain.css - the code brain: the module graph, its side panels and the findings deck.
 *
 * Extracted from code-brain.html, which was over the 450-line limit almost
 * entirely because of this block and the script beside it. Left inline it was
 * also re-downloaded with every visit to the page and invisible to any tool
 * that reads stylesheets.
 */
        html, body { height: 100%; margin: 0; overflow: hidden; }
        body { background: var(--bg-primary, #06070f); }
        nav.cg-nav {
            position: fixed; top: 0; left: 0; right: 0; z-index: 30;
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 22px; gap: 16px;
            background: rgba(6,7,15,0.55); backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
        }
        nav.cg-nav .cg-left { display: flex; align-items: center; gap: 18px; }
        nav.cg-nav .nav-logo { font-weight: 800; font-size: 1.1rem; text-decoration: none;
            background: linear-gradient(120deg,var(--accent,#4f7cff),var(--accent-tertiary,#34e0c4));
            -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
        nav.cg-nav .cg-links { display: flex; gap: 14px; }
        nav.cg-nav .cg-links a { color: var(--text-secondary,#9aa4bf); text-decoration: none; font-size: 0.9rem; padding: 6px 10px; border-radius: 8px; transition: .2s; }
        nav.cg-nav .cg-links a:hover { color: var(--text-primary,#fff); background: var(--bg-card,rgba(255,255,255,0.05)); }
        nav.cg-nav .nav-cta { color: #0b0d18; font-weight: 600; font-size: 0.9rem; text-decoration: none; padding: 8px 16px; border-radius: 999px;
            background: linear-gradient(120deg,var(--accent,#4f7cff),var(--accent-tertiary,#34e0c4)); }
        #graph { position: absolute; inset: 0; z-index: 1; }
        .stage { position: relative; min-height: 0; height: 100%; overflow: hidden; }
        .ro-lab { font-family: var(--font-mono, ui-monospace, Menlo, monospace);
            font-size: 0.66rem; letter-spacing: 0.15em; text-transform: uppercase;
            color: var(--text-tertiary,#6B5D51); }
        .readout { border-bottom: 1px solid var(--border,rgba(255,255,255,0.09)); }
        .ro-hd { display: flex; align-items: center; justify-content: space-between;
            padding: 10px 18px; border-bottom: 1px solid var(--border,rgba(255,255,255,0.09)); }
        .ro-live { font-family: var(--font-mono, ui-monospace, Menlo, monospace);
            font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
            color: var(--accent-secondary,#E0521F); }
        .ro-figs { display: grid; grid-template-columns: 1fr 1fr; }
        .ro-fig { padding: 12px 18px;
            border-right: 1px solid var(--border,rgba(255,255,255,0.09));
            border-bottom: 1px solid var(--border,rgba(255,255,255,0.09)); }
        .ro-fig:nth-child(2n) { border-right: 0; }
        .ro-fig:nth-last-child(-n+2) { border-bottom: 0; }
        .ro-fig .n { font-family: var(--font-mono, ui-monospace, Menlo, monospace);
            font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
            color: var(--accent,#C08457); }
        .ro-fig .t { font-family: var(--font-mono, ui-monospace, Menlo, monospace);
            font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
            color: var(--text-tertiary,#6B5D51); margin-top: 2px; }
        .dock .title { display: flex; flex-direction: column; gap: 1px; flex: none; }
        .dock h1 { font-size: 0.98rem; margin: 0; }
        .dock .search { display: flex; gap: 8px; flex: none; }
        .dock input:focus { border-color: var(--accent,#4f7cff); }
        .dock .stats { display: none; gap: 14px; font-size: 0.78rem; color: var(--text-secondary,#9aa4bf); flex-wrap: wrap; flex: none; }
        .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
        .cg-btn {
            background: rgba(255,255,255,0.06); border: 1px solid var(--border,rgba(255,255,255,0.1));
            color: var(--text-primary,#fff); border-radius: 10px; padding: 8px 12px; font-size: 0.8rem;
            cursor: pointer; transition: .2s; font-family: inherit;
        }
        .cg-btn:hover { background: var(--accent,#4f7cff); border-color: var(--accent,#4f7cff); }
        .cg-btn:disabled { opacity: 0.35; cursor: not-allowed; }
        .legend { display: flex; flex-direction: row; gap: 12px; font-size: 0.74rem; color: var(--text-secondary,#9aa4bf);
            flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
        .legend .row { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
        .legend .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
        .legend::-webkit-scrollbar { height: 6px; }
        .legend::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 8px; }
        .hint strong { color: var(--text-primary,#fff); font-weight: 600; }
        .loading-cg { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; color: var(--text-secondary,#9aa4bf); background: var(--bg-primary,#06070f); }
        .spinner { width: 42px; height: 42px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent,#4f7cff); border-radius: 50%; animation: spin 0.9s linear infinite; }
        @keyframes spin { to { transform: rotate(360deg); } }
