/* Shadow IC — Design System
   Based on Vitronia v2 design language (dark-first, 5-level surface hierarchy)
   Adapted for adversarial AI debate UX */

/* === Tokens === */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Dark theme (default) */
    --surface-0: #09090B;
    --surface-1: #111113;
    --surface-2: #18181B;
    --surface-3: #1E1E22;
    --surface-4: #262830;

    --text-primary: #F4F4F5;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;

    --border: #27272A;
    --border-subtle: #1E1E22;

    --accent: #6366F1;
    --accent-hover: #818CF8;
    --accent-soft: rgba(99,102,241,0.08);

    --red: #EF4444;
    --red-soft: rgba(239,68,68,0.08);
    --yellow: #F59E0B;
    --yellow-soft: rgba(245,158,11,0.08);
    --green: #22C55E;
    --green-soft: rgba(34,197,94,0.08);
    --blue: #3B82F6;

    --radius: 8px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Light theme */
[data-theme="light"] {
    --surface-0: #FFFFFF;
    --surface-1: #F9FAFB;
    --surface-2: #F3F4F6;
    --surface-3: #E5E7EB;
    --surface-4: #D1D5DB;

    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #9CA3AF;

    --border: #E5E7EB;
    --border-subtle: #F3F4F6;

    --accent-soft: rgba(99,102,241,0.06);
    --red-soft: rgba(239,68,68,0.06);
    --yellow-soft: rgba(245,158,11,0.06);
    --green-soft: rgba(34,197,94,0.06);
}

/* Light theme badge contrast overrides */
[data-theme="light"] .vote-pill.vote-invest,
[data-theme="light"] .final-vote-badge.vote-invest,
[data-theme="light"] .position-vote.vote-invest {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}
[data-theme="light"] .vote-pill.vote-conditional,
[data-theme="light"] .final-vote-badge.vote-conditional,
[data-theme="light"] .position-vote.vote-conditional {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}
[data-theme="light"] .vote-pill.vote-pass,
[data-theme="light"] .final-vote-badge.vote-pass,
[data-theme="light"] .position-vote.vote-pass {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}
[data-theme="light"] .condition-badge.badge-owner {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}
[data-theme="light"] .condition-badge.badge-deadline {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}
[data-theme="light"] .specialist-badge {
    background: rgba(99, 102, 241, 0.10);
    color: #4338ca;
}
[data-theme="light"] .evidence-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
}
[data-theme="light"] .data-gap-badge {
    background: rgba(245, 158, 11, 0.10);
    color: #92400e;
}
[data-theme="light"] .stress-probability.high {
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
}
[data-theme="light"] .stress-probability.medium {
    background: rgba(245, 158, 11, 0.10);
    color: #b45309;
}
[data-theme="light"] .stress-probability.low {
    background: rgba(34, 197, 94, 0.10);
    color: #15803d;
}
[data-theme="light"] .db-severity.sev-critical {
    color: #b91c1c;
}
[data-theme="light"] .db-severity.sev-high {
    color: #b45309;
}
[data-theme="light"] .badge-red {
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
}
[data-theme="light"] .badge-amber {
    background: rgba(234, 179, 8, 0.10);
    color: #92400e;
}

/* === Focus-visible accessibility === */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.tab-btn:focus-visible,
.drawer-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.nav-btn:focus-visible,
.btn-login:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background: var(--surface-0);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* === Dev Banner — engine indicator === */
.dev-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dev-banner-mock {
    background: #92400e; color: #fef3c7;
}
.dev-banner-claude_code {
    background: #1e40af; color: #dbeafe;
}
.dev-banner-api {
    background: #166534; color: #dcfce7;
}

.dev-banner-hint {
    opacity: 0.7;
}

body:has(.dev-banner) .nav-bar { top: 34px; }
body:has(.dev-banner) .main-content { padding-top: 3rem; }
body:has(.dev-banner) .verdict-bar { top: 90px; }
body:has(.dev-banner) .evidence-sidebar { top: 166px; height: calc(100vh - 166px); }
body:has(.dev-banner) .evidence-toggle-btn { top: 174px; }

/* === Nav Bar === */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left { display: flex; align-items: center; gap: 1rem; }
.nav-right { display: flex; align-items: center; gap: 1rem; }

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-logo { color: var(--accent); }

.nav-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    transition: all 0.15s;
}
.nav-link:hover { color: var(--text-primary); background: var(--accent-soft); }
.nav-link-muted { color: var(--text-tertiary); }

.nav-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s;
}
.nav-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* === Main Content === */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* === Login (split-screen) === */
.login-body { margin: 0; overflow: hidden; min-height: 100vh; }

.login-scene { display: flex; min-height: 100vh; }

