/* ============================================================================
   INTELLIGENCE PLATFORM — Design System
   Warm dark theme — sophisticated, high-contrast, no pure white/black
   Token-driven: change :root to retheme the entire product
   ============================================================================ */

/* ===== DESIGN TOKENS ===== */
:root {
    /* ── Backgrounds (warm navy-slate from VeraCita containers) ── */
    /* Warm neutral dark — grey with hint of warmth, not blue */
    --ip-bg-page:        #171A1F;
    --ip-bg-surface:     #1E2128;
    --ip-bg-surface-alt: #252930;
    --ip-bg-hover:       #2E3239;
    --ip-bg-active:      #373B43;
    --ip-bg-input:       #1E2128;
    --ip-bg-overlay:     rgba(0,0,0,0.30);

    /* ── Text (warm off-white, high contrast) ── */
    --ip-text-primary:   #EDEDEB;
    --ip-text-secondary: #C0BEB6;
    --ip-text-tertiary:  #9A9890;
    --ip-text-muted:     #787670;

    /* ── Accent (lighter slate blue for dark bg visibility) ── */
    --ip-accent:         #5B8EC9;
    --ip-accent-mid:     #4A7AB5;
    --ip-accent-light:   #7BAAD8;
    --ip-accent-subtle:  rgba(91,142,201,0.10);
    --ip-accent-text:    #7BAAD8;

    /* ── Status colors (brighter for dark bg) ── */
    --ip-success:        #3DBB9E;
    --ip-success-bg:     rgba(61,187,158,0.10);
    --ip-success-border: rgba(61,187,158,0.25);

    --ip-warning:        #E5A235;
    --ip-warning-bg:     rgba(229,162,53,0.10);
    --ip-warning-border: rgba(229,162,53,0.25);

    --ip-error:          #E5574F;
    --ip-error-bg:       rgba(229,87,79,0.10);
    --ip-error-border:   rgba(229,87,79,0.25);

    /* ── Borders (visible but not harsh) ── */
    --ip-border:         rgba(255,255,255,0.14);
    --ip-border-light:   rgba(255,255,255,0.09);
    --ip-border-accent:  rgba(91,142,201,0.30);

    /* ── Shadows (subtle glow on dark) ── */
    --ip-shadow-xs:      0 1px 2px rgba(0,0,0,0.20);
    --ip-shadow-sm:      0 1px 4px rgba(0,0,0,0.25);
    --ip-shadow-md:      0 2px 10px rgba(0,0,0,0.30);
    --ip-shadow-lg:      0 4px 20px rgba(0,0,0,0.35);

    /* ── Typography ── */
    --ip-font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ip-font-mono:      'JetBrains Mono', 'Fira Code', monospace;

    /* ── Radii ── */
    --ip-radius-sm:      4px;
    --ip-radius-md:      8px;
    --ip-radius-lg:      12px;

    /* ── Panel widths (used by JS for resize) ── */
    --vi-ws-width:       240px;
    --vi-src-width:      280px;
    --vi-det-width:      320px;
    --vi-intel-width:    240px;

    /* ── Legacy compat (for ViewConversation inline CSS) ── */
    --vc-bg-body:        var(--ip-bg-page);
    --vc-bg-surface:     var(--ip-bg-surface);
    --vc-bg-hover:       var(--ip-bg-hover);
    --vc-border:         var(--ip-border);
    --vc-accent:         var(--ip-accent);
    --vc-accent2:        var(--ip-accent-mid);
    --vc-t1:             var(--ip-text-primary);
    --vc-t2:             var(--ip-text-secondary);
    --vc-t3:             var(--ip-text-tertiary);
    --vc-t4:             var(--ip-text-muted);
    --vi-font:           var(--ip-font);
    --font:              var(--ip-font);
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--ip-font);
    background: var(--ip-bg-page);
    color: var(--ip-text-primary);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== EXEC BAR (56px — refined, lighter) ===== */
.vi-exec-bar {
    height: 56px;
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #252930, #1B1E24);
    border-bottom: 1px solid var(--ip-border);
    padding: 0 16px;
    position: relative;
    z-index: 100;
}

/* Exec Bar — Left */
.vi-eb-left {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
    border-right: 1px solid var(--ip-border-light);
    flex-shrink: 0;
}
.vi-eb-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4A7AB5, #5B8EC9);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vi-eb-logo svg { stroke: white; }
.vi-eb-brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--ip-text-primary);
    letter-spacing: -0.02em;
}
.vi-eb-sep {
    width: 1px;
    height: 18px;
    background: var(--ip-border);
}
.vi-eb-ws {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-text-secondary);
    cursor: pointer;
}
.vi-eb-ws-pct {
    padding: 2px 6px;
    background: var(--ip-success-bg);
    border-radius: var(--ip-radius-sm);
    font-size: 9px;
    color: var(--ip-success);
    font-weight: 600;
}

/* Workspace button (next to brand) */
.vi-eb-ws-wrap {
    display: flex;
    align-items: center;
}
.vi-eb-ws-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    color: var(--ip-text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--ip-font);
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}
.vi-eb-ws-button:hover {
    background: var(--ip-bg-hover);
    border-color: var(--ip-border-accent);
    color: var(--ip-text-primary);
}
.vi-eb-ws-wrap.vi-ws-open .vi-eb-ws-button {
    background: var(--ip-bg-hover);
    border-color: var(--ip-accent);
    color: var(--ip-accent-light);
}
.vi-ws-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 280px;
    z-index: 200;
    padding: 6px;
    animation: vi-dd-in 0.12s ease;
}
/* Also allow dropdown from the tab button */
.vi-eb-tab-ws .vi-ws-dropdown {
    top: calc(100% + 8px);
    left: -4px;
}
.vi-ws-dropdown.vi-ws-dd-open { display: block; }
.vi-ws-dd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid var(--ip-border-light);
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.vi-ws-dd-new {
    background: none;
    border: 1px solid var(--ip-border-accent);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-accent-light);
    font-size: 10px;
    font-family: var(--ip-font);
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.12s;
}
.vi-ws-dd-new:hover { background: var(--ip-accent-subtle); }
.vi-ws-dd-list { max-height: 240px; overflow-y: auto; }
.vi-ws-dd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--ip-radius-sm);
    cursor: pointer;
    transition: background 0.1s;
    margin: 2px 0;
}
.vi-ws-dd-item:hover { background: var(--ip-bg-hover); }
.vi-ws-dd-item.vi-ws-dd-active {
    background: var(--ip-accent-subtle);
    border-left: 2px solid var(--ip-accent);
}
.vi-ws-dd-item-name {
    font-size: 12px;
    color: var(--ip-text-primary);
    font-weight: 500;
}
.vi-ws-dd-item-meta {
    font-size: 9px;
    color: var(--ip-text-tertiary);
}
.vi-ws-dd-delete {
    background: none;
    border: none;
    color: var(--ip-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--ip-radius-sm);
    flex-shrink: 0;
    transition: all 0.12s;
}
.vi-ws-dd-delete:hover { color: var(--ip-error); background: var(--ip-error-bg); }
.vi-ws-dd-footer {
    border-top: 1px solid var(--ip-border-light);
    margin-top: 4px;
    padding-top: 4px;
}
.vi-ws-dd-delete-current {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    background: none;
    border: none;
    border-radius: var(--ip-radius-sm);
    color: var(--ip-error);
    font-size: 11px;
    font-family: var(--ip-font);
    cursor: pointer;
    transition: background 0.1s;
}
.vi-ws-dd-delete-current:hover { background: var(--ip-error-bg); }
.vi-ws-dd-empty {
    padding: 16px;
    text-align: center;
    font-size: 11px;
    color: var(--ip-text-muted);
}

/* Exec Bar — Center */
.vi-eb-mid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Exec Bar — Right */
.vi-eb-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-left: 12px;
}
.vi-eb-tabs {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    padding: 3px;
}
.vi-eb-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--ip-text-tertiary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--ip-font);
    white-space: nowrap;
    transition: all 0.15s;
}
.vi-eb-tab:hover { color: var(--ip-text-secondary); }
.vi-eb-tab.active {
    background: linear-gradient(145deg, #2E3239, #242830);
    box-shadow: var(--ip-shadow-sm);
    color: var(--ip-accent-light) !important;
    font-weight: 600;
}
.vi-eb-tab svg { width: 13px; height: 13px; }
.vi-eb-tab-sep {
    width: 1px;
    height: 16px;
    background: var(--ip-border);
    flex-shrink: 0;
    margin: 0 2px;
}
.vi-eb-tab-ws {
    position: relative;
}
.vi-tab-ws-chevron {
    opacity: 0.4;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.vi-eb-tab-ws.vi-ws-open .vi-tab-ws-chevron {
    transform: rotate(180deg);
}
.vi-eb-badge {
    padding: 1px 5px;
    background: var(--ip-accent-subtle);
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    color: var(--ip-accent);
}

.vi-eb-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--ip-radius-md);
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border);
    color: var(--ip-text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.vi-eb-icon:hover {
    border-color: var(--ip-border-accent);
    color: var(--ip-text-secondary);
}
.vi-eb-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 3px 8px 3px 3px;
    border-radius: var(--ip-radius-md);
    transition: background 0.12s;
}
.vi-eb-user:hover { background: var(--ip-bg-hover); }
.vi-eb-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--ip-radius-md);
    background: var(--ip-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}
.vi-eb-avatar.vi-eb-avatar-guest {
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border);
    color: var(--ip-text-tertiary);
}
.vi-eb-user-name {
    font-size: 11px;
    color: var(--ip-text-secondary);
    font-weight: 500;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vi-eb-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 200px;
    z-index: 100;
    padding: 6px;
    animation: vi-dd-in 0.12s ease;
}
@keyframes vi-dd-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.vi-eb-user-dropdown.vi-dd-open { display: block; }
.vi-eb-dd-info {
    padding: 8px 10px 6px;
    border-bottom: 1px solid var(--ip-border-light);
    margin-bottom: 4px;
}
.vi-eb-dd-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text-primary);
}
.vi-eb-dd-email {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    margin-top: 2px;
}
.vi-eb-dd-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    background: none;
    border: none;
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text-secondary);
    font-size: 12px;
    font-family: var(--ip-font);
    cursor: pointer;
    transition: background 0.1s;
}
.vi-eb-dd-btn:hover { background: var(--ip-bg-hover); color: var(--ip-text-primary); }
.vi-eb-dd-logout { color: var(--ip-error); }
.vi-eb-dd-logout:hover { background: rgba(229,87,79,0.1); color: var(--ip-error); }

/* ===== LAYOUT BAR ===== */
.vi-layout-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #1C1F26;
    border-bottom: 1px solid var(--ip-border);
    height: 28px;
}
.vi-lb-label {
    font-size: 9px;
    color: var(--ip-text-muted);
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.vi-lb-btn {
    padding: 2px 8px;
    border-radius: var(--ip-radius-sm);
    font-size: 9px;
    color: var(--ip-text-tertiary);
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    font-family: var(--ip-font);
    transition: all 0.1s;
}
.vi-lb-btn:hover {
    color: var(--ip-text-secondary);
    background: var(--ip-bg-hover);
}
.vi-lb-btn.active {
    background: var(--ip-accent-subtle);
    border-color: var(--ip-border-accent);
    color: var(--ip-accent);
    font-weight: 600;
}

/* ===== 5-PANEL LAYOUT ===== */
.vi-layout {
    display: flex;
    height: calc(100vh - 56px - 28px);
}

/* Panel base */
.vi-panel {
    overflow-y: auto;
    transition: width 0.25s ease, opacity 0.2s ease;
    flex-shrink: 0;
}
.vi-panel.collapsed {
    width: 0 !important;
    overflow: hidden;
    opacity: 0;
    padding: 0 !important;
    border: none !important;
}

/* Panel 1: Workspace */
.vi-p-workspace {
    width: var(--vi-ws-width);
    background: linear-gradient(145deg, #252930, #1B1E24);
    border-right: 1px solid var(--ip-border);
    padding: 10px;
}

/* Panel 2: Sources */
.vi-p-sources {
    width: var(--vi-src-width);
    background: linear-gradient(145deg, #242830, #1C1F26);
    border-right: 1px solid var(--ip-border);
    padding: 0;
}

/* Panel 3: Main Content — kept lighter/warmer as the reading area */
.vi-p-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    background: #1B1E24;
}

/* Panel 4: Detail */
.vi-p-detail {
    width: var(--vi-det-width);
    background: linear-gradient(145deg, #242830, #1C1F26);
    border-left: 1px solid var(--ip-border);
    padding: 0;
}

/* Panel 5: Intelligence */
.vi-p-intel {
    width: var(--vi-intel-width);
    background: linear-gradient(145deg, #252930, #1B1E24);
    border-left: 1px solid var(--ip-border);
    padding: 12px;
}

/* ===== PANEL HEADERS ===== */
.vi-ph {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ip-border-light);
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 2;
}
.vi-ph-title {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.vi-ph-close {
    width: 20px;
    height: 20px;
    border-radius: var(--ip-radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--ip-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.1s;
}
.vi-ph-close:hover {
    color: var(--ip-text-secondary);
    background: var(--ip-bg-hover);
}

/* ===== RESIZE HANDLES ===== */
.vi-resize-handle {
    width: 4px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.15s;
    flex-shrink: 0;
    z-index: 10;
}
.vi-resize-handle:hover,
.vi-resize-handle.active {
    background: var(--ip-accent-light);
    opacity: 0.3;
}
.vi-resize-handle.collapsed { display: none; }

/* ===== WORKSPACE CONTENT ===== */
.vi-ws-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ip-text-tertiary);
    font-weight: 600;
    margin: 8px 0 4px;
}
.vi-ws-folder {
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--ip-radius-sm);
    font-size: 11px;
    color: var(--ip-text-secondary);
    cursor: pointer;
    transition: background 0.1s;
}
.vi-ws-folder:hover { background: var(--ip-bg-hover); }
.vi-ws-folder.vi-ws-active {
    background: var(--ip-accent-subtle);
    color: var(--ip-accent);
}
.vi-ws-folder-icon { font-size: 12px; }
.vi-ws-status { font-size: 7px; margin-left: auto; }
.vi-ws-status-ok { color: var(--ip-success); }
.vi-ws-status-err { color: var(--ip-error); }
.vi-ws-doc {
    padding: 3px 8px 3px 24px;
    font-size: 10px;
    color: var(--ip-text-tertiary);
    cursor: pointer;
    transition: color 0.1s;
}
.vi-ws-doc:hover { color: var(--ip-text-secondary); }
.vi-ws-ctx {
    padding: 10px;
    background: var(--ip-bg-surface-alt);
    border-radius: var(--ip-radius-md);
    border: 1px solid var(--ip-border-light);
    margin-top: 10px;
}
.vi-ws-ctx-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    padding: 2px 0;
}
.vi-ws-ctx-label { color: var(--ip-text-tertiary); }
.vi-ws-ctx-value { color: var(--ip-text-secondary); font-weight: 500; }
.vi-ws-bar {
    height: 3px;
    background: var(--ip-bg-hover);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.vi-ws-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ip-accent), var(--ip-success));
    border-radius: 2px;
}

