        :root {
            --bg: #0a0e14;
            --surface: #131920;
            --surface-2: #1a2230;
            --text: #e2e8f0;
            --text-muted: #8892a4;
            --border: #2a3545;
            --accent: #00b336;
            --accent-glow: rgba(0, 179, 54, 0.35);
            --copy-only: #e68a00;
            --copy-only-glow: rgba(230, 138, 0, 0.35);
        }

        :root.light {
            --bg: #ffffff;
            --surface: #f5f5f5;
            --surface-2: #eeeeee;
            --text: #1a1a1a;
            --text-muted: #666666;
            --border: #dddddd;
            --accent: #00b336;
            --accent-glow: rgba(0, 179, 54, 0.15);
            --copy-only: #c87800;
            --copy-only-glow: rgba(200, 120, 0, 0.15);
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text);
            height: 100vh;
            overflow: hidden;
        }

        header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 24px;
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            z-index: 10;
            position: relative;
        }

        .logo-area h1 {
            font-size: 20px;
            font-weight: 700;
        }

        .logo-area h1 span { color: var(--accent); }

        .logo-area .subtitle {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .search-box input {
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 14px;
            color: var(--text);
            font-size: 14px;
            width: 280px;
            outline: none;
            transition: border-color 0.2s;
        }

        .search-box input:focus { border-color: var(--accent); }
        .search-box input::placeholder { color: var(--text-muted); }

        .btn {
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 16px;
            color: var(--text);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn:hover { background: var(--border); }

        .theme-toggle {
            width: 36px;
            height: 36px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .theme-toggle:hover { background: var(--border); border-color: var(--accent); }
        .theme-toggle svg { width: 18px; height: 18px; }

        /* ── Flow Layout ── */
        .flow-container {
            display: flex;
            height: calc(100vh - 57px);
            position: relative;
        }

        .column {
            display: flex;
            flex-direction: column;
            padding: 16px 0;
            overflow-y: auto;
            z-index: 2;
            position: relative;
            scrollbar-width: thin;
            scrollbar-color: rgba(128,128,128,0.2) transparent;
        }

        .column::-webkit-scrollbar { width: 4px; }
        .column::-webkit-scrollbar-track { background: transparent; }
        .column::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.2); border-radius: 2px; }
        .column:hover::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.4); }

        .column-left {
            width: 240px;
            padding-left: 20px;
            padding-right: 12px;
        }

        .column-right {
            width: 260px;
            padding-right: 20px;
            padding-left: 12px;
            margin-left: auto;
        }

        .column-header {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--text-muted);
            padding: 4px 12px 10px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .column-header .arrow { color: var(--accent); font-size: 14px; }

        .cat-label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            color: var(--text-muted);
            padding: 4px 12px;
            margin-top: 14px;
            font-weight: 700;
            display: block;
        }

        .flow-node {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.15s;
            position: relative;
            white-space: nowrap;
        }

        .flow-node:hover { background: var(--surface-2); }

        .flow-node.selected {
            background: var(--accent);
            color: #fff;
            box-shadow: 0 0 16px var(--accent-glow);
        }

        .flow-node.highlighted {
            background: var(--surface-2);
            border-left: 2px solid var(--accent);
        }

        .column-right .flow-node.highlighted {
            border-left: none;
            border-right: 2px solid var(--accent);
        }

        .flow-node.dimmed {
            opacity: 0.2;
        }

        .flow-node .node-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .flow-node .count {
            margin-left: auto;
            font-size: 10px;
            color: var(--text-muted);
            background: var(--surface-2);
            padding: 1px 6px;
            border-radius: 10px;
        }

        .flow-node.selected .count {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }

        /* ── SVG connection lines ── */
        .connections-svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
        }

        .conn-path {
            fill: none;
            stroke: var(--border);
            stroke-width: 1;
            stroke-opacity: 0.2;
            transition: all 0.3s;
        }

        .conn-path.highlighted {
            stroke: var(--accent);
            stroke-opacity: 0.7;
            stroke-width: 2;
        }

        .conn-path.highlighted-copy {
            stroke: var(--copy-only);
            stroke-opacity: 0.7;
            stroke-width: 2;
            stroke-dasharray: 6 3;
        }

        .conn-path.dimmed {
            stroke-opacity: 0.03;
        }

        .flow-node.highlighted-copy {
            background: var(--surface-2);
            border-left: 2px dashed var(--copy-only);
        }

        .column-right .flow-node.highlighted-copy {
            border-left: none;
            border-right: 2px dashed var(--copy-only);
        }

        /* ── Center info ── */
        .center-label {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            z-index: 3;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .center-label.visible { opacity: 1; }

        .center-label .cl-name {
            font-size: 18px;
            font-weight: 700;
            color: var(--accent);
        }

        .center-label .cl-cat {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .center-label .cl-count {
            font-size: 28px;
            font-weight: 800;
            color: var(--text);
            margin-top: 8px;
        }

        .center-label .cl-desc {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* ── Bottom bar ── */
        .info-panel {
            position: absolute;
            bottom: 16px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 8px 20px;
            display: flex;
            align-items: center;
            gap: 20px;
            font-size: 12px;
            color: var(--text-muted);
            z-index: 10;
        }

        .info-panel .stat-value {
            color: var(--accent);
            font-weight: 600;
        }

        /* ── Flow direction arrow ── */
        .flow-arrow {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 0;
            color: var(--border);
            font-size: 40px;
            opacity: 0.15;
            pointer-events: none;
            letter-spacing: 20px;
        }

        /* ── Documentation Panel ── */
        .docs-panel {
            position: absolute;
            bottom: 52px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            z-index: 10;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 14px 18px;
            max-width: 600px;
            min-width: 380px;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s ease;
        }

        .docs-panel.visible {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) translateY(0);
        }

        .docs-panel-header {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .docs-panel-header .doc-icon {
            font-size: 13px;
        }

        .docs-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .doc-link {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 8px;
            text-decoration: none;
            color: var(--text);
            font-size: 12px;
            transition: all 0.2s;
            flex: 1 1 calc(50% - 4px);
            min-width: 170px;
        }

        .doc-link:hover {
            border-color: var(--accent);
            background: rgba(0, 179, 54, 0.08);
        }

        .doc-link .doc-link-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            flex-shrink: 0;
        }

        .doc-link .doc-link-text {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .doc-link .doc-link-title {
            font-weight: 600;
            font-size: 12px;
            line-height: 1.2;
        }

        .doc-link .doc-link-desc {
            font-size: 10px;
            color: var(--text-muted);
            line-height: 1.2;
        }