.login-brand-panel {
    flex: 1;
    background: linear-gradient(145deg, var(--surface-0) 0%, #0c0e16 35%, #1a1540 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    top: 15%; left: 25%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.10) 0%, rgba(99,102,241,0.03) 40%, transparent 70%);
    pointer-events: none;
    animation: orbPulse 8s ease-in-out infinite;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}

@keyframes orbPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.brand-content { position: relative; z-index: 1; max-width: 500px; }
.brand-logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 3rem; animation: brandIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.1s both; }
.brand-logo-text { font-size: 1.5rem; font-weight: 700; color: white; letter-spacing: -0.03em; }
.brand-headline { font-size: 2.75rem; font-weight: 800; color: white; letter-spacing: -0.035em; line-height: 1.12; margin-bottom: 1.25rem; animation: brandIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.2s both; }
.brand-headline .accent-text { background: linear-gradient(135deg, #818cf8, #a5b4fc, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand-subtext { font-size: 1.0625rem; color: #94a3b8; line-height: 1.75; margin-bottom: 3rem; max-width: 440px; animation: brandIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.3s both; }
.brand-proof { display: flex; gap: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.06); animation: brandIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.4s both; }
.proof-item { display: flex; flex-direction: column; gap: 3px; }
.proof-value { font-size: 1.5rem; font-weight: 700; color: white; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.proof-label { font-size: 0.6875rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

@keyframes brandIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.login-form-panel {
    width: 520px; min-width: 520px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 3rem;
    background: var(--surface-1);
    border-left: 1px solid var(--border);
}

.login-form-container { width: 100%; max-width: 380px; animation: formSlideIn 0.5s cubic-bezier(0.16,1,0.3,1) 0.15s both; }
@keyframes formSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.login-form-header { margin-bottom: 2rem; }
.login-form-header h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 0.375rem; }
.login-form-header p { font-size: 0.875rem; color: var(--text-secondary); }

.login-alert-error {
    padding: 0.75rem 1rem;
    background: var(--red-soft); color: var(--red);
    border-radius: var(--radius); font-size: 0.8125rem; font-weight: 500;
    margin-bottom: 1.25rem; border: 1px solid rgba(239,68,68,0.15);
    animation: shakeIn 0.35s ease;
}
@keyframes shakeIn { 0% { transform: translateX(0); opacity: 0; } 20% { transform: translateX(-6px); opacity: 1; } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } 100% { transform: translateX(0); } }

.login-field { margin-bottom: 1.25rem; }
.login-field label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.375rem; letter-spacing: -0.01em; }
.login-field input {
    width: 100%; padding: 0.6875rem 0.875rem; font-size: 0.875rem; font-family: var(--font-sans);
    color: var(--text-primary); background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.login-field input::placeholder { color: var(--text-tertiary); }

.btn-login {
    width: 100%; padding: 0.75rem 1rem; font-size: 0.9375rem; font-weight: 600; font-family: var(--font-sans);
    color: white; background: var(--accent); border: none; border-radius: var(--radius);
    cursor: pointer; transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    margin-top: 0.5rem; position: relative; overflow: hidden;
}
.btn-login:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(99,102,241,0.35); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login.is-loading .btn-label { opacity: 0; }
.btn-login.is-loading .btn-spinner { display: block; }
.btn-spinner { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.25); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.login-footer { text-align: center; margin-top: 2.5rem; font-size: 0.75rem; color: var(--text-tertiary); }
.login-footer span { color: var(--accent); font-weight: 500; }

/* === Upload === */
.upload-container { max-width: 800px; margin: 0 auto; }
.upload-header { margin-bottom: 2rem; }
.upload-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.upload-header p { color: var(--text-secondary); font-size: 0.9375rem; }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--surface-1);
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.upload-icon { color: var(--text-tertiary); margin-bottom: 1rem; }
.upload-text { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.upload-browse { color: var(--accent); font-weight: 600; }
.upload-hint { font-size: 0.8125rem; color: var(--text-tertiary); }

.upload-status {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}
.status-file { font-weight: 600; margin-bottom: 0.75rem; }
.status-progress { height: 4px; background: var(--surface-4); border-radius: 2px; overflow: hidden; margin-bottom: 0.75rem; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.5s ease; width: 0%; }
.status-text { font-size: 0.8125rem; color: var(--text-secondary); }

/* Sample memo button */
.sample-section { margin-top: 1.5rem; text-align: center; }
.sample-divider { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.sample-divider::before, .sample-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.sample-divider span { color: var(--text-tertiary); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }
.sample-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-primary); font-size: 0.875rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s ease;
}
.sample-btn:hover { border-color: var(--accent); color: var(--accent); }
.sample-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sample-hint { font-size: 0.75rem; color: var(--text-tertiary); margin-top: 0.5rem; }

/* Panel cards */
.debate-panel-section { margin-top: 3rem; }
.debate-panel-section h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.panel-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.25rem; }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.panel-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border-left: 3px solid var(--card-accent);
}
.panel-card-header { display: flex; align-items: flex-start; gap: 0.75rem; }
.panel-avatar { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.panel-name { font-weight: 600; font-size: 0.9375rem; }
.panel-perspective { font-size: 0.8125rem; color: var(--text-tertiary); font-style: italic; margin-top: 0.125rem; }

/* === Debate Live View === */
.debate-container { max-width: 1400px; margin: 0 auto; }
.debate-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.debate-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.debate-doc-name { color: var(--text-secondary); font-size: 0.875rem; }
.debate-header-right { display: flex; align-items: center; gap: 1.5rem; }
.debate-status-msg { font-size: 0.875rem; color: var(--accent); font-weight: 500; max-width: 300px; text-align: right; }
.debate-timer { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; color: var(--accent); }

/* === FEED-FIRST DEBATE LAYOUT === */

/* Split layout: feed left (primary), sidebar right */
.debate-split {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 1.5rem;
    align-items: start;
}

/* Phase bar — sticky */
.phase-bar {
    display: flex; align-items: center; gap: 0;
    margin-bottom: 1.5rem;
    background: var(--surface-2); border-radius: var(--radius-lg); padding: 1rem 1.5rem;
    border: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 10;
}
body:has(.dev-banner) .phase-bar { top: 104px; }

.phase-step { display: flex; align-items: center; gap: 0.5rem; flex: 1; }
.phase-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--surface-4); border: 2px solid var(--border);
    transition: all 0.3s;
}
.phase-step.active .phase-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(99,102,241,0.5); animation: pulseDot 1.5s infinite; }
.phase-step.done .phase-dot { background: var(--green); border-color: var(--green); }
.phase-label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); }
.phase-step.active .phase-label { color: var(--accent); font-weight: 600; }
.phase-step.done .phase-label { color: var(--green); }
.phase-connector { width: 24px; height: 2px; background: var(--border); flex-shrink: 0; }

@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 8px rgba(99,102,241,0.3); } 50% { box-shadow: 0 0 16px rgba(99,102,241,0.6); } }

/* Transcript feed (left panel — PRIMARY) */
:root { --chrome-height: 240px; }
body:has(.dev-banner) { --chrome-height: 280px; }

.transcript-title {
    font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem;
}

.transcript-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100dvh - var(--chrome-height));
    overflow-y: auto;
    padding: 1rem;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    scroll-behavior: smooth;
}

/* Scroll badge */
.scroll-badge {
    position: sticky; bottom: 0; left: 50%;
    transform: translateX(-50%);
    background: var(--accent); color: white;
    padding: 0.5rem 1rem; border-radius: var(--radius);
    font-size: 0.8125rem; cursor: pointer; border: none;
    font-family: var(--font-sans); font-weight: 500;
    animation: materialize 0.25s ease-out;
    z-index: 5;
}
.scroll-badge:hover { filter: brightness(1.1); }

/* Sticky sidebar */
.debate-sidebar {
    position: sticky;
    top: 120px;
    max-height: calc(100dvh - 140px);
    overflow-y: auto;
}
body:has(.dev-banner) .debate-sidebar { top: 160px; }
body:has(.dev-banner) .agent-slideover { top: 90px; }

.sidebar-title {
    font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem;
}

/* Agent grid — single column for reliable fit */
.agent-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

/* Mini agent cards (sidebar) */
.agent-card-mini {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-align: left;
    font-family: var(--font-sans);
    color: var(--text-primary);
    border-left: 3px solid var(--agent-color, var(--border));
    width: 100%;
}
.agent-card-mini:hover {
    border-color: var(--agent-color, var(--accent));
    box-shadow: 0 0 16px color-mix(in srgb, var(--agent-color, var(--accent)) 12%, transparent);
    transform: translateX(-2px);
}
.agent-card-mini[aria-expanded="true"] {
    background: var(--surface-3);
    border-color: var(--agent-color, var(--accent));
    box-shadow: 0 0 20px color-mix(in srgb, var(--agent-color, var(--accent)) 15%, transparent);
}