/* ===== METHODOLOGY TIER BADGES ===== */
.methodology-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.9;
}
.methodology-badge.tier-1 { background: #1a6b3c; }
.methodology-badge.tier-2 { background: #2d8a5e; }
.methodology-badge.tier-3 { background: #4a9e6e; }
.methodology-badge.tier-4 { background: #d4a96a; }
.methodology-badge.tier-5 { background: #c4935a; }
.methodology-badge.tier-6 { background: #c0392b; }

/* ===== TIER FILTER BAR ===== */
.vi-tier-filter-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--ip-border-light);
    background: rgba(0,0,0,0.15);
}
.vi-tier-filter-label {
    font-size: 9px;
    color: var(--ip-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-right: 2px;
}
.vi-tier-filter-btn {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid var(--ip-border-light);
    border-radius: 3px;
    background: transparent;
    color: var(--ip-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.vi-tier-filter-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--ip-text-primary);
}
.vi-tier-filter-btn.active {
    background: var(--ip-accent);
    border-color: var(--ip-accent);
    color: #fff;
}

/* ===== BACKEND HEALTH STATUS ===== */
.vi-backend-status-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--ip-border, rgba(255,255,255,0.08));
    font-size: 10px;
    color: var(--ip-text-dim, rgba(255,255,255,0.45));
}
.vi-bh-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.vi-bh-dot-up       { background: var(--ip-success, #3DBB9E); }
.vi-bh-dot-degraded { background: var(--ip-warning, #E5A235); }
.vi-bh-dot-down     { background: var(--ip-error,   #E5574F); }
.vi-bh-dot-unknown  { background: rgba(255,255,255,0.25); }
.vi-bh-label {
    font-size: 10px;
    color: var(--ip-text-dim, rgba(255,255,255,0.45));
    margin-right: 4px;
}
.vi-backend-banner {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 12px;
    padding: 7px 10px;
    background: var(--ip-warning-bg, rgba(229,162,53,0.10));
    border: 1px solid var(--ip-warning-border, rgba(229,162,53,0.25));
    border-radius: 6px;
    font-size: 11px;
    color: var(--ip-warning, #E5A235);
    line-height: 1.4;
}
.vi-backend-banner-icon { flex-shrink: 0; }

/* ===== SOURCE LIST CONTENT ===== */
.vi-src-group { padding: 8px 12px; }
.vi-src-group-title {
    font-size: 10px;
    color: var(--ip-accent);
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vi-src-status {
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 600;
}
.vi-src-status-ok { background: var(--ip-success-bg); color: var(--ip-success); }
.vi-src-status-part { background: var(--ip-warning-bg); color: var(--ip-warning); }
.vi-src-card {
    padding: 8px 10px;
    margin-bottom: 4px;
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border-light);
    border-radius: var(--ip-radius-md);
    cursor: pointer;
    transition: all 0.12s;
}
.vi-src-card:hover {
    border-color: var(--ip-border-accent);
    box-shadow: var(--ip-shadow-xs);
}
.vi-src-card.vi-src-selected {
    border-color: var(--ip-accent);
    border-left: 3px solid var(--ip-accent);
    background: var(--ip-accent-subtle);
}
/* Background-first: preliminary sources surfaced from phases 1-7 while the user
   answers clarifications. Dimmed + dashed accent border — rewritten on resume. */
.source--preliminary { opacity: 0.7; border-left: 2px dashed var(--ip-accent); }
.ii-bg-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--ip-text-tertiary);
    background: var(--ip-bg-surface-alt, rgba(255,255,255,0.03));
    border-left: 2px solid var(--ip-accent);
    border-radius: var(--ip-radius-sm, 4px);
}
.ii-bg-indicator-spinner {
    width: 10px; height: 10px;
    border: 2px solid var(--ip-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: ii-bg-spin 0.9s linear infinite;
}
.ii-bg-indicator-ready .ii-bg-indicator-spinner {
    border: 2px solid var(--ip-success, #34d399);
    border-top-color: transparent;
    animation: none;
}
.ii-bg-indicator-error .ii-bg-indicator-spinner {
    border-color: var(--ip-warning, #fbbf24);
    animation: none;
}
@keyframes ii-bg-spin { to { transform: rotate(360deg); } }

/* Track C: sub-questions readout — numbered list shown as system chat message. */
.ii-sys-subquestions {
    border-left: 2px solid var(--ip-accent, #6B5CE7);
    padding-left: 12px;
    margin: 4px 0;
    white-space: pre-line;
    font-size: 0.85rem;
    color: var(--vc-t2, #A09CB0);
    line-height: 1.6;
}

.vi-src-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-text-primary);
    line-height: 1.4;
}
.vi-src-meta {
    font-size: 9px;
    color: var(--ip-text-tertiary);
    margin-top: 3px;
    display: flex;
    gap: 6px;
}
.vi-src-tag {
    padding: 0 4px;
    background: var(--ip-bg-surface-alt);
    border-radius: 2px;
    font-weight: 500;
}
.vi-src-tag-lib { background: var(--ip-warning-bg); color: var(--ip-warning); }
.vi-src-verified { color: var(--ip-success); font-weight: 600; }

/* ===== MAIN CONTENT ===== */
.vi-main-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}
.vi-msg {
    margin-bottom: 16px;
    max-width: 680px;
}
.vi-msg.vi-msg-user {
    margin-left: auto;
    max-width: 480px;
}
.vi-msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.vi-msg-avatar {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: white;
}
.vi-msg-avatar-system { background: var(--ip-accent); }
.vi-msg-avatar-user { background: var(--ip-success); }
.vi-msg-name {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    font-weight: 500;
}
.vi-msg-body {
    padding: 14px 18px;
    border-radius: var(--ip-radius-lg);
    font-size: 15px;
    line-height: 1.7;
    color: var(--ip-text-secondary);
}
.vi-msg-system .vi-msg-body {
    background: linear-gradient(145deg, #282C34, #21252C);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.vi-msg-user .vi-msg-body {
    background: var(--ip-accent-subtle);
    border: 1px solid var(--ip-border-accent);
}
.vi-msg-body strong { color: var(--ip-text-primary); }
.vi-msg-hl { color: var(--ip-accent); font-weight: 600; }

/* Input bar */
.vi-input-bar {
    padding: 12px 20px;
    border-top: 1px solid var(--ip-border);
    background: linear-gradient(145deg, #232730, #1B1E24);
}
.vi-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.vi-input-field {
    flex: 1;
    padding: 10px 14px;
    background: var(--ip-bg-surface);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--ip-radius-lg);
    color: var(--ip-text-primary);
    font-size: 13px;
    font-family: var(--ip-font);
    resize: none;
    min-height: 40px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.vi-input-field:focus {
    outline: none;
    border-color: var(--ip-accent);
    box-shadow: 0 0 0 3px var(--ip-accent-subtle);
}
.vi-input-field::placeholder { color: var(--ip-text-muted); }
.vi-send-btn {
    padding: 10px 18px;
    background: var(--ip-accent);
    border: none;
    border-radius: var(--ip-radius-md);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--ip-font);
    transition: background 0.15s;
}
.vi-send-btn:hover { background: var(--ip-accent-mid); }
.vi-att-btn {
    padding: 10px 12px;
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    color: var(--ip-text-tertiary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.vi-att-btn:hover {
    border-color: var(--ip-border-accent);
    color: var(--ip-text-secondary);
}

/* ===== DETAIL PANEL CONTENT ===== */
.vi-det-content { padding: 16px; }
.vi-det-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ip-text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}
.vi-det-meta {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.vi-det-tag {
    padding: 2px 6px;
    background: var(--ip-bg-surface-alt);
    border-radius: var(--ip-radius-sm);
    font-weight: 500;
}
.vi-det-section { margin-bottom: 14px; }
.vi-det-section-title {
    font-size: 9px;
    color: var(--ip-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}
.vi-det-text {
    font-size: 12px;
    color: var(--ip-text-secondary);
    line-height: 1.7;
}
.vi-det-snippet {
    padding: 10px 12px;
    background: var(--ip-accent-subtle);
    border-left: 2px solid var(--ip-accent);
    border-radius: 0 var(--ip-radius-md) var(--ip-radius-md) 0;
    font-size: 12px;
    color: var(--ip-text-secondary);
    line-height: 1.6;
    font-style: italic;
    margin: 8px 0;
}
.vi-det-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}
.vi-det-btn {
    padding: 6px 12px;
    border-radius: var(--ip-radius-md);
    font-size: 11px;
    cursor: pointer;
    border: 1px solid var(--ip-border);
    background: var(--ip-bg-surface);
    color: var(--ip-text-secondary);
    font-family: var(--ip-font);
    transition: all 0.12s;
}
.vi-det-btn:hover {
    border-color: var(--ip-border-accent);
    color: var(--ip-accent);
}
.vi-det-btn-primary {
    background: var(--ip-accent-subtle);
    border-color: var(--ip-border-accent);
    color: var(--ip-accent);
    font-weight: 600;
}
.vi-det-verif {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--ip-success-bg);
    border: 1px solid var(--ip-success-border);
    border-radius: var(--ip-radius-sm);
    font-size: 10px;
    color: var(--ip-success);
    font-weight: 500;
    margin-top: 8px;
}
.vi-det-cred { margin-top: 10px; }
.vi-det-cred-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    padding: 3px 0;
    border-bottom: 1px solid var(--ip-border-light);
}
.vi-det-cred-row:last-child { border-bottom: none; }
.vi-det-cred-label { color: var(--ip-text-tertiary); }
.vi-det-cred-val { font-weight: 600; }
.vi-det-cred-a { color: var(--ip-success); }
.vi-det-cred-b { color: var(--ip-accent-light); }
.vi-det-cred-c { color: var(--ip-warning); }

/* ===== INTELLIGENCE PANEL ===== */
.vi-il { margin-bottom: 14px; }
.vi-il-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ip-text-tertiary);
    font-weight: 600;
    margin-bottom: 6px;
}
.vi-il-readiness {
    text-align: center;
    padding: 12px;
    background: var(--ip-bg-surface-alt);
    border-radius: var(--ip-radius-md);
    border: 1px solid var(--ip-border-light);
}
.vi-il-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--ip-success);
}
.vi-il-txt {
    font-size: 9px;
    color: var(--ip-text-tertiary);
    margin-top: 2px;
}
.vi-il-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 10px;
}
.vi-il-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.vi-il-dot-ok { background: var(--ip-success); }
.vi-il-dot-part { background: var(--ip-warning); }
.vi-il-item-label {
    flex: 1;
    color: var(--ip-text-secondary);
}
.vi-il-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.vi-il-tag {
    padding: 2px 6px;
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border-light);
    border-radius: var(--ip-radius-sm);
    font-size: 8px;
    color: var(--ip-text-secondary);
    font-weight: 500;
}
.vi-il-tag-lib { color: var(--ip-warning); background: var(--ip-warning-bg); }
.vi-il-tag-org { color: var(--ip-accent-light); border-color: var(--ip-border-accent); }
.vi-il-tag-person { color: var(--ip-text-secondary); }
.vi-il-tag-legal { color: var(--ip-warning); border-color: rgba(229,162,53,0.25); }
.vi-il-tag-framework { color: var(--ip-success); border-color: rgba(61,187,158,0.25); }
.vi-il-exp {
    padding: 6px 10px;
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    color: var(--ip-text-secondary);
    font-size: 10px;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 3px;
    font-family: var(--ip-font);
    transition: all 0.12s;
}
.vi-il-exp:hover {
    border-color: var(--ip-border-accent);
    background: var(--ip-bg-hover);
}
.vi-il-exp-primary {
    background: var(--ip-accent-subtle);
    border-color: var(--ip-border-accent);
    color: var(--ip-accent);
    font-weight: 600;
}

/* Intelligence Panel States */
.vi-il-state { padding: 0 12px; }
.vi-il-empty-icon { text-align: center; padding: 20px 0 8px; opacity: 0.5; }
.vi-il-empty-title {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-secondary);
    margin-bottom: 6px;
}
.vi-il-empty-text {
    text-align: center;
    font-size: 11px;
    color: var(--ip-text-muted);
    line-height: 1.5;
    padding: 0 8px;
}
.vi-il-summary {
    font-size: 12px;
    color: var(--ip-text-secondary);
    line-height: 1.6;
    padding: 4px 0;
}
.vi-il-next-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
    background: var(--ip-accent-subtle);
    border: 1px dashed var(--ip-border-accent);
    border-radius: var(--ip-radius-md);
    font-size: 11px;
    color: var(--ip-accent-light);
    line-height: 1.5;
}
.vi-il-next-step svg { flex-shrink: 0; margin-top: 1px; }
.vi-il-gap-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
    font-size: 11px;
    color: var(--ip-text-secondary);
    line-height: 1.4;
}
.vi-il-gap-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}
.vi-il-gap-critical { background: var(--ip-error); }
.vi-il-gap-important { background: var(--ip-warning); }
.vi-il-gap-nice { background: var(--ip-text-muted); }
.vi-il-found-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 11px;
    color: var(--ip-success);
}
.vi-il-found-item::before {
    content: '\2713';
    font-size: 10px;
    font-weight: 700;
}

