/* Tribunal Dashboard — v6 (The Institution) */

/* ══════════════════════════════════════════
   DARK THEME (default)
   ══════════════════════════════════════════ */
:root, [data-theme="dark"] {
    --bg-base: #0F0E0C;
    --bg-surface: #1A1816;
    --bg-elevated: #242220;
    --bg-hover: rgba(196, 149, 106, 0.06);
    --border: rgba(255, 245, 230, 0.08);
    --border-hover: rgba(255, 245, 230, 0.15);
    --accent: #C4956A;
    --accent-bright: #D4A878;
    --accent-glow: rgba(196, 149, 106, 0.2);
    --text-primary: #F0ECE7;
    --text-secondary: #B5B0A8;
    --text-muted: #8A837B;
    --emerald: #34d399;
    --radius: 4px;
    --radius-sm: 2px;
    --nav-bg: rgba(15, 14, 12, 0.88);
    --code-bg: rgba(196, 149, 106, 0.1);
    --code-color: #D4A878;
    --pre-bg: rgba(0, 0, 0, 0.4);
    --md-text: #CFC9C1;
    --md-heading: #F0ECE7;
    --md-heading2: #E0DBD3;
    --md-heading3: #CFC9C1;
    --md-heading4: #B5B0A8;
    --accordion-body-bg: rgba(0, 0, 0, 0.3);
    --scrollbar-thumb: rgba(255, 245, 230, 0.08);
    --scrollbar-thumb-hover: rgba(255, 245, 230, 0.15);
    --progress-bg: rgba(255, 245, 230, 0.04);
    --pill-active-bg: rgba(255, 245, 230, 0.08);
    --pill-hover-bg: rgba(255, 245, 230, 0.04);
    --sort-active-bg: rgba(255, 245, 230, 0.06);
    --table-head-bg: rgba(255, 245, 230, 0.02);
    --row-border: rgba(255, 245, 230, 0.03);
    --chart-border: #141210;
    --blockquote-bg: rgba(196, 149, 106, 0.06);
    --hr-color: rgba(255, 245, 230, 0.06);
    --table-cell-border: rgba(255, 245, 230, 0.04);
}

/* ══════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════ */
[data-theme="light"] {
    --bg-base: #F5F2ED;
    --bg-surface: #FEFCF9;
    --bg-elevated: #F0EDE7;
    --bg-hover: rgba(139, 105, 20, 0.04);
    --border: rgba(120, 100, 60, 0.12);
    --border-hover: rgba(120, 100, 60, 0.22);
    --accent: #8B6914;
    --accent-bright: #7A5C1F;
    --accent-glow: rgba(139, 105, 20, 0.15);
    --text-primary: #1A1610;
    --text-secondary: #4A4540;
    --text-muted: #8A8580;
    --emerald: #059669;
    --nav-bg: rgba(245, 242, 237, 0.92);
    --code-bg: rgba(139, 105, 20, 0.08);
    --code-color: #7A5C1F;
    --pre-bg: #F0EDE7;
    --md-text: #3A3530;
    --md-heading: #1A1610;
    --md-heading2: #2A2520;
    --md-heading3: #3A3530;
    --md-heading4: #4A4540;
    --accordion-body-bg: #F0EDE7;
    --scrollbar-thumb: rgba(120, 100, 60, 0.12);
    --scrollbar-thumb-hover: rgba(120, 100, 60, 0.22);
    --progress-bg: rgba(120, 100, 60, 0.06);
    --pill-active-bg: rgba(120, 100, 60, 0.08);
    --pill-hover-bg: rgba(120, 100, 60, 0.04);
    --sort-active-bg: rgba(120, 100, 60, 0.06);
    --table-head-bg: rgba(120, 100, 60, 0.03);
    --row-border: rgba(120, 100, 60, 0.06);
    --chart-border: #FEFCF9;
    --blockquote-bg: rgba(139, 105, 20, 0.04);
    --hr-color: rgba(120, 100, 60, 0.1);
    --table-cell-border: rgba(120, 100, 60, 0.06);
}

/* ══════════════════════════════════════════
   DARK THEME: Tailwind warm-gray overrides
   ══════════════════════════════════════════ */
