/* void-network.css — Styles for the void network visualization */

.vn-container {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    max-height: 900px;
    background: #06060c;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.vn-container .viz-canvas {
    width: 100%;
    height: 100%;
}
.vn-container .viz-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Controls bar (search + filters) */
.vn-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(to bottom, rgba(6,6,12,0.92) 0%, rgba(6,6,12,0.7) 80%, transparent 100%);
    pointer-events: none;
}
.vn-controls > * {
    pointer-events: auto;
}

/* Search */
.vn-search-wrap {
    flex-shrink: 0;
}
.vn-search {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text, #e0e0e0);
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    width: 160px;
    outline: none;
    transition: border-color 0.15s, width 0.2s;
}
.vn-search:focus {
    border-color: var(--accent, #4a9eff);
    width: 200px;
}
.vn-search::placeholder {
    color: rgba(255,255,255,0.3);
}

/* Category filter buttons */
.vn-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.vn-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 3px;
    color: rgba(255,255,255,0.4);
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    padding: 0.2rem 0.45rem;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vn-filter-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}
.vn-filter-btn.vn-filter-active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
}
.vn-filter-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.vn-filter-count {
    opacity: 0.5;
    font-size: 0.55rem;
}

/* Stats line */
.vn-stats {
    position: absolute;
    top: auto;
    bottom: 0.6rem;
    right: 0.75rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.25);
    z-index: 6;
    letter-spacing: 0.04em;
}

/* Floating node labels */
.vn-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.vn-label {
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: rgba(220, 220, 230, 0.85);
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 12px rgba(0,0,0,0.7), 0 1px 2px rgba(0,0,0,0.8);
    transition: opacity 0.15s;
}

/* Info panel (right side overlay) */
.vn-info {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 90%;
    height: 100%;
    background: rgba(10, 10, 18, 0.96);
    border-left: 1px solid rgba(74, 158, 255, 0.15);
    padding: 1.25rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    line-height: 1.6;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.vn-info-visible {
    transform: translateX(0);
}

/* Close button */
.vn-info-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.15s;
}
.vn-info-close:hover {
    color: rgba(255,255,255,0.8);
}