.agent-card-header { display: flex; align-items: center; gap: 0.5rem; }

.agent-avatar-sm {
    width: 28px; height: 28px; min-width: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid;
    font-size: 0.8125rem; font-weight: 700;
    color: var(--agent-color, var(--accent));
}

.agent-card-info { flex: 1; min-width: 0; }
.agent-card-name {
    font-weight: 600; font-size: 0.6875rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: 0.01em;
}
.agent-card-status {
    display: flex; align-items: center; gap: 0.25rem;
    font-size: 0.625rem; color: var(--text-tertiary); font-family: var(--font-mono);
}

.agent-card-vote { flex-shrink: 0; }

/* Card teaser — one-liner key concern */
.agent-card-teaser {
    font-size: 0.6875rem; color: var(--text-secondary);
    line-height: 1.4; margin-top: 0.375rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.agent-card-teaser:empty { display: none; }

/* Confidence bar — thin indicator under card */
.agent-card-confidence {
    height: 2px; border-radius: 1px;
    margin-top: 0.5rem;
    background: var(--surface-4);
    overflow: hidden;
}
.agent-card-confidence:empty { display: none; }
.confidence-fill {
    height: 100%; border-radius: 1px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.confidence-fill.vote-invest { background: var(--green); }
.confidence-fill.vote-conditional { background: var(--yellow); }
.confidence-fill.vote-pass { background: var(--red); }

/* Status with dot indicator */
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); flex-shrink: 0; animation: statusPulse 2s infinite; }
.status-dot.done { background: var(--green); animation: none; }
.status-dot.analyzing { background: var(--accent); animation: statusPulse 1s infinite; }

/* === SLIDE-OVER PANEL (viewport-level, 480px) === */
.slideover-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.slideover-scrim.visible {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.agent-slideover {
    position: fixed;
    top: 56px; right: 0; bottom: 0;
    width: 480px;
    z-index: 100;
    background: var(--surface-1);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.agent-slideover.open {
    transform: translateX(0);
}

/* Slide-over header */
.slideover-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    flex-shrink: 0;
}
.slideover-agent-info {
    display: flex; align-items: center; gap: 0.75rem;
    flex: 1; min-width: 0;
}
.slideover-close-btn {
    background: none; border: 1px solid var(--border);
    color: var(--text-secondary); cursor: pointer;
    font-size: 1.25rem; line-height: 1;
    padding: 0.375rem 0.625rem; border-radius: var(--radius);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    font-family: var(--font-sans); flex-shrink: 0;
}
.slideover-close-btn:hover {
    border-color: var(--accent); color: var(--accent);
    background: var(--accent-soft);
}

/* Panel avatar */
.panel-avatar {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid; font-size: 1.125rem; font-weight: 700;
    flex-shrink: 0;
}
.panel-avatar .avatar-initial { color: var(--agent-color, var(--accent)); }
.panel-agent-name { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.125rem; }
.panel-agent-perspective { font-size: 0.75rem; color: var(--text-tertiary); font-style: italic; }

/* Agent navigation strip — switch agents within panel */
.panel-nav {
    display: flex; align-items: center; gap: 0.375rem;
    padding: 0.625rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.panel-nav::-webkit-scrollbar { display: none; }
.panel-nav:empty { display: none; }

.panel-nav-pill {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    border: 2px solid transparent;
    background: var(--surface-3);
    color: var(--text-secondary);
    cursor: pointer; flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.panel-nav-pill:hover {
    background: var(--surface-4);
    transform: translateY(-1px);
}
.panel-nav-pill.active {
    border-color: var(--pill-color, var(--accent));
    background: color-mix(in srgb, var(--pill-color, var(--accent)) 15%, var(--surface-2));
    color: var(--pill-color, var(--accent));
}
.panel-nav-pill[title] { position: relative; }

/* Slide-over body — scrollable */
.slideover-body {
    flex: 1; overflow-y: auto;
    padding: 0;
}

/* Summary block — always visible at top */
.panel-summary {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.panel-vote-row {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.panel-vote-badge {
    font-size: 0.875rem; font-weight: 700;
    padding: 0.375rem 0.75rem; border-radius: var(--radius);
}
.panel-vote-badge.vote-invest { background: var(--green-soft); color: var(--green); }
.panel-vote-badge.vote-conditional { background: var(--yellow-soft); color: var(--yellow); }
.panel-vote-badge.vote-pass { background: var(--red-soft); color: var(--red); }
.panel-confidence-text {
    font-size: 0.75rem; font-family: var(--font-mono);
    color: var(--text-tertiary);
}
.panel-confidence-bar {
    height: 3px; border-radius: 2px; background: var(--surface-4);
    overflow: hidden; margin-top: 0.5rem;
}
.panel-confidence-fill {
    height: 100%; border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.panel-confidence-fill.vote-invest { background: var(--green); }
.panel-confidence-fill.vote-conditional { background: var(--yellow); }
.panel-confidence-fill.vote-pass { background: var(--red); }
.panel-one-liner {
    font-size: 0.9375rem; color: var(--text-primary);
    line-height: 1.5; margin: 0; font-weight: 500;
}
.panel-summary-label {
    font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-tertiary); margin-bottom: 0.25rem;
}

/* Collapsible sections */
.panel-section {
    border-bottom: 1px solid var(--border);
}
.panel-section:last-child { border-bottom: none; }
.panel-section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-secondary);
    transition: color 0.15s, background 0.15s;
    user-select: none;
}
.panel-section-header:hover {
    color: var(--text-primary); background: var(--surface-2);
}
.panel-section-header .section-count {
    font-size: 0.625rem; font-weight: 500;
    color: var(--text-tertiary); font-family: var(--font-mono);
    background: var(--surface-3); padding: 0.125rem 0.375rem;
    border-radius: var(--radius); margin-left: auto; margin-right: 0.5rem;
}
.panel-section-header .section-chevron {
    font-size: 0.5rem;
    transition: transform 0.2s;
    color: var(--text-tertiary);
}
.panel-section.open .section-chevron { transform: rotate(90deg); }

.panel-section-body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
}
.panel-section.open .panel-section-body {
    max-height: 3000px;
}
.panel-section-body-inner {
    padding: 0 1.5rem 1.25rem;
}

/* Full analysis text */
.panel-full-text {
    white-space: pre-wrap; font-size: 0.8125rem;
    color: var(--text-secondary); line-height: 1.65;
}

/* Exchange items (challenges + responses paired) */
.panel-exchange {
    margin-bottom: 1.25rem; padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}
.panel-exchange:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.panel-exchange-round {
    font-size: 0.625rem; font-weight: 600; font-family: var(--font-mono);
    color: var(--text-tertiary); margin-bottom: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.panel-exchange-block { margin-bottom: 0.75rem; }
.panel-exchange-block:last-child { margin-bottom: 0; }
.panel-exchange-label {
    font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 0.375rem;
}
.panel-exchange-label.challenge-label { color: var(--yellow); }
.panel-exchange-label.response-label { color: var(--green); }
.panel-exchange-text {
    font-size: 0.8125rem; color: var(--text-secondary);
    line-height: 1.55; white-space: pre-wrap;
}
.panel-shift-indicator {
    display: inline-block;
    font-size: 0.6875rem; font-weight: 600;
    padding: 0.125rem 0.5rem; border-radius: var(--radius);
    margin-top: 0.375rem;
}
.panel-shift-indicator.shifted { background: var(--yellow-soft); color: var(--yellow); }
.panel-shift-indicator.defended { background: var(--surface-3); color: var(--text-tertiary); }

.panel-empty {
    font-size: 0.8125rem; color: var(--text-tertiary);
    font-style: italic; padding: 0.25rem 0;
}

/* Content swap transition */
.slideover-body.swapping {
    opacity: 0.3;
    transition: opacity 0.1s;
}
.slideover-body.swapped {
    opacity: 1;
    transition: opacity 0.15s;
}

/* Slide-over responsive */
@media (max-width: 768px) {
    .agent-slideover {
        width: 100%;
        top: auto; bottom: 0; left: 0; right: 0;
        max-height: 75vh;
        border-left: none;
        border-top: 1px solid var(--border);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(100%);
    }
    .agent-slideover.open { transform: translateY(0); }
    .slideover-header::before {
        content: ''; display: block; position: absolute;
        top: 8px; left: 50%; transform: translateX(-50%);
        width: 36px; height: 4px; border-radius: 2px;
        background: var(--border);
    }
    .slideover-header { position: relative; padding-top: 1.5rem; }
}
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .slideover-body { padding-bottom: env(safe-area-inset-bottom); }
    }
}

/* Agent table (kept for verdict page compatibility) */
.agent-table {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem; margin-bottom: 2rem;
    position: relative; min-height: 300px;
}
.agent-seat {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.25rem;
    transition: all 0.3s; border-top: 3px solid var(--seat-color, var(--border));
}

/* Vote pills */
.vote-pill {
    display: inline-block;
    font-size: 0.6875rem; font-weight: 700;
    padding: 0.2rem 0.5rem; border-radius: var(--radius);
    text-transform: uppercase; letter-spacing: 0.03em;
}
.vote-pill.vote-invest { background: var(--green-soft); color: var(--green); }
.vote-pill.vote-conditional { background: var(--yellow-soft); color: var(--yellow); }
.vote-pill.vote-pass { background: var(--red-soft); color: var(--red); }

/* === TRANSCRIPT EVENT CARDS === */

/* Base card */
.transcript-event {
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--surface-2);
    border-left: 3px solid var(--border);
    will-change: transform, opacity;
    animation-fill-mode: both;
}