:root .text-zinc-100, [data-theme="dark"] .text-zinc-100 { color: #F0ECE7 !important; }
:root .text-zinc-200, [data-theme="dark"] .text-zinc-200 { color: #E0DBD3 !important; }
:root .text-zinc-300, [data-theme="dark"] .text-zinc-300 { color: #CFC9C1 !important; }
:root .text-zinc-400, [data-theme="dark"] .text-zinc-400 { color: #B5B0A8 !important; }
:root .text-zinc-500, [data-theme="dark"] .text-zinc-500 { color: #9A9389 !important; }
:root .text-zinc-600, [data-theme="dark"] .text-zinc-600 { color: #8A837B !important; }
:root .text-zinc-700, [data-theme="dark"] .text-zinc-700 { color: #7A736B !important; }
:root .text-slate-100, [data-theme="dark"] .text-slate-100 { color: #F0ECE7 !important; }
:root .text-slate-200, [data-theme="dark"] .text-slate-200 { color: #E0DBD3 !important; }
:root .text-slate-300, [data-theme="dark"] .text-slate-300 { color: #CFC9C1 !important; }
:root .text-slate-400, [data-theme="dark"] .text-slate-400 { color: #B5B0A8 !important; }
:root .text-slate-500, [data-theme="dark"] .text-slate-500 { color: #9A9389 !important; }
:root .text-slate-600, [data-theme="dark"] .text-slate-600 { color: #8A837B !important; }
:root .text-\[10px\] { color: #8A837B !important; }
:root .text-\[\#6c7086\] { color: #9A9389 !important; }

/* ══════════════════════════════════════════
   LIGHT THEME: Tailwind overrides
   ══════════════════════════════════════════ */
[data-theme="light"] .text-white { color: var(--text-primary) !important; }
[data-theme="light"] .text-zinc-100 { color: var(--text-primary) !important; }
[data-theme="light"] .text-zinc-200 { color: #2A2520 !important; }
[data-theme="light"] .text-zinc-300 { color: #3A3530 !important; }
[data-theme="light"] .text-zinc-400 { color: #5A5550 !important; }
[data-theme="light"] .text-zinc-500 { color: #6A6560 !important; }
[data-theme="light"] .text-zinc-600 { color: #8A8580 !important; }
[data-theme="light"] .text-zinc-700 { color: #8A8580 !important; }
[data-theme="light"] .text-slate-100 { color: var(--text-primary) !important; }
[data-theme="light"] .text-slate-200 { color: #2A2520 !important; }
[data-theme="light"] .text-slate-300 { color: #3A3530 !important; }
[data-theme="light"] .text-slate-400 { color: #5A5550 !important; }
[data-theme="light"] .text-slate-500 { color: #6A6560 !important; }
[data-theme="light"] .text-slate-600 { color: #8A8580 !important; }
[data-theme="light"] .text-\[10px\] { color: #8A8580 !important; }
[data-theme="light"] .text-\[\#6c7086\] { color: #6A6560 !important; }

/* Light theme: background overrides */
[data-theme="light"] .bg-white\/\[0\.02\] { background-color: rgba(0, 0, 0, 0.02) !important; }
[data-theme="light"] .bg-white\/\[0\.04\] { background-color: rgba(0, 0, 0, 0.03) !important; }
[data-theme="light"] .border-white\/\[0\.06\] { border-color: rgba(0, 0, 0, 0.06) !important; }
[data-theme="light"] .border-white\/\[0\.04\] { border-color: rgba(0, 0, 0, 0.04) !important; }
[data-theme="light"] .divide-white\/\[0\.04\] > :not([hidden]) ~ :not([hidden]) { border-color: rgba(0, 0, 0, 0.04) !important; }

/* Light theme: semantic color adjustments */
[data-theme="light"] .text-cyan-400 { color: #0891b2 !important; }
[data-theme="light"] .text-emerald-400 { color: #059669 !important; }
[data-theme="light"] .text-amber-400 { color: #d97706 !important; }
[data-theme="light"] .text-red-400 { color: #dc2626 !important; }

/* Light theme: depth badge text stays white */
[data-theme="light"] .badge-depth.text-white { color: #fff !important; }

/* Light theme: status dots keep their colors */
[data-theme="light"] .bg-emerald-400 { background-color: #34d399 !important; }
[data-theme="light"] .bg-amber-400 { background-color: #fbbf24 !important; }
[data-theme="light"] .bg-red-400 { background-color: #f87171 !important; }

/* ══════════════════════════════════════════
   VIOLET → BRASS: comprehensive overrides
   Catches all violet Tailwind classes in templates
   ══════════════════════════════════════════ */
.text-violet-400 { color: var(--accent) !important; }
.text-violet-300 { color: var(--accent-bright) !important; }
.text-violet-400\/70 { color: rgba(196, 149, 106, 0.7) !important; }
.hover\:text-violet-300:hover { color: var(--accent-bright) !important; }
.bg-violet-500\/20 { background-color: rgba(196, 149, 106, 0.2) !important; }
.bg-violet-500\/\[0\.08\] { background-color: rgba(196, 149, 106, 0.08) !important; }
.bg-violet-500\/70 { background-color: rgba(196, 149, 106, 0.7) !important; }
.border-violet-500\/40 { border-color: rgba(196, 149, 106, 0.4) !important; }
.border-violet-500\/15 { border-color: rgba(196, 149, 106, 0.15) !important; }
.border-violet-500\/10 { border-color: rgba(196, 149, 106, 0.1) !important; }
.border-violet-500\/20 { border-color: rgba(196, 149, 106, 0.2) !important; }
.peer:checked ~ .peer-checked\:bg-violet-600 { background-color: #B8864A !important; }
.group:hover .group-hover\:bg-violet-500\/30 { background-color: rgba(196, 149, 106, 0.3) !important; }

[data-theme="light"] .text-violet-400\/70 { color: rgba(139, 105, 20, 0.7) !important; }
[data-theme="light"] .bg-violet-500\/20 { background-color: rgba(139, 105, 20, 0.1) !important; }
[data-theme="light"] .bg-violet-500\/\[0\.08\] { background-color: rgba(139, 105, 20, 0.06) !important; }
[data-theme="light"] .bg-violet-500\/70 { background-color: rgba(139, 105, 20, 0.5) !important; }
[data-theme="light"] .border-violet-500\/40 { border-color: rgba(139, 105, 20, 0.25) !important; }
[data-theme="light"] .border-violet-500\/15 { border-color: rgba(139, 105, 20, 0.1) !important; }
[data-theme="light"] .border-violet-500\/10 { border-color: rgba(139, 105, 20, 0.06) !important; }
[data-theme="light"] .peer:checked ~ .peer-checked\:bg-violet-600 { background-color: #8B6914 !important; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 16px;
}

/* ══════════════════════════════════════════
   NAV — compact, institutional
   ══════════════════════════════════════════ */
.nav-bar {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    color: var(--text-muted);
}
.nav-link:hover:not(.active) {
    color: var(--text-primary);
    background: var(--pill-hover-bg);
}
.nav-link.active {
    color: var(--text-primary) !important;
    background: var(--pill-active-bg);
}

/* ══════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════ */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.card:hover {
    border-color: var(--border-hover);
}
.card-glow:hover {
    border-color: rgba(196, 149, 106, 0.3);
    box-shadow: 0 0 24px rgba(196, 149, 106, 0.08);
}

/* Stat cards */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.15s;
}
.stat-card::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0.3;
    transition: opacity 0.15s;
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-card:hover::before { opacity: 0.8; }

/* ══════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════ */
.mono { font-family: 'JetBrains Mono', monospace; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Serif display headings */
.detail-title, .session-title,
.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    font-family: 'Instrument Serif', Georgia, serif;
}

/* Vote numbers — serif for gravitas */
.vote-number {
    font-family: 'Instrument Serif', Georgia, serif;
}

/* ══════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
}
.badge-depth {
    font-weight: 800;
    font-size: 0.625rem;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ══════════════════════════════════════════
   DEPTH BADGES — muted institutional palette
   ══════════════════════════════════════════ */
.depth-T1 { background: linear-gradient(135deg, #4A6FA5, #3D5D8C); }
.depth-T2 { background: linear-gradient(135deg, #3D8B8B, #337474); }
.depth-T3 { background: linear-gradient(135deg, #4A8B6E, #3D7459); }
.depth-T4 { background: linear-gradient(135deg, #B8964A, #9A7D3D); }
.depth-T5 { background: linear-gradient(135deg, #B87A4A, #9A653D); }
.depth-T6 { background: linear-gradient(135deg, #A54A4A, #8C3D3D); }
.depth-QUICK { background: linear-gradient(135deg, #5B8BC4, #4A7AAD); }
.depth-BALANCED { background: linear-gradient(135deg, #3D8B8B, #337474); }
.depth-THOROUGH { background: linear-gradient(135deg, #4A8B6E, #3D7459); }
.depth-NUCLEAR { background: linear-gradient(135deg, #8B4A6E, #A54A4A); }

/* ══════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════ */
.input {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: all 0.15s;
    outline: none;
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn-primary {
    background: linear-gradient(135deg, #B8864A, #9A7040);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
    transition: all 0.15s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(196, 149, 106, 0.3);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ══════════════════════════════════════════
   PROGRESS / ANIMATIONS
   ══════════════════════════════════════════ */
.progress-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--progress-bg);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.htmx-settling { opacity: 0.7; }
.htmx-swapping { opacity: 0.4; transition: opacity 0.1s; }
.htmx-added { opacity: 0; }
.htmx-added.htmx-settling { opacity: 1; transition: opacity 0.2s; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.tab-content { animation: tabFadeIn 0.2s ease-out; }
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

[x-cloak] { display: none !important; }
[x-collapse] { overflow: hidden; }

/* ══════════════════════════════════════════
   COST
   ══════════════════════════════════════════ */
.cost-value {
    color: var(--emerald);
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Pulse dot */
.pulse-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ══════════════════════════════════════════
   SESSION DETAIL — two-column layout
   ══════════════════════════════════════════ */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    min-height: calc(100vh - 80px);
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .detail-sidebar {
        order: -1;
    }
}

.detail-main {
    padding-right: 2rem;
    border-right: 1px solid var(--border);
    min-width: 0;
}

@media (max-width: 1024px) {
    .detail-main {
        padding-right: 0;
        border-right: none;
    }
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Sidebar */
.detail-sidebar {
    padding-left: 1.5rem;
}

@media (max-width: 1024px) {
    .detail-sidebar {
        padding-left: 0;
        margin-bottom: 1.5rem;
    }
}

.sidebar-inner {
    position: sticky;
    top: 72px;
}

.sidebar-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    min-height: 2rem;
}

.sidebar-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-value {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-align: right;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0.625rem 0;
}

.sidebar-pdf-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.15s;
}
.sidebar-pdf-link:hover { color: var(--accent-bright); }

/* Status pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0;
}
.status-ok { color: #34d399; }
.status-warn { color: #fbbf24; }
.status-err { color: #f87171; }

/* Detail tabs */
.detail-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.detail-tab {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
    margin-bottom: -1px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
}
.detail-tab:hover { color: var(--text-secondary); }
.detail-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--accent);
}

/* ══════════════════════════════════════════
   ARENA-INSPIRED SESSION LIST
   ══════════════════════════════════════════ */
.arena-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.arena-search {
    position: relative;
    flex: 1;
    min-width: 180px;
}
.arena-search .search-icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}
.arena-search-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4375rem 0.75rem 0.4375rem 2rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s;
}
.arena-search-input::placeholder { color: var(--text-muted); }
.arena-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Depth pill filters */
.arena-pills {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}
.arena-pill {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.arena-pill:hover {
    color: var(--text-secondary);
    background: var(--pill-hover-bg);
}
.arena-pill.active {
    color: var(--text-primary);
    background: var(--pill-active-bg);
    border-color: var(--border-hover);
}
/* Depth-colored active pills — muted institutional */
.arena-pill.active.depth-pill-T1 { background: rgba(74, 111, 165, 0.15); border-color: rgba(74, 111, 165, 0.3); color: #7A9FCA; }
.arena-pill.active.depth-pill-T2 { background: rgba(61, 139, 139, 0.15); border-color: rgba(61, 139, 139, 0.3); color: #5BB8B8; }
.arena-pill.active.depth-pill-T3 { background: rgba(74, 139, 110, 0.15); border-color: rgba(74, 139, 110, 0.3); color: #6EBB9A; }
.arena-pill.active.depth-pill-T4 { background: rgba(184, 150, 74, 0.15); border-color: rgba(184, 150, 74, 0.3); color: #D4B85C; }
.arena-pill.active.depth-pill-T5 { background: rgba(184, 122, 74, 0.15); border-color: rgba(184, 122, 74, 0.3); color: #D4A06E; }
.arena-pill.active.depth-pill-T6 { background: rgba(165, 74, 74, 0.15); border-color: rgba(165, 74, 74, 0.3); color: #CA8A8A; }

/* Sort pills */
.arena-sort {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}
.arena-sort-pill {
    padding: 0.1875rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.arena-sort-pill:hover { color: var(--text-secondary); }
.arena-sort-pill.active {
    color: var(--text-primary);
    background: var(--sort-active-bg);
    border-color: var(--border);
}

/* Arena table */
.arena-table-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    overflow-y: visible;
}

.arena-table {
    width: 100%;
    font-size: 0.8125rem;
    border-collapse: collapse;
}

.arena-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    background: var(--table-head-bg);
}

.arena-row {
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--row-border);
}
.arena-row:last-child { border-bottom: none; }
.arena-row:hover { background: rgba(196, 149, 106, 0.04); }
.arena-row td { padding: 0.5rem 0.625rem; }

.arena-topic {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.1s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 420px;
    display: block;
}
.arena-row:hover .arena-topic { color: var(--text-primary); }


/* ══════════════════════════════════════════
   OYEZ-INSPIRED JUDICIAL TAB
   ══════════════════════════════════════════ */

/* Vote result banner */
.vote-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.vote-banner-inner { margin-bottom: 1.25rem; }

.vote-split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.vote-number {
    font-size: 2.5rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.vote-number.vote-majority { color: #34d399; }
.vote-number.vote-dissent { color: #f87171; }
.vote-dash {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 300;
}
.vote-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Vote strip */
.vote-strip {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.vote-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
}
.vote-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: transform 0.15s;
}
.vote-dot:hover { transform: scale(1.15); }
.vote-dot.majority {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}
.vote-dot.dissent {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.15);
}
.vote-dot-name {
    font-size: 0.5625rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 72px;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    word-break: break-word;
}

/* Opinion sections */
.opinion-section { }

.opinion-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}
.opinion-header.majority { color: #34d399; }
.opinion-header.dissent { color: #f87171; }
.opinion-header.neutral { color: var(--text-secondary); }

.opinion-count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 245, 230, 0.06);
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
}

.opinion-judges {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Judge cards — Oyez style */
.judge-card-oyez {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s;
}
.judge-card-oyez:hover { border-color: var(--border-hover); }

.judge-card-oyez.majority {
    border-left: 3px solid rgba(52, 211, 153, 0.4);
}
.judge-card-oyez.dissent {
    border-left: 3px solid rgba(248, 113, 113, 0.4);
}

.judge-card-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.judge-vote-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.judge-vote-indicator.majority { background: #34d399; }
.judge-vote-indicator.dissent { background: #f87171; }

.judge-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}
.judge-provider {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.judge-card-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.judge-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}


/* ══════════════════════════════════════════
   MODEL CARDS
   ══════════════════════════════════════════ */
.model-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all 0.15s;
}
.model-card:hover {
    border-color: var(--border-hover);
}
.model-card .model-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }
.model-card .model-provider { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.125rem; }
.model-card .model-stats { display: flex; gap: 1rem; margin-top: 0.75rem; }
.model-card .model-stats .stat-label {
    font-size: 0.625rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.model-card .model-stats .stat-value {
    font-weight: 700; font-variant-numeric: tabular-nums;
    margin-top: 0.125rem; font-size: 0.875rem;
}

.provider-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ══════════════════════════════════════════
   ACCORDION
   ══════════════════════════════════════════ */
.accordion-trigger {
    width: 100%; text-align: left;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    transition: all 0.15s; cursor: pointer;
}
.accordion-trigger:hover { border-color: var(--border-hover); background: var(--pill-hover-bg); }
.accordion-body {
    background: var(--accordion-body-bg); border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 1rem; font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap;
}

/* ══════════════════════════════════════════
   ROLE BADGES — warm institutional
   ══════════════════════════════════════════ */
.role-badge { font-size: 0.6875rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 2px; }
.role-bishop { background: rgba(196, 149, 106, 0.15); color: #D4A878; }
.role-priest { background: rgba(61, 139, 139, 0.15); color: #5BB8B8; }
.role-deacon { background: rgba(184, 150, 74, 0.15); color: #D4B85C; }
.role-advocate { background: rgba(165, 74, 74, 0.15); color: #CA8A8A; }

/* ══════════════════════════════════════════
   SESSION ROWS (legacy)
   ══════════════════════════════════════════ */
.session-row { transition: background 0.1s; cursor: pointer; }
.session-row:hover { background: var(--bg-hover); }
.session-row:hover .session-topic { color: var(--text-primary); }
.session-topic { color: var(--text-secondary); transition: color 0.15s; font-weight: 500; }

/* Legacy tables */
table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
table tbody tr { transition: background 0.1s; }
table tbody tr:hover { background: var(--bg-hover); }

/* Legacy tab bar */
.tab-bar {
    border-bottom: 1px solid var(--border);
    gap: 0;
}
.tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--accent);
}

/* Legacy session-hero and meta-grid */
.session-hero { padding: 1.5rem 0; }
.session-title {
    font-size: 1.5rem; font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em; line-height: 1.3;
}
.session-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}
.meta-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}
.meta-card .meta-label {
    font-size: 0.625rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 0.375rem;
}
.meta-card .meta-value {
    font-size: 1.25rem; font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════
   MARKDOWN — session summaries (serif headings)
   ══════════════════════════════════════════ */
.markdown-content { font-size: 1.0625rem; line-height: 1.85; }
.markdown-content h1 {
    font-size: 1.5rem; font-weight: 400; color: var(--md-heading);
    margin: 2rem 0 0.75rem; letter-spacing: -0.01em;
    font-style: italic;
}
.markdown-content h2 {
    font-size: 1.25rem; font-weight: 400; color: var(--md-heading2);
    margin: 1.75rem 0 0.625rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(196, 149, 106, 0.15);
}
.markdown-content h3 {
    font-size: 1.0625rem; font-weight: 400; color: var(--md-heading3);
    margin: 1.5rem 0 0.5rem;
}
.markdown-content h4 {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 0.9375rem; font-weight: 600; color: var(--md-heading4);
    margin: 1.125rem 0 0.375rem;
}
.markdown-content p { color: var(--md-text); line-height: 1.8; margin: 0.625rem 0; }
.markdown-content strong { color: var(--md-heading); font-weight: 700; }
.markdown-content em { color: var(--md-text); }
.markdown-content ul { color: var(--md-text); padding-left: 1.5rem; margin: 0.625rem 0; list-style-type: disc; }
.markdown-content ol { color: var(--md-text); padding-left: 1.5rem; margin: 0.625rem 0; list-style-type: decimal; }
.markdown-content li { margin: 0.375rem 0; line-height: 1.75; color: var(--md-text); }
.markdown-content li::marker { color: var(--accent); }
.markdown-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem; margin: 1rem 0;
    background: var(--blockquote-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}
.markdown-content code {
    background: var(--code-bg); padding: 0.15rem 0.4rem;
    border-radius: 2px; font-size: 0.85em; color: var(--code-color);
    font-family: 'JetBrains Mono', monospace;
}
.markdown-content pre {
    background: var(--pre-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem 1.25rem;
    overflow-x: auto; margin: 1rem 0;
}
.markdown-content pre code { background: none; padding: 0; font-size: 0.8125rem; color: var(--md-text); }
.markdown-content a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.markdown-content a:hover { color: var(--md-heading); }
.markdown-content hr { border: none; border-top: 1px solid var(--hr-color); margin: 1.5rem 0; }
.markdown-content table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.markdown-content th { text-align: left; padding: 0.5rem 0.625rem; border-bottom: 1px solid var(--border); color: var(--text-primary); font-weight: 700; font-size: 0.8125rem; }
.markdown-content td { padding: 0.5rem 0.625rem; border-bottom: 1px solid var(--table-cell-border); color: var(--md-text); font-size: 0.875rem; }

/* ══════════════════════════════════════════
   THEME TOGGLE
   ══════════════════════════════════════════ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
}
.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--pill-hover-bg);
    border-color: var(--border);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ══════════════════════════════════════════
   LIGHT THEME: component overrides
   ══════════════════════════════════════════ */
[data-theme="light"] .vote-number.vote-majority { color: #059669; }
[data-theme="light"] .vote-number.vote-dissent { color: #dc2626; }
[data-theme="light"] .vote-dot.majority {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.4);
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.1);
}
[data-theme="light"] .vote-dot.dissent {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.08);
}
[data-theme="light"] .judge-vote-indicator.majority { background: #059669; }
[data-theme="light"] .judge-vote-indicator.dissent { background: #dc2626; }
[data-theme="light"] .judge-card-oyez.majority { border-left-color: rgba(5, 150, 105, 0.4); }
[data-theme="light"] .judge-card-oyez.dissent { border-left-color: rgba(220, 38, 38, 0.3); }
[data-theme="light"] .opinion-header.majority { color: #059669; }
[data-theme="light"] .opinion-header.dissent { color: #dc2626; }
[data-theme="light"] .status-ok { color: #059669; }
[data-theme="light"] .status-warn { color: #d97706; }
[data-theme="light"] .status-err { color: #dc2626; }
[data-theme="light"] .pulse-dot { background: #059669; box-shadow: 0 0 6px rgba(5, 150, 105, 0.5); }

/* Light theme: depth pills */
[data-theme="light"] .arena-pill.active.depth-pill-T1 { background: rgba(74, 111, 165, 0.1); border-color: rgba(74, 111, 165, 0.25); color: #3D5D8C; }
[data-theme="light"] .arena-pill.active.depth-pill-T2 { background: rgba(61, 139, 139, 0.1); border-color: rgba(61, 139, 139, 0.25); color: #337474; }
[data-theme="light"] .arena-pill.active.depth-pill-T3 { background: rgba(74, 139, 110, 0.1); border-color: rgba(74, 139, 110, 0.25); color: #3D7459; }
[data-theme="light"] .arena-pill.active.depth-pill-T4 { background: rgba(184, 150, 74, 0.1); border-color: rgba(184, 150, 74, 0.25); color: #9A7D3D; }
[data-theme="light"] .arena-pill.active.depth-pill-T5 { background: rgba(184, 122, 74, 0.1); border-color: rgba(184, 122, 74, 0.25); color: #9A653D; }
[data-theme="light"] .arena-pill.active.depth-pill-T6 { background: rgba(165, 74, 74, 0.1); border-color: rgba(165, 74, 74, 0.25); color: #8C3D3D; }

/* Light theme: role badges */
[data-theme="light"] .role-bishop { background: rgba(196, 149, 106, 0.1); color: #9A7040; }
[data-theme="light"] .role-priest { background: rgba(61, 139, 139, 0.1); color: #337474; }
[data-theme="light"] .role-deacon { background: rgba(184, 150, 74, 0.1); color: #7A6520; }
[data-theme="light"] .role-advocate { background: rgba(165, 74, 74, 0.1); color: #8C3D3D; }

/* Light theme: misc */
[data-theme="light"] .opinion-count { background: rgba(120, 100, 60, 0.06); color: var(--text-muted); }
[data-theme="light"] .card:hover { box-shadow: 0 2px 12px rgba(80, 60, 20, 0.06); }
[data-theme="light"] .card-glow:hover {
    border-color: rgba(139, 105, 20, 0.2);
    box-shadow: 0 2px 16px rgba(139, 105, 20, 0.06);
}

/* ══════════════════════════════════════════
   SUMMARY TAB — structured sections
   ══════════════════════════════════════════ */
.summary-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--md-heading);
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin: 0 0 1.5rem;
}

.summary-section {
    margin-bottom: 1.5rem;
    position: relative;
}

.summary-section > .label {
    display: block;
    margin-bottom: 0.5rem;
}

.summary-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.summary-toggle:hover {
    color: var(--text-secondary);
    background: var(--pill-hover-bg);
}

.summary-prompt-card {
    background: var(--blockquote-bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.summary-collapsed {
    max-height: 5rem;
}
.summary-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: linear-gradient(transparent, var(--bg-base));
    cursor: pointer;
}

.summary-hero {
    border-left: 3px solid var(--accent);
}

/* Key Moments — numbered list */
.summary-moments {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.summary-moment {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}
.summary-moment-num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 0.8125rem;
    color: var(--accent);
    border: 1px solid rgba(196, 149, 106, 0.25);
    border-radius: 50%;
    margin-top: 0.125rem;
}

/* Scorecard table */
.summary-scorecard-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.summary-scorecard {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.summary-scorecard th {
    text-align: left;
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.summary-scorecard td {
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--table-cell-border);
    color: var(--md-text);
    white-space: nowrap;
}
.summary-scorecard td.sc-accept {
    color: #34d399;
    font-weight: 600;
}
.summary-scorecard td.sc-reject {
    color: #f87171;
    font-weight: 600;
}
.summary-scorecard td.sc-partial {
    color: #fbbf24;
    font-weight: 600;
}
[data-theme="light"] .summary-scorecard td.sc-accept { color: #059669; }
[data-theme="light"] .summary-scorecard td.sc-reject { color: #dc2626; }
[data-theme="light"] .summary-scorecard td.sc-partial { color: #d97706; }

/* Advocate cards (legacy format) */
.summary-adv-card {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--table-cell-border);
}
.summary-adv-card:last-child { border-bottom: none; }

/* Dissent card accent */
.summary-dissent-card {
    border-left: 3px solid rgba(248, 113, 113, 0.4);
}
[data-theme="light"] .summary-dissent-card {
    border-left-color: rgba(220, 38, 38, 0.3);
}

/* Build This card accent */
.summary-build-card {
    border-left: 3px solid rgba(52, 211, 153, 0.4);
}
[data-theme="light"] .summary-build-card {
    border-left-color: rgba(5, 150, 105, 0.3);
}

/* Brief content — clean reading */
.brief-content {
    font-size: 1.0625rem;
    line-height: 1.85;
}
.brief-content p {
    margin-bottom: 1rem;
}
.brief-content p:last-child {
    margin-bottom: 0;
}

/* ══════════════════════════════════════════
   PROMPT TAB — formatted prompt
   ══════════════════════════════════════════ */
.prompt-formatted {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--md-text);
}
.prompt-formatted p {
    margin: 0 0 0.75rem;
}
.prompt-formatted p:last-child {
    margin-bottom: 0;
}
.prompt-list {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
    color: var(--md-text);
    line-height: 1.75;
}
ol.prompt-list {
    list-style-type: decimal;
}
ul.prompt-list {
    list-style-type: disc;
}
.prompt-list li {
    padding: 0.25rem 0;
    padding-left: 0.25rem;
}

/* ══════════════════════════════════════════
   MAJORITY OPINION TAB
   ══════════════════════════════════════════ */
.majority-opinion-content {
    font-size: 1.0625rem;
    line-height: 1.85;
}
.majority-opinion-content h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.25rem;
    color: var(--md-heading2);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.majority-opinion-content h3:first-child {
    margin-top: 0;
}
.majority-opinion-content h4 {
    font-size: 1rem;
    color: var(--md-heading3);
    margin: 1.5rem 0 0.5rem;
}
.majority-opinion-content hr {
    border: none;
    border-top: 1px solid var(--hr-color);
    margin: 1.5rem 0;
}
.majority-opinion-content ul,
.majority-opinion-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0 1rem;
}
.majority-opinion-content li {
    margin: 0.375rem 0;
}

/* ══════════════════════════════════════════
   DEBATE TAB — council performance cards
   ══════════════════════════════════════════ */
.debate-card {
    border-left: 3px solid var(--border);
    transition: border-color 0.15s;
}
.debate-card:hover {
    border-left-color: var(--accent);
}
.debate-card-header {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}
.debate-model-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.debate-rank {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    font-family: 'Instrument Serif', Georgia, serif;
}
.debate-rank.withdrawn {
    color: var(--text-muted);
    font-family: inherit;
    font-style: italic;
}
.debate-position {
    margin-bottom: 0.625rem;
}
.debate-position:last-child {
    margin-bottom: 0;
}
.debate-position-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.debate-position-label.catalyst {
    color: var(--accent);
}
.debate-position-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--md-text);
    margin: 0;
}

/* ══════════════════════════════════════════
   NARRATIVE TAB
   ══════════════════════════════════════════ */
.narrative-card {
    max-width: 48rem;
}
.narrative-content {
    font-size: 1.0625rem;
    line-height: 1.85;
}
.narrative-content h1,
.narrative-content h2,
.narrative-content h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    color: var(--md-heading);
    margin: 1.75rem 0 0.75rem;
}
.narrative-content h1:first-child,
.narrative-content h2:first-child,
.narrative-content h3:first-child {
    margin-top: 0;
}
.narrative-content h1 { font-size: 1.5rem; }
.narrative-content h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.narrative-content h3 { font-size: 1.0625rem; }
.narrative-content p {
    margin-bottom: 1rem;
}
.narrative-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: var(--blockquote-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}
.narrative-content hr {
    border: none;
    border-top: 1px solid var(--hr-color);
    margin: 1.5rem 0;
}
.narrative-content ul,
.narrative-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0 1rem;
}
.narrative-content li {
    margin: 0.375rem 0;
}
.narrative-content strong {
    color: var(--text-primary);
}
.narrative-content em {
    font-style: italic;
}

/* ── Panel Groups & Table ─────────────────── */
.panel-group {
    margin-bottom: 2rem;
}
.panel-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.panel-group-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.panel-group-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.panel-table thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.panel-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.panel-table tbody tr:last-child td {
    border-bottom: none;
}
.panel-table tbody tr:hover {
    background: var(--bg-hover);
}
.panel-mono {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}
.seat-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.seat-permanent {
    background: rgba(196, 149, 106, 0.15);
    color: var(--accent);
}
.seat-rotating {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}
.seat-dissent {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}
.vote-badge {
    display: inline-block;
    padding: 0.0625rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.vote-majority {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}
.vote-dissent {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}
