        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #1a1a2e;
            color: #eee;
            overflow: hidden;
        }
        #container {
            display: flex;
            height: 100vh;
        }
        #sidebar {
            width: 320px;
            background: #16213e;
            padding: 20px;
            overflow-y: auto;
            border-right: 1px solid #0f3460;
        }
        #graph {
            flex: 1;
            position: relative;
        }
        #passages-panel {
            width: 400px;
            background: #16213e;
            padding: 20px;
            overflow-y: auto;
            border-left: 1px solid #0f3460;
            display: none;
        }
        #passages-panel.visible { display: block; }
        #passages-panel h2 {
            font-size: 1.1rem;
            color: #e94560;
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #close-passages {
            background: none;
            border: none;
            color: #888;
            font-size: 1.2rem;
            cursor: pointer;
        }
        #close-passages:hover { color: #e94560; }
        .passage {
            background: #0f3460;
            border-radius: 6px;
            padding: 12px;
            margin-bottom: 12px;
            font-size: 0.85rem;
            line-height: 1.5;
            color: #ccc;
        }
        .passage-source {
            font-size: 0.7rem;
            color: #0f9b8e;
            margin-bottom: 6px;
            display: flex;
            justify-content: space-between;
        }
        .passage-source a {
            color: #0f9b8e;
            text-decoration: none;
        }
        .passage-source a:hover { text-decoration: underline; }
        .passage-score {
            color: #666;
        }
        .passage-text {
            color: #ddd;
        }
        h1 {
            font-size: 1.3rem;
            margin-bottom: 15px;
            color: #e94560;
        }
        h2 {
            font-size: 1rem;
            margin: 15px 0 10px;
            color: #0f9b8e;
        }
        .domain-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 15px;
        }
        .domain-btn {
            padding: 4px 10px;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.2s;
        }
        .domain-btn.active { opacity: 1; }
        .domain-btn:not(.active) { opacity: 0.4; }
        #concept-detail {
            background: #0f3460;
            border-radius: 8px;
            padding: 15px;
            margin-top: 15px;
            display: none;
        }
        #concept-detail.visible { display: block; }
        #concept-name {
            font-size: 1.1rem;
            color: #e94560;
            margin-bottom: 8px;
        }
        #concept-domain {
            font-size: 0.8rem;
            color: #0f9b8e;
            margin-bottom: 10px;
        }
        #concept-definition {
            font-size: 0.85rem;
            line-height: 1.5;
            color: #ccc;
            margin-bottom: 10px;
        }
        #concept-relationships {
            font-size: 0.8rem;
        }
        .rel-item {
            margin: 4px 0;
            color: #aaa;
        }
        .rel-type { color: #0f9b8e; }
        .rel-target { color: #e94560; cursor: pointer; }
        .rel-target:hover { text-decoration: underline; }
        #search {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #0f3460;
            border-radius: 6px;
            background: #1a1a2e;
            color: #eee;
            margin-bottom: 10px;
        }
        #search:focus { outline: none; border-color: #e94560; }
        .legend {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 15px;
        }
        .legend-item {
            display: flex;
            align-items: center;
            font-size: 0.7rem;
            gap: 4px;
        }
        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }
        svg { width: 100%; height: 100%; }
        .node { cursor: pointer; }
        .node circle {
            stroke: #fff;
            stroke-width: 1.5px;
            transition: r 0.2s;
        }
        .node:hover circle { r: 12; }
        .node.selected circle {
            stroke: #e94560;
            stroke-width: 3px;
        }
        .node text {
            font-size: 14px;
            fill: #ccc;
            pointer-events: none;
            transition: font-size 0.2s, fill 0.2s;
        }
        .node.hovered text, .node.connected text {
            font-size: 18px;
            fill: #fff;
            font-weight: 600;
        }
        .node.connected-2nd text {
            font-size: 15px;
            fill: #aaa;
            font-weight: 500;
        }
        .node.connected-2nd circle {
            opacity: 0.7;
        }
        .node.hovered circle {
            r: 14;
        }
        .node.dimmed {
            opacity: 0.15;
        }
        /* Pinned (clicked) state - cyan/teal colors */
        .node.pinned text {
            font-size: 18px;
            fill: #00d9ff;
            font-weight: 600;
        }
        .node.pinned circle {
            r: 14;
            stroke: #00d9ff;
            stroke-width: 3px;
        }
        .node.pinned-connected text {
            font-size: 17px;
            fill: #7fecff;
            font-weight: 600;
        }
        .node.pinned-connected circle {
            stroke: #00d9ff;
            stroke-width: 1px;
        }
        .node.pinned-connected-2nd text {
            font-size: 14px;
            fill: #5cc;
            font-weight: 500;
        }
        .node.pinned-connected-2nd circle {
            opacity: 0.8;
        }
        .node.pinned-dimmed {
            opacity: 0.2;
        }
        .link {
            stroke: #444;
            stroke-opacity: 0.4;
            fill: none;
            transition: stroke 0.2s, stroke-opacity 0.2s, stroke-width 0.2s;
        }
        .link.highlighted {
            stroke: #e94560;
            stroke-opacity: 1;
            stroke-width: 2.5px;
        }
        .link.highlighted-2nd {
            stroke: #e94560;
            stroke-opacity: 0.4;
            stroke-width: 1.5px;
        }
        .link.pinned-highlighted {
            stroke: #00d9ff;
            stroke-opacity: 1;
            stroke-width: 2.5px;
        }
        .link.pinned-highlighted-2nd {
            stroke: #00d9ff;
            stroke-opacity: 0.4;
            stroke-width: 1.5px;
        }
        .link.pinned-dimmed {
            opacity: 0.2;
        }
        .link.dimmed {
            stroke-opacity: 0.05;
        }
        .link-label {
            transition: opacity 0.2s, fill 0.2s, font-size 0.2s;
        }
        .link-label.highlighted {
            opacity: 1 !important;
            fill: #e94560;
            font-size: 12px;
            font-weight: 600;
        }
        .link-label.highlighted-2nd {
            opacity: 0.6 !important;
            fill: #e94560;
            font-size: 10px;
        }
        .link-label.pinned-highlighted {
            opacity: 1 !important;
            fill: #00d9ff;
            font-size: 12px;
            font-weight: 600;
        }
        .link-label.pinned-highlighted-2nd {
            opacity: 0.6 !important;
            fill: #00d9ff;
            font-size: 10px;
        }
        .link-label.pinned-dimmed {
            opacity: 0 !important;
        }
        .link-label.dimmed {
            opacity: 0 !important;
        }
        #controls {
            position: absolute;
            bottom: 20px;
            right: 20px;
            display: flex;
            gap: 8px;
        }
        .control-btn {
            padding: 8px 12px;
            background: #0f3460;
            border: none;
            border-radius: 6px;
            color: #eee;
            cursor: pointer;
        }
        .control-btn:hover { background: #e94560; }
        #stats {
            font-size: 0.75rem;
            color: #666;
            margin-top: 10px;
        }