.vn-info-header h3 {
    font-size: 1.15rem;
    margin: 0 0 0.35rem;
    color: var(--text, #e0e0e0);
    padding-right: 2rem;
}
.vn-info-cat {
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    display: inline-block;
    margin-right: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.vn-info-conf {
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    color: var(--text-dim, #888);
    padding: 0.1em 0.5em;
    border: 1px solid var(--border, #333);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Score display */
.vn-info-score {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 1rem 0;
}
.vn-info-score-num {
    font-family: var(--font-mono, monospace);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text, #e0e0e0);
    line-height: 1;
}
.vn-info-score-den {
    font-size: 1rem;
    color: var(--text-dim, #888);
    font-weight: 400;
}
.vn-info-risk {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Score bars */
.vn-info-bars {
    margin: 0.75rem 0;
}
.vn-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.4rem 0;
}
.vn-bar-label {
    width: 110px;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-dim, #888);
}
.vn-bar-track {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.vn-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.vn-bar-val {
    width: 28px;
    text-align: right;
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    color: var(--text-dim, #888);
}

.vn-info-text {
    margin: 0.75rem 0;
    color: var(--text, #e0e0e0);
}
.vn-info-section {
    margin: 0.75rem 0;
    color: var(--text-dim, #aaa);
    font-size: 0.8rem;
    line-height: 1.6;
}
.vn-info-section strong {
    color: var(--text, #e0e0e0);
}
.vn-info-section ul {
    margin: 0.4rem 0;
    padding-left: 1rem;
}
.vn-info-section li {
    margin: 0.3rem 0;
}
.vn-info-notes {
    font-style: italic;
    color: var(--accent, #4a9eff);
    border-left: 2px solid var(--accent, #4a9eff);
    padding-left: 0.75rem;
}
.vn-coupling-score {
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    color: var(--text-dim, #888);
}

/* Legend (bottom left overlay) */
.vn-legend {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    font-size: 0.65rem;
    color: var(--text-dim, #888);
    z-index: 5;
    max-width: 200px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.vn-legend-title {
    font-family: var(--font-mono, monospace);
    color: var(--accent, #4a9eff);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}
.vn-legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.2rem 0;
}
.vn-legend-dot {
    display: inline-block;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Info panel metadata tags */
.vn-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0.75rem;
}
.vn-info-tag {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.6);
    padding: 0.15em 0.5em;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Axis labels in cluster/dynamics views */
.vn-axis-label {
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: rgba(74, 158, 255, 0.7);
    white-space: nowrap;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 0 8px rgba(0,0,0,0.9);
    transition: opacity 0.15s;
}
.vn-axis-label.vn-axis-tick {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0;
    text-transform: none;
}

/* Legend subtitle */
.vn-legend-subtitle {
    font-family: var(--font-mono, monospace);
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
    margin-bottom: 0.15rem;
}

/* Hover tooltip */
.vn-tooltip {
    position: absolute;
    z-index: 12;
    background: rgba(10, 10, 18, 0.95);
    border: 1px solid rgba(74, 158, 255, 0.25);
    border-radius: 5px;
    padding: 0.5rem 0.7rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    color: var(--text, #e0e0e0);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
    white-space: nowrap;
    line-height: 1.5;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.vn-tooltip-hint {
    color: rgba(255,255,255,0.3);
    font-size: 0.58rem;
}

/* Harms section */
.vn-info-harms {
    background: rgba(255, 68, 68, 0.06);
    border-left: 2px solid rgba(255, 68, 68, 0.4);
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
}

/* Recommendations section */
.vn-info-recs {
    background: rgba(61, 220, 132, 0.06);
    border-left: 2px solid rgba(61, 220, 132, 0.4);
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
}
.vn-info-recs ul {
    margin: 0.4rem 0 0;
    padding-left: 1rem;
}
.vn-info-recs li {
    margin: 0.4rem 0;
    line-height: 1.5;
}
.vn-rec-text {
    color: var(--text, #e0e0e0);
}
.vn-rec-tag {
    display: inline-block;
    font-family: var(--font-mono, monospace);
    font-size: 0.55rem;
    color: #3ddc84;
    background: rgba(61, 220, 132, 0.1);
    border: 1px solid rgba(61, 220, 132, 0.2);
    border-radius: 2px;
    padding: 0.05em 0.35em;
    margin-left: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

/* Scrollbar */
.vn-info::-webkit-scrollbar {
    width: 4px;
}
.vn-info::-webkit-scrollbar-track {
    background: transparent;
}
.vn-info::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}
.vn-info::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .vn-container {
        height: 65vh;
        min-height: 400px;
    }
    .vn-controls {
        padding: 0.4rem 0.5rem;
        gap: 0.3rem;
    }
    .vn-search {
        width: 120px;
        font-size: 1rem; /* prevent iOS auto-zoom */
    }
    .vn-search:focus {
        width: 140px;
    }
    .vn-filter-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        min-height: 32px;
    }
    .vn-view-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        min-height: 32px;
    }
    .vn-info {
        width: 100%;
        max-width: 100%;
        height: 55%;
        top: auto;
        bottom: 0;
        right: 0;
        transform: translateY(100%);
        border-left: none;
        border-top: 1px solid rgba(74, 158, 255, 0.15);
    }
    .vn-info-visible {
        transform: translateY(0);
    }
    .vn-legend {
        max-width: 170px;
        font-size: 0.58rem;
        padding: 0.5rem 0.65rem;
    }
    .vn-stats {
        font-size: 0.55rem;
    }
}

/* ========== View Toggle ========== */
.vn-view-toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--border, #333);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.vn-view-btn {
    background: var(--bg-card, #151520);
    border: none;
    color: var(--text-dim, #888);
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    padding: 0.45rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.03em;
}
.vn-view-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text, #e0e0e0);
}
.vn-view-btn.vn-view-active {
    background: var(--accent, #4a9eff);
    color: #fff;
    font-weight: 600;
}

/* ========== Scorecard View ========== */
.vn-scorecard {
    background: var(--bg-card, #151520);
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

/* Scorecard controls bar */
.vn-sc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(6,6,12,0.6);
    border-bottom: 1px solid var(--border, #333);
}
.vn-sc-search {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text, #e0e0e0);
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    padding: 0.4rem 0.65rem;
    width: 180px;
    outline: none;
    transition: border-color 0.15s;
}
.vn-sc-search:focus {
    border-color: var(--accent, #4a9eff);
}
.vn-sc-search::placeholder {
    color: rgba(255,255,255,0.3);
}
.vn-sc-sort,
.vn-sc-filter-cat,
.vn-sc-filter-conf {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text, #e0e0e0);
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
    outline: none;
    cursor: pointer;
}
.vn-sc-sort option,
.vn-sc-filter-cat option,
.vn-sc-filter-conf option {
    background: #151520;
    color: var(--text, #e0e0e0);
}

/* Summary strip */
.vn-sc-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.6rem 1rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.7rem;
    color: var(--text-dim, #888);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.vn-sc-summary-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.vn-sc-summary-num {
    font-weight: 700;
    color: var(--text, #e0e0e0);
    font-size: 0.85rem;
}

/* Scorecard table */
.vn-sc-table {
    width: 100%;
}

/* Row */
.vn-sc-row {
    display: grid;
    grid-template-columns: 2.2rem 1fr 5.5rem 4.5rem 6rem;
    align-items: center;
    gap: 0;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.12s;
}
.vn-sc-row:hover {
    background: rgba(255,255,255,0.03);
}
.vn-sc-row-header {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: default;
    padding: 0.5rem 1rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.vn-sc-row-header:hover {
    background: transparent;
}

/* Score badge */
.vn-sc-score {
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1;
}

/* Name + category cell */
.vn-sc-name {
    font-size: 0.85rem;
    color: var(--text, #e0e0e0);
    font-weight: 500;
}
.vn-sc-cat {
    font-family: var(--font-mono, monospace);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.5rem;
}

/* Mini bars for sub-scores */
.vn-sc-bars {
    display: flex;
    gap: 2px;
    align-items: center;
}
.vn-sc-mini-bar {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    opacity: 0.85;
    position: relative;
}
.vn-sc-mini-bar-label {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono, monospace);
    font-size: 0.5rem;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    display: none;
}
.vn-sc-row:hover .vn-sc-mini-bar-label {
    display: block;
}

/* Confidence badge */
.vn-sc-conf {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* Risk label */
.vn-sc-risk {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: right;
}

/* Expandable detail */
.vn-sc-detail {
    display: none;
    padding: 0.75rem 1rem 1rem 3.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(6,6,12,0.4);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-dim, #aaa);
    animation: vn-sc-expand 0.2s ease-out;
}
@keyframes vn-sc-expand {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 600px; }
}
.vn-sc-detail.vn-sc-detail-open {
    display: block;
}
.vn-sc-detail-bars {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0 0.75rem;
}
.vn-sc-detail-bar {
    flex: 1;
}
.vn-sc-detail-bar-label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.2rem;
}
.vn-sc-detail-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.vn-sc-detail-bar-fill {
    height: 100%;
    border-radius: 3px;
}
.vn-sc-detail-bar-val {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: var(--text-dim, #888);
    margin-top: 0.15rem;
}
.vn-sc-detail p {
    margin: 0.4rem 0;
}
.vn-sc-detail strong {
    color: var(--text, #e0e0e0);
}
.vn-sc-detail ul {
    margin: 0.3rem 0;
    padding-left: 1rem;
}
.vn-sc-detail li {
    margin: 0.25rem 0;
}
.vn-sc-detail-harms {
    background: rgba(255,68,68,0.06);
    border-left: 2px solid rgba(255,68,68,0.4);
    padding: 0.4rem 0.6rem;
    border-radius: 0 4px 4px 0;
    margin: 0.5rem 0;
}
.vn-sc-detail-recs {
    background: rgba(61,220,132,0.06);
    border-left: 2px solid rgba(61,220,132,0.4);
    padding: 0.4rem 0.6rem;
    border-radius: 0 4px 4px 0;
    margin: 0.5rem 0;
}
.vn-sc-detail-connections {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Category group headers in "By Category" sort */
.vn-sc-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vn-sc-group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Responsive scorecard */
@media (max-width: 768px) {
    .vn-view-toggle {
        width: 100%;
    }
    .vn-view-btn {
        flex: 1;
        text-align: center;
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
    }
    .vn-sc-controls {
        gap: 0.4rem;
        padding: 0.5rem 0.65rem;
    }
    .vn-sc-search {
        width: 100%;
    }
    .vn-sc-sort,
    .vn-sc-filter-cat,
    .vn-sc-filter-conf {
        flex: 1;
        min-width: 0;
        font-size: 0.65rem;
    }
    .vn-sc-row {
        grid-template-columns: 2rem 1fr 5rem;
        padding: 0.5rem 0.65rem;
    }
    .vn-sc-bars,
    .vn-sc-conf {
        display: none;
    }
    .vn-sc-detail {
        padding-left: 2rem;
    }
}

/* --- extracted from void-network.html --- */
/* ── Full-screen atlas layout ─────────────────────────── */
html, body { height: 100%; overflow: hidden; background: #06060c; }

/* Nav overlay */
#main-nav {
    position: fixed !important;
    top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(6,6,12,0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
/* Override constraint-mode backdrop-filter blanket for nav only */
html.mode-constraint #main-nav {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* The viz fills the entire screen behind everything */
#void-network.vn-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    border: none !important;
    border-radius: 0 !important;
    z-index: 0;
}

/* Hide the auto-generated controls bar — left panel replaces it */
#void-network .vn-controls { display: none !important; }

/* ── Left panel ───────────────────────────────────────── */
#atlas-left {
    position: fixed;
    left: 0; top: 52px;
    width: 228px;
    height: calc(100vh - 52px);
    background: rgba(6,6,12,0.9);
    border-right: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 90;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
html.mode-constraint #atlas-left {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.atlas-panel-section {
    padding: 0.9rem 0.9rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.atlas-panel-label {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: rgba(255,255,255,0.3);
    margin-bottom: 0.6rem; display: block;
}

/* Search */
#atlas-search {
    width: 100%; padding: 0.45rem 0.65rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e8e8e8; font-family: var(--font-mono);
    font-size: 0.78rem; outline: none;
    transition: border-color 0.15s;
}
#atlas-search:focus { border-color: rgba(255,255,255,0.25); }
#atlas-search::placeholder { color: rgba(255,255,255,0.2); }

/* Category filters */
.atlas-cat-btn {
    display: flex; align-items: center; gap: 0.45rem;
    width: 100%; padding: 0.35rem 0.5rem;
    background: transparent; border: 1px solid transparent;
    color: rgba(255,255,255,0.55); font-family: var(--font-mono);
    font-size: 0.73rem; cursor: pointer; text-align: left;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
    border-radius: 2px; margin-bottom: 2px;
}
.atlas-cat-btn:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.atlas-cat-btn.hidden-cat { color: rgba(255,255,255,0.2); text-decoration: line-through; }
.atlas-cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* Score range */
.atlas-range-row {
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-mono); font-size: 0.72rem; color: rgba(255,255,255,0.4);
    margin-bottom: 0.4rem;
}
#atlas-range {
    width: 100%; accent-color: #ff4444;
    margin: 0;
}

/* Live activity feed */
.atlas-feed-item {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    font-family: var(--font-mono); font-size: 0.72rem;
}
.atlas-feed-item:last-child { border-bottom: none; }
.atlas-feed-dot {
    width: 6px; height: 6px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
    background: rgba(255,255,255,0.2);
}
.atlas-feed-dot.live { background: #3ddc84; box-shadow: 0 0 6px rgba(61,220,132,0.5); animation: feedPulse 2s ease-in-out infinite; }
@keyframes feedPulse { 0%,100%{opacity:0.7} 50%{opacity:1} }
.atlas-feed-name { color: rgba(255,255,255,0.7); font-weight: 700; }
.atlas-feed-score { color: rgba(255,255,255,0.35); }
.atlas-feed-time { color: rgba(255,255,255,0.2); font-size: 0.65rem; margin-top: 1px; }

/* ── Bottom HUD ───────────────────────────────────────── */
#atlas-hud {
    position: fixed; bottom: 0;
    left: 228px; right: 0; height: 42px;
    background: rgba(6,6,12,0.88);
    border-top: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 90;
    display: flex; align-items: center;
    padding: 0 1rem; gap: 1.5rem;
}
html.mode-constraint #atlas-hud {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.hud-stat {
    display: flex; align-items: baseline; gap: 0.35rem;
    font-family: var(--font-mono); font-size: 0.72rem;
}
.hud-stat-val { color: rgba(255,255,255,0.7); font-weight: 700; }
.hud-stat-label { color: rgba(255,255,255,0.28); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hud-sep { width: 1px; height: 18px; background: rgba(255,255,255,0.08); }
.hud-view-toggle { margin-left: auto; display: flex; gap: 0; }
.hud-view-btn {
    padding: 0.25rem 0.7rem; font-family: var(--font-mono); font-size: 0.7rem;
    font-weight: 700; letter-spacing: 0.05em; background: transparent;
    border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.35);
    cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.hud-view-btn + .hud-view-btn { border-left: none; }
.hud-view-btn:hover { color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.05); }
.hud-view-btn.active {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.92);
    border-color: rgba(255,255,255,0.22);
}

/* ── Floating Score button ────────────────────────────── */
#atlas-score-fab {
    position: fixed; bottom: 58px; right: 20px; z-index: 95;
}
#atlas-score-fab a {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    background: rgba(204,0,0,0.85);
    border: 1px solid rgba(255,68,68,0.4);
    color: #ffffff; font-family: var(--font-mono); font-size: 0.78rem;
    font-weight: 700; letter-spacing: 0.06em; text-decoration: none;
    backdrop-filter: blur(8px);
    transition: background 0.15s;
}
#atlas-score-fab a:hover { background: rgba(204,0,0,1); }

/* ── Scorecard view (replaces 3D when active) ─────────── */
#atlas-scorecard-wrap {
    display: none;
    position: fixed;
    top: 52px; left: 228px; right: 0; bottom: 42px;
    z-index: 80; overflow-y: auto;
    background: #0a0a0a;
    padding: 1.5rem;
}
#atlas-scorecard-wrap.active { display: block; }
#atlas-scorecard-wrap .vn-sc-controls {
    display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem;
}
#atlas-scorecard-wrap input, #atlas-scorecard-wrap select {
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); padding: 0.4rem 0.75rem;
    font-family: var(--font-mono); font-size: 0.82rem; outline: none;
}
#atlas-scorecard-wrap input { flex: 1; min-width: 180px; }

/* ── Internal viz element adjustments for full-screen ─── */
/* Legend: push right of left panel, above HUD */
#void-network .vn-legend {
    left: 240px;
    bottom: 50px;
    border-radius: 2px;
}
/* Stats: above HUD */
#void-network .vn-stats {
    bottom: 50px;
}
/* Info panel: below nav, above HUD */
#void-network .vn-info {
    top: 52px;
    height: calc(100vh - 52px - 42px);
}
/* Labels: start below nav */
#void-network .vn-labels {
    top: 52px;
    height: calc(100vh - 52px);
}

/* ── Responsive: hide left panel on small screens ─────── */
@media (max-width: 768px) {
    #atlas-left { display: none; }
    #atlas-hud { left: 0; padding: 0 0.75rem; gap: 0.75rem; }
    #atlas-score-fab { bottom: 58px; right: 12px; }
    /* Scorecard view: full-width when left panel is hidden */
    #atlas-scorecard-wrap { left: 0; padding: 1rem 0.75rem; }
    /* Prevent iOS auto-zoom on search input */
    #atlas-search { font-size: 1rem; min-height: 36px; }
    #atlas-scorecard-wrap input,
    #atlas-scorecard-wrap select { font-size: 1rem; min-height: 36px; }
    /* FAB button — larger touch target */
    #atlas-score-fab a { padding: 0.75rem 1.25rem; font-size: 0.82rem; min-height: 44px; }
}

@media (max-width: 480px) {
    #atlas-hud .hud-stat:nth-child(n+4) { display: none; }
    #atlas-hud .hud-sep:nth-child(n+4) { display: none; }
}

/* ── Info panel action buttons (v2.0) ─────────────────── */
.vn-info-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 0.5rem;
}

.vn-action-btn {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: opacity 0.15s;
}

.vn-action-btn:hover { opacity: 0.75; }

.vn-action-case {
    background: rgba(92, 107, 192, 0.18);
    color: #7c8aff;
    border: 1px solid rgba(92, 107, 192, 0.3);
}

.vn-action-eu {
    background: rgba(34, 139, 230, 0.12);
    color: #74c0fc;
    border: 1px solid rgba(34, 139, 230, 0.25);
}

.vn-action-score {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ── Pe display in info panel ────────────────────────────── */
.vn-info-pe {
    font-family: var(--font-mono, monospace);
    font-size: 0.78rem;
    color: var(--text-dim, #888);
    margin: -0.25rem 0 0.75rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 3px;
}
.vn-info-pe strong {
    color: var(--text, #e0e0e0);
    font-size: 0.9rem;
}

/* ── Framework stats panel (left sidebar) ────────────────── */
.atlas-stats-section {
    padding-bottom: 0.5rem !important;
}
.atlas-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.atlas-stat {
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 3px;
}
.atlas-stat-num {
    font-family: var(--font-mono, monospace);
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    line-height: 1.2;
}
.atlas-stat-dim {
    font-family: var(--font-mono, monospace);
    font-size: 0.58rem;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.atlas-pe-formula {
    font-family: var(--font-mono, monospace);
    font-size: 0.62rem;
    color: rgba(255,255,255,0.2);
    text-align: center;
    padding: 0.25rem 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