.vi-il-priv {
    padding: 6px 8px;
    background: var(--ip-success-bg);
    border: 1px solid var(--ip-success-border);
    border-radius: var(--ip-radius-md);
    font-size: 9px;
    color: var(--ip-success);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}
.vi-il-cost-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    padding: 2px 0;
}
.vi-il-cost-label { color: var(--ip-text-tertiary); }
.vi-il-cost-value { color: var(--ip-accent); font-weight: 600; }

/* ===== CHAIN ANALYSIS BADGES ===== */
.vi-chain-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    margin-left: 4px;
    white-space: nowrap;
}
.vi-chain-strong {
    background: var(--ip-success-bg);
    color: var(--ip-success);
    border: 1px solid var(--ip-success-border);
}
.vi-chain-warn {
    background: var(--ip-warning-bg);
    color: var(--ip-warning);
    border: 1px solid var(--ip-warning-border);
}
.vi-chain-weak {
    background: rgba(255,255,255,0.05);
    color: var(--ip-text-muted);
    border: 1px solid var(--ip-border);
}
.vi-chain-risk {
    background: var(--ip-error-bg);
    color: var(--ip-error);
    border: 1px solid var(--ip-error-border);
}

/* Detail panel chain section */
.vi-det-chain-row { margin-top: 4px; }
.vi-det-chain-note {
    margin-top: 6px;
    font-size: 11px;
    color: var(--ip-text-muted);
    line-height: 1.4;
}
.vi-det-chain-btn {
    display: block;
    width: calc(100% - 24px);
    margin: 8px 12px 4px;
    padding: 7px 12px;
    background: var(--ip-accent-subtle);
    color: var(--ip-accent-text);
    border: 1px solid var(--ip-border-accent);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}
.vi-det-chain-btn:hover { background: rgba(91,142,201,0.18); }