.event-timestamp {
    font-family: var(--font-mono); font-size: 0.625rem;
    color: var(--text-tertiary); display: block;
    margin-bottom: 0.375rem;
}

.event-header {
    display: flex; align-items: center; gap: 0.5rem;
    flex-wrap: wrap; margin-bottom: 0.375rem;
}

.event-text {
    font-size: 0.875rem; color: var(--text-secondary);
    line-height: 1.5; white-space: pre-wrap;
}

.event-summary {
    font-size: 0.875rem; color: var(--text-secondary);
    line-height: 1.5; margin: 0;
}

.event-confidence {
    font-size: 0.75rem; color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.round-badge {
    font-size: 0.625rem; font-weight: 600; font-family: var(--font-mono);
    color: var(--text-tertiary); background: var(--surface-3);
    padding: 0.125rem 0.375rem; border-radius: var(--radius);
}

.shift-badge {
    font-size: 0.6875rem; font-weight: 500;
    color: var(--text-secondary); padding: 0.125rem 0.5rem;
    border-radius: var(--radius); background: var(--surface-3);
}
.shift-badge.shifted {
    color: var(--yellow); background: var(--yellow-soft);
    font-weight: 600;
}

/* Position cards — agent color accent */
.transcript-event.event-position {
    border-left-color: var(--agent-color, var(--accent));
    animation: materialize 0.3s ease-out both;
}

/* Challenge cards — yellow accent, tinted background */
.transcript-event.event-challenge {
    border-left-color: var(--yellow);
    background: color-mix(in srgb, var(--yellow) 5%, var(--surface-2));
    animation: strike 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Response cards — agent color */
.transcript-event.event-response {
    border-left-color: var(--agent-color, var(--accent));
    animation: parry 0.25s ease-out both;
}

/* Vote cards — green accent */
.transcript-event.event-vote {
    border-left-color: var(--green);
    animation: voteDrop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Synthesis card — prominent, verdict-colored */
.transcript-event.event-synthesis {
    padding: 1.5rem;
    border: none;
    background: color-mix(in srgb, var(--verdict-color, var(--accent)) 8%, var(--surface-2));
    border-radius: var(--radius-lg);
    animation: verdictRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Status cards — subtle */
.transcript-event.event-status {
    border-left-color: var(--border);
    background: transparent;
    padding: 0.5rem 1rem;
    animation: materialize 0.2s ease-out both;
}
.transcript-event.event-status .event-text { font-style: italic; color: var(--text-tertiary); font-size: 0.8125rem; }

/* Error cards */
.transcript-event.event-error {
    border-left-color: var(--red);
    color: var(--red);
}

/* Specialist activation */
.transcript-event.event-specialist {
    border-left-color: var(--accent);
    background: var(--accent-soft);
    animation: materialize 0.4s ease-out both;
}
.specialist-header { font-size: 0.9375rem; }

/* Completion card */
.transcript-event.event-complete {
    border: none;
    background: var(--green-soft);
    animation: verdictRise 0.5s ease-out both;
}
.complete-content {
    display: flex; align-items: center; gap: 0.75rem;
    flex-wrap: wrap;
}
.complete-check {
    font-size: 1.25rem; color: var(--green); font-weight: 700;
}
.complete-cta {
    color: var(--accent); font-weight: 600;
    text-decoration: none; margin-left: auto;
}
.complete-cta:hover { text-decoration: underline; }

/* Quick kill card */
.transcript-event.event-quickkill {
    border-left-color: var(--accent);
    animation: materialize 0.3s ease-out both;
}
.status-go { color: var(--green); font-weight: 700; }
.status-flagged { color: var(--red); font-weight: 700; }
.flag-list { margin: 0.5rem 0 0; padding-left: 1.25rem; font-size: 0.8125rem; color: var(--text-secondary); }

/* Phase dividers */
.transcript-phase {
    text-align: center;
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    animation: phaseSweep 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Verdict elements */
.verdict-rule {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: phaseSweep 0.4s ease-out both;
}

.verdict-rec {
    display: inline-block;
    font-size: 1.5rem; font-weight: 800;
    letter-spacing: -0.02em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}
.verdict-rec.rec-invest { color: var(--green); background: var(--green-soft); }
.verdict-rec.rec-conditional { color: var(--yellow); background: var(--yellow-soft); }
.verdict-rec.rec-pass { color: var(--red); background: var(--red-soft); }

.verdict-one-liner {
    font-size: 1rem; font-weight: 500;
    color: var(--text-primary); margin: 0.5rem 0 0;
    line-height: 1.5;
}

.verdict-conditions {
    margin: 0.75rem 0 0; padding-left: 1.25rem;
    font-size: 0.875rem; color: var(--text-secondary);
    line-height: 1.6;
}

.verdict-header { gap: 1rem; }

/* Expandable position text */
.position-details { margin-top: 0.5rem; }
.position-details summary {
    font-size: 0.75rem; color: var(--accent); cursor: pointer;
    font-weight: 500;
}
.position-full-text {
    white-space: pre-wrap; font-size: 0.8125rem;
    color: var(--text-secondary); line-height: 1.6;
    margin-top: 0.5rem; max-height: 300px; overflow-y: auto;
}

/* Evidence badge */
.evidence-badge {
    font-size: 0.6875rem; font-weight: 500;
    color: var(--yellow); background: var(--yellow-soft);
    padding: 0.2rem 0.5rem; border-radius: var(--radius);
    display: inline-block; margin-top: 0.375rem;
}

/* Position vote badge (used in drawer) */
.position-vote {
    display: inline-block;
    font-size: 0.75rem; font-weight: 700;
    padding: 0.25rem 0.625rem; border-radius: var(--radius);
    margin-bottom: 0.5rem;
}
.position-vote.vote-invest { background: var(--green-soft); color: var(--green); }
.position-vote.vote-conditional { background: var(--yellow-soft); color: var(--yellow); }
.position-vote.vote-pass { background: var(--red-soft); color: var(--red); }

/* Final vote badge */
.final-vote-badge {
    display: inline-block;
    font-size: 0.8125rem; font-weight: 700;
    padding: 0.375rem 0.75rem; border-radius: var(--radius);
    margin-bottom: 0.5rem;
}
.final-vote-badge.vote-invest { background: var(--green-soft); color: var(--green); }
.final-vote-badge.vote-conditional { background: var(--yellow-soft); color: var(--yellow); }
.final-vote-badge.vote-pass { background: var(--red-soft); color: var(--red); }

/* Specialist badge */
.specialist-badge {
    font-size: 0.5625rem; font-weight: 600;
    background: var(--accent-soft); color: var(--accent);
    padding: 0.1rem 0.375rem; border-radius: var(--radius);
    margin-left: 0.375rem; vertical-align: middle;
    text-transform: uppercase; letter-spacing: 0.03em;
}

/* Progressive animation dampening */
.transcript-event.anim-subtle { animation-name: materialize; animation-duration: 0.2s; }
.transcript-event.anim-minimal { animation: none; opacity: 1; }
/* Exception: phase dividers and verdict ALWAYS get full animation */

/* === ANIMATION KEYFRAMES === */

/* 1. MATERIALIZE — default */
@keyframes materialize {
    from { opacity: 0; transform: translateY(6px); filter: blur(1px); }
    to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

/* 2. STRIKE — challenge cards (snaps left-to-right) */
@keyframes strike {
    0%   { opacity: 0; transform: translateX(-16px) scaleX(0.96); }
    60%  { transform: translateX(3px) scaleX(1.01); }
    100% { opacity: 1; transform: translateX(0) scaleX(1); }
}

/* 3. PARRY — response cards (mirror of strike, from right) */
@keyframes parry {
    0%   { opacity: 0; transform: translateX(16px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* 4. PHASE SWEEP — phase transition dividers */
@keyframes phaseSweep {
    0%   { opacity: 0; clip-path: inset(0 100% 0 0); }
    100% { opacity: 1; clip-path: inset(0 0% 0 0); }
}

/* 5. VOTE DROP — final votes (weighty, with overshoot) */
@keyframes voteDrop {
    0%   { opacity: 0; transform: translateY(-10px) scale(0.97); }
    70%  { transform: translateY(2px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 6. VERDICT RISE — synthesis reveal (the climax) */
@keyframes verdictRise {
    0%   { opacity: 0; transform: scale(0.85) translateY(20px); filter: blur(4px); }
    60%  { transform: scale(1.03) translateY(-4px); filter: blur(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 7. STATUS PULSE — sidebar dot */
@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

/* (drawerIn removed — slide-over uses CSS transitions) */

/* Reduced motion — REQUIRED */
@media (prefers-reduced-motion: reduce) {
    .transcript-event, .transcript-phase, .status-dot,
    .scroll-badge, .verdict-rule, .agent-slideover,
    .slideover-scrim, .agent-card-mini, .confidence-fill,
    .panel-section-body, .panel-confidence-fill {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        filter: none !important;
    }
    .agent-slideover { transform: translateX(100%); }
    .agent-slideover.open { transform: translateX(0); }
    .transcript-feed { scroll-behavior: auto !important; }
}

/* Skip link (a11y) */
.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--accent); color: white;
    padding: 8px 16px; z-index: 9999;
    border-radius: 0 0 4px 0;
    text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 0; }

/* Screen reader only */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}
.feed-flag { font-size: 0.75rem; color: var(--yellow); }
.feed-flag-count { font-weight: 600; color: var(--yellow); }

.status-go { color: var(--green); font-weight: 700; }
.status-flagged { color: var(--yellow); font-weight: 700; }

.verdict-link { color: var(--accent); font-weight: 600; }
.verdict-link:hover { text-decoration: underline; }
.feed-link { background: var(--accent-soft); border-radius: 4px; padding: 0.5rem 0.75rem !important; margin-top: 0.25rem; }

/* Debate completion banner */
.debate-complete-banner {
    background: linear-gradient(135deg, var(--green-soft), var(--accent-soft));
    border: 1px solid var(--green);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    animation: slideDown 0.4s ease-out;
}
.banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}
.banner-check {
    color: var(--green);
    font-size: 1.25rem;
}
.banner-cta {
    margin-left: auto;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s;
}
.banner-cta:hover { background: var(--accent-hover); }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Verdict Page === */
.verdict-container { max-width: 900px; margin: 0 auto; }

.verdict-hero {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.verdict-hero[data-verdict="invest"] { border-left: 4px solid var(--green); }
.verdict-hero[data-verdict="conditional"] { border-left: 4px solid var(--yellow); }
.verdict-hero[data-verdict="pass"] { border-left: 4px solid var(--red); }

.verdict-doc-name { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; }

.verdict-recommendation { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }

.rec-badge {
    font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em;
    padding: 0.375rem 1rem; border-radius: var(--radius);
}
.rec-invest, .rec-badge.rec-invest { background: var(--green-soft); color: var(--green); }
.rec-conditional, .rec-badge.rec-conditional { background: var(--yellow-soft); color: var(--yellow); }
.rec-pass, .rec-badge.rec-pass { background: var(--red-soft); color: var(--red); }
.rec-unknown { background: var(--surface-3); color: var(--text-secondary); }

.rec-confidence { font-size: 0.875rem; color: var(--text-secondary); }

.verdict-one-liner { font-size: 1.0625rem; line-height: 1.6; margin-bottom: 1rem; }
.verdict-conditions { font-size: 0.875rem; color: var(--text-secondary); }
.verdict-conditions ul { margin-left: 1.25rem; margin-top: 0.5rem; }
.verdict-meta { font-size: 0.75rem; color: var(--text-tertiary); margin-top: 1rem; font-family: var(--font-mono); }

/* Tabs */
.verdict-tabs {
    display: flex; gap: 0.25rem;
    background: var(--surface-2); border-radius: var(--radius-lg);
    padding: 0.25rem; margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}
.tab-btn {
    flex: 1; padding: 0.625rem 1rem;
    font-size: 0.8125rem; font-weight: 500; font-family: var(--font-sans);
    color: var(--text-secondary); background: transparent;
    border: none; border-bottom: 2px solid transparent; border-radius: var(--radius); cursor: pointer;
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--text-primary); background: var(--surface-3); }
.tab-btn.active { color: var(--text-primary); background: var(--surface-0); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.2); border-bottom: 2px solid var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Risk cards */
.risk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .risk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .risk-grid { grid-template-columns: 1fr; } }
.risk-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.25rem;
}
.risk-card.risk-green { border-left: 3px solid var(--green); }
.risk-card.risk-yellow { border-left: 3px solid var(--yellow); }
.risk-card.risk-red { border-left: 3px solid var(--red); }

.risk-light { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; margin-bottom: 0.75rem; }
.light-dot { width: 10px; height: 10px; border-radius: 50%; }
.light-green { background: var(--green); }
.light-yellow { background: var(--yellow); }
.light-red { background: var(--red); }

.risk-summary { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.risk-detail { font-size: 0.8125rem; color: var(--text-tertiary); }
.risk-source { font-family: var(--font-mono); font-size: 0.75rem; display: block; margin-top: 0.25rem; }

/* Deal-breaker cards */
.dealbreaker-card {
    display: flex; gap: 1rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.25rem;
    margin-bottom: 0.75rem;
}
.db-rank { font-size: 1.5rem; font-weight: 800; color: var(--text-tertiary); min-width: 40px; }
.db-content { flex: 1; }
.db-severity { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.sev-critical { color: var(--red); }
.sev-high { color: var(--yellow); }
.sev-medium { color: var(--blue); }

/* Deal-breaker severity left borders */
.dealbreaker-card.severity-critical { border-left: 3px solid #ef4444; }
.dealbreaker-card.severity-high { border-left: 3px solid #f59e0b; }
.dealbreaker-card.severity-medium { border-left: 3px solid #3b82f6; }
.db-risk { font-size: 0.9375rem; margin-bottom: 0.75rem; }
.db-meta { font-size: 0.8125rem; color: var(--text-tertiary); display: flex; gap: 1.5rem; }
.db-mitigation { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }

/* Killer questions */
.question-card {
    display: flex; gap: 1rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.25rem;
    margin-bottom: 0.75rem;
}
.q-rank { font-size: 1.5rem; font-weight: 800; color: var(--accent); min-width: 40px; }
.q-content { flex: 1; }
.q-text { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.q-context { font-size: 0.8125rem; color: var(--text-secondary); }
.q-answers { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.q-good { padding: 0.5rem 0.75rem; background: var(--green-soft); border-radius: var(--radius); }
.q-good span { font-weight: 600; color: var(--green); }
.q-red { padding: 0.5rem 0.75rem; background: var(--red-soft); border-radius: var(--radius); }
.q-red span { font-weight: 600; color: var(--red); }

/* Theater */
.theater-section { margin-bottom: 2rem; }
.theater-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

.changes-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.change-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
}
.change-agent { font-weight: 600; margin-bottom: 0.5rem; }
.change-arrow { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; margin-bottom: 0.5rem; }
.change-from { color: var(--text-tertiary); text-decoration: line-through; }
.arrow { color: var(--accent); }
.change-to { color: var(--text-primary); font-weight: 500; }
.change-reason { font-size: 0.8125rem; color: var(--text-secondary); }

.consensus-list, .disagreement-list { margin-left: 1.5rem; font-size: 0.9375rem; }
.consensus-list li { color: var(--green); margin-bottom: 0.375rem; }
.disagreement-list li { color: var(--yellow); margin-bottom: 0.375rem; }

.agent-details {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 0.5rem;
}
.agent-details summary {
    padding: 0.75rem 1rem; cursor: pointer; font-weight: 500; font-size: 0.875rem;
    list-style: none;
}
.agent-details summary::before { content: '\25B6 '; font-size: 0.625rem; color: var(--text-tertiary); }
.agent-details[open] summary::before { content: '\25BC '; }
.agent-full-text { padding: 0 1rem 1rem; font-size: 0.8125rem; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.6; }
.challenge-detail { border-left: 3px solid var(--red); }
.response-detail { border-left: 3px solid var(--green); }

/* === History === */
.history-container { max-width: 700px; margin: 0 auto; }
.history-container h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }

.history-list { display: flex; flex-direction: column; gap: 0.5rem; }
.history-card {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.25rem;
    color: var(--text-primary); transition: all 0.15s;
}
.history-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.history-doc { font-weight: 500; }
.history-meta { display: flex; align-items: center; gap: 1rem; }
.history-verdict { font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 4px; }
.history-duration { font-size: 0.8125rem; color: var(--text-tertiary); font-family: var(--font-mono); }

.history-empty { text-align: center; padding: 3rem; color: var(--text-secondary); }

/* === Responsive === */
@media (max-width: 1200px) {
    .debate-split { grid-template-columns: 1fr 220px; }
}
@media (max-width: 900px) {
    .debate-split { grid-template-columns: 1fr; }
    .debate-sidebar { position: static; }
    .agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
}

@media (max-width: 960px) {
    .login-scene { flex-direction: column; }
    .login-brand-panel { min-height: 38vh; padding: 2.5rem; }
    .brand-headline { font-size: 2rem; }
    .login-form-panel { width: 100%; min-width: unset; border-left: none; border-top: 1px solid var(--border); }
    .agent-table { grid-template-columns: 1fr; }
    .debate-agents { min-height: auto; }
    .table-center { position: static; transform: none; padding: 1.5rem; }
}

/* Evidence enforcement badge */
.evidence-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    margin-top: 6px;
    font-family: var(--font-mono);
}

/* Executive Summary */
.executive-summary {
    background: var(--surface-2);
    border-left: 3px solid var(--accent);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}
.executive-summary h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

@media (max-width: 520px) {
    .login-brand-panel { padding: 1.75rem; min-height: 32vh; }
    .brand-headline { font-size: 1.625rem; }
    .brand-subtext { display: none; }
    .main-content { padding: 1rem; }
    .phase-bar { flex-wrap: wrap; }

    /* Nav collapse at mobile widths */
    .nav-bar { padding: 0 0.75rem; }
    .nav-left { gap: 0.5rem; }
    .nav-right { gap: 0.375rem; }
    .nav-brand { font-size: 0.9375rem; gap: 0.375rem; }
    .nav-link { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
    .nav-link .signout-text { display: none; }
    .nav-link-muted { font-size: 0; }
    .nav-link-muted::before { font-size: 0.875rem; }
    .nav-btn { width: 32px; height: 32px; font-size: 0.875rem; }
    #mode-toggle::after { display: none; }
}

/* Stress Tests */
.stress-test-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}
.stress-test-card.severity-critical { border-left: 3px solid #ef4444; }
.stress-test-card.severity-high { border-left: 3px solid #f59e0b; }
.stress-test-card.severity-medium { border-left: 3px solid #3b82f6; }
.stress-test-card.severity-low { border-left: 3px solid var(--green); }
.stress-scenario {
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.stress-probability {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    text-transform: uppercase;
}
.stress-probability.high {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.stress-probability.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.stress-probability.low {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.stress-impact {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.stress-implications {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === v2: Final Vote badges === */
.final-vote-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    letter-spacing: 0.03em;
}
.vote-invest { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.vote-conditional { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.vote-pass { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.final-vote-liner {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-style: italic;
}

/* === v2: Vote pills (verdict page) === */
.vote-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.vote-pill.vote-invest { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.vote-pill.vote-conditional { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.vote-pill.vote-pass { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* === v2: Votes table === */
.votes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}
.votes-table th {
    background: var(--surface-2);
    color: var(--text-primary);
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}
.votes-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    vertical-align: top;
}

/* === v2: Condition badges === */
.condition-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.4rem;
    vertical-align: middle;
}
.badge-owner { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-deadline { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* === v2: Minority Report === */
.minority-report {
    margin-top: 1.5rem;
}
.minority-report h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.minority-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid #ef4444;
    border-radius: 0 6px 6px 0;
    margin-bottom: 0.5rem;
}
.minority-icon {
    font-size: 1rem;
    color: #ef4444;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.minority-item p {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* === v2: Decision Triggers === */
.decision-triggers {
    margin-top: 1.5rem;
}
.decision-triggers h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.triggers-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.triggers-list {
    list-style: none;
    padding: 0;
}
.triggers-list li {
    padding: 0.5rem 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}
.triggers-list li::before {
    content: '\2192';
    position: absolute;
    left: 0.25rem;
    color: var(--accent);
    font-weight: bold;
}

/* === v2: Feed final-vote === */
.feed-final-vote {
    border-left: 2px solid #818cf8;
}

/* Agent card summary styles */
.position-vote {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.position-vote.vote-invest { background: var(--green-soft); color: var(--green); }
.position-vote.vote-conditional { background: var(--yellow-soft); color: var(--yellow); }
.position-vote.vote-pass { background: var(--red-soft); color: var(--red); }

.position-summary {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.position-details {
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.5rem;
}
.position-details summary {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    cursor: pointer;
    user-select: none;
}
.position-details summary:hover { color: var(--accent); }
.position-full-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.challenge-indicator {
    font-size: 0.75rem;
    color: var(--yellow);
    padding: 0.25rem 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.25rem;
}
.challenge-from { font-weight: 600; }

.response-indicator {
    font-size: 0.75rem;
    color: var(--green);
    padding: 0.25rem 0;
}
.response-indicator.shifted {
    color: var(--yellow);
    font-weight: 600;
}
.feed-shift { color: var(--yellow); font-weight: 600; }

/* === Specialist Agent — Announcement & Card === */

/* Feed announcement card */
.specialist-announcement {
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06));
    border: 1px solid rgba(99,102,241,0.25);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    margin: 0.5rem 0;
    animation: specialistReveal 0.5s ease-out;
}
.specialist-ann-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}
.specialist-ann-icon {
    font-size: 1rem;
    animation: pulseGlow 1.5s ease-in-out 2;
}
.specialist-ann-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}
.specialist-ann-detect,
.specialist-ann-spawn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.5;
}
.specialist-ann-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    background: var(--surface-3);
    padding: 0.125rem 0.4rem;
    border-radius: 3px;
    flex-shrink: 0;
}
.specialist-ann-arrow {
    text-align: center;
    color: var(--accent);
    font-size: 0.875rem;
    line-height: 1;
    padding: 0.125rem 0;
    opacity: 0.6;
}
.specialist-ann-agent {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--surface-3);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8125rem;
    border: 1px solid var(--border);
}
.specialist-ann-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulseGlow 1.5s ease-in-out 3;
}
.specialist-ann-quote {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-subtle);
}

/* Agent card — specialist variant */
.specialist-seat {
    border: 1px dashed rgba(99,102,241,0.3) !important;
    background: linear-gradient(135deg, var(--surface-2), rgba(99,102,241,0.03)) !important;
}
.specialist-badge {
    font-size: 0.5625rem;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.375rem;
    border: 1px solid rgba(99,102,241,0.2);
}
.specialist-trigger-ctx {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    background: var(--surface-3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin: 0 0.75rem 0.375rem;
    border-left: 2px solid var(--accent);
}

/* Entrance animation for specialist card */
.specialist-enter {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
}
.specialist-seat {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Animations */
@keyframes specialistReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.feed-specialist { color: var(--accent); font-weight: 500; }

/* === Verdict Decision Bar (sticky) === */
.verdict-bar {
    position: sticky;
    top: 56px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.5rem;
    height: 72px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.verdict-bar-rec {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.verdict-bar-rec .rec-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
}

.verdict-bar-confidence {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.verdict-bar-summary {
    flex: 1;
    min-width: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 375px) {
    .verdict-bar {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        height: auto;
        flex-wrap: wrap;
    }
    .verdict-bar-summary {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-basis: 100%;
    }
    .consensus-meter { width: 100%; }
}

.verdict-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.verdict-bar-actions .btn-outline {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

/* Consensus Meter */
.consensus-meter {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    width: 120px;
    flex-shrink: 0;
    background: var(--surface-3);
}

.consensus-segment {
    height: 100%;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.consensus-segment.invest { background: var(--green); }
.consensus-segment.conditional { background: var(--yellow); }
.consensus-segment.pass { background: var(--red); }

/* Vote chip pop animation */
@keyframes chipPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.position-vote, .final-vote-badge {
    animation: chipPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Missing data badge */
.data-gap-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: var(--font-mono);
    background: rgba(245, 158, 11, 0.12);
    color: var(--yellow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.data-gap-badge::before {
    content: '?';
    font-weight: 800;
}

/* Hide verdict bar when not ready */
.verdict-bar[hidden] { display: none; }

@media (max-width: 900px) {
    .verdict-bar { height: auto; flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.5rem; }
    .verdict-bar-summary { white-space: normal; }
    .consensus-meter { width: 100%; order: 10; }
}

/* === RESPONSIVE BREAKPOINTS === */

/* 768px — tablet portrait */
@media (max-width: 768px) {
    .debate-split { grid-template-columns: 1fr 240px; }
    .transcript-feed { max-height: calc(100dvh - 280px); }

    /* Drawer becomes bottom sheet */
    .agent-drawer {
        position: fixed;
        bottom: 0; left: 0; right: 0; top: auto;
        max-height: 70vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        z-index: 100;
        animation: drawerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .agent-drawer::before {
        content: ''; display: block; width: 36px; height: 4px;
        border-radius: 2px; background: var(--border); margin: 0 auto 1rem;
    }
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 520px — large phone */
@media (max-width: 520px) {
    .debate-split { grid-template-columns: 1fr; }
    .debate-sidebar { order: -1; } /* agents ABOVE feed */
    .agent-grid { flex-direction: row; flex-wrap: wrap; }
    .agent-card-mini { flex: 1 1 calc(50% - 0.25rem); min-height: 56px; padding: 0.5rem; }
    .agent-card-name { font-size: 0.625rem; }
    .phase-label { display: none; } /* dots only */
    .transcript-feed { max-height: calc(100dvh - 220px); }
}

/* 375px — small phone */
@media (max-width: 375px) {
    .agent-card-mini { flex: 1 1 calc(50% - 0.25rem); min-height: 56px; min-width: 44px; }
    .phase-connector { width: 8px; }
    .transcript-feed { max-height: calc(100dvh - 260px); }
    .debate-header { flex-direction: column; align-items: flex-start; }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .agent-drawer { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
}

/* Light theme contrast overrides (a11y) */
[data-theme="light"] .transcript-event.event-challenge {
    background: color-mix(in srgb, #92650A 5%, var(--surface-2));
    border-left-color: #92650A;
}
[data-theme="light"] .shift-badge.shifted { color: #92650A; }
[data-theme="light"] .transcript-phase { color: #4338ca; }

/* === Partner / Analyst Mode === */
[data-mode="partner"] .analyst-only { display: none !important; }
[data-mode="partner"] .position-full-text { display: none; }
[data-mode="partner"] .position-details { display: none; }
[data-mode="partner"] .evidence-badge { display: none; }
[data-mode="partner"] .evidence-sidebar,
[data-mode="partner"] .evidence-toggle-btn { display: none !important; }
[data-mode="partner"] .verdict-layout { grid-template-columns: 1fr; }

/* Mode toggle label */
#mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
#mode-toggle::after {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}
[data-mode="analyst"] #mode-toggle::after { content: "Analyst"; }
[data-mode="partner"] #mode-toggle::after { content: "Partner"; }

/* === Evidence Source Map Sidebar === */
.verdict-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.verdict-layout .verdict-container {
    max-width: 900px;
    margin: 0 auto;
}

.evidence-sidebar {
    position: sticky;
    top: 132px;
    height: calc(100vh - 132px);
    overflow-y: auto;
    padding: 1rem 0.75rem;
    border-right: 1px solid var(--border);
    background: var(--bg, var(--surface-0));
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 10;
}
.evidence-sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}
.verdict-layout.sidebar-collapsed {
    grid-template-columns: 0 1fr;
}
.evidence-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.evidence-sidebar-header h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0;
}
.evidence-collapse-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    transition: background 0.15s;
}
.evidence-collapse-btn:hover { background: var(--surface-3); }

.evidence-toggle-btn {
    position: fixed;
    left: 0.5rem;
    top: 140px;
    z-index: 20;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.375rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: border-color 0.15s, color 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.evidence-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.evidence-group { margin-bottom: 0.75rem; }
.evidence-group-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0;
    user-select: none;
}
.evidence-group-chevron {
    display: inline-block;
    font-size: 0.625rem;
    transition: transform 0.2s;
}
.collapsed-group .evidence-group-chevron { transform: rotate(-90deg); }
.collapsed-group .evidence-group-items { display: none; }

.evidence-section {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.375rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.8125rem;
}
.evidence-section:hover { background: var(--surface-3); }
.evidence-section.active {
    background: var(--accent-soft);
    color: var(--accent);
}
.evidence-heading {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}
.evidence-section.active .evidence-heading { color: var(--accent); }

.evidence-severity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.severity-red { background: var(--red); }
.severity-yellow { background: var(--yellow); }
.severity-green { background: var(--green); }
.severity-neutral { background: var(--text-tertiary); }

/* Evidence sidebar badges (scoped to sidebar context) */
.evidence-sidebar .evidence-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.0625rem 0.375rem;
    border-radius: 10px;
    flex-shrink: 0;
    min-width: 1.25rem;
    text-align: center;
    display: inline-block;
    background: var(--surface-3);
    color: var(--text-secondary);
    margin-top: 0;
}
.badge-red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-amber { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.badge-neutral { background: var(--surface-3); color: var(--text-secondary); }

.evidence-meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
}
.evidence-meta-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.evidence-highlight {
    box-shadow: 0 0 0 2px var(--green, var(--accent));
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

@media (max-width: 900px) {
    .verdict-layout { grid-template-columns: 1fr; }
    .evidence-sidebar { display: none; }
    .evidence-toggle-btn { display: none !important; }
}
