        body { margin: 0; background: #111; font-family: system-ui, sans-serif; overflow: hidden; }
        canvas { display: block; }
        #controls {
            position: fixed; top: 20px; left: 20px;
            background: rgba(20,20,20,0.95); padding: 20px;
            border-radius: 12px; color: #fff; width: 280px; z-index: 10;
            max-height: calc(100vh - 40px); overflow-y: auto;
        }
        h1 { margin: 0 0 10px; font-size: 18px; color: #4fc3f7; }
        .explain { font-size: 12px; color: #888; margin-bottom: 15px; line-height: 1.4; }
        .stat { font-size: 13px; color: #aaa; margin: 5px 0; }
        .stat b { color: #fff; }
        input[type=text] {
            width: 100%; padding: 10px; margin: 10px 0;
            background: #222; border: 1px solid #444; border-radius: 6px; color: #fff;
            box-sizing: border-box;
        }
        #results { max-height: 200px; overflow-y: auto; }
        .result { padding: 8px; cursor: pointer; font-size: 13px; color: #ccc; border-radius: 4px; border-bottom: 1px solid #333; }
        .result:hover { background: #333; }
        .result small { color: #666; }

        /* Semantic search — mode buttons + per-type result rows */
        .ds-mode { flex: 1; padding: 4px 6px; font-size: 10px;
            background: #1a1a1a; color: #888;
            border: 1px solid #333; border-radius: 4px;
            cursor: pointer; text-transform: uppercase; letter-spacing: 0.4px; }
        .ds-mode:hover { color: #ccc; border-color: #555; }
        .ds-mode.active { background: #4fc3f7; color: #000; border-color: #4fc3f7; }

        .ds-row { padding: 7px 8px; border-bottom: 1px solid #2a2a2a;
            display: block; color: #ccc; text-decoration: none; font-size: 12px;
            line-height: 1.4; cursor: pointer; }
        .ds-row:hover { background: #2a2a2a; color: #fff; }
        .ds-row:last-child { border-bottom: 0; }
        .ds-row .ds-summary, .ds-row .ds-bio, .ds-row .ds-nature { color: #ddd; }
        .ds-row .ds-title { color: #4fc3f7; font-weight: 600; font-size: 11px; }
        .ds-row .ds-meta { color: #888; font-size: 10px; margin-top: 3px; }
        .ds-row .ds-score { color: #4fc3f7; font-variant-numeric: tabular-nums; }
        .ds-row .ds-pair-arrow { color: #4fc3f7; }
        label { display: block; margin-top: 12px; font-size: 12px; color: #666; }
        input[type=range] { width: 100%; margin: 8px 0; }

        #info {
            position: fixed; bottom: 20px; left: 20px;
            background: rgba(20,20,20,0.95); padding: 15px;
            border-radius: 10px; color: #fff; display: none; z-index: 10;
            max-width: 320px; max-height: 350px; overflow-y: auto;
        }
        #info h3 { margin: 0 0 8px; color: #4fc3f7; font-size: 15px; word-break: break-all; }
        #info.locked { border: 2px solid #4fc3f7; }

        #loading {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
            color: #4fc3f7; font-size: 18px; text-align: center;
        }

        #date-filter-wrap { margin: 15px 0 0; padding-top: 10px; border-top: 1px solid #333; }
        .agency-combo { margin: 15px 0 0; padding-top: 10px; border-top: 1px solid #333;
            position: relative; }
        .agency-input-wrap { position: relative; }
        #agency-search, #domain-search { margin: 5px 0 0; padding-right: 34px; }
        .agency-combo.has-selection #agency-search,
        .agency-combo.has-selection #domain-search { border-color: #4fc3f7;
            background: rgba(79,195,247,0.08); }
        #agency-toggle, #domain-toggle { position: absolute; right: 5px; top: calc(50% + 2px);
            transform: translateY(-50%); width: 28px; height: 28px; padding: 0;
            color: #aaa; background: transparent; border: 0; cursor: pointer;
            font-size: 15px; border-radius: 4px; }
        #agency-toggle:hover, #agency-toggle:focus-visible,
        #domain-toggle:hover, #domain-toggle:focus-visible { color: #fff; background: #333; }
        #agency-dropdown, #domain-dropdown { display: none; position: absolute; left: 0; right: 0;
            z-index: 30; max-height: 320px; overflow-y: auto; background: #1a1a1a;
            border: 1px solid #444; border-radius: 0 0 6px 6px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.45); }
        #agency-dropdown.show, #domain-dropdown.show { display: block; }
        .agency-option { display: flex; width: 100%; align-items: flex-start;
            justify-content: space-between; gap: 8px; padding: 8px 9px;
            color: #ccc; background: transparent; border: 0;
            border-bottom: 1px solid #333; text-align: left; cursor: pointer;
            font: inherit; font-size: 12px; line-height: 1.3; }
        .agency-option:last-child { border-bottom: 0; }
        .agency-option:hover, .agency-option.active, .agency-option:focus-visible {
            color: #fff; background: #333; outline: none; }
        .agency-option.selected { background: rgba(79,195,247,0.12); }
        .agency-option.selected .agency-option-name,
        .agency-option.selected > .agency-option-label { color: #4fc3f7; }
        .agency-option-label { min-width: 0; display: grid; gap: 2px; }
        .agency-option-name { color: #eee; font-weight: 600; }
        .agency-option-domains { color: #8ccff2; overflow-wrap: anywhere;
            font-size: 10px; line-height: 1.35; }
        .agency-option-count { flex: 0 0 auto; color: #777; font-size: 11px; }
        .agency-empty { padding: 10px; color: #777; font-size: 12px; }
        #agency-selection-hint, #domain-selection-hint {
            min-height: 14px; margin-top: 4px; color: #8ccff2;
            font-size: 10px; line-height: 1.3; }
        #date-filter-wrap label.toggle { display: flex; align-items: center; cursor: pointer;
            font-size: 12px; color: #ccc; margin-top: 0; }
        #date-filter-wrap label.toggle input { margin-right: 8px; }
        #date-filter-box { display: none; flex-direction: column; gap: 6px; margin-top: 8px;
            padding: 10px; background: rgba(255,255,255,0.04); border-radius: 6px; }
        #date-filter-box.show { display: flex; }
        #date-filter-box .dfb-row { display: grid; grid-template-columns: 1fr auto 1fr auto;
            align-items: end; gap: 6px; font-size: 12px; color: #aaa; }
        #date-filter-box .dfb-field { display: grid; gap: 3px; margin: 0;
            color: #777; font-size: 10px; }
        #date-filter-box select { width: 100%; min-width: 0; padding: 6px 22px 6px 7px;
            background: #222; border: 1px solid #444; border-radius: 4px; color: #fff;
            box-sizing: border-box; }
        #date-filter-box .dfb-range-mark { align-self: end; padding-bottom: 7px; color: #777; }
        #date-reset { align-self: end; height: 29px; padding: 0 7px; border: 1px solid #444;
            border-radius: 4px; background: #222; color: #aaa; cursor: pointer;
            font: inherit; font-size: 10px; }
        #date-reset:hover, #date-reset:focus-visible { color: #fff; border-color: #777; }
        #date-filter-summary { min-height: 14px; color: #8ccff2; font-size: 10px;
            line-height: 1.3; font-weight: 600; }
        #date-filter-box .dfb-warn { font-size: 10px; color: #888; line-height: 1.35; }
        .era-toggle { margin: 15px 0 0; padding-top: 10px; border-top: 1px solid #333; }
        .era-toggle-title { font-size: 11px; color: #666; margin-bottom: 6px; }
        .era-toggle-btns { display: flex; gap: 4px; }
        .era-toggle-btn { flex: 1; padding: 7px 6px; font-size: 11px;
            background: #1a1a1a; color: #aaa; border: 1px solid #333;
            border-radius: 6px; cursor: pointer; font-weight: 600; }
        .era-toggle-btn:hover { color: #fff; border-color: #555; }
        .era-toggle-btn.active { background: #4fc3f7; color: #000; border-color: #4fc3f7; }
        .era-toggle-note { margin-top: 6px; font-size: 10px; color: #777; line-height: 1.35; }

        /* LLM dossier panels (per-node profile + per-edge correspondence summary).
           Ports the .ed-* pattern from networkviewer/index.html. */
        #dossier-pane {
            position: fixed; top: 20px; right: 380px;
            width: 340px; max-height: calc(100vh - 40px); overflow-y: auto;
            display: none; z-index: 10;
            background: rgba(20,20,20,0.95); padding: 14px;
            border-radius: 12px; color: #fff;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        }
        @media (max-width: 1180px) {
            /* On narrower screens, dock under the correspondent-panel
               instead of beside it, to avoid overlapping the left controls. */
            #dossier-pane { top: auto; right: 80px; bottom: 20px; width: 280px;
                max-height: 50vh; }
        }
        .dossier { margin: 0 0 10px; padding: 10px; background: rgba(79,195,247,0.06);
            border: 1px solid rgba(79,195,247,0.2); border-radius: 6px; }
        .dossier:last-child { margin-bottom: 0; }
        .dossier.collapsed .ed-body { display: none; }
        .ed-head { display: flex; align-items: center; gap: 6px; cursor: pointer;
            font-size: 11px; color: #4fc3f7; text-transform: uppercase;
            letter-spacing: 0.5px; user-select: none; }
        .ed-head .ed-burger { font-size: 13px; line-height: 1; }
        .ed-head .ed-hint { margin-left: auto; color: #555; text-transform: none;
            letter-spacing: 0; font-size: 10px; }
        .ed-body { margin-top: 8px; font-size: 12px; line-height: 1.45; color: #ddd; }
        .ed-title { font-weight: 600; color: #fff; margin-bottom: 4px; word-break: break-all; }
        .ed-meta { color: #888; font-size: 11px; margin-bottom: 6px; }
        .ed-badge { display: inline-block; padding: 1px 6px; border-radius: 10px;
            font-size: 10px; font-weight: 600; margin-left: 6px; text-transform: uppercase;
            letter-spacing: 0.5px; }
        .ed-badge.strong       { background: #1b5e20; color: #a5d6a7; }
        .ed-badge.incidental   { background: #424242; color: #bbb; }
        .ed-badge.same_entity  { background: #4527a0; color: #b39ddb; }
        .ed-badge.unclear      { background: #4e342e; color: #d7ccc8; }
        .ed-badge.role         { background: #0d47a1; color: #90caf9; }
        .ed-badge.kind-org     { background: #4a148c; color: #ce93d8; }
        .ed-badge.kind-person  { background: #0d47a1; color: #90caf9; }
        .ed-badge.kind-unclear { background: #4e342e; color: #d7ccc8; }
        .ed-nature, .ed-bio { color: #eee; margin: 4px 0; }
        .ed-why { color: #aaa; font-style: italic; font-size: 11px; }
        .ed-empty { color: #777; font-style: italic; font-size: 11px; }
        .ed-sec { margin-top: 8px; color: #888; font-size: 10px;
            text-transform: uppercase; letter-spacing: 0.5px; }
        .ed-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
        .ed-chip { padding: 2px 7px; border-radius: 10px; background: rgba(255,255,255,0.07);
            color: #ccc; font-size: 11px; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); }
        .ed-chip:hover { background: rgba(255,255,255,0.15); color: #fff; }
        .ed-chip.term { background: rgba(245,158,11,0.10); color: #fcd34d;
            border-color: rgba(245,158,11,0.25); }
        .ed-chip.term:hover { background: rgba(245,158,11,0.20); color: #fbbf24; }
        /* Static chips: informational only — no pointer, no hover lift. */
        .ed-chip.static { cursor: default; }
        .ed-chip.static:hover { background: rgba(255,255,255,0.07); color: #ccc; }
        .ed-chip.static.term { /* same look as a regular term chip */ }
        .ed-chip.static.term:hover { background: rgba(245,158,11,0.10); color: #fcd34d; }
        .ed-spark { display: flex; align-items: flex-end; gap: 1px; height: 28px;
            margin: 6px 0 0; }
        .ed-spark .bar { flex: 1 1 0; min-width: 2px; max-width: 12px;
            background: #4fc3f7; border-radius: 1px 1px 0 0; min-height: 1px; }
        .ed-spark .bar.und { background: #555; flex-grow: 0; flex-basis: 6px; margin-left: 4px; }
        .ed-spark-labels { display: flex; justify-content: space-between;
            font-size: 9px; color: #777; margin-top: 2px; }

        .legend { margin-top: 15px; padding-top: 15px; border-top: 1px solid #333; }
        .legend-title { font-size: 11px; color: #666; margin-bottom: 8px; }
        .legend-item { display: flex; align-items: center; margin: 4px 0; font-size: 11px; color: #aaa; }
        .legend-dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }

        .btn {
            display: block; margin-top: 8px; padding: 10px 14px;
            background: #4fc3f7; color: #000; border: none; border-radius: 6px;
            cursor: pointer; font-weight: 600; width: 100%; font-size: 12px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: rgba(255,255,255,0.2);
        }
        .btn:hover { background: #81d4fa; }
        .btn:active { opacity: 0.8; }

        #clear-btn { display: none; background: #666; color: #fff; }
        #clear-btn:hover { background: #888; }
        #toxicdocs-btn { background: #ff9800; }
        #toxicdocs-btn:hover { background: #ffb74d; }
        #toxicdocs-pair-btn { display: none; background: #ff9800; }
        #toxicdocs-pair-btn:hover { background: #ffb74d; }
        #toxicdocs-source-panel { display: none; margin-top: 8px; padding: 10px;
            background: #eef8f6; border: 1px solid #cad4d2; color: #00102e; }
        #toxicdocs-source-summary { margin-bottom: 7px; color: #28766c;
            font-size: 11px; font-weight: 700; line-height: 1.35; }
        #toxicdocs-source-links { display: grid; gap: 4px; max-height: 220px;
            overflow-y: auto; }
        .toxicdocs-source-link { display: grid; grid-template-columns: auto minmax(0, 1fr);
            gap: 8px; align-items: start; padding: 7px 8px; background: #fff;
            border: 1px solid #cad4d2; color: #28766c; font-size: 10px;
            line-height: 1.3; overflow-wrap: anywhere; text-decoration: none; }
        .toxicdocs-source-index { padding-top: 1px; color: #5f7773; font-size: 8px;
            font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
            white-space: nowrap; }
        .toxicdocs-source-text { display: -webkit-box; overflow: hidden;
            -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #163e38; }
        .toxicdocs-source-link:hover, .toxicdocs-source-link:focus-visible {
            background: #afe0d7; color: #00102e; outline: none; }
        #toxicdocs-source-more { display: none; width: 100%; margin-top: 7px;
            padding: 7px; border: 1px solid #4da395; background: #fff;
            color: #28766c; cursor: pointer; font: inherit; font-size: 10px; }
        #toxicdocs-source-more:hover, #toxicdocs-source-more:focus-visible {
            background: #afe0d7; color: #00102e; outline: none; }
        #download-correspondence-btn { display: none; background: #ff9800; }
        #download-correspondence-btn:hover { background: #ffb74d; }

        #zip-toast {
            position: fixed; top: 20px; right: 20px;
            background: rgba(20,20,20,0.97); border: 1px solid #ff9800;
            border-radius: 10px; padding: 14px 18px; z-index: 100;
            color: #fff; font-size: 13px; max-width: 340px;
            display: none; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }
        #zip-toast.done { border-color: #4caf50; }
        #zip-toast.error { border-color: #f44336; }
        #zip-toast-title {
            font-weight: 700; margin-bottom: 6px; font-size: 12px;
            color: #ff9800; text-transform: uppercase; letter-spacing: 0.5px;
        }
        #zip-toast.done #zip-toast-title { color: #4caf50; }
        #zip-toast.error #zip-toast-title { color: #f44336; }
        #zip-toast-msg { color: #ccc; line-height: 1.4; }
        #zip-toast-msg a { color: #4fc3f7; text-decoration: none; font-weight: 600; }
        #zip-toast-msg a:hover { text-decoration: underline; }
        #zip-toast-close {
            position: absolute; top: 8px; right: 10px;
            background: none; border: none; color: #666; cursor: pointer;
            font-size: 16px; line-height: 1;
        }
        #zip-toast-close:hover { color: #fff; }
        @keyframes zip-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        #zip-toast-spinner {
            display: inline-block; animation: zip-pulse 1.5s ease-in-out infinite;
            margin-right: 6px;
        }
        #list-connections-btn { background: #00897b; color: #fff; }
        #list-connections-btn:hover { background: #26a69a; }

        #connections-list { margin-top: 10px; max-height: 150px; overflow-y: auto; }
        .conn-item { padding: 4px 0; font-size: 11px; color: #ccc; border-bottom: 1px solid #333; cursor: pointer; }
        .conn-item:hover { color: #4fc3f7; }

        #zoom-controls {
            position: fixed; bottom: 20px; right: 20px;
            background: rgba(20,20,20,0.95); padding: 10px;
            border-radius: 10px; z-index: 10;
        }
        #zoom-controls button {
            width: 36px; height: 36px; margin: 2px;
            background: #333; border: 1px solid #555; border-radius: 6px;
            color: #fff; font-size: 18px; cursor: pointer;
        }
        #zoom-controls button:hover { background: #4fc3f7; color: #000; }

        #isolate-toggle { position: fixed; bottom: 85px; right: 20px; z-index: 10; }
        #isolate-btn {
            padding: 10px 16px;
            background: #333; color: #aaa; border: 1px solid #555; border-radius: 8px;
            cursor: pointer; font-weight: 600; font-size: 12px;
        }
        #isolate-btn:hover { background: #444; color: #fff; }
        #isolate-btn.active { background: #9c27b0; color: #fff; border-color: #9c27b0; }

        .domain-badge {
            display: inline-block; background: #444; color: #ccc;
            padding: 2px 6px; border-radius: 4px; font-size: 10px; margin-left: 4px;
        }
        .hamburger { transition: transform 0.2s; display: inline-block; }
        .hamburger.open { transform: rotate(90deg); }
        .org-item {
            display: flex; justify-content: space-between; align-items: center;
            padding: 3px 0; font-size: 11px; border-bottom: 1px solid #333;
        }
        .org-item:last-child { border-bottom: none; }
        .org-name { color: #ccc; flex: 1; }
        .org-count { color: #4fc3f7; font-weight: bold; margin-left: 8px; }
        .org-type {
            font-size: 9px; padding: 1px 4px; border-radius: 3px; margin-left: 6px;
        }
        .org-type.government { background: #1565c0; color: #fff; }
        .org-type.industry { background: #c62828; color: #fff; }
        .org-type.thinktank { background: #6a1b9a; color: #fff; }
        .org-type.personal { background: #555; color: #aaa; }
        .org-type.education { background: #2e7d32; color: #fff; }
        .org-type.unknown { background: #555; color: #aaa; }

        #industry-toggle {
            margin-top: 15px; padding-top: 15px; border-top: 1px solid #333;
        }
        #industry-btn {
            width: 100%; padding: 10px 14px;
            background: #333; color: #aaa; border: 1px solid #555; border-radius: 6px;
            cursor: pointer; font-weight: 600; font-size: 12px;
        }
        #industry-btn:hover, #thinktank-btn:hover { background: #444; color: #fff; }
        #industry-btn.active { background: #c62828; color: #fff; border-color: #c62828; }
        #thinktank-btn {
            width: 100%; padding: 10px 14px;
            background: #333; color: #aaa; border: 1px solid #555; border-radius: 6px;
            cursor: pointer; font-weight: 600; font-size: 12px;
        }
        #thinktank-btn.active { background: #6a1b9a; color: #fff; border-color: #6a1b9a; }

        #industry-panel, #thinktank-panel {
            position: fixed; top: 20px; right: 80px;
            background: rgba(20,20,20,0.95); padding: 15px;
            border-radius: 10px; color: #fff; display: none; z-index: 10;
            max-width: 280px; max-height: calc(100vh - 40px); overflow-y: auto;
        }
        #thinktank-panel { right: 370px; }
        #industry-panel h3 { margin: 0 0 5px; color: #c62828; font-size: 14px; }
        #thinktank-panel h3 { margin: 0 0 5px; font-size: 14px; }
        .industry-item, .thinktank-item {
            padding: 8px 10px; margin: 4px 0; background: #222;
            border-radius: 6px; font-size: 12px;
            display: flex; justify-content: space-between; align-items: center;
            border-left: 3px solid #c62828;
        }
        .thinktank-item { border-left-color: #6a1b9a; }
        .industry-item:hover, .thinktank-item:hover { background: #333; }
        .industry-item .name, .thinktank-item .name { color: #fff; cursor: pointer; flex: 1; }
        .industry-item .count, .thinktank-item .count { color: #c62828; font-weight: bold; margin: 0 8px; }
        .thinktank-item .count { color: #6a1b9a; }
        .search-btn {
            background: none; border: none; cursor: pointer; font-size: 14px;
            padding: 2px 6px; border-radius: 4px;
        }
        .search-btn:hover { background: #444; }

        #industry-people {
            margin-top: 10px; padding-top: 10px; border-top: 1px solid #333;
            display: none;
        }
        #industry-people h4 { margin: 0 0 8px; color: #4fc3f7; font-size: 12px; }
        #industry-people-list {
            max-height: 300px; overflow-y: auto;
        }
        .person-item {
            padding: 6px 4px; font-size: 11px; color: #ccc;
            border-bottom: 1px solid #333;
            display: flex; align-items: center; justify-content: space-between;
        }
        .person-item:hover { background: #333; }
        .person-item .person-name { cursor: pointer; flex: 1; }
        .person-item .person-name:hover { color: #4fc3f7; }
        .person-item small { color: #888; margin: 0 4px; }
        #thinktank-people { margin-top: 10px; padding-top: 10px; border-top: 1px solid #333; display: none; }
        #thinktank-people h4 { margin: 0 0 8px; color: #6a1b9a; font-size: 12px; }
        #thinktank-people-list { max-height: 300px; overflow-y: auto; }

        #correspondent-panel {
            position: fixed; top: 20px; right: 80px;
            background: rgba(20,20,20,0.95); padding: 20px;
            border-radius: 12px; color: #fff; width: 280px; z-index: 10;
            display: none; max-height: calc(100vh - 100px); overflow-y: auto;
        }
        #correspondent-panel h3 { margin: 0 0 15px; color: #4fc3f7; font-size: 16px; }
        #correspondent-panel h3 .clickable-name { cursor: pointer; text-decoration: underline; }
        #correspondent-panel h3 .clickable-name:hover { color: #81d4fa; }

        #reorient-panel {
            display: none; margin-top: 8px;
        }
        #reorient-btn {
            width: 100%; padding: 8px 10px;
            background: #4fc3f7; color: #000; border: none; border-radius: 6px;
            cursor: pointer; font-weight: 600; font-size: 12px;
        }
        #reorient-btn:hover { background: #81d4fa; }

        .report-mistake {
            display: inline-block; margin-left: 6px;
            width: 18px; height: 18px; line-height: 18px; text-align: center;
            background: #444; border-radius: 50%; color: #aaa;
            font-size: 11px; font-weight: 700; text-decoration: none;
            vertical-align: middle; cursor: pointer;
            position: relative;
        }
        .report-mistake:hover { background: #ff9800; color: #000; }
        .report-mistake .report-tip {
            display: none; position: absolute; bottom: 24px; left: 50%;
            transform: translateX(-50%);
            background: rgba(20,20,20,0.97); border: 1px solid #555;
            border-radius: 6px; padding: 6px 10px; white-space: nowrap;
            color: #ccc; font-size: 11px; pointer-events: none;
        }
        .report-mistake:hover .report-tip { display: block; }

        @media (max-width: 760px) {
            #controls {
                top: auto; left: 10px; right: 10px; bottom: 10px;
                width: auto; padding: 14px; max-height: 48vh;
                border-radius: 10px;
            }
            #controls h1 { font-size: 16px; }
            #docsearch-results { max-height: 180px !important; }
            #results { max-height: 120px; }
            #domain-dropdown { max-height: 180px !important; }

            #info {
                left: 10px; right: 10px; bottom: calc(48vh + 20px);
                max-width: none; max-height: 28vh; padding: 12px;
            }
            #industry-panel,
            #thinktank-panel,
            #correspondent-panel,
            #dossier-pane {
                left: 10px; right: 10px; width: auto;
                max-width: none; max-height: 38vh;
            }
            #industry-panel,
            #thinktank-panel,
            #correspondent-panel {
                top: 10px;
            }
            #dossier-pane {
                top: auto; bottom: calc(48vh + 20px);
            }
            #zoom-controls { top: 10px; right: 10px; bottom: auto; }
            #isolate-toggle { top: 62px; right: 10px; bottom: auto; }
            #zip-toast {
                top: 10px; left: 10px; right: 10px;
                max-width: none;
            }
        }

        /* EDGI visual system */
        :root { --edgi-ink:#00102e; --edgi-green:#4da395; --edgi-green-dark:#28766c; --edgi-green-pale:#afe0d7; --edgi-heading:#443f3f; --edgi-muted:#6d7685; --edgi-line:#cad4d2; --edgi-canvas:#f7faf9; }
        body { background:#0a0a0f; color:var(--edgi-ink); font-family:"Arial Narrow","Roboto Condensed",Arial,sans-serif; }
        #controls, #info, #dossier-pane, #industry-panel, #thinktank-panel, #correspondent-panel, #zoom-controls, #zip-toast {
            background:rgba(255,255,255,.97); color:var(--edgi-ink); border:1px solid var(--edgi-line); border-radius:0; box-shadow:0 4px 18px rgba(0,16,46,.08);
        }
        h1, #info h3, .ed-head, .ds-row .ds-title, #zip-toast-title { color:var(--edgi-heading); }
        .explain, .stat, label, .legend-title, .legend-item, .era-toggle-title, .era-toggle-note, .ed-meta, .ed-why, .ed-empty, .ed-sec, .ed-spark-labels, .result small, .ds-row .ds-meta, #zip-toast-msg { color:var(--edgi-muted); }
        .stat b, .ed-title, .ed-body, .ed-nature, .ed-bio, .ds-row, .ds-row .ds-summary, .ds-row .ds-bio, .ds-row .ds-nature, .result, .conn-item, .org-item { color:var(--edgi-ink); }
        input[type=text], input[type=number], select, #docsearch-wrap, #domain-combo, #gov-toggle, #date-filter-box {
            background:white !important; color:var(--edgi-ink) !important; border-color:var(--edgi-line) !important; border-radius:0 !important;
        }
        input[type=text]:focus, input[type=number]:focus, select:focus { outline:2px solid var(--edgi-green); outline-offset:1px; }
        input[type=range] { accent-color:var(--edgi-green-dark); }
        .result, .ds-row, .conn-item, .org-item, .legend, .era-toggle, #date-filter-wrap { border-color:var(--edgi-line); }
        .result:hover, .ds-row:hover, .conn-item:hover, .org-item:hover, .ed-chip:hover { background:#eef8f6; color:var(--edgi-ink); }
        .ds-mode, .era-toggle-btn, #isolate-btn, #zoom-controls button {
            background:white; color:var(--edgi-ink); border-color:var(--edgi-line); border-radius:0; box-shadow:none;
        }
        .ds-mode:hover, .era-toggle-btn:hover, #isolate-btn:hover, #zoom-controls button:hover { background:#eef8f6; color:var(--edgi-green-dark); border-color:var(--edgi-green); }
        .ds-mode.active, .era-toggle-btn.active, #isolate-btn.active { background:var(--edgi-green-pale); color:var(--edgi-ink); border-color:var(--edgi-green); }
        .btn, #clear-btn, #toxicdocs-btn, #toxicdocs-pair-btn, #download-correspondence-btn, #list-connections-btn { background:var(--edgi-green); color:white; border-radius:0; }
        .btn:hover, #clear-btn:hover, #toxicdocs-btn:hover, #toxicdocs-pair-btn:hover, #download-correspondence-btn:hover, #list-connections-btn:hover { background:var(--edgi-green-dark); }
        .dossier, .ed-chip, .domain-badge { background:#eef8f6; color:var(--edgi-ink); border-color:var(--edgi-line); border-radius:0; }
        .dossier .ed-chip.term,
        .dossier .ed-chip.static.term,
        .dossier .ed-chip.static.term:hover {
            background:#e3f2ef !important;
            color:var(--edgi-green-dark) !important;
            border-color:var(--edgi-green) !important;
            font-weight:600;
        }
        .dossier .ed-chip.term:not(.static):hover {
            background:var(--edgi-green-pale) !important;
            color:#174f48 !important;
        }
        .ed-spark .bar { background:var(--edgi-green); }
        #loading, #zip-toast-msg a, .conn-item:hover { color:var(--edgi-green-dark); }
        #info.locked { border-color:var(--edgi-green); }
        .legend-item:nth-child(2) .legend-dot { background:#f44336 !important; }
        .legend-item:nth-child(3) .legend-dot { background:#ff9800 !important; }
        .legend-item:nth-child(4) .legend-dot { background:#ffeb3b !important; }
        .legend-item:nth-child(5) .legend-dot { background:#4caf50 !important; }
        .legend-item:nth-child(6) .legend-dot { background:#2196f3 !important; }
        #dossier-pane .ed-body, #dossier-pane .ed-title, #dossier-pane .ed-nature,
        #dossier-pane .ed-bio, #industry-panel, #thinktank-panel, #correspondent-panel,
        #industry-panel *, #thinktank-panel *, #correspondent-panel * { color:var(--edgi-ink) !important; }
        #dossier-pane .ed-head, #dossier-pane .ed-sec { color:var(--edgi-green-dark) !important; }
        .ed-badge.unclear { background:#d8e3e1 !important; color:#00102e !important; border:1px solid #9fb3af; }
        ::-webkit-scrollbar-track { background:#eef3f2; }
        ::-webkit-scrollbar-thumb { background:#a9bfbb; }

        /* Single-drawer layout, mirroring Network Viewer. */
        :root {
            --email-panel-gap: clamp(10px, 1.2vw, 18px);
            --email-switcher-height: 38px;
            --email-controls-width: clamp(250px, 22vw, 300px);
            --email-details-width: clamp(330px, 27vw, 390px);
        }
        html body.edgi-switcher-email #controls {
            top: calc(var(--email-switcher-height) + var(--email-panel-gap)) !important;
            left: var(--email-panel-gap);
            box-sizing: border-box;
            width: var(--email-controls-width);
            max-height: calc(100dvh - var(--email-switcher-height) - (2 * var(--email-panel-gap))) !important;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        html body.edgi-switcher-email #info {
            top: calc(var(--email-switcher-height) + var(--email-panel-gap)) !important;
            right: var(--email-panel-gap);
            bottom: auto !important;
            left: auto !important;
            box-sizing: border-box;
            width: min(var(--email-details-width), calc(100vw - (2 * var(--email-panel-gap))));
            max-width: none;
            max-height: calc(100dvh - var(--email-switcher-height) - (2 * var(--email-panel-gap))) !important;
            padding: clamp(14px, 1.4vw, 20px);
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        html body.edgi-switcher-email #info > #dossier-pane,
        html body.edgi-switcher-email #info > #correspondent-panel,
        html body.edgi-switcher-email #info > #industry-panel,
        html body.edgi-switcher-email #info > #thinktank-panel {
            position: static !important;
            top: auto !important;
            right: auto !important;
            bottom: auto !important;
            left: auto !important;
            box-sizing: border-box;
            width: 100%;
            max-width: none;
            max-height: none;
            margin: 14px 0 0;
            padding: 14px 0 0;
            border: 0;
            border-top: 1px solid var(--edgi-line);
            background: transparent;
            box-shadow: none;
            overflow: visible;
        }
        html body.edgi-switcher-email #info > #dossier-pane {
            padding-top: 0;
            border-top: 0;
        }
        #info > #dossier-pane .dossier {
            margin: 0;
            padding: 12px;
        }
        #info > #correspondent-panel h3,
        #info > #industry-panel h3,
        #info > #thinktank-panel h3 {
            margin-top: 0;
        }
        #info > #correspondent-panel .btn {
            white-space: normal;
            line-height: 1.3;
        }
        #info .correspondent-toggle {
            position: relative;
            padding-right: 36px;
            text-align: left;
        }
        #info .correspondent-toggle::after {
            content: "+";
            position: absolute;
            top: 50%;
            right: 14px;
            transform: translateY(-50%);
            font-size: 20px;
            line-height: 1;
        }
        #info .correspondent-toggle[aria-expanded="true"]::after {
            content: "−";
        }
        #info #person-correspondents {
            margin-top: 12px !important;
            padding-top: 12px;
            border-top: 1px solid var(--edgi-line);
        }
        #info #correspondents-title {
            margin: 0 0 8px !important;
            color: var(--edgi-heading) !important;
            font-size: 12px;
        }
        #info #correspondents-list {
            max-height: min(40dvh, 400px) !important;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        #info #correspondents-list .person-item {
            background: transparent;
            color: var(--edgi-ink) !important;
            border-bottom: 1px solid var(--edgi-line);
        }
        #info #correspondents-list .person-item:hover {
            background: #eef8f6;
        }
        #info > #industry-panel .industry-item,
        #info > #thinktank-panel .thinktank-item {
            background: #eef8f6;
            border-bottom: 1px solid var(--edgi-line);
        }

        /* Both domain pickers share the same readable EDGI treatment. */
        html body.edgi-switcher-email #agency-dropdown,
        html body.edgi-switcher-email #domain-dropdown {
            background: #fff !important;
            color: var(--edgi-ink) !important;
            border: 1px solid var(--edgi-line) !important;
            box-shadow: 0 8px 18px rgba(0, 16, 46, .12);
        }
        html body.edgi-switcher-email #agency-dropdown .agency-option,
        html body.edgi-switcher-email #domain-dropdown .agency-option {
            box-sizing: border-box;
            gap: 8px;
            min-height: 42px;
            padding: 9px 10px;
            background: #fff !important;
            color: var(--edgi-ink) !important;
            border: 0;
            border-bottom: 1px solid var(--edgi-line);
            border-radius: 0;
            line-height: 1.25;
        }
        html body.edgi-switcher-email #agency-dropdown .agency-option:last-child,
        html body.edgi-switcher-email #domain-dropdown .agency-option:last-child {
            border-bottom: 0;
        }
        html body.edgi-switcher-email #agency-dropdown .agency-option:hover,
        html body.edgi-switcher-email #agency-dropdown .agency-option.active,
        html body.edgi-switcher-email #agency-dropdown .agency-option:focus-visible,
        html body.edgi-switcher-email #domain-dropdown .agency-option:hover,
        html body.edgi-switcher-email #domain-dropdown .agency-option.active,
        html body.edgi-switcher-email #domain-dropdown .agency-option:focus-visible {
            background: #eef8f6 !important;
            color: var(--edgi-ink) !important;
        }
        html body.edgi-switcher-email #agency-dropdown .agency-option.selected,
        html body.edgi-switcher-email #domain-dropdown .agency-option.selected {
            background: #e3f2ef !important;
        }
        html body.edgi-switcher-email .agency-option-name {
            color: var(--edgi-heading) !important;
        }
        html body.edgi-switcher-email .agency-option-domains {
            color: var(--edgi-green-dark) !important;
        }
        html body.edgi-switcher-email .agency-option-count {
            color: var(--edgi-muted) !important;
        }
        html body.edgi-switcher-email .agency-combo.has-selection input[type=text] {
            background: #eef8f6 !important;
            border-color: var(--edgi-green) !important;
        }
        html body.edgi-switcher-email #domain-selection-hint,
        html body.edgi-switcher-email #agency-selection-hint {
            color: var(--edgi-green-dark);
        }
        html body.edgi-switcher-email #date-filter-summary {
            color: var(--edgi-green-dark);
        }
        html body.edgi-switcher-email #date-reset {
            background: #fff; color: var(--edgi-green-dark);
            border-color: var(--edgi-line); border-radius: 0;
        }
        html body.edgi-switcher-email #date-reset:hover,
        html body.edgi-switcher-email #date-reset:focus-visible {
            background: #eef8f6; border-color: var(--edgi-green);
        }
        html body.edgi-switcher-email #date-filter-box .dfb-warn,
        html body.edgi-switcher-email #date-filter-box .dfb-field,
        html body.edgi-switcher-email #date-filter-box .dfb-range-mark {
            color: var(--edgi-muted);
        }

        @media (max-width: 760px) {
            :root { --email-panel-gap: 10px; }
            html body.edgi-switcher-email #controls {
                top: calc(var(--email-switcher-height) + var(--email-panel-gap)) !important;
                right: var(--email-panel-gap);
                bottom: auto !important;
                left: var(--email-panel-gap);
                width: auto;
                max-height: min(34dvh, 310px) !important;
            }
            html body.edgi-switcher-email #info {
                top: auto !important;
                right: var(--email-panel-gap);
                bottom: var(--email-panel-gap) !important;
                left: var(--email-panel-gap) !important;
                width: auto;
                max-height: min(46dvh, 430px) !important;
            }
            html body.edgi-switcher-email #zoom-controls {
                top: calc(var(--email-switcher-height) + var(--email-panel-gap)) !important;
                right: var(--email-panel-gap);
            }
            html body.edgi-switcher-email #isolate-toggle {
                top: calc(var(--email-switcher-height) + 62px) !important;
                right: var(--email-panel-gap);
            }
        }

        @media (max-width: 500px) {
            html body.edgi-switcher-email #controls { max-height: 30dvh !important; }
            html body.edgi-switcher-email #info { max-height: 50dvh !important; }
        }

        /* 2026 Email Explorer overhaul */
        html body.edgi-switcher-email {
            --explorer-panel: rgba(255, 255, 255, .985);
            --explorer-shadow: 0 14px 42px rgba(0, 16, 46, .16);
            background: #080b12;
        }
        html body.edgi-switcher-email canvas {
            background:
                radial-gradient(circle at 60% 42%, rgba(77, 163, 149, .08), transparent 38%),
                linear-gradient(145deg, #090b12 0%, #070910 100%);
            touch-action: none;
        }
        html body.edgi-switcher-email #loading {
            z-index: 100;
            display: flex;
            width: min(360px, calc(100vw - 40px));
            box-sizing: border-box;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 28px;
            background: var(--explorer-panel);
            border: 1px solid var(--edgi-line);
            box-shadow: var(--explorer-shadow);
            color: var(--edgi-ink);
        }
        html body.edgi-switcher-email #loading strong { color: var(--edgi-heading); font-size: 16px; }
        html body.edgi-switcher-email #loading small { color: var(--edgi-muted); font-size: 12px; }
        .loading-spinner {
            width: 22px; height: 22px; border-radius: 50%;
            border: 3px solid #d8e8e5; border-top-color: var(--edgi-green-dark);
            animation: explorer-spin .8s linear infinite;
        }
        #loading.error .loading-spinner { display: none; }
        #loading-retry {
            display: none; margin-top: 8px; padding: 8px 14px;
            border: 1px solid var(--edgi-green); background: var(--edgi-green);
            color: #fff; cursor: pointer; font: inherit; font-weight: 700;
        }
        @keyframes explorer-spin { to { transform: rotate(360deg); } }

        html body.edgi-switcher-email #controls,
        html body.edgi-switcher-email #info {
            background: var(--explorer-panel);
            border-color: rgba(202, 212, 210, .9);
            box-shadow: var(--explorer-shadow);
        }
        html body.edgi-switcher-email #controls {
            width: clamp(300px, 24vw, 338px);
            padding: 0;
            overflow: hidden;
        }
        #controls-body {
            max-height: calc(100dvh - var(--email-switcher-height) - 142px);
            padding: 0 18px 18px;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        #controls.collapsed { width: auto; min-width: 270px; }
        #controls.collapsed #controls-body,
        #controls.collapsed > .explain,
        #controls.collapsed > .view-metrics { display: none; }
        .controls-header {
            display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
            padding: 18px 18px 8px;
        }
        .controls-kicker {
            margin-bottom: 3px; color: var(--edgi-green-dark);
            font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
        }
        #controls h1 { margin: 0; color: var(--edgi-heading); font-size: 22px; line-height: 1; }
        #controls-collapse {
            flex: 0 0 auto; padding: 5px 7px; border: 0; background: transparent;
            color: var(--edgi-muted); cursor: pointer; font: inherit; font-size: 10px;
        }
        #controls-collapse:hover, #controls-collapse:focus-visible {
            background: #eef8f6; color: var(--edgi-green-dark); outline: 1px solid var(--edgi-green);
        }
        #controls > .explain {
            margin: 0; padding: 0 18px 12px; color: var(--edgi-muted);
            font-size: 11px; line-height: 1.45;
        }
        .view-metrics {
            display: grid; grid-template-columns: 1fr 1fr;
            margin: 0 18px 14px; border: 1px solid var(--edgi-line); background: #f8fbfa;
        }
        .view-metrics span { padding: 8px 10px; color: var(--edgi-muted); font-size: 10px; }
        .view-metrics span + span { border-left: 1px solid var(--edgi-line); }
        .view-metrics b { display: block; color: var(--edgi-heading); font-size: 16px; line-height: 1.1; }

        .control-section {
            margin: 0; padding: 15px 0; border-top: 1px solid var(--edgi-line);
        }
        .control-section:first-child { border-top: 0; padding-top: 0; }
        .control-section-title,
        .control-label {
            display: flex; align-items: center; justify-content: space-between;
            margin: 0 0 8px; color: var(--edgi-heading);
            font-size: 11px; font-weight: 800; letter-spacing: .035em;
        }
        .control-label output {
            min-width: 32px; padding: 2px 6px; background: #eef8f6;
            color: var(--edgi-green-dark); text-align: center; font-weight: 800;
        }
        .search-input-wrap { position: relative; }
        html body.edgi-switcher-email #search {
            margin: 0; min-height: 42px; padding: 10px 34px 10px 11px;
            border: 1px solid var(--edgi-line) !important;
        }
        #search-clear {
            position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
            display: none; width: 28px; height: 28px; border: 0; background: transparent;
            color: var(--edgi-muted); cursor: pointer; font-size: 18px;
        }
        #search-clear.show { display: block; }
        #search-clear:hover, #search-clear:focus-visible { color: var(--edgi-green-dark); background: #eef8f6; }
        #results {
            display: grid; max-height: 280px; margin-top: 6px; overflow-y: auto;
            border: 0; background: #fff;
        }
        .result,
        html body.edgi-switcher-email .result {
            display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
            width: 100%; box-sizing: border-box; padding: 9px 10px;
            border: 1px solid var(--edgi-line); border-bottom: 0; border-radius: 0;
            background: #fff; color: var(--edgi-ink); text-align: left; font: inherit;
        }
        .result:last-child,
        html body.edgi-switcher-email .result:last-child { border-bottom: 1px solid var(--edgi-line); }
        .result-main, .result-meta { display: grid; min-width: 0; gap: 2px; }
        .result-main strong { overflow: hidden; color: var(--edgi-heading); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
        .result-main small { overflow: hidden; color: var(--edgi-green-dark); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
        .result-meta { align-content: center; justify-items: end; color: var(--edgi-muted); font-size: 9px; }
        .result-meta em { color: var(--edgi-green-dark); font-style: normal; font-weight: 800; }
        .search-empty, .connection-empty { padding: 10px; color: var(--edgi-muted); font-size: 11px; }
        .activity-control { margin-top: 14px; }
        .activity-control input[type=range] { margin: 2px 0 0; }
        .range-ends { display: flex; justify-content: space-between; color: var(--edgi-muted); font-size: 9px; }

        #active-view {
            margin: 0 0 4px; padding: 10px; border: 1px solid #b9d7d2; background: #eef8f6;
        }
        .active-view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
        .active-view-head > span { color: var(--edgi-green-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
        #reset-filters { padding: 2px 0; border: 0; background: transparent; color: var(--edgi-green-dark); cursor: pointer; font: inherit; font-size: 10px; text-decoration: underline; }
        #active-filter-chips { display: flex; flex-wrap: wrap; gap: 4px; }
        .active-filter-chip { padding: 4px 6px; background: #fff; border: 1px solid #c5dfda; color: var(--edgi-ink); font-size: 9px; font-weight: 700; }

        .toggle-row {
            display: flex; align-items: flex-start; gap: 8px; margin: 0; cursor: pointer;
            color: var(--edgi-ink); font-size: 11px;
        }
        .toggle-row input { margin: 2px 0 0; accent-color: var(--edgi-green-dark); }
        .toggle-row span { display: grid; gap: 2px; }
        .toggle-row strong { color: var(--edgi-heading); font-size: 11px; }
        .toggle-row small { color: var(--edgi-muted); font-size: 9px; line-height: 1.35; }
        .toggle-row.compact { padding: 9px; border: 1px solid var(--edgi-line); background: #fff; }
        html body.edgi-switcher-email #gov-toggle {
            margin: 0 0 12px; padding: 0; border: 0; background: transparent !important;
        }
        html body.edgi-switcher-email .agency-combo {
            margin: 10px 0 0; padding: 0; border: 0; background: transparent !important;
        }
        .agency-combo > label { margin: 0 0 4px; color: var(--edgi-muted); font-size: 10px; }
        html body.edgi-switcher-email #agency-search,
        html body.edgi-switcher-email #domain-search { min-height: 38px; margin: 0; }
        #agency-selection-hint, #domain-selection-hint { min-height: 0; margin-top: 5px; }
        .agency-combo:not(.has-selection) #agency-selection-hint:empty,
        .agency-combo:not(.has-selection) #domain-selection-hint:empty { display: none; }
        .time-section .era-toggle { margin: 0 0 12px; padding: 0; border: 0; }
        .era-toggle-btns { gap: 0; }
        html body.edgi-switcher-email .era-toggle-btn { min-height: 34px; border-right: 0; }
        html body.edgi-switcher-email .era-toggle-btn:last-child { border-right: 1px solid var(--edgi-line); }
        #date-filter-wrap { margin: 0; padding: 0; border: 0; }
        #date-filter-box { margin-top: 6px; border: 1px solid var(--edgi-line); }
        .legend { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 2px; padding: 12px 0 0; }
        .legend-title { flex-basis: 100%; }

        #view-status {
            position: fixed; left: 50%; bottom: 18px; z-index: 8;
            transform: translateX(-50%); max-width: min(560px, calc(100vw - 760px));
            padding: 7px 11px; border: 1px solid rgba(175, 224, 215, .38);
            background: rgba(0, 16, 46, .84); color: #e7f5f2;
            box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
            font-size: 10px; font-weight: 700; text-align: center;
            pointer-events: none;
        }

        #info {
            top: calc(var(--email-switcher-height) + var(--email-panel-gap)) !important;
            right: var(--email-panel-gap); bottom: auto !important; left: auto !important;
            box-sizing: border-box;
            width: min(var(--email-details-width), calc(100vw - (2 * var(--email-panel-gap))));
            max-width: none;
            max-height: calc(100dvh - var(--email-switcher-height) - (2 * var(--email-panel-gap))) !important;
            padding: 18px; overflow-y: auto; overscroll-behavior: contain;
        }
        #info > #dossier-pane,
        #info > #correspondent-panel,
        #info > #industry-panel,
        #info > #thinktank-panel {
            position: static !important; inset: auto !important;
            box-sizing: border-box; width: 100%; max-width: none; max-height: none;
            margin: 14px 0 0; padding: 14px 0 0; border: 0;
            border-top: 1px solid var(--edgi-line); background: transparent;
            box-shadow: none; overflow: visible;
        }
        #info > #dossier-pane { padding-top: 0; border-top: 0; }
        #info-close {
            position: absolute; top: 8px; right: 8px; z-index: 2;
            width: 30px; height: 30px; border: 0; background: transparent;
            color: var(--edgi-muted); cursor: pointer; font-size: 21px;
        }
        #info-close:hover, #info-close:focus-visible { background: #eef8f6; color: var(--edgi-green-dark); }
        #pair-context {
            display: none; margin: 0 34px 8px 0; color: var(--edgi-green-dark);
            font-size: 9px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase;
        }
        #info h3 { margin-right: 30px; font-size: 18px; line-height: 1.2; }
        #info .stat { font-size: 11px; line-height: 1.45; }
        #info .domain-badge { margin-left: 7px; vertical-align: 2px; }
        html body.edgi-switcher-email #org-breakdown {
            border: 1px solid var(--edgi-line); background: #f8fbfa !important; border-radius: 0 !important;
        }
        #info .btn { min-height: 38px; margin-top: 7px; font-size: 11px; letter-spacing: .01em; }
        #info .btn.secondary { border: 1px solid var(--edgi-line); background: #fff; color: var(--edgi-green-dark); }
        #info .btn.secondary:hover { background: #eef8f6; border-color: var(--edgi-green); }
        #toxicdocs-source-panel { padding: 10px; border-color: #b9d7d2; background: #f5fbf9; }
        #toxicdocs-source-summary { font-size: 10px; }
        .toxicdocs-source-link { min-height: 28px; box-sizing: border-box; font-size: 9px; }
        #connections-list { margin-top: 6px; max-height: none; overflow: visible; }
        .connection-list-header { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; color: var(--edgi-muted); font-size: 9px; }
        .connection-list-header strong { color: var(--edgi-heading); font-size: 10px; }
        .connection-search,
        html body.edgi-switcher-email .connection-search {
            width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 8px 9px;
            border: 1px solid var(--edgi-line); border-radius: 0; background: #fff;
            color: var(--edgi-ink); font: inherit; font-size: 10px;
        }
        .connection-rows { max-height: min(38dvh, 360px); overflow-y: auto; border: 1px solid var(--edgi-line); }
        .conn-item,
        html body.edgi-switcher-email .conn-item {
            display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
            width: 100%; box-sizing: border-box; margin: 0; padding: 8px 9px;
            border: 0; border-bottom: 1px solid var(--edgi-line); background: #fff;
            text-align: left; cursor: pointer; font: inherit;
        }
        .conn-item:last-child,
        html body.edgi-switcher-email .conn-item:last-child { border-bottom: 0; }
        .conn-item > span { display: grid; min-width: 0; gap: 2px; }
        .conn-item strong { overflow: hidden; color: var(--edgi-heading); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
        .conn-item small { overflow: hidden; color: var(--edgi-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
        .conn-evidence { justify-items: end; color: var(--edgi-green-dark); font-size: 9px; font-weight: 800; }
        #isolate-toggle { gap: 6px; }
        html body.edgi-switcher-email #back-btn,
        html body.edgi-switcher-email #isolate-btn {
            margin: 0; padding: 10px 14px; border: 1px solid var(--edgi-line);
            background: rgba(255, 255, 255, .96); color: var(--edgi-ink);
            box-shadow: 0 5px 18px rgba(0, 16, 46, .12); cursor: pointer;
            font: inherit; font-size: 11px; font-weight: 800;
        }
        html body.edgi-switcher-email #isolate-btn.active { background: var(--edgi-green-pale); }

        @media (min-width: 761px) {
            body.details-open #zoom-controls,
            body.details-open #isolate-toggle {
                right: calc(var(--email-details-width) + (2 * var(--email-panel-gap)));
            }
        }

        @media (max-width: 980px) and (min-width: 761px) {
            html body.edgi-switcher-email #controls { width: 288px; }
            html body.edgi-switcher-email #info { width: 340px; }
            #view-status { display: none; }
        }
        @media (max-width: 760px) {
            #controls,
            html body.edgi-switcher-email #controls {
                top: auto !important; right: 8px; bottom: 8px !important; left: 8px; width: auto;
                max-height: min(44dvh, 390px) !important;
            }
            #controls-body { max-height: calc(min(44dvh, 390px) - 132px); padding: 0 14px 14px; }
            .controls-header { padding: 14px 14px 7px; }
            #controls > .explain { padding: 0 14px 9px; }
            .view-metrics { margin: 0 14px 10px; }
            #controls.collapsed {
                top: calc(var(--email-switcher-height) + 8px) !important;
                right: auto; bottom: auto !important;
                width: min(280px, calc(100vw - 76px)); min-width: 0;
            }
            #info,
            html body.edgi-switcher-email #info {
                right: 8px; bottom: 8px !important; left: 8px !important;
                top: auto !important;
                max-height: min(52dvh, 520px) !important; padding: 15px;
            }
            #view-status { display: none; }
            #zoom-controls,
            html body.edgi-switcher-email #zoom-controls {
                top: calc(var(--email-switcher-height) + 8px) !important;
                right: 8px; bottom: auto !important;
            }
            #isolate-toggle,
            html body.edgi-switcher-email #isolate-toggle {
                top: calc(var(--email-switcher-height) + 64px) !important;
                right: 8px; bottom: auto !important;
            }
            body.details-open #zoom-controls { display: none; }
            body.details-open #isolate-toggle {
                right: 8px; bottom: auto !important;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
        }