/* Chain topology modal */
.vi-chain-modal {
    position: fixed;
    inset: 40px;
    background: var(--ip-panel-bg, #1a1917);
    border: 1px solid var(--ip-border);
    border-radius: 10px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.vi-chain-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ip-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-primary, #e5e3df);
    flex-shrink: 0;
}
.vi-chain-modal-close {
    background: none;
    border: none;
    color: var(--ip-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
}
.vi-chain-modal-close:hover { background: var(--ip-border); color: var(--ip-text-primary, #e5e3df); }
.vi-chain-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Intelligence panel chain summary */
.vi-il-chain-stats { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.vi-il-chain-stat {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 3px;
    color: var(--ip-text-muted);
}
.vi-il-chain-stat.vi-chain-strong {
    background: var(--ip-success-bg);
    color: var(--ip-success);
}
.vi-il-chain-stat.vi-chain-risk {
    background: var(--ip-error-bg);
    color: var(--ip-error);
}

/* ===== CONSENSUS SECTION (E-10b) ===== */
.consensus-section { display: flex; flex-direction: column; gap: 0; }

.consensus-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 5px 0;
    border-radius: var(--ip-radius-sm);
    transition: background 0.1s;
}
.consensus-row:hover { background: var(--ip-bg-hover); }
.consensus-row.consensus-row-open { background: var(--ip-bg-surface-alt); }

.consensus-topic {
    font-size: 11px;
    color: var(--ip-text-secondary);
    flex-shrink: 0;
    width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.consensus-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    flex: 1;
    margin: 0 8px;
    background: var(--ip-bg-surface-alt);
}
.bar-supporting { background: var(--ip-accent-green, #2d8a5e); }
.bar-opposing   { background: var(--ip-accent-red, #c0392b); }
.bar-nuanced    { background: var(--ip-accent-amber, #d4a96a); }

.consensus-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    white-space: nowrap;
}
.consensus-badge.strong      { background: rgba(45,138,94,0.15);   color: #2d8a5e; }
.consensus-badge.moderate    { background: rgba(212,169,106,0.15); color: #c4935a; }
.consensus-badge.contested   { background: rgba(192,57,43,0.15);   color: #c0392b; }
.consensus-badge.divided     { background: rgba(90,106,128,0.15);  color: #5a6a80; }
.consensus-badge.insufficient { background: rgba(90,106,128,0.1); color: #8a9bb5; }

/* Expandable detail */
.consensus-detail {
    margin: 0 0 4px 0;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--ip-radius-sm);
    border-left: 2px solid var(--ip-border-accent);
}
.consensus-detail-inner { display: flex; flex-direction: column; gap: 5px; }
.consensus-detail-summary {
    font-size: 11px;
    color: var(--ip-text-secondary);
    line-height: 1.5;
}
.consensus-detail-meta {
    font-size: 10px;
    color: var(--ip-text-muted);
}
.consensus-detail-temporal {
    font-size: 10px;
    color: var(--ip-warning);
    background: var(--ip-warning-bg);
    padding: 3px 6px;
    border-radius: 3px;
}
.consensus-stance-group { margin-top: 4px; }
.consensus-stance-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.consensus-stance-label.supporting { color: #2d8a5e; }
.consensus-stance-label.opposing   { color: #c0392b; }
.consensus-stance-label.nuanced    { color: #c4935a; }
.consensus-source-item {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    padding: 1px 0 1px 8px;
    border-left: 2px solid var(--ip-border-light);
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.consensus-source-item em { font-style: italic; opacity: 0.7; }

/* ===== CONSENSUS MAP — S7.2 (main brief view) ===== */

.vc-consensus-map-wrap {
    margin-bottom: 24px;
}

.vc-consensus-map {
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    overflow: hidden;
}

.vc-cm-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--ip-border-light);
}

.vc-cm-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ip-text-secondary);
}

.vc-cm-subtitle {
    font-size: 10px;
    color: var(--ip-text-muted);
}

.vc-cm-bars {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Individual row */
.vc-cm-row {
    padding: 9px 14px 8px;
    cursor: pointer;
    border-bottom: 1px solid var(--ip-border-light);
    transition: background 0.1s;
}
.vc-cm-row:last-child { border-bottom: none; }
.vc-cm-row:hover { background: var(--ip-bg-hover); }

.vc-cm-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.vc-cm-row-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--ip-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Strength badge (mirrors sidebar .consensus-badge but on map rows) */
.vc-cm-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.vc-cm-badge.strong      { background: rgba(45,138,94,0.15);   color: #2d8a5e; }
.vc-cm-badge.moderate    { background: rgba(91,142,201,0.15);  color: var(--ip-accent-light); }
.vc-cm-badge.contested   { background: rgba(229,162,53,0.15);  color: var(--ip-warning); }
.vc-cm-badge.divided     { background: rgba(90,106,128,0.15);  color: #5a6a80; }
.vc-cm-badge.insufficient{ background: rgba(90,106,128,0.08);  color: var(--ip-text-muted); }

.vc-cm-trend-icon { margin-left: 3px; }

/* Bar track */
.vc-cm-bar-track {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--ip-bg-surface-alt);
    margin-bottom: 4px;
}

.vc-cb-fill        { height: 100%; transition: width 0.4s ease; }
.vc-cb-fill.strong      { background: #2d8a5e; }
.vc-cb-fill.moderate    { background: var(--ip-accent); }
.vc-cb-fill.contested   { background: var(--ip-warning); }
.vc-cb-fill.divided     { background: #5a6a80; }
.vc-cb-fill.insufficient{
    background: repeating-linear-gradient(
        90deg,
        var(--ip-text-muted) 0,
        var(--ip-text-muted) 3px,
        transparent 3px,
        transparent 6px
    );
    opacity: 0.5;
}

.vc-cb-contra {
    height: 100%;
    background: #c0392b;
    opacity: 0.75;
}

.vc-cb-remainder {
    flex: 1;
    height: 100%;
    background: transparent;
}

.vc-cm-count {
    font-size: 10px;
    color: var(--ip-text-muted);
}

.vc-cm-temporal {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    margin-top: 2px;
    font-style: italic;
}

/* Timeline */
.vc-cm-timeline-wrap {
    border-top: 1px solid var(--ip-border-light);
    padding: 8px 14px 10px;
    background: var(--ip-bg-surface-alt);
}

.vc-cm-timeline-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ip-text-muted);
    margin-bottom: 6px;
}

.vc-cm-timeline { display: flex; flex-direction: column; gap: 4px; }

.vc-cm-tl-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 10px;
    line-height: 1.4;
}

.vc-cm-tl-year {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ip-accent-light);
    width: 36px;
    flex-shrink: 0;
}

.vc-cm-tl-text {
    color: var(--ip-text-secondary);
    flex: 1;
}

/* Inline heading badge */
.vc-cm-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
    cursor: default;
    flex-shrink: 0;
}
.vc-cm-inline-badge.strong      { background: rgba(45,138,94,0.20);  color: #2d8a5e; }
.vc-cm-inline-badge.moderate    { background: rgba(91,142,201,0.20); color: var(--ip-accent-light); }
.vc-cm-inline-badge.contested   { background: rgba(229,162,53,0.20); color: var(--ip-warning); }
.vc-cm-inline-badge.divided     { background: rgba(90,106,128,0.15); color: #5a6a80; }
.vc-cm-inline-badge.insufficient{ background: rgba(90,106,128,0.10); color: var(--ip-text-muted); }

/* Section highlight flash on click-to-scroll */
.vc-cm-section-highlight {
    animation: vc-cm-flash 1.4s ease-out forwards;
}
@keyframes vc-cm-flash {
    0%   { outline: 2px solid var(--ip-accent); outline-offset: 2px; }
    70%  { outline: 2px solid var(--ip-accent); outline-offset: 2px; }
    100% { outline: 2px solid transparent; outline-offset: 2px; }
}

/* ===== NOTIFICATION BELL ===== */
.vi-notif-wrap {
    position: relative;
    margin-right: 8px;
    display: flex;
    align-items: center;
}
.vi-notif-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ip-text-secondary);
    padding: 4px 6px;
    border-radius: var(--ip-radius-sm);
    display: flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}
.vi-notif-bell:hover { color: var(--ip-text-primary); background: rgba(255,255,255,0.06); }
.vi-notif-bell svg { width: 16px; height: 16px; }
.vi-notif-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 14px;
    height: 14px;
    background: var(--ip-error);
    color: #fff;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    padding: 0 3px;
    pointer-events: none;
}

/* ===== ALERT DROPDOWN ===== */
.vi-notif-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 300px;
    background: var(--ip-bg-surface, #1E2128);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 9000;
}
.vi-notif-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--ip-border);
}
.vi-notif-hdr span {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text-primary);
}
.vi-notif-mark-read {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    color: var(--ip-accent);
    padding: 0;
}
.vi-notif-mark-read:hover { text-decoration: underline; }
.vi-notif-list {
    max-height: 320px;
    overflow-y: auto;
}
.vi-notif-empty {
    padding: 20px 12px;
    font-size: 11px;
    color: var(--ip-text-muted);
    text-align: center;
}
.vi-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.1s;
}
.vi-notif-item:last-child { border-bottom: none; }
.vi-notif-item:hover { background: rgba(255,255,255,0.04); }
.vi-notif-item.unread { background: rgba(91,142,201,0.08); }
.vi-notif-item.unread:hover { background: rgba(91,142,201,0.13); }
.vi-notif-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ip-accent);
    flex-shrink: 0;
    margin-top: 4px;
}
.vi-notif-item:not(.unread) .vi-notif-dot { background: transparent; }
.vi-notif-title {
    font-size: 11px;
    color: var(--ip-text-primary);
    line-height: 1.4;
    margin: 0 0 2px;
}
.vi-notif-meta {
    font-size: 10px;
    color: var(--ip-text-muted);
    margin: 0;
}

/* ===== MONITOR PROMPT (intel panel — after research completes) ===== */
.vi-monitor-prompt {
    padding: 9px;
    background: var(--ip-accent-subtle);
    border: 1px solid var(--ip-border-accent);
    border-radius: var(--ip-radius-md);
}
.vi-monitor-prompt-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 7px;
}
.vi-monitor-prompt-row svg { color: var(--ip-accent-light); flex-shrink: 0; margin-top: 1px; }
.vi-monitor-prompt-row p {
    margin: 0;
    font-size: 11px;
    color: var(--ip-text-secondary);
    line-height: 1.4;
}
.vi-monitor-freq {
    width: 100%;
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text-primary);
    font-size: 11px;
    padding: 4px 6px;
    margin-bottom: 6px;
}
.vi-monitor-activate-btn {
    width: 100%;
    padding: 6px;
    background: var(--ip-accent);
    color: #fff;
    border: none;
    border-radius: var(--ip-radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.vi-monitor-activate-btn:hover { background: var(--ip-accent-light); }
.vi-monitor-activate-btn:disabled { background: var(--ip-text-muted); cursor: default; }
.vi-monitor-activated {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ip-success);
    padding: 4px 0;
}
.vi-monitor-activated svg { flex-shrink: 0; }

/* ===== MONITORS SECTION (workspace panel) ===== */
.vi-monitors-section {
    border-top: 1px solid var(--ip-border);
    padding: 8px 0 0;
    margin-top: 6px;
}
.vi-monitor-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.vi-monitor-item:last-child { border-bottom: none; }
.vi-monitor-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}
.vi-monitor-dot.active { background: var(--ip-success); }
.vi-monitor-dot.paused { background: var(--ip-warning); }
.vi-monitor-goal {
    font-size: 11px;
    color: var(--ip-text-primary);
    line-height: 1.3;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 130px;
}
.vi-monitor-meta {
    font-size: 10px;
    color: var(--ip-text-muted);
    margin: 0;
}
.vi-monitor-actions { margin-left: auto; flex-shrink: 0; }
.vi-monitor-pause-btn {
    background: none;
    border: 1px solid var(--ip-border);
    border-radius: 3px;
    color: var(--ip-text-muted);
    font-size: 9px;
    padding: 2px 5px;
    cursor: pointer;
}
.vi-monitor-pause-btn:hover { border-color: var(--ip-accent); color: var(--ip-accent); }

/* ===== FRESHNESS BADGES ===== */
.vi-freshness {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    cursor: default;
    vertical-align: middle;
    margin-left: 4px;
}
.vi-freshness-fresh {
    background: var(--ip-success-bg);
    color: var(--ip-success);
    border: 1px solid var(--ip-success-border);
}
.vi-freshness-updates {
    background: var(--ip-warning-bg);
    color: var(--ip-warning);
    border: 1px solid var(--ip-warning-border);
    cursor: pointer;
}
.vi-freshness-stale {
    background: var(--ip-error-bg);
    color: var(--ip-error);
    border: 1px solid var(--ip-error-border);
}
.vi-freshness-unmonitored {
    background: rgba(255,255,255,0.04);
    color: var(--ip-text-muted);
    border: 1px solid var(--ip-border);
}

/* ===== REVIEW UPDATES DIALOG ===== */
.vi-review-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vi-review-dialog {
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    width: 480px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vi-review-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--ip-border);
    flex-shrink: 0;
}
.vi-review-hdr h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-primary);
}
.vi-review-close {
    background: none;
    border: none;
    color: var(--ip-text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
}
.vi-review-close:hover { color: var(--ip-text-primary); }
.vi-review-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}
.vi-review-section-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ip-text-muted);
    margin: 0 0 8px;
}
.vi-review-source-item {
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--ip-text-secondary);
    line-height: 1.4;
}
.vi-review-source-item strong {
    color: var(--ip-text-primary);
    display: block;
    margin-bottom: 2px;
}
.vi-review-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--ip-border);
    flex-shrink: 0;
}
.vi-review-rerun-btn {
    flex: 1;
    padding: 8px;
    background: var(--ip-accent);
    color: #fff;
    border: none;
    border-radius: var(--ip-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.vi-review-rerun-btn:hover { background: var(--ip-accent-light); }
.vi-review-dismiss-btn {
    padding: 8px 14px;
    background: none;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text-secondary);
    font-size: 12px;
    cursor: pointer;
}
.vi-review-dismiss-btn:hover { border-color: var(--ip-text-secondary); }

/* ===== REGULATORY ANNOTATIONS (E-14c) ===== */
.regulatory-note {
    background: rgba(0,51,153,0.06);
    border-left: 3px solid #003399;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 0.85rem;
    color: var(--ip-text-secondary);
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
}
.reg-ref {
    color: #4a6fa5;
    border-bottom: 1px dotted #4a6fa5;
    cursor: pointer;
    white-space: nowrap;
}
.reg-ref:hover {
    color: var(--ip-accent);
    border-bottom-color: var(--ip-accent);
}

/* ===== REGULATORY CONTEXT (E-14b) ===== */
.vi-il-reg-frameworks {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}
.vi-il-reg-framework {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}
.vi-il-reg-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.vi-il-reg-badge.ch { background: rgba(255,0,0,0.1); color: #c0392b; }
.vi-il-reg-badge.eu { background: rgba(0,51,153,0.1); color: #4a6fa5; }
.vi-il-reg-badge.us { background: rgba(0,82,165,0.1); color: #2e6da4; }
.vi-il-reg-name {
    color: var(--ip-text-secondary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vi-il-reg-authority {
    font-size: 10px;
    color: var(--ip-text-muted);
    flex-shrink: 0;
}
.vi-il-reg-loading {
    font-size: 10px;
    color: var(--ip-text-muted);
    margin-top: 6px;
    font-style: italic;
}
.vi-il-reg-updates { margin-top: 4px; }
.vi-il-reg-update {
    padding: 7px 8px;
    margin-bottom: 6px;
    background: var(--ip-bg-surface-alt);
    border-radius: 4px;
    border-left: 3px solid var(--ip-border);
    font-size: 11px;
}
.vi-il-reg-update.important { border-left-color: var(--ip-warning); }
.vi-il-reg-update.critical  { border-left-color: var(--ip-error); }
.vi-il-reg-update-date {
    font-size: 10px;
    color: var(--ip-text-muted);
    display: inline-block;
    margin-right: 6px;
}
.vi-il-reg-update-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--ip-accent-subtle);
    color: var(--ip-accent-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 4px;
}
.vi-il-reg-update-title {
    margin: 4px 0 2px;
    color: var(--ip-text-primary);
    font-size: 11px;
    line-height: 1.4;
}
.vi-il-reg-update-impact {
    margin: 2px 0;
    color: var(--ip-text-secondary);
    font-size: 10px;
    line-height: 1.4;
}
.vi-il-reg-update-link {
    font-size: 10px;
    color: var(--ip-accent-text);
    text-decoration: none;
    display: inline-block;
    margin-top: 3px;
}
.vi-il-reg-update-link:hover { text-decoration: underline; }
.vi-il-reg-update-more {
    font-size: 10px;
    color: var(--ip-text-muted);
    text-align: center;
    padding: 4px 0;
}

/* ===================================================
   EVIDENCE GRAPH (E-12b)
   =================================================== */

/* ── Modal overlay ─────────────────────────────────── */
.eg-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    background: var(--ip-bg-page, #171A1F);
    font-family: inherit;
}

.eg-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 44px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    background: var(--ip-bg-surface, #1E2128);
}

.eg-modal-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-primary, #EDEDEB);
    letter-spacing: 0.01em;
}

.eg-modal-stats {
    font-size: 11px;
    color: var(--ip-text-muted, #787670);
    flex: 1;
}

.eg-modal-close {
    margin-left: auto;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: none;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    border-radius: 4px;
    color: var(--ip-text-secondary, #C0BEB6);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}
.eg-modal-close:hover { border-color: var(--ip-text-secondary); color: var(--ip-text-primary); }

.eg-modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.eg-modal-empty {
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.eg-empty-text {
    font-size: 13px;
    color: var(--ip-text-muted, #787670);
}

/* ── SVG canvas ─────────────────────────────────────── */
.eg-svg {
    display: block;
    flex: 1;
    width: 100%;
    cursor: grab;
}
.eg-svg:active { cursor: grabbing; }

/* ── Animated edges ─────────────────────────────────── */
.eg-edge-contradicts {
    animation: eg-contra 1.4s linear infinite;
}
@keyframes eg-contra {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -18; }
}

/* ── Gap node pulse ─────────────────────────────────── */
.eg-gap-circle {
    animation: eg-pulse 2.2s ease-in-out infinite;
}
@keyframes eg-pulse {
    0%, 100% { stroke-dashoffset: 0;  }
    50%       { stroke-dashoffset: 12; }
}

/* ── Node text ──────────────────────────────────────── */
.eg-node-label {
    pointer-events: none;
    user-select: none;
}

.eg-unfulfilled {
    font-style: italic;
}

/* ── Tooltip ────────────────────────────────────────── */
.eg-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--ip-bg-surface, #1E2128);
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    border-radius: 6px;
    padding: 10px 12px;
    min-width: 180px;
    max-width: 240px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

.eg-tt-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-text-primary, #EDEDEB);
    margin-bottom: 7px;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.eg-tt-gap { color: var(--ip-error, #E5574F); }

.eg-tt-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 10px;
    color: var(--ip-text-tertiary, #9A9890);
    margin-bottom: 3px;
}

.eg-tt-val {
    color: var(--ip-text-secondary, #C0BEB6);
    font-weight: 500;
}
.eg-tt-ok   { color: var(--ip-success,  #3DBB9E); }
.eg-tt-warn { color: var(--ip-error,    #E5574F); }

.eg-tt-reason {
    font-size: 10px;
    color: var(--ip-text-tertiary, #9A9890);
    margin-bottom: 5px;
    line-height: 1.4;
}

.eg-tt-hint {
    font-size: 9px;
    color: var(--ip-text-muted, #787670);
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid var(--ip-border, rgba(255,255,255,0.1));
}

/* ── Filter bar ─────────────────────────────────────── */
.eg-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    height: 44px;
    flex-shrink: 0;
    background: var(--ip-bg-surface-alt, #252930);
    border-bottom: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    overflow-x: auto;
}

.eg-filter-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-text-muted, #787670);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    margin-right: 2px;
}

.eg-filter-btn {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 3px;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    background: none;
    color: var(--ip-text-muted, #787670);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.eg-filter-btn.active {
    color: var(--ip-text-secondary, #C0BEB6);
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.05);
}
.eg-filter-btn[data-edge-type="contradicts"].active  { border-color: rgba(229,87,79,0.5);  color: #E5574F; }
.eg-filter-btn[data-edge-type="corroborates"].active { border-color: rgba(61,187,158,0.5); color: #3DBB9E; }
.eg-filter-btn:hover { border-color: rgba(255,255,255,0.35); }

.eg-filter-reset {
    margin-left: auto;
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 3px;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    background: none;
    color: var(--ip-text-muted, #787670);
    cursor: pointer;
    white-space: nowrap;
}
.eg-filter-reset:hover { color: var(--ip-text-secondary); border-color: rgba(255,255,255,0.3); }

/* ── Legend ─────────────────────────────────────────── */
.eg-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 16px;
    flex-shrink: 0;
    background: var(--ip-bg-surface-alt, #252930);
    border-top: 1px solid var(--ip-border, rgba(255,255,255,0.1));
    overflow-x: auto;
    white-space: nowrap;
}

.eg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--ip-text-tertiary, #9A9890);
}

.eg-legend-sep {
    width: 1px;
    height: 12px;
    background: var(--ip-border, rgba(255,255,255,0.14));
}

.eg-legend-edge {
    font-size: 10px;
    color: var(--ip-text-muted, #787670);
}
.eg-legend-supports     { color: rgba(255,255,255,0.35); }
.eg-legend-contradicts  { color: #E5574F; }
.eg-legend-corroborates { color: #3DBB9E; }

.eg-legend-note {
    font-size: 10px;
    color: var(--ip-text-muted, #787670);
    font-style: italic;
}

/* ── Gap detail panel (shown on gap click) ──────────── */
.eg-gap-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 240px;
    background: var(--ip-bg-surface, #1E2128);
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    border-radius: 6px;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.eg-gap-critical { border-color: rgba(229,87,79,0.45); }
.eg-gap-high     { border-color: rgba(229,162,53,0.35); }

.eg-gap-panel-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(229,87,79,0.08);
    border-bottom: 1px solid var(--ip-border, rgba(255,255,255,0.1));
}

.eg-gap-panel-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-error, #E5574F);
    flex: 1;
}

.eg-gap-panel-close {
    background: none;
    border: none;
    color: var(--ip-text-muted, #787670);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.eg-gap-panel-close:hover { color: var(--ip-text-primary); }

.eg-gap-panel-label {
    padding: 10px 12px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text-primary, #EDEDEB);
    line-height: 1.4;
}

.eg-gap-panel-reason {
    padding: 0 12px 8px;
    font-size: 11px;
    color: var(--ip-text-tertiary, #9A9890);
    line-height: 1.4;
}

.eg-gap-panel-ql-title {
    padding: 4px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-text-muted, #787670);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid var(--ip-border, rgba(255,255,255,0.1));
}

.eg-gap-query {
    padding: 4px 12px;
    font-size: 11px;
    color: var(--ip-accent, #5B8EC9);
    cursor: default;
    line-height: 1.4;
}
.eg-gap-query:last-child { padding-bottom: 10px; }

/* ── Evidence Graph launch button (Intel panel) ─────── */
.vi-il-graph-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 0;
    background: var(--ip-accent-subtle, rgba(91,142,201,0.10));
    border: 1px solid rgba(91,142,201,0.3);
    border-radius: var(--ip-radius-sm, 4px);
    color: var(--ip-accent-light, #7BAAD8);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.vi-il-graph-btn:hover {
    background: rgba(91,142,201,0.18);
    border-color: rgba(91,142,201,0.55);
}
.vi-il-graph-btn svg { flex-shrink: 0; }

/* ===== DOCTRINE RECOMMENDATIONS (OPT-B6) ===== */

/* Section container in intelligence panel */
#intel-doctrine-section .vi-il-label { margin-bottom: 8px; }

/* Individual recommendation row */
.vi-doctrine-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 8px;
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border-light);
    border-radius: var(--ip-radius-sm);
    margin-bottom: 6px;
}
.vi-doctrine-item:last-child { margin-bottom: 0; }

.vi-doctrine-icon {
    grid-row: 1 / 3;
    font-size: 14px;
    line-height: 1.4;
    padding-top: 1px;
}

.vi-doctrine-body { grid-column: 2; }

.vi-doctrine-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-text-primary);
    line-height: 1.4;
    margin-bottom: 2px;
}

.vi-doctrine-topic {
    font-size: 10px;
    color: var(--ip-text-secondary);
    line-height: 1.4;
    margin-bottom: 3px;
}

.vi-doctrine-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 3px;
}

.vi-doctrine-bge-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 2px;
    background: var(--ip-success-bg);
    color: var(--ip-success);
    border: 1px solid var(--ip-success-border);
}

.vi-doctrine-status {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.vi-doctrine-status.included { color: var(--ip-success); }
.vi-doctrine-status.pasted   { color: var(--ip-accent-light); }

.vi-doctrine-actions {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.vi-doctrine-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--ip-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s;
    font-family: var(--ip-font);
    line-height: 1;
}

.vi-doctrine-btn-paste {
    background: var(--ip-accent-subtle);
    border: 1px solid var(--ip-border-accent);
    color: var(--ip-accent-light);
}
.vi-doctrine-btn-paste:hover {
    background: rgba(91,142,201,0.18);
    border-color: var(--ip-accent);
}

.vi-doctrine-btn-oa {
    background: var(--ip-success-bg);
    border: 1px solid var(--ip-success-border);
    color: var(--ip-success);
}
.vi-doctrine-btn-oa:hover {
    background: rgba(61,187,158,0.18);
}

.vi-doctrine-btn-link {
    background: none;
    border: 1px solid var(--ip-border);
    color: var(--ip-text-secondary);
}
.vi-doctrine-btn-link:hover {
    border-color: var(--ip-text-secondary);
    color: var(--ip-text-primary);
}

/* ── Shared modal shell ── */
#vi-doctrine-paste-modal,
#vi-doctrine-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 8900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vi-doctrine-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.vi-doctrine-modal-dialog {
    position: relative;
    width: 440px;
    max-width: calc(100vw - 32px);
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    box-shadow: var(--ip-shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 64px);
    overflow: hidden;
}

.vi-doctrine-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ip-border-light);
    flex-shrink: 0;
}

.vi-doctrine-modal-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-primary);
    line-height: 1.4;
}

.vi-doctrine-modal-close {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: none;
    border: 1px solid var(--ip-border);
    border-radius: 4px;
    color: var(--ip-text-secondary);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}
.vi-doctrine-modal-close:hover {
    border-color: var(--ip-text-secondary);
    color: var(--ip-text-primary);
}

/* ── Paste modal body ── */
.vi-doctrine-modal-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.vi-doctrine-modal-source {
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.vi-doctrine-modal-source-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ip-text-tertiary);
    font-weight: 600;
    flex-shrink: 0;
}
.vi-doctrine-modal-source-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--ip-text-primary);
}

.vi-doctrine-modal-margins { display: flex; flex-direction: column; gap: 5px; }
.vi-doctrine-modal-margin-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ip-text-tertiary);
    font-weight: 600;
}
.vi-doctrine-modal-margin-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ip-text-secondary);
}
.vi-doctrine-margin-input {
    width: 64px;
    padding: 5px 8px;
    background: var(--ip-bg-input);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text-primary);
    font-size: 12px;
    font-family: var(--ip-font);
}
.vi-doctrine-margin-input:focus {
    outline: none;
    border-color: var(--ip-accent);
}

.vi-doctrine-paste-area {
    width: 100%;
    min-height: 130px;
    padding: 9px 10px;
    background: var(--ip-bg-input);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text-primary);
    font-size: 12px;
    font-family: var(--ip-font);
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}
.vi-doctrine-paste-area:focus {
    outline: none;
    border-color: var(--ip-accent);
}
.vi-doctrine-paste-area-error {
    border-color: var(--ip-error) !important;
}

.vi-doctrine-privacy-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    color: var(--ip-text-tertiary);
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border-light);
    border-radius: var(--ip-radius-sm);
    padding: 7px 10px;
    line-height: 1.4;
}
.vi-doctrine-privacy-notice svg { flex-shrink: 0; color: var(--ip-text-muted); }

.vi-doctrine-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 2px;
}

.vi-doctrine-submit-btn {
    padding: 7px 16px;
    background: var(--ip-accent);
    border: 1px solid var(--ip-accent-mid);
    border-radius: var(--ip-radius-sm);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--ip-font);
    transition: background 0.12s;
}
.vi-doctrine-submit-btn:hover { background: var(--ip-accent-mid); }

.vi-doctrine-cancel-btn {
    padding: 7px 14px;
    background: none;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text-secondary);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--ip-font);
    transition: border-color 0.12s;
}
.vi-doctrine-cancel-btn:hover {
    border-color: var(--ip-text-secondary);
    color: var(--ip-text-primary);
}

/* ── Open-access viewer ── */
.vi-doctrine-viewer-dialog {
    width: 640px;
    max-width: calc(100vw - 32px);
}

.vi-doctrine-viewer-meta {
    font-size: 10px;
    color: var(--ip-text-tertiary);
    margin-top: 2px;
}

.vi-doctrine-viewer-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}

.vi-doctrine-viewer-topic {
    font-size: 11px;
    font-style: italic;
    color: var(--ip-text-secondary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ip-border-light);
}

.vi-doctrine-viewer-text {
    font-size: 12px;
    color: var(--ip-text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.vi-doctrine-viewer-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--ip-text-muted);
    text-align: center;
}
.vi-doctrine-viewer-unavailable svg { opacity: 0.4; }
.vi-doctrine-viewer-unavailable p { font-size: 12px; margin: 0; }
.vi-doctrine-viewer-unavailable-sub { font-size: 10px; color: var(--ip-text-tertiary); }

/* ===== SCROLLBARS ===== */
.vi-panel::-webkit-scrollbar { width: 4px; }
.vi-panel::-webkit-scrollbar-track { background: transparent; }
.vi-panel::-webkit-scrollbar-thumb { background: var(--ip-border); border-radius: 2px; }
.vi-panel::-webkit-scrollbar-thumb:hover { background: var(--ip-text-muted); }

/* ===== EXECUTIVE SUMMARY CARD ===== */
.ii-exec-summary { background: var(--ip-surface, #1a1a2e); border: 1px solid var(--ip-border, #2a2a4a); border-radius: 8px; padding: 16px; font-size: 13px; }
.ii-exec-header { font-size: 14px; font-weight: 600; color: var(--ip-text, #e0e0e0); margin-bottom: 12px; }
.ii-exec-section { margin-bottom: 12px; }
.ii-exec-label { font-size: 11px; font-weight: 500; color: var(--ip-text-muted, #888); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.ii-exec-value { color: var(--ip-text, #e0e0e0); line-height: 1.4; }
.ii-exec-detail { color: var(--ip-text-muted, #888); font-size: 12px; margin-top: 2px; }
.ii-exec-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ii-exec-chip { background: var(--ip-surface-alt, #222244); border: 1px solid var(--ip-border, #2a2a4a); border-radius: 4px; padding: 4px 8px; font-size: 12px; color: var(--ip-text, #e0e0e0); }
.ii-exec-chip-label { color: var(--ip-text-muted, #888); font-size: 10px; text-transform: uppercase; margin-right: 4px; }
.ii-exec-reqs { display: flex; flex-direction: column; gap: 6px; }
.ii-exec-req { display: flex; gap: 8px; align-items: flex-start; }
.ii-exec-req-num { min-width: 20px; height: 20px; background: var(--ip-accent, #6366f1); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.ii-exec-req-body { flex: 1; }
.ii-exec-req-label { color: var(--ip-text, #e0e0e0); font-size: 12px; }
.ii-exec-req-meta { color: var(--ip-text-muted, #888); font-size: 11px; }
.ii-exec-stat { text-align: center; flex: 1; }
.ii-exec-stat-num { display: block; font-size: 18px; font-weight: 600; color: var(--ip-accent, #6366f1); }
.ii-exec-stat-label { font-size: 11px; color: var(--ip-text-muted, #888); }

/* Writing quality selector */
.ii-quality-selector { display: flex; gap: 8px; }
.ii-quality-btn { flex: 1; background: var(--ip-surface-alt, #222244); border: 1px solid var(--ip-border, #2a2a4a); border-radius: 6px; padding: 8px 10px; cursor: pointer; text-align: center; transition: all 0.15s; }
.ii-quality-btn:hover { border-color: var(--ip-accent, #6366f1); }
.ii-quality-btn.ii-quality-active { border-color: var(--ip-accent, #6366f1); background: rgba(99, 102, 241, 0.12); }
.ii-quality-name { display: block; font-size: 13px; font-weight: 600; color: var(--ip-text, #e0e0e0); }
.ii-quality-desc { display: block; font-size: 10px; color: var(--ip-text-muted, #888); margin-top: 2px; }

/* Language selector */
.ii-lang-selector { display: inline-block; }
.ii-lang-select { background: var(--ip-surface-alt, #222244); border: 1px solid var(--ip-border, #2a2a4a); border-radius: 4px; padding: 5px 8px; color: var(--ip-text, #e0e0e0); font-size: 12px; font-family: inherit; cursor: pointer; }
.ii-lang-select:focus { outline: none; border-color: var(--ip-accent, #6366f1); }

/* Style template section */
.ii-style-section { display: flex; flex-direction: column; gap: 8px; }
.ii-style-templates { display: flex; gap: 6px; flex-wrap: wrap; }
.ii-style-none { color: var(--ip-text-muted, #888); font-size: 11px; }
.ii-style-chip { background: var(--ip-surface-alt, #222244); border: 1px solid var(--ip-border, #2a2a4a); border-radius: 4px; padding: 4px 10px; font-size: 12px; color: var(--ip-text, #e0e0e0); cursor: pointer; transition: all 0.15s; }
.ii-style-chip:hover { border-color: var(--ip-accent, #6366f1); }
.ii-style-chip.ii-style-active { border-color: var(--ip-accent, #6366f1); background: rgba(99, 102, 241, 0.12); }
.ii-style-upload-btn { background: none; border: 1px dashed var(--ip-border, #2a2a4a); border-radius: 4px; padding: 6px 12px; font-size: 12px; color: var(--ip-text-muted, #888); cursor: pointer; transition: all 0.15s; align-self: flex-start; }
.ii-style-upload-btn:hover { border-color: var(--ip-accent, #6366f1); color: var(--ip-text, #e0e0e0); }
.ii-style-status { font-size: 11px; color: var(--ip-text-muted, #888); }

/* ===== MONITOR ALERT NOTIFICATIONS (LAUNCH-12) ===== */
.vi-monitor-alert-bell { position: relative; background: none; border: none; color: var(--ip-text-muted, #888); cursor: pointer; padding: 4px 8px; }
.vi-monitor-alert-bell:hover { color: var(--ip-text, #e0e0e0); }
.vi-alert-badge { position: absolute; top: -2px; right: 0; min-width: 16px; height: 16px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }
.vi-alert-panel { position: fixed; top: 40px; right: 16px; width: 340px; max-height: 420px; background: var(--ip-surface, #161922); border: 1px solid var(--ip-border, #2a2a4a); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 9000; display: flex; flex-direction: column; overflow: hidden; }
.vi-alert-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--ip-border, #2a2a4a); font-size: 13px; font-weight: 600; color: var(--ip-text, #e0e0e0); }
.vi-alert-panel-close { background: none; border: none; color: var(--ip-text-muted, #888); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; }
.vi-alert-panel-close:hover { color: var(--ip-text, #e0e0e0); }
.vi-alert-panel-list { overflow-y: auto; flex: 1; padding: 4px 0; }
.vi-alert-empty { padding: 24px 14px; text-align: center; color: var(--ip-text-muted, #888); font-size: 12px; }
.vi-alert-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--ip-border-light, rgba(150,145,175,0.04)); transition: background 0.15s; }
.vi-alert-item:hover { background: var(--ip-surface-alt, rgba(255,255,255,0.02)); }
.vi-alert-item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; background: var(--ip-accent, #6366f1); }
.vi-alert-type-new_source .vi-alert-item-dot, .vi-alert-item-dot.vi-alert-type-new_source { background: #34d399; }
.vi-alert-type-retraction .vi-alert-item-dot, .vi-alert-item-dot.vi-alert-type-retraction { background: #ef4444; }
.vi-alert-type-stat_update .vi-alert-item-dot, .vi-alert-item-dot.vi-alert-type-stat_update { background: #f59e0b; }
.vi-alert-item-goal { margin: 0; font-size: 12px; font-weight: 600; color: var(--ip-text, #e0e0e0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vi-alert-item-summary { margin: 2px 0 0; font-size: 11px; color: var(--ip-text-muted, #888); }
.vi-alert-item-time { margin: 2px 0 0; font-size: 10px; color: var(--ip-text-muted, #666); }
.vi-alert-dismiss { background: none; border: none; color: var(--ip-text-muted, #666); cursor: pointer; font-size: 12px; padding: 2px 4px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.vi-alert-item:hover .vi-alert-dismiss { opacity: 1; }
.vi-alert-dismiss:hover { color: var(--ip-text, #e0e0e0); }

/* Scope enforcement toast */
.vi-scope-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: #1e1b2e; border: 1px solid #7c3aed; border-radius: 8px; color: #e0e0e0; font-size: 13px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 10000; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.vi-scope-toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ===== PROVENANCE CERTIFICATE ===== */
.vc-provenance-certificate-wrap { padding: 0 16px 4px; }
.vc-provenance-certificate { border: 1px solid var(--ip-border, #2a2a4a); border-radius: 6px; background: var(--ip-surface, #161922); font-size: 12px; }
.vc-provenance-certificate summary { padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 12px; color: var(--ip-text-muted, #888); list-style: none; display: flex; align-items: center; gap: 6px; }
.vc-provenance-certificate summary::before { content: "\25B6"; font-size: 8px; transition: transform 0.15s; }
.vc-provenance-certificate[open] summary::before { transform: rotate(90deg); }
.vc-provenance-cert-body { padding: 10px 12px; border-top: 1px solid var(--ip-border, #2a2a4a); display: flex; flex-direction: column; gap: 4px; }
.vc-provenance-cert-field { display: flex; gap: 8px; font-size: 11px; color: var(--ip-text, #e0e0e0); }
.vc-provenance-cert-field strong { color: var(--ip-text, #e0e0e0); min-width: 120px; flex-shrink: 0; }
.vc-provenance-cert-field code { font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 10px; background: rgba(99,102,241,0.08); padding: 1px 4px; border-radius: 3px; word-break: break-all; }
.vc-provenance-download-btn { margin-top: 8px; padding: 5px 14px; border-radius: 6px; font-size: 11px; font-weight: 600; border: 1px solid var(--ip-accent, #6366f1); background: rgba(99,102,241,0.1); color: var(--ip-accent, #6366f1); cursor: pointer; transition: background 0.15s; align-self: flex-start; }
.vc-provenance-download-btn:hover { background: rgba(99,102,241,0.2); }
@media print { .vc-provenance-certificate { display: block !important; } .vc-provenance-certificate[open] .vc-provenance-cert-body { display: flex !important; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .vi-p-workspace { width: 0 !important; overflow: hidden; opacity: 0; }
    .vi-p-intel { width: 0 !important; overflow: hidden; opacity: 0; }
}
@media (max-width: 900px) {
    .vi-p-sources { width: 0 !important; overflow: hidden; opacity: 0; }
    .vi-p-detail { width: 0 !important; overflow: hidden; opacity: 0; }
}
@media (max-width: 600px) {
    .vi-layout-bar { display: none; }
    .vi-layout { height: calc(100vh - 56px); }
}

/* ===== S4.1 MONITOR UI — supplemental styles ===== */

/* Active bell state */
.vi-notif-bell--active { color: var(--ip-accent, #6366f1); }

/* Notification dropdown items */
.vi-notif-item-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
}
.vi-notif-item-body { font-size: 11px; color: var(--ip-text-secondary); }
.vi-notif-item-meta { font-size: 10px; color: var(--ip-text-muted); margin-top: 2px; }
.vi-notif-item-open {
    margin-top: 6px;
    background: none;
    border: 1px solid var(--ip-border);
    border-radius: 4px;
    color: var(--ip-accent, #6366f1);
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
}
.vi-notif-item-open:hover { background: rgba(99,102,241,0.08); }

/* Monitor sidebar item layout */
.vi-monitor-item-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.vi-monitor-item-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.vi-monitor-item-freq {
    font-size: 9px;
    color: var(--ip-text-muted);
    text-transform: capitalize;
    margin-left: auto;
}
.vi-monitor-item-pause {
    background: none;
    border: none;
    color: var(--ip-text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.vi-monitor-item-pause:hover { color: var(--ip-text-primary); }

/* Monitor freshness badges */
.vi-monitor-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.vi-monitor-badge--current {
    background: rgba(16,185,129,0.12);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.2);
}
.vi-monitor-badge--updates {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.2);
}

/* ============================================================================
   S5.2 — Connected Sources overlay
   ============================================================================ */

.osc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.osc-panel {
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    box-shadow: var(--ip-shadow-lg);
    width: min(680px, 94vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.osc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ip-border-light);
    flex-shrink: 0;
}
.osc-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.osc-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-text-primary);
    font-family: var(--ip-font);
}
.osc-close {
    background: none;
    border: none;
    color: var(--ip-text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--ip-radius-sm);
    transition: color 0.15s, background 0.15s;
}
.osc-close:hover { color: var(--ip-text-primary); background: var(--ip-bg-hover); }

.osc-body {
    overflow-y: auto;
    padding: 8px 0 16px;
    flex: 1;
}
.osc-loading {
    padding: 32px;
    text-align: center;
    color: var(--ip-text-muted);
    font-size: 13px;
}

.osc-section {
    padding: 12px 20px 8px;
    border-bottom: 1px solid var(--ip-border-light);
}
.osc-section:last-of-type { border-bottom: none; }

.osc-section-hdr {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ip-text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.osc-section-sub {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: var(--ip-text-muted);
    opacity: 0.75;
}

.osc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: var(--ip-text-secondary);
}
.osc-row + .osc-row { border-top: 1px solid rgba(255,255,255,0.04); }
.osc-row-dim { opacity: 0.5; }

.osc-check {
    color: var(--ip-success);
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.osc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ip-border);
    flex-shrink: 0;
    margin: 0 4px;
}
.osc-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}
.osc-row-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ip-text-secondary);
}
.osc-row-count {
    font-size: 11px;
    color: var(--ip-text-muted);
    white-space: nowrap;
    min-width: 44px;
    text-align: right;
}
.osc-row-status {
    font-size: 11px;
    color: var(--ip-success);
    white-space: nowrap;
}
.osc-row-connected .osc-row-label { color: var(--ip-text-primary); }

.osc-btn {
    flex-shrink: 0;
    background: var(--ip-bg-surface-alt);
    border: 1px solid var(--ip-border);
    color: var(--ip-accent-text);
    font-size: 11px;
    padding: 3px 9px;
    border-radius: var(--ip-radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-family: var(--ip-font);
}
.osc-btn:hover { background: var(--ip-bg-hover); color: var(--ip-text-primary); }
.osc-btn-ghost {
    background: transparent;
    border-color: var(--ip-border-light);
    color: var(--ip-text-muted);
}
.osc-btn-ghost:hover {
    color: var(--ip-error);
    border-color: var(--ip-error);
    background: var(--ip-error-bg);
}

.osc-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}
.osc-badge-soon {
    background: rgba(120,118,112,0.12);
    color: var(--ip-text-muted);
    border: 1px solid var(--ip-border-light);
}

.osc-ext-notice {
    margin: 8px 20px 0;
    padding: 10px 14px;
    background: var(--ip-warning-bg);
    border: 1px solid var(--ip-warning-border);
    border-radius: var(--ip-radius-md);
    font-size: 12px;
    color: var(--ip-warning);
    line-height: 1.5;
}
.osc-ext-notice a { color: var(--ip-warning); text-decoration: underline; }

.osc-footer {
    display: flex;
    gap: 24px;
    padding: 12px 20px 4px;
    font-size: 11px;
    color: var(--ip-text-muted);
    border-top: 1px solid var(--ip-border-light);
    flex-wrap: wrap;
}

/* ============================================================================
   S5.2 — Pre-research source picker (inside vi-input-bar)
   ============================================================================ */

.vi-src-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--ip-border-light);
}
.vi-srcp-label {
    font-size: 11px;
    color: var(--ip-text-muted);
    font-weight: 500;
    white-space: nowrap;
    margin-right: 2px;
}
.vi-srcp-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid var(--ip-border);
    background: var(--ip-bg-surface-alt);
    color: var(--ip-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--ip-font);
    white-space: nowrap;
}
.vi-srcp-chip:hover:not(:disabled) {
    border-color: var(--ip-accent);
    color: var(--ip-text-secondary);
}
.vi-srcp-chip.vi-srcp-on {
    border-color: rgba(91,142,201,0.45);
    background: rgba(91,142,201,0.10);
    color: var(--ip-accent-text);
}
.vi-srcp-chip.vi-srcp-off,
.vi-srcp-chip:disabled {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}
.vi-srcp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    flex-shrink: 0;
}
.vi-srcp-chip.vi-srcp-on .vi-srcp-dot { opacity: 1; }
.vi-srcp-sub {
    font-size: 10px;
    opacity: 0.65;
    margin-left: 1px;
}
.vi-srcp-settings {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--ip-text-muted);
    cursor: pointer;
    padding: 3px 4px;
    border-radius: var(--ip-radius-sm);
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

/* ============================================================================
   EVIDENCE GRAPH VISUALIZATION — S7.1 (evidence-graph-viz.js)
   ============================================================================ */

/* ── Toolbar ── */
.egv-filter-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--ip-bg-surface, #1E2128);
    border-bottom: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    flex-wrap: wrap;
    flex-shrink: 0;
}
.egv-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-text-muted, #787670);
    margin-right: 4px;
    white-space: nowrap;
}
.egv-filter-btn {
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    background: transparent;
    color: var(--ip-text-tertiary, #9A9890);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    opacity: 0.5;
}
.egv-filter-btn.active {
    opacity: 1;
    background: var(--ip-bg-hover, #2E3239);
    color: var(--ip-text-secondary, #C0BEB6);
    border-color: rgba(255,255,255,0.22);
}
.egv-filter-btn:hover { opacity: 1; background: var(--ip-bg-hover, #2E3239); }
.egv-filter-reset {
    margin-left: 4px;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    background: transparent;
    color: var(--ip-accent-text, #7BAAD8);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.egv-filter-reset:hover { background: var(--ip-accent-subtle, rgba(91,142,201,0.10)); }

/* Export buttons (appended inside filter bar) */
.egv-export-bar {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.egv-export-btn {
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    background: transparent;
    color: var(--ip-text-tertiary, #9A9890);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}
.egv-export-btn:hover {
    background: var(--ip-bg-hover, #2E3239);
    color: var(--ip-text-primary, #EDEDEB);
}

/* ── SVG canvas ── */
.egv-svg {
    display: block;
    width: 100%;
    background: transparent;
    touch-action: none;   /* allow D3 touch zoom/pan */
}
.egv-mini-svg { display: block; width: 100%; }

/* ── Node labels ── */
.egv-node-label {
    font-family: 'Inter', -apple-system, sans-serif;
    pointer-events: none;
    user-select: none;
    paint-order: stroke;
    stroke: var(--ip-bg-page, #171A1F);
    stroke-width: 3px;
    stroke-linejoin: round;
}
.egv-node { cursor: pointer; }
.egv-node:focus { outline: none; }
.egv-node:focus .egv-node-circle { stroke-width: 3; }
.egv-node-circle { transition: r 0.15s; }
.egv-node:hover .egv-node-circle { r: 2px; }

/* ── Tooltip ── */
.egv-tooltip {
    position: absolute;
    background: var(--ip-bg-surface, #1E2128);
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    border-radius: 8px;
    padding: 10px 13px;
    pointer-events: none;
    z-index: 9999;
    max-width: 228px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.egv-tt-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text-primary, #EDEDEB);
    margin-bottom: 4px;
    line-height: 1.4;
}
.egv-tt-query { color: #F5C842; }
.egv-tt-meta {
    font-size: 11px;
    color: var(--ip-text-tertiary, #9A9890);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.egv-tt-type { font-weight: 500; }
.egv-tt-type-legislation { color: #5B8EC9; }
.egv-tt-type-case_law    { color: #3DBB9E; }
.egv-tt-type-doctrine    { color: #9B7FD4; }
.egv-tt-type-user_doc    { color: #E5A235; }
.egv-tt-tier {
    display: inline-block;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.07);
    color: var(--ip-text-secondary, #C0BEB6);
    margin-left: 5px;
}
.egv-tt-passage {
    font-size: 11px;
    color: var(--ip-text-tertiary, #9A9890);
    font-style: italic;
    border-left: 2px solid var(--ip-border, rgba(255,255,255,0.14));
    padding-left: 7px;
    margin: 5px 0;
    line-height: 1.5;
}
.egv-tt-hint {
    font-size: 10px;
    color: var(--ip-text-muted, #787670);
    margin-top: 5px;
}

/* ── Legend ── */
.egv-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 7px 12px;
    font-size: 11px;
    color: var(--ip-text-tertiary, #9A9890);
    background: var(--ip-bg-surface, #1E2128);
    border-top: 1px solid var(--ip-border, rgba(255,255,255,0.14));
}
.egv-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.egv-legend-sep {
    width: 1px;
    height: 14px;
    background: var(--ip-border, rgba(255,255,255,0.14));
    flex-shrink: 0;
}
.egv-legend-note {
    font-size: 10px;
    color: var(--ip-text-muted, #787670);
    margin-left: auto;
    white-space: nowrap;
}

/* ── Graph tab in ViewBrief ── */
.vc-brief.mode-graph .vc-brief-editor,
.vc-brief.mode-graph .vc-provenance-certificate-wrap {
    display: none !important;
}
.vc-brief.mode-graph .vc-brief-graph-pane {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.vc-brief-graph-pane {
    display: none;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* ── Mini-graph block on graph.html ── */
.egv-mini-block {
    background: var(--surface, #161922);
    border: 1px solid var(--border, rgba(150,145,175,0.08));
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}
.egv-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--border, rgba(150,145,175,0.08));
}
.egv-mini-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--t3, #8B849E);
}
.egv-mini-expand {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent, #7C6FEE);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-family: inherit;
    transition: opacity 0.12s;
}
.egv-mini-expand:hover { opacity: 0.75; }
.egv-mini-canvas { padding: 0; }
.egv-mini-canvas .egv-tooltip { z-index: 100; }

/* CONTRADICTS edge animation */
@keyframes egv-dash-flow {
    to { stroke-dashoffset: -20; }
}
.egv-edge-CONTRADICTS {
    animation: egv-dash-flow 1.4s linear infinite;
}

/* Gap pulse animation (re-used from E-12b convention) */
@keyframes egv-pulse {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 1; }
}

/* ===== D.6: GATE 2 FAILURE BANNER ===== */
.vc-gate2-failure {
    border-left: 4px solid #c53030;
    background: #fff5f5;
    border-radius: 0 4px 4px 0;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: #2d2d2d;
}
.vc-gate2-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 12px;
    color: #c53030;
    margin-bottom: 6px;
}
.vc-gate2-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}
.vc-gate2-details {
    margin: 0 0 6px 18px;
    padding: 0;
    font-size: 11px;
    color: #5a2020;
    list-style: disc;
}
.vc-gate2-details li {
    margin-bottom: 2px;
}
.vc-gate2-audit {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #c53030;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: opacity 0.12s;
}
.vc-gate2-audit:hover {
    opacity: 0.75;
}
.vi-srcp-settings:hover { color: var(--ip-text-secondary); }

/* ===== D.5: ADDITIONAL SOURCE FILTER ROWS ===== */

/* Jurisdiction, source-type, and date rows reuse .vi-tier-filter-bar layout.
   These modifier classes add only the per-row distinguishing overrides. */

/* Jurisdiction row — pills wrap on narrow panels */
.vc-filter-jurisdiction {
    flex-wrap: wrap;
    row-gap: 3px;
}

/* Source-type row — same wrap behaviour */
.vc-filter-source-type {
    flex-wrap: wrap;
    row-gap: 3px;
}

/* Date-range row — give sliders room */
.vc-filter-date {
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

/* Range sliders */
.vc-date-from,
.vc-date-to {
    -webkit-appearance: none;
    appearance: none;
    flex: 1 1 0;
    min-width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--ip-border-light, rgba(255,255,255,0.12));
    outline: none;
    cursor: pointer;
    accent-color: var(--ip-accent, #8b5cf6);
}
.vc-date-from::-webkit-slider-thumb,
.vc-date-to::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ip-accent, #8b5cf6);
    cursor: pointer;
}
.vc-date-from::-moz-range-thumb,
.vc-date-to::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ip-accent, #8b5cf6);
    border: none;
    cursor: pointer;
}

/* Live year display */
.vc-date-display {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-text-secondary, rgba(255,255,255,0.6));
    white-space: nowrap;
    min-width: 68px;
    text-align: right;
}

/* ============================================================================
   Track B: progressive section streaming shimmer
   ============================================================================ */
.doc-section--writing {
    opacity: 0.6;
}
.doc-section-shimmer-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--vc-t1, #E8E5F0);
    margin-bottom: 8px;
}
.doc-section-shimmer-lines {
    height: 80px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== IPA.1: Research-mode toggle (Fast / Guided) ===== */
.ii-mode-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--ip-border-light, rgba(150, 145, 175, 0.12));
    background: var(--ip-bg-surface-alt, rgba(255, 255, 255, 0.02));
    flex: 0 0 auto;
}
.ii-mode-toggle {
    display: inline-flex;
    border: 1px solid var(--ip-border-light, rgba(150, 145, 175, 0.18));
    border-radius: 999px;
    overflow: hidden;
    background: var(--ip-bg-surface, rgba(255, 255, 255, 0.03));
}
.ii-mode-btn {
    appearance: none;
    background: transparent;
    border: none;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ip-text-tertiary, #A09CB0);
    cursor: pointer;
    transition: background-color 0.12s, color 0.12s;
}
.ii-mode-btn:hover { color: var(--ip-text-primary, #E8E5F0); }
.ii-mode-btn.is-active {
    background: var(--ip-accent, #6B5CE7);
    color: #fff;
}
.ii-mode-hint {
    font-size: 10.5px;
    color: var(--ip-text-tertiary, #8d8a99);
}

/* ===== GUIDED PAUSE CARDS (.research-stage) ===== */
.research-stage {
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    padding: 16px 18px;
    margin: 4px 0;
    box-shadow: var(--ip-shadow-sm);
}
.research-stage.approved {
    opacity: 0.55;
    pointer-events: none;
}
.research-stage-header { margin-bottom: 10px; }
.research-stage-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-primary);
}
.research-stage-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0;
}
.research-stage-add {
    font-size: 11px;
    color: var(--ip-accent-text);
    background: none;
    border: 1px dashed var(--ip-border-accent);
    border-radius: var(--ip-radius-sm);
    padding: 4px 10px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background 0.12s;
}
.research-stage-add:hover { background: var(--ip-accent-subtle); }
.research-stage-continue {
    padding: 7px 16px;
    background: var(--ip-accent);
    border: none;
    border-radius: var(--ip-radius-md);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.research-stage-continue:hover    { opacity: 0.88; }
.research-stage-continue:disabled { opacity: 0.45; cursor: default; }
.research-stage-skip {
    font-size: 11px;
    color: var(--ip-text-tertiary);
    text-decoration: none;
}
.research-stage-skip:hover { color: var(--ip-text-secondary); text-decoration: underline; }

/* Sub-question items */
.research-sq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--ip-bg-surface-alt);
    border-radius: var(--ip-radius-sm);
}
.research-sq-priority {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 3px;
}
.research-sq-priority.critical { background: var(--ip-error-bg);     color: var(--ip-error);       }
.research-sq-priority.high     { background: var(--ip-warning-bg);   color: var(--ip-warning);     }
.research-sq-priority.medium   { background: var(--ip-accent-subtle); color: var(--ip-accent-text); }
.research-sq-text  { flex: 1; font-size: 12px; color: var(--ip-text-primary); outline: none; min-width: 0; }
.research-sq-remove { flex-shrink: 0; background: none; border: none; color: var(--ip-text-muted); font-size: 14px; cursor: pointer; padding: 0 4px; }
.research-sq-remove:hover { color: var(--ip-error); }

/* Outline items */
.research-outline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: var(--ip-bg-surface-alt);
    border-radius: var(--ip-radius-sm);
}
.research-outline-num {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ip-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
}
.research-outline-title  { flex: 1; font-size: 12px; color: var(--ip-text-primary); outline: none; min-width: 0; }
.research-outline-sources { font-size: 10px; color: var(--ip-text-muted); white-space: nowrap; }
.research-outline-move { background: none; border: none; color: var(--ip-text-muted); font-size: 10px; cursor: pointer; padding: 0 2px; }
.research-outline-move:hover { color: var(--ip-text-secondary); }

/* Pause-card action row — flex so the "Skip to finish" link can right-align. */
.research-stage-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.research-stage-skip-to-finish {
    margin-left: auto;
    font-size: 11px;
    color: var(--ip-text-tertiary, #8d8a99);
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid var(--ip-border-light, rgba(150, 145, 175, 0.18));
    border-radius: 4px;
    transition: color 0.12s, background-color 0.12s, border-color 0.12s;
}
.research-stage-skip-to-finish:hover {
    color: var(--ip-text-primary, #E8E5F0);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--ip-border-accent, rgba(150, 145, 175, 0.35));
}

/* ===== IPA.10: Shared pause-card base class =====
   Applied to ALL pause cards: plan, subquestions, sources, outline.
   Gate 0 adds its own override (.ii-gate0-card.ii-pause-card) for the red tint.
   The existing .research-stage selector already handles subquestions + outline;
   ii-pause-card is added alongside it for new cards (IPA.5/6/7) and for future polish. */
.ii-pause-card {
    background: var(--ip-bg-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    padding: 16px 20px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    animation: ii-pause-slide-in 0.2s ease-out;
}
@keyframes ii-pause-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ii-pause-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-text-primary);
}
.ii-pause-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--ip-border-light);
}
/* Skip link pushed to the left inside the actions row */
.ii-pause-actions-left-skip { margin-right: auto; }
.ii-btn-primary {
    background: var(--ip-accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.ii-btn-primary:hover  { background: var(--ip-accent-light); }
.ii-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ii-btn-secondary {
    background: transparent;
    color: var(--ip-text-secondary);
    border: 1px solid var(--ip-border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.ii-btn-secondary:hover { border-color: var(--ip-accent); color: var(--ip-accent); }
.ii-btn-skip {
    background: transparent;
    color: var(--ip-text-tertiary);
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
}
.ii-btn-skip:hover { color: var(--ip-accent); }

/* Gate 0 override — keep the red tint to signal it's a blocker, not a routine pause */
.ii-gate0-card.ii-pause-card {
    background: rgba(239,68,68,0.04);
    border-color: rgba(239,68,68,0.3);
}

/* Tablet-safe: pause cards must be usable at ≥768px */
@media (max-width: 900px) {
    .ii-pause-card { padding: 12px 14px; }
    .ii-pause-actions { flex-direction: column; align-items: stretch; }
    .ii-pause-actions-left-skip { margin-right: 0; margin-bottom: 4px; }
}

/* ── W4-IPA8: Source Inspector ─────────────────────────────────────────────── */

.ii-si-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--ip-bg-overlay, rgba(0,0,0,0.45));
    z-index: 10100;
}
.ii-si-backdrop.is-open { display: block; }

.ii-source-inspector {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 92vw);
    background: var(--ip-bg-surface, #1E2128);
    border-left: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    box-shadow: -8px 0 40px rgba(0,0,0,0.50);
    display: flex;
    flex-direction: column;
    z-index: 10200;
    transform: translateX(100%);
    transition: transform 0.22s ease-out;
    outline: none;
}
.ii-source-inspector.is-open { transform: translateX(0); }

/* Header */
.ii-si-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    flex-shrink: 0;
}
.ii-si-close {
    display: flex;
    align-items: center;
    gap: 5px;
    appearance: none;
    background: transparent;
    border: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    border-radius: 5px;
    color: var(--ip-text-tertiary, #9A9890);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    transition: color 0.12s, border-color 0.12s, background-color 0.12s;
}
.ii-si-close:hover {
    color: var(--ip-text-primary, #EDEDEB);
    border-color: var(--ip-border, rgba(255,255,255,0.14));
    background: var(--ip-bg-hover, #2E3239);
}

/* Scrollable body */
.ii-si-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 18px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Title section */
.ii-si-title-section {
    margin-bottom: 14px;
}
.ii-si-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ip-text-primary, #EDEDEB);
    margin: 0 0 6px;
}
.ii-si-title a {
    color: inherit;
    text-decoration: none;
}
.ii-si-title a:hover { text-decoration: underline; color: var(--ip-accent-light, #7BAAD8); }
.ii-si-subtitle {
    font-size: 12px;
    color: var(--ip-text-tertiary, #9A9890);
    margin: 0;
    line-height: 1.5;
}

/* Chips row */
.ii-si-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.ii-si-chip {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ii-si-chip--tier {
    background: rgba(91,142,201,0.12);
    color: var(--ip-accent-light, #7BAAD8);
    border-color: rgba(91,142,201,0.25);
}
.ii-si-chip--type {
    background: rgba(255,255,255,0.05);
    color: var(--ip-text-secondary, #C0BEB6);
    border-color: var(--ip-border-light, rgba(255,255,255,0.09));
}
.ii-si-chip--lang {
    background: rgba(255,255,255,0.05);
    color: var(--ip-text-muted, #787670);
    border-color: var(--ip-border-light, rgba(255,255,255,0.09));
}
.ii-si-chip--score {
    background: rgba(61,187,158,0.09);
    color: var(--ip-success, #3DBB9E);
    border-color: rgba(61,187,158,0.22);
}
.ii-si-chip--graph {
    background: rgba(91,142,201,0.12);
    color: var(--ip-accent-light, #7BAAD8);
    border-color: rgba(91,142,201,0.25);
}

/* Section */
.ii-si-section {
    border-top: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    padding: 16px 0;
}
.ii-si-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ip-text-muted, #787670);
    margin-bottom: 10px;
}

/* Full passage */
.ii-si-passage {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--ip-text-secondary, #C0BEB6);
    background: var(--ip-bg-surface-alt, #252930);
    border: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    border-radius: 6px;
    padding: 12px 14px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 260px;
    overflow-y: auto;
}

/* Metadata table */
.ii-si-meta {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}
.ii-si-meta tr + tr td,
.ii-si-meta tr + tr th { border-top: 1px solid var(--ip-border-light, rgba(255,255,255,0.07)); }
.ii-si-meta-key {
    color: var(--ip-text-muted, #787670);
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 12px 5px 0;
    vertical-align: top;
    width: 100px;
    text-align: left;
}
.ii-si-meta-val {
    color: var(--ip-text-secondary, #C0BEB6);
    padding: 5px 0;
    word-break: break-word;
    vertical-align: top;
}

/* Why selected list */
.ii-si-reasons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ii-si-reason-item {
    font-size: 12px;
    color: var(--ip-text-secondary, #C0BEB6);
    display: flex;
    gap: 6px;
    align-items: baseline;
}
.ii-si-reason-item::before { content: '•'; color: var(--ip-text-muted, #787670); flex-shrink: 0; }
.ii-si-reason-label {
    font-weight: 600;
    color: var(--ip-text-tertiary, #9A9890);
    flex-shrink: 0;
}

/* Claims list */
.ii-si-claims {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ii-si-claim-item {
    font-size: 12px;
    color: var(--ip-text-secondary, #C0BEB6);
    background: var(--ip-bg-surface-alt, #252930);
    border-radius: 5px;
    padding: 8px 10px;
    line-height: 1.55;
    border-left: 2px solid var(--ip-border, rgba(255,255,255,0.14));
}
.ii-si-claim-type {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}
.ii-si-claim-type--supporting {
    background: rgba(61,187,158,0.12);
    color: var(--ip-success, #3DBB9E);
}
.ii-si-claim-type--contradicting {
    background: rgba(229,87,79,0.12);
    color: #E5574F;
}
.ii-si-claim-type--neutral,
.ii-si-claim-type--background {
    background: rgba(255,255,255,0.06);
    color: var(--ip-text-muted, #787670);
}

/* Inspect trigger button (vi-src-card) */
.vi-src-inspect-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    appearance: none;
    background: transparent;
    border: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    border-radius: 4px;
    color: var(--ip-text-muted, #787670);
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 500;
    padding: 3px 8px;
    margin-top: 6px;
    transition: color 0.12s, border-color 0.12s, background-color 0.12s;
}
.vi-src-inspect-btn:hover {
    color: var(--ip-accent-light, #7BAAD8);
    border-color: rgba(91,142,201,0.35);
    background: rgba(91,142,201,0.06);
}

/* ============================================================================
   GATE 0 CARD — W4-IPA7
   Evidence-insufficient block card with resumption options.
   Class prefix: g0c-
   ============================================================================ */

.g0c-card {
    font-family: var(--ip-font, 'Inter', sans-serif);
    background: var(--ip-bg-surface, #1E2128);
    border: 1px solid var(--ip-warning-border, rgba(229,162,53,0.25));
    border-radius: var(--ip-radius-lg, 12px);
    overflow: hidden;
    margin: 4px 0 8px;
}

.g0c-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--ip-warning-bg, rgba(229,162,53,0.10));
    border-bottom: 1px solid var(--ip-warning-border, rgba(229,162,53,0.25));
}
.g0c-header-icon { font-size: 16px; flex-shrink: 0; }
.g0c-header-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-warning, #E5A235);
    line-height: 1.3;
}

.g0c-why {
    padding: 12px 16px;
    border-bottom: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
}
.g0c-why-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ip-text-muted, #787670);
    margin-bottom: 6px;
}
.g0c-why-list { margin: 0; padding: 0 0 0 14px; list-style: disc; }
.g0c-why-list li {
    font-size: 12px;
    color: var(--ip-text-secondary, #C0BEB6);
    line-height: 1.5;
    margin-bottom: 2px;
}

.g0c-options-label {
    padding: 10px 16px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ip-text-muted, #787670);
}
.g0c-options { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }

.g0c-option {
    border: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    border-radius: var(--ip-radius-md, 8px);
    background: var(--ip-bg-surface-alt, #252930);
    overflow: hidden;
    transition: border-color 0.15s;
}
.g0c-option:hover { border-color: var(--ip-border, rgba(255,255,255,0.14)); }
.g0c-option-recommended {
    border-color: var(--ip-border-accent, rgba(91,142,201,0.30));
    background: var(--ip-bg-surface, #1E2128);
}
.g0c-option-recommended:hover { border-color: var(--ip-accent-mid, #4A7AB5); }
.g0c-option-danger { opacity: 0.75; }
.g0c-option-danger:hover { opacity: 1; }

.g0c-option-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; }
.g0c-option-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-accent-text, #7BAAD8);
    background: var(--ip-accent-subtle, rgba(91,142,201,0.10));
    border: 1px solid var(--ip-border-accent, rgba(91,142,201,0.30));
    border-radius: 3px;
    padding: 1px 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.g0c-option-label { font-size: 13px; font-weight: 600; color: var(--ip-text-primary, #EDEDEB); }
.g0c-option-desc {
    font-size: 12px;
    color: var(--ip-text-tertiary, #9A9890);
    padding: 0 12px 6px;
    line-height: 1.4;
}

.g0c-form { padding: 6px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.g0c-textarea {
    background: var(--ip-bg-input, #1E2128);
    border: 1px solid var(--ip-border, rgba(255,255,255,0.14));
    border-radius: var(--ip-radius-sm, 4px);
    color: var(--ip-text-primary, #EDEDEB);
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.5;
    padding: 7px 10px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}
.g0c-textarea::placeholder { color: var(--ip-text-muted, #787670); }
.g0c-textarea:focus { border-color: var(--ip-accent-mid, #4A7AB5); }

.g0c-btn {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: var(--ip-radius-sm, 4px);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--ip-accent, #5B8EC9);
    color: #fff;
    transition: background 0.15s, opacity 0.15s;
}
.g0c-btn:hover:not(:disabled) { background: var(--ip-accent-mid, #4A7AB5); }
.g0c-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.g0c-btn-warning { background: var(--ip-warning, #E5A235); color: #0F0F0F; }
.g0c-btn-warning:hover:not(:disabled) { background: #cc8f2e; }
.g0c-btn-danger {
    background: transparent;
    border-color: var(--ip-error-border, rgba(229,87,79,0.25));
    color: var(--ip-error, #E5574F);
}
.g0c-btn-danger:hover:not(:disabled) {
    background: var(--ip-error-bg, rgba(229,87,79,0.10));
    border-color: var(--ip-error, #E5574F);
}

.g0c-drop-zone {
    position: relative;
    border: 1px dashed var(--ip-border, rgba(255,255,255,0.14));
    border-radius: var(--ip-radius-sm, 4px);
    background: var(--ip-bg-input, #1E2128);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.g0c-drop-zone:hover, .g0c-drop-zone.drag-over {
    border-color: var(--ip-accent-mid, #4A7AB5);
    background: var(--ip-accent-subtle, rgba(91,142,201,0.10));
}
.g0c-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.g0c-drop-label { display: block; font-size: 12.5px; color: var(--ip-text-secondary, #C0BEB6); margin-bottom: 2px; }
.g0c-drop-hint { display: block; font-size: 11px; color: var(--ip-text-muted, #787670); }
.g0c-file-list { display: flex; flex-direction: column; gap: 3px; }
.g0c-file-item {
    font-size: 11.5px;
    color: var(--ip-text-secondary, #C0BEB6);
    background: var(--ip-bg-hover, #2E3239);
    border-radius: 3px;
    padding: 3px 8px;
}

.g0c-lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.g0c-lang-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ip-text-secondary, #C0BEB6);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--ip-radius-sm, 4px);
    border: 1px solid var(--ip-border-light, rgba(255,255,255,0.09));
    transition: border-color 0.12s, background 0.12s;
}
.g0c-lang-item:hover {
    border-color: var(--ip-border, rgba(255,255,255,0.14));
    background: var(--ip-bg-hover, #2E3239);
}
.g0c-lang-item input { cursor: pointer; }

.g0c-acknowledge {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: var(--ip-text-secondary, #C0BEB6);
    cursor: pointer;
    line-height: 1.4;
}
.g0c-acknowledge input { flex-shrink: 0; margin-top: 2px; cursor: pointer; }

.g0c-error {
    margin: 4px 12px 8px;
    padding: 6px 10px;
    border-radius: var(--ip-radius-sm, 4px);
    background: var(--ip-error-bg, rgba(229,87,79,0.10));
    border: 1px solid var(--ip-error-border, rgba(229,87,79,0.25));
    color: var(--ip-error, #E5574F);
    font-size: 12px;
}

.g0c-card.g0c-submitted { pointer-events: none; opacity: 0.7; }

/* ==========================================================================
   IPA.5 — Plan Card (enhanced, replaces IPA.3 minimal inline version)
   ========================================================================== */

.ii-plan-card .research-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.ii-plan-card .research-stage-title {
    font-size: 14px;
    font-weight: 600;
}
.ii-plan-card .research-stage-skip-to-finish {
    font-size: 11px;
    color: var(--ip-text-tertiary, #9A9890);
    text-decoration: none;
}
.ii-plan-card .research-stage-skip-to-finish:hover {
    color: var(--ip-accent, #5B8EC9);
    text-decoration: underline;
}

.ii-plan-block {
    padding: 10px 0;
    border-bottom: 1px solid var(--ip-border-light, rgba(255,255,255,0.06));
}
.ii-plan-block:last-of-type { border-bottom: none; }

.ii-plan-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ip-text-tertiary, #9A9890);
    margin-bottom: 6px;
}

.ii-plan-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ii-plan-pattern-name, .ii-plan-template-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-text-primary, #E8E5DB);
}

.ii-plan-conf-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(91,142,201,0.12);
    color: var(--ip-accent-light, #7BAAD8);
    border: 1px solid rgba(91,142,201,0.25);
}

.ii-plan-select {
    margin-left: auto;
    padding: 4px 8px;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.13));
    border-radius: 4px;
    background: var(--ip-bg-surface, #14171A);
    color: var(--ip-text-secondary, #B8B6AE);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    max-width: 280px;
}
.ii-plan-select:hover {
    border-color: var(--ip-accent, #5B8EC9);
}
.ii-plan-select:focus {
    outline: none;
    border-color: var(--ip-accent, #5B8EC9);
    box-shadow: 0 0 0 2px rgba(91,142,201,0.15);
}

.ii-plan-reason {
    margin-top: 6px;
    font-size: 11px;
    font-style: italic;
    color: var(--ip-text-tertiary, #9A9890);
}

.ii-plan-sections {
    padding: 8px 0;
    border-bottom: 1px solid var(--ip-border-light, rgba(255,255,255,0.06));
}
.ii-plan-sections summary {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ip-text-tertiary, #9A9890);
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}
.ii-plan-sections summary:hover {
    color: var(--ip-accent, #5B8EC9);
}
.ii-plan-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 12px;
    margin-top: 8px;
}
.ii-plan-section-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 12px;
    color: var(--ip-text-secondary, #B8B6AE);
    cursor: pointer;
}
.ii-plan-section-item input[type="checkbox"] {
    accent-color: var(--ip-accent, #5B8EC9);
    cursor: pointer;
}
.ii-plan-section-item:has(input:not(:checked)) span {
    text-decoration: line-through;
    opacity: 0.55;
}

.ii-plan-strategy .ii-plan-strat-item {
    font-size: 12px;
    color: var(--ip-text-secondary, #B8B6AE);
    padding: 2px 0;
}

.ii-plan-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--ip-border-light, rgba(255,255,255,0.06));
}
.ii-plan-abort {
    background: transparent;
    border: 1px solid var(--ip-border, rgba(255,255,255,0.13));
    color: var(--ip-text-tertiary, #9A9890);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.ii-plan-abort:hover {
    color: var(--ip-error, #E5574F);
    border-color: var(--ip-error-border, rgba(229,87,79,0.4));
}

.ii-plan-card.approved {
    opacity: 0.6;
    pointer-events: none;
}

