/* =============================================================================
   WORLDVIEW - DESIGN SYSTEM
   Modern UI (Koyfin/BamSEC-inspired)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   DESIGN TOKENS (CSS Custom Properties)
   ----------------------------------------------------------------------------- */
:root {
    /* Color Palette - Light Mode */
    --color-bg-primary: #F5F7FA;
    --color-bg-secondary: #ffffff;
    --color-bg-tertiary: #f1f5f9;
    --color-bg-elevated: #ffffff;
    --color-bg-hover: #f1f5f9;
    --color-bg-active: #e2e8f0;

    /* Text Colors */
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-tertiary: #64748b;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #ffffff;

    /* Border Colors */
    --color-border-primary: #e2e8f0;
    --color-border-secondary: #cbd5e1;
    --color-border-subtle: #f1f5f9;

    /* Brand Colors - Navy as primary accent */
    --color-brand: #1B2A4A;
    --color-brand-hover: #152238;
    --color-brand-soft: #EDF1F7;
    --color-brand-muted: #7B9DC5;
    --color-accent: #4A7AB5;
    --color-accent-light: #6B9FD4;

    /* Semantic Colors */
    --color-positive: #2E8B6E;
    --color-positive-soft: #e0f7fa;
    --color-positive-text: #257A5E;

    /* Negative signal: amber instead of red (brand preference). */
    --color-negative: #D97706;
    --color-negative-soft: #FEF3C7;
    --color-negative-text: #B45309;

    --color-warning: #ea580c;
    --color-warning-soft: #fff7ed;
    --color-warning-text: #c2410c;

    --color-info: #0284c7;
    --color-info-soft: #e0f2fe;
    --color-info-text: #075985;

    /* Badge Colors */
    --color-badge-ticker: #0284c7;
    --color-badge-subject: #64748b;
    --color-badge-industry: #78716c;
    --color-badge-date: #94a3b8;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    /* Spacing Scale (4px base) */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    --text-xs: 11px;
    --text-sm: 12px;
    --text-base: 14px;
    --text-md: 14px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 20px;
    --text-3xl: 24px;

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Z-index layers */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;

    /* Sidebar */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
}

/* Dark Mode */
[data-theme="dark"] {
    --color-bg-primary: #0D1B2A;
    --color-bg-secondary: #162236;
    --color-bg-tertiary: #1F3044;
    --color-bg-elevated: #162236;
    --color-bg-hover: #1F3044;
    --color-bg-active: #2A4060;

    --color-text-primary: #E8EDF4;
    --color-text-secondary: #A8B8CC;
    --color-text-tertiary: #7B8FA6;
    --color-text-muted: #4E6380;

    --color-border-primary: #1F3044;
    --color-border-secondary: #2A4060;
    --color-border-subtle: #162236;

    --color-brand-soft: rgba(74, 122, 181, 0.15);
    --color-accent: #6B9FD4;
    --color-accent-light: #8BB8E4;

    --color-positive-soft: rgba(46, 139, 110, 0.15);
    --color-negative-soft: rgba(217, 119, 6, 0.18);
    --color-warning-soft: rgba(234, 88, 12, 0.15);
    --color-info-soft: rgba(2, 132, 199, 0.15);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* -----------------------------------------------------------------------------
   BASE RESET & GLOBAL STYLES
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
}

/* -----------------------------------------------------------------------------
   LAYOUT
   ----------------------------------------------------------------------------- */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top App Bar - Sticky */
.app-bar {
    position: sticky;
    top: 0;
    z-index: var(--z-overlay);
    background: #1B2A4A;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(13, 27, 42, 0.3);
}

.app-bar-inner {
    padding: var(--space-3) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    position: relative;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: #ffffff;
}

.app-logo-icon {
    font-size: var(--text-2xl);
}

.app-logo-text {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    letter-spacing: -0.02em;
    color: #ffffff;
}

.app-logo-subtitle {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    display: none;
}

@media (min-width: 768px) {
    .app-logo-subtitle {
        display: block;
    }
}

/* Taxonomy Stats Bar */
.taxonomy-stats-bar {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: stretch;
    background: var(--color-bg-secondary);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-primary);
    margin-bottom: var(--space-5);
}

/* Global Search */
.global-search {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 300px;
    min-width: 150px;
    position: relative;
}

.global-search input.global-search-input,
.global-search input.global-search-input[type="text"] {
    width: 100%;
    padding: 8px 16px 8px 48px;
    font-size: var(--text-base);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    color: #ffffff;
    transition: var(--transition-fast);
    text-transform: none;
}

.global-search input.global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.global-search input.global-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(74, 122, 181, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.global-search .global-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    font-size: 18px;
    line-height: 1;
    z-index: 1;
}

/* Data Center Agent — unified section search (Latest updates / Asset registry / Deal comps) */
.dc-search-wrap {
    position: sticky;
    top: 0;
    z-index: 5;
    /* Match the white card it sits on so the sticky strip is invisible (no grey
       toolbar band); a subtle divider keeps separation when content scrolls under. */
    background: var(--color-bg-secondary);
    padding: 2px 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--color-border-subtle);
}
.dc-search {
    position: relative;
    max-width: 540px;
}
.dc-search-input,
.dc-search-input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    /* Match the app's standard input format: radius-md, brand focus, no resting shadow. */
    padding: var(--space-2) 34px;
    font-size: var(--text-md);
    font-family: var(--font-sans);
    line-height: 1.4;
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    text-transform: none;
    transition: var(--transition-fast);
}
.dc-search-input::placeholder { color: var(--color-text-tertiary); }
.dc-search-input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-soft);
}
.dc-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: var(--color-text-tertiary);
    pointer-events: none;
    transition: color var(--transition-fast);
}
.dc-search-input:focus ~ .dc-search-icon { color: var(--color-brand); }
.dc-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.dc-search-clear:hover { background: var(--color-border-secondary); color: var(--color-text-primary); }
.dc-search-hint {
    display: none;
    margin-top: 8px;
    padding-left: 2px;
    font-size: 12px;
    color: var(--color-text-tertiary);
}
.dc-search-hint strong { font-weight: 600; color: var(--color-text-secondary); }

/* DC main-column sections — thin top rule + breathing room so each (Latest
   updates / Asset registry / Deal comps / …) reads as a distinct block. */
.dc-section {
    margin-bottom: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-primary);
}
.dc-section:first-of-type {
    padding-top: 4px;
    border-top: none;
}
.dc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
}
.dc-section-title .dc-count {
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0;
    color: var(--color-text-tertiary);
}
.dc-section-desc {
    margin-top: -8px;
    margin-bottom: 12px;
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--color-text-tertiary);
}

/* Search Results Dropdown */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 420px;
    max-height: 480px;
    overflow-y: auto;
    background: var(--color-bg-primary, #1a1d23);
    border: 1px solid var(--color-border, rgba(255,255,255,0.15));
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 9999;
    scrollbar-width: thin;
}

.search-results-dropdown.visible {
    display: block;
}

.search-results-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--color-text-muted, rgba(255,255,255,0.4));
    font-size: var(--text-sm);
}

.search-results-category {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted, rgba(255,255,255,0.4));
    background: var(--color-bg-secondary, rgba(255,255,255,0.03));
    border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
    position: sticky;
    top: 0;
    z-index: 1;
}

.search-results-category:first-child {
    border-top: none;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.05));
}

.search-result-item:hover,
.search-result-item.active {
    background: rgba(74, 122, 181, 0.15);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-top: 1px;
}

.search-result-icon.type-company { background: rgba(74, 122, 181, 0.2); color: #6ba3d6; }
.search-result-icon.type-earnings { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.search-result-icon.type-conference { background: rgba(155, 89, 182, 0.15); color: #bb8fd9; }
.search-result-icon.type-research { background: rgba(52, 152, 219, 0.15); color: #5dade2; }
.search-result-icon.type-expert_call { background: rgba(230, 126, 34, 0.15); color: #e67e22; }
.search-result-icon.type-meeting_note { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.search-result-icon.type-news { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.search-result-icon.type-youtube { background: rgba(255, 0, 0, 0.12); color: #ff4444; }

.search-result-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.search-result-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary, #e8e8e8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.search-result-title mark {
    background: rgba(74, 122, 181, 0.35);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.search-result-subtitle {
    font-size: 12px;
    color: var(--color-text-muted, rgba(255,255,255,0.45));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-top: 1px;
}

.search-result-date {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--color-text-muted, rgba(255,255,255,0.35));
    margin-top: 2px;
    white-space: nowrap;
}

.search-spinner {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted, rgba(255,255,255,0.4));
    font-size: var(--text-sm);
}

/* Keyboard hint */
.search-kbd-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 11px;
    color: var(--color-text-muted, rgba(255,255,255,0.3));
    border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
}

.search-kbd-hint kbd {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 10px;
    font-family: inherit;
}

/* App Bar Actions */
.app-bar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.theme-toggle {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--text-lg);
    line-height: 1;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: var(--space-6);
    width: 100%;
    min-width: 0;
}

/* Sidebar + Content Layout */
.app-body {
    display: flex;
    flex: 1;
}

/* =============================================================================
   LEFT SIDEBAR NAVIGATION
   ============================================================================= */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: calc(100vh - 52px);
    position: sticky;
    top: 52px;
    background: var(--color-bg-secondary);
    border-right: 1px solid var(--color-border-primary);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow), min-width var(--transition-slow);
    overflow: hidden;
    z-index: var(--z-sticky);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-3) 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--color-border-secondary);
    border-radius: var(--radius-full);
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-tertiary);
    padding: var(--space-3) var(--space-5) var(--space-2);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-section-label:first-child {
    padding-top: var(--space-6);
}

.sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    padding: var(--space-2) 0;
    height: 0;
    margin: 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0 var(--space-4);
    height: 40px;
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.sidebar-nav-item:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.sidebar-nav-item.active {
    border-left-color: var(--color-accent);
    background: var(--color-brand-soft);
    color: var(--color-accent);
    font-weight: var(--font-semibold);
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--transition-slow);
}

.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .sidebar-nav-item span {
    opacity: 0;
    width: 0;
}

.inbox-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 6px;
    background: #f59e0b;
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    line-height: 16px;
    vertical-align: middle;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-top: 1px solid var(--color-border-primary);
    cursor: pointer;
    color: var(--color-text-tertiary);
    transition: var(--transition-fast);
    background: transparent;
    border-left: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    border-radius: 0;
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--transition-slow);
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-sticky) - 1);
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile sidebar hamburger */
.sidebar-mobile-toggle {
    display: none;
    padding: var(--space-2);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: var(--text-lg);
    line-height: 1;
}

.sidebar-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Legacy container support */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--space-6);
}

/* Legacy header - now styled as app bar */
header {
    background: var(--color-bg-secondary);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-5);
    border: 1px solid var(--color-border-primary);
}

.header-left {
    flex: 1;
    min-width: 200px;
}

header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* -----------------------------------------------------------------------------
   KPI CARDS (Header Stats)
   ----------------------------------------------------------------------------- */
.header-stats {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: stretch;
}

.header-stat-item {
    background: var(--color-bg-tertiary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    text-align: center;
    min-width: 90px;
    border: 1px solid var(--color-border-subtle);
    transition: var(--transition-fast);
}

.header-stat-item:hover {
    border-color: var(--color-accent-light, var(--color-brand-muted));
    background: var(--color-brand-soft);
}

.header-stat-clickable {
    cursor: pointer;
}

.header-stat-clickable:hover .header-stat-value {
    text-decoration: underline;
}

.taxonomy-ticker:hover {
    text-decoration: underline;
    color: var(--color-brand-primary) !important;
}

.header-stat-label {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.header-stat-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------------------------------
   TABS - Modern Pill Style
   ----------------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-6);
    padding: var(--space-1);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-xl);
    width: fit-content;
    border: 1px solid var(--color-border-primary);
}

.tab {
    padding: var(--space-2) var(--space-5);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-text-tertiary);
    transition: var(--transition-fast);
    border-radius: var(--radius-lg);
    position: relative;
    white-space: nowrap;
}

.tab:hover:not(.active) {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.tab.active {
    background: var(--color-bg-secondary);
    color: var(--color-brand);
    box-shadow: var(--shadow-sm);
    font-weight: var(--font-semibold);
}

/* Tab content visibility */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

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

/* Remove old tab color themes - use brand color for all */
.tab-results.active,
.tab-benchmarks.active,
.tab-economic.active,
.tab-quotes.active,
.tab-synthesis.active,
.tab-taxonomy.active {
    color: var(--color-brand);
}

/* -----------------------------------------------------------------------------
   CARDS & PANELS
   ----------------------------------------------------------------------------- */
.controls, .card, .panel {
    background: var(--color-bg-secondary);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-5);
    border: 1px solid var(--color-border-primary);
    transition: box-shadow var(--transition-fast);
}

/* Section Headers - Neutral, not heavy green */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--color-bg-tertiary);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
    font-size: var(--text-md);
    font-weight: var(--font-semibold);
    border: 1px solid var(--color-border-primary);
}

.section-header:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-secondary);
}

.section-header::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-text-tertiary);
    border-bottom: 2px solid var(--color-text-tertiary);
    transform: rotate(45deg);
    transition: transform var(--transition-fast);
}

.section-header.collapsed::after {
    transform: rotate(-45deg);
}

.section-header.section-header-brand {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}

.section-header.section-header-brand:hover {
    background: var(--color-brand);
    opacity: 0.92;
    border-color: var(--color-brand);
}

.section-header.section-header-brand::after {
    border-right-color: #fff;
    border-bottom-color: #fff;
}

.section-content {
    transition: max-height var(--transition-slow), opacity var(--transition-base);
    overflow: hidden;
    max-height: 5000px;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Earnings recap section needs much larger max-height for long recaps */
#earningsRecapSection,
#companyEarningsRecapSection {
    max-height: 50000px;
}

/* Results table can be very tall with many segment metrics */
#companyResultsTableSection {
    max-height: 50000px;
}

/* -----------------------------------------------------------------------------
   FORMS & INPUTS
   ----------------------------------------------------------------------------- */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

select, input[type="text"], input[type="number"], input[type="date"] {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    font-family: var(--font-sans);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-soft);
}

input[type="text"] {
    text-transform: uppercase;
}

input[type="file"] {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Actions Container */
.actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

/* -----------------------------------------------------------------------------
   BUTTONS
   ----------------------------------------------------------------------------- */
button {
    font-family: var(--font-sans);
    font-size: var(--text-md);
    font-weight: var(--font-medium);
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Button - Brand color */
.btn-primary {
    background: var(--color-brand);
    color: var(--color-text-inverse);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-brand-hover);
}

/* Secondary Button - Ghost/Outline */
.btn-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-bg-hover);
    border-color: var(--color-border-secondary);
    color: var(--color-text-primary);
}

/* Process Button - Positive action */
.btn-process {
    background: var(--color-positive);
    color: var(--color-text-inverse);
}

.btn-process:hover:not(:disabled) {
    background: #257A5E;
}

/* Recap Button - Brand gradient */
.btn-recap {
    background: linear-gradient(135deg, #1B2A4A 0%, #4A7AB5 100%);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-5);
    font-weight: var(--font-semibold);
}

.btn-recap:hover:not(:disabled) {
    background: linear-gradient(135deg, #152238 0%, #3A6A9E 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Toggle button for calculated metrics */
.calc-metrics-toggle {
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-3);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
}

.calc-metrics-toggle:hover {
    background: var(--color-bg-hover);
}

/* -----------------------------------------------------------------------------
   RESULTS TABLE - Pro Finance Styling
   ----------------------------------------------------------------------------- */
.results-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-primary);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
    font-variant-numeric: tabular-nums lining-nums;
}

.results-table th {
    background: var(--color-brand-soft);
    color: var(--color-text-primary);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--color-border-primary);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

/* Sticky first column for metric names */
.results-table th:first-child,
.results-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--color-bg-secondary);
    z-index: 2;
    min-width: 180px;
    max-width: 225px;
    white-space: normal;
    word-wrap: break-word;
    border-right: 1px solid var(--color-border-primary);
}

.results-table th:first-child {
    background: var(--color-bg-tertiary);
    z-index: 3;
}

.results-table td {
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
    font-size: var(--text-base);
    white-space: nowrap;
    max-width: 120px;
}

/* Allow text wrapping for qualitative guidance */
.results-table td .qualitative-guidance {
    white-space: normal;
    word-wrap: break-word;
    max-width: 90px;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
    font-size: var(--text-sm);
}

/* Row type-based shading (primary metrics vs calculated/guidance) */
/* Primary extracted metrics get primary background (white/dark) */
/* Calculated metrics and guidance get secondary background (grey) */

/* Hover state */
.results-table tbody tr:hover {
    background: var(--color-bg-hover);
}

.results-table tbody tr:hover td:first-child {
    background: var(--color-bg-hover);
}

/* Metric Values - Right aligned */
.metric-value {
    text-align: right;
    font-weight: var(--font-medium);
    font-variant-numeric: tabular-nums;
}

.metric-value.null {
    color: var(--color-text-muted);
    font-style: italic;
}

.metric-value.positive {
    color: var(--color-positive);
    font-weight: var(--font-semibold);
}

.metric-value.negative {
    color: var(--color-negative);
    font-weight: var(--font-semibold);
}

.metric-value.neutral {
    color: var(--color-text-muted);
}

/* Qualitative values */
.qualitative-value {
    color: var(--color-brand);
    font-weight: var(--font-semibold);
    cursor: help;
    border-bottom: 1px dashed var(--color-brand);
}

/* Source metric rows - primary extracted data (card background) */
.source-metric-row {
    cursor: pointer;
    transition: background var(--transition-fast);
    background: var(--color-bg-secondary);
}

.source-metric-row td:first-child {
    background: var(--color-bg-secondary);
}

.source-metric-row:hover {
    background: var(--color-brand-soft) !important;
}

.source-metric-row:hover td:first-child {
    background: transparent !important;
}

.source-metric-row.minimized {
    display: none;
}

/* Calculated metric rows - derived/guidance data (secondary background) */
.calculated-metric-row {
    cursor: pointer;
    transition: background var(--transition-fast);
    background: var(--color-bg-tertiary);
}

.calculated-metric-row td {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
}

.calculated-metric-row td:first-child {
    padding-left: var(--space-8);
    background: var(--color-bg-tertiary);
}

.calculated-metric-row td:first-child::before {
    content: '└';
    position: absolute;
    left: var(--space-4);
    color: var(--color-text-muted);
}

.calculated-metric-row:hover {
    background: var(--color-bg-hover) !important;
}

.calculated-metric-row.minimized,
.child-of-minimized {
    display: none;
}

/* Hidden calc badge */
.hidden-calc-badge {
    display: inline-block;
    font-size: var(--text-xs);
    background: var(--color-bg-tertiary);
    color: var(--color-text-muted);
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    margin-left: var(--space-2);
    cursor: pointer;
    font-style: italic;
    font-weight: var(--font-normal);
}

.hidden-calc-badge:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
}

/* Quarter header */
.quarter-header {
    background: var(--color-brand);
    color: var(--color-text-inverse);
    font-weight: var(--font-semibold);
}

/* Estimate (forward consensus) column header */
.quarter-header.estimate-header {
    background: #2e7d6f;
    color: #fff;
}

/* Estimate column cells - subtle background tint */
.estimate-cell {
    background-color: rgba(46, 125, 111, 0.04);
}

/* Guidance rows */
.guidance-row,
.guided-yoy-row,
.beat-miss-row,
.consensus-row,
.consensus-beat-miss-row {
    background-color: var(--color-bg-tertiary);
}

/* Ensure sticky first column matches row background for calculated rows */
.guidance-row td:first-child,
.guided-yoy-row td:first-child,
.beat-miss-row td:first-child,
.consensus-row td:first-child,
.consensus-beat-miss-row td:first-child {
    background-color: var(--color-bg-tertiary);
}

.guided-yoy-row,
.beat-miss-row,
.consensus-beat-miss-row {
    font-weight: var(--font-medium);
}

/* Trending indicators */
.trending-down {
    background-color: var(--color-warning-soft) !important;
    border-left: 3px solid var(--color-warning) !important;
}

.trending-down td:first-child {
    background-color: var(--color-warning-soft) !important;
}

.trending-down td:first-child::after {
    content: ' ⚠';
    color: var(--color-warning);
    font-size: var(--text-md);
    margin-left: var(--space-1);
}

.trending-up {
    background-color: var(--color-positive-soft) !important;
    border-left: 3px solid var(--color-positive) !important;
}

.trending-up td:first-child {
    background-color: var(--color-positive-soft) !important;
}

.trending-up td:first-child::after {
    content: ' ▲';
    color: var(--color-positive);
    font-size: var(--text-md);
    margin-left: var(--space-1);
}

/* Trending row hover states - maintain colored background */
.trending-down:hover {
    background-color: var(--color-warning-soft) !important;
    filter: brightness(0.95);
}

.trending-down:hover td:first-child {
    background-color: transparent !important;
}

.trending-up:hover {
    background-color: var(--color-positive-soft) !important;
    filter: brightness(0.95);
}

.trending-up:hover td:first-child {
    background-color: transparent !important;
}

/* -----------------------------------------------------------------------------
   QUOTE CARDS
   ----------------------------------------------------------------------------- */
.quotes-container, .synthesis-container {
    display: grid;
    gap: var(--space-5);
}

.quote-card, .synthesis-card {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-primary);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.quote-card:hover, .synthesis-card:hover {
    box-shadow: var(--shadow-md);
}

/* Quote Header - Neutral with accent border */
.quote-header, .synthesis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border-primary);
    border-left: 4px solid var(--color-brand);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.quote-header:hover, .synthesis-header:hover {
    background: var(--color-bg-hover);
}

.quote-header::after, .synthesis-header::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-text-tertiary);
    border-bottom: 2px solid var(--color-text-tertiary);
    transform: rotate(45deg);
    transition: transform var(--transition-fast);
}

.quote-header.collapsed::after, .synthesis-header.collapsed::after {
    transform: rotate(-45deg);
}

.quote-meta, .synthesis-meta {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: var(--text-sm);
}

.meta-badge {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-ticker { background: var(--color-badge-ticker); color: white; }
.badge-subject { background: var(--color-badge-subject); color: white; }
.badge-industry { background: var(--color-badge-industry); color: white; }
.badge-date { background: var(--color-badge-date); color: white; }

/* Quote Content */
.quote-content, .synthesis-content {
    padding: var(--space-4);
    transition: max-height var(--transition-slow), opacity var(--transition-base);
    overflow: hidden;
    max-height: 20000px; /* Increased for large synthesis categories */
    opacity: 1;
}

.quote-content.collapsed, .synthesis-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

.quote-text {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    color: var(--color-text-primary);
}

.quote-text strong {
    background: var(--color-warning-soft);
    padding: 1px var(--space-1);
    border-radius: var(--radius-sm);
    font-weight: var(--font-semibold);
}

.quote-group {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.quote-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.quote-group-text {
    flex: 1;
}

.quote-group-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding-top: 2px;
}

/* Synthesis specific */
.synthesis-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
}

.synthesis-summary {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
}

.industry-section {
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
}

.industry-header {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.industry-meta {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-4);
}

.observation-item {
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-brand);
}

.observation-text {
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.supporting-quotes {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
}

.supporting-quotes-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.quote-citation {
    margin-bottom: var(--space-2);
    padding: var(--space-2);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--color-text-muted);
}

.quote-citation-header {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.quote-citation-text {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-text-secondary);
    font-style: italic;
}

.nuanced-section, .anomalies-section {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--color-warning-soft);
    border-radius: var(--radius-lg);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

/* -----------------------------------------------------------------------------
   EARNINGS RECAP STYLING
   ----------------------------------------------------------------------------- */
.earnings-recap-header {
    background: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
    border-left-color: var(--color-border-primary) !important;
}

.earnings-recap-header:hover {
    background: var(--color-bg-hover) !important;
}

.recap-card {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--color-border-primary);
}

.recap-header-bar {
    background: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
    padding: var(--space-5) var(--space-6);
    border-bottom: 2px solid var(--color-border-primary);
}

.recap-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.recap-meta {
    display: flex;
    gap: var(--space-4);
    font-size: var(--text-sm);
    opacity: 0.9;
}

.recap-body {
    padding: var(--space-6);
}

/* Assessment Banner */
.assessment-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.assessment-banner.very-bullish,
.assessment-banner.bullish,
.assessment-banner.positive {
    background: var(--color-positive-soft);
    border-left: 4px solid var(--color-positive);
}

.assessment-banner.neutral {
    background: var(--color-bg-tertiary);
    border-left: 4px solid var(--color-text-muted);
}

.assessment-banner.bearish,
.assessment-banner.very-bearish,
.assessment-banner.negative {
    background: var(--color-warning-soft);
    border-left: 4px solid var(--color-warning);
}

.rating-badge {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.rating-badge.strong-beat { background: var(--color-positive); color: white; }
.rating-badge.beat { background: var(--color-positive); color: white; }
.rating-badge.inline { background: var(--color-text-muted); color: white; }
.rating-badge.miss { background: var(--color-warning); color: white; }
.rating-badge.strong-miss { background: var(--color-negative); color: white; }

.sentiment-badge {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.sentiment-badge.very-bullish,
.sentiment-badge.bullish,
.sentiment-badge.positive { background: var(--color-positive-soft); color: var(--color-positive); }
.sentiment-badge.neutral { background: var(--color-bg-tertiary); color: var(--color-text-secondary); }
.sentiment-badge.bearish,
.sentiment-badge.very-bearish,
.sentiment-badge.negative { background: var(--color-warning-soft); color: var(--color-warning); }

.one-liner {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    flex: 1;
}

.stock-reaction {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: var(--space-2);
}

/* Recap Sections */
.recap-section {
    margin-bottom: var(--space-5);
    padding: var(--space-5);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
}

.recap-section-title {
    font-size: var(--text-md);
    font-weight: var(--font-bold);
    color: var(--color-brand);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}

.recap-section-title:hover {
    opacity: 0.8;
}

.recap-section-title .section-toggle-icon {
    margin-left: auto;
    font-size: var(--text-sm);
    transition: transform var(--transition-base);
    color: var(--color-text-secondary);
}

.recap-section.collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.recap-section-content {
    transition: all var(--transition-base);
}

.recap-section.collapsed .recap-section-content {
    display: none;
}

.recap-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--color-brand);
    border-radius: var(--radius-sm);
}

/* Metric Analysis */
.metric-analysis-item {
    background: var(--color-bg-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    border-left: 3px solid var(--color-brand);
}

.metric-analysis-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.metric-name {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.metric-value-display {
    font-weight: var(--font-bold);
    color: var(--color-brand);
}

.trend-indicator {
    font-size: var(--text-xs);
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    font-weight: var(--font-semibold);
}

.trend-indicator.accelerating,
.trend-indicator.improved { background: var(--color-positive-soft); color: var(--color-positive); }
.trend-indicator.stable { background: var(--color-bg-tertiary); color: var(--color-text-secondary); }
.trend-indicator.decelerating,
.trend-indicator.declined { background: var(--color-negative-soft); color: var(--color-negative); }

.metric-significance {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

/* Commentary */
.commentary-item {
    background: var(--color-bg-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.commentary-topic {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.commentary-quote {
    font-style: italic;
    color: var(--color-text-secondary);
    padding: var(--space-3);
    background: var(--color-bg-tertiary);
    border-left: 3px solid var(--color-text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: var(--space-2);
}

.commentary-implication {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

/* Thesis Impact */
.thesis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.thesis-box {
    background: var(--color-bg-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

.thesis-box.bull { border-top: 3px solid var(--color-positive); }
.thesis-box.bear { border-top: 3px solid var(--color-negative); }

.thesis-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.thesis-label.bull { color: var(--color-positive); }
.thesis-label.bear { color: var(--color-negative); }

.thesis-status {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: var(--space-2);
}

.thesis-status.strengthened { background: var(--color-positive-soft); color: var(--color-positive); }
.thesis-status.unchanged { background: var(--color-bg-tertiary); color: var(--color-text-secondary); }
.thesis-status.weakened { background: var(--color-negative-soft); color: var(--color-negative); }

.thesis-analysis {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

/* Bottom Line */
.bottom-line-box {
    background: linear-gradient(135deg, var(--color-brand) 0%, #10b981 100%);
    color: var(--color-text-inverse);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
}

.bottom-line-summary {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.bottom-line-action {
    font-size: var(--text-sm);
    opacity: 0.9;
    font-style: italic;
}

/* Peer Context */
.peer-quote-item {
    background: var(--color-bg-secondary);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    border-left: 3px solid var(--color-brand-muted);
}

.peer-quote-ticker {
    font-weight: var(--font-semibold);
    color: var(--color-brand);
    margin-bottom: var(--space-1);
}

.peer-quote-text {
    font-style: italic;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.peer-quote-relevance {
    font-size: var(--text-xs);
    color: var(--color-text-primary);
}

/* Lists */
.recap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recap-list li {
    padding: var(--space-2) 0 var(--space-2) var(--space-5);
    position: relative;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.recap-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-brand);
    font-weight: bold;
}

.recap-list.risks li::before {
    content: '⚠';
    color: var(--color-warning);
}

.recap-list.catalysts li::before {
    content: '⚡';
    color: var(--color-positive);
}

/* -----------------------------------------------------------------------------
   LOADING & ERROR STATES
   ----------------------------------------------------------------------------- */
.loading {
    text-align: center;
    padding: var(--space-10);
    color: var(--color-text-muted);
    font-size: var(--text-md);
}

.error {
    background: var(--color-negative-soft);
    color: var(--color-negative-text);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    border: 1px solid var(--color-negative);
}

/* -----------------------------------------------------------------------------
   STATS & BADGES
   ----------------------------------------------------------------------------- */
.stats {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.stat-item {
    background: var(--color-bg-tertiary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.stat-label {
    color: var(--color-text-muted);
    font-weight: var(--font-semibold);
}

.stat-value {
    color: var(--color-text-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
}

/* -----------------------------------------------------------------------------
   TAXONOMY TABLE
   ----------------------------------------------------------------------------- */
.results-container {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-primary);
}

/* Taxonomy specific styling */
#taxonomyContainer table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}

#taxonomyContainer th {
    background: var(--color-brand);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

#taxonomyContainer td {
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
    color: var(--color-text-primary);
}

#taxonomyContainer tr:nth-child(even) {
    background: var(--color-bg-tertiary);
}

#taxonomyContainer tr:hover {
    background: var(--color-bg-hover);
}

/* Benchmarks & Economic Tables - match taxonomy styling */
#benchmarksContainer table,
#economicContainer table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
    font-variant-numeric: tabular-nums;
}

#benchmarksContainer th,
#economicContainer th {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--color-border-primary);
    white-space: nowrap;
}

#benchmarksContainer td,
#economicContainer td {
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
    color: var(--color-text-primary);
}

/* Zebra striping for benchmarks only - economic uses manual row styling */
#benchmarksContainer tr:nth-child(even) {
    background: var(--color-bg-tertiary);
}

#benchmarksContainer tr:hover,
#economicContainer tr:hover {
    background: var(--color-bg-hover);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE DESIGN
   ----------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .container, .main-content {
        padding: var(--space-4);
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .thesis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .global-search {
        max-width: 200px;
    }

    .admin-login-btn {
        display: none;
    }

    .header-stats {
        width: 100%;
        justify-content: space-between;
    }

    .header-stat-item {
        flex: 1;
        min-width: 70px;
    }

    .header-stat-value {
        font-size: var(--text-lg);
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

    .quote-meta, .synthesis-meta {
        flex-direction: column;
        gap: var(--space-1);
    }

    .assessment-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Results table mobile scrolling */
    .results-table-wrapper {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        max-width: 100vw;
        margin-left: calc(-1 * var(--space-3));
        margin-right: calc(-1 * var(--space-3));
        padding-left: var(--space-3);
        padding-right: var(--space-3);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .results-table th:first-child,
    .results-table td:first-child {
        min-width: 120px;
        max-width: 150px;
        font-size: var(--text-sm);
    }

    /* Ensure sticky works for all first column cells on mobile */
    .results-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
    }

    .results-table th {
        padding: var(--space-2) var(--space-3);
        font-size: 10px;
    }

    .results-table td {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .container, .main-content {
        padding: var(--space-3);
    }

    .controls, .card, .panel {
        padding: var(--space-3);
    }

    .global-search {
        max-width: 160px;
        min-width: 120px;
    }

    .global-search input.global-search-input {
        padding: 6px 12px 6px 36px;
        font-size: var(--text-sm);
    }

    .global-search .global-search-icon {
        left: 10px;
    }

    .search-results-dropdown {
        min-width: 300px;
        left: -60px;
        right: -60px;
        max-height: 400px;
    }

    .header-stat-item {
        padding: var(--space-2);
    }
}

/* -----------------------------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-positive { color: var(--color-positive); }
.text-negative { color: var(--color-negative); }
.text-warning { color: var(--color-warning); }
.text-muted { color: var(--color-text-muted); }

.bg-positive-soft { background: var(--color-positive-soft); }
.bg-negative-soft { background: var(--color-negative-soft); }
.bg-warning-soft { background: var(--color-warning-soft); }

.font-tabular { font-variant-numeric: tabular-nums; }

/* -----------------------------------------------------------------------------
   FEED TAB - Chronological Earnings Feed
   ----------------------------------------------------------------------------- */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feed-card {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-primary);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.feed-card:hover {
    box-shadow: var(--shadow-md);
}

.feed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--color-bg-tertiary);
    border-left: 4px solid var(--color-brand);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.feed-card-header:hover {
    background: var(--color-bg-hover);
}

/* Type-specific left border colors */
.feed-card.type-earnings .feed-card-header { border-left-color: var(--color-brand); }
.feed-card.type-conference .feed-card-header { border-left-color: #8b5cf6; }
.feed-card.type-podcast .feed-card-header { border-left-color: #a855f7; }
.feed-card.type-research .feed-card-header { border-left-color: #f59e0b; }
.feed-card.type-expert_call .feed-card-header { border-left-color: #14b8a6; }
.feed-card.type-meeting_note .feed-card-header { border-left-color: #6b7280; }
.feed-card.type-ai_hiring .feed-card-header { border-left-color: #22c55e; }

/* Punchline / summary shown below header */
.feed-card-punchline {
    padding: 6px 12px 8px 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    border-left: 4px solid transparent;
}
.feed-card.type-earnings .feed-card-punchline { border-left-color: var(--color-brand); }
.feed-card.type-conference .feed-card-punchline { border-left-color: #8b5cf6; }
.feed-card.type-podcast .feed-card-punchline { border-left-color: #a855f7; }
.feed-card.type-research .feed-card-punchline { border-left-color: #f59e0b; }
.feed-card.type-expert_call .feed-card-punchline { border-left-color: #14b8a6; }
.feed-card.type-meeting_note .feed-card-punchline { border-left-color: #6b7280; }
.feed-card.type-ai_hiring .feed-card-punchline { border-left-color: #22c55e; }

/* Inline metrics row for earnings */
.feed-card-metrics {
    display: flex;
    gap: 12px;
    padding: 0 12px 6px 16px;
    flex-wrap: wrap;
    border-left: 4px solid var(--color-brand);
}

.feed-metric {
    font-size: 11px;
    color: var(--color-text-tertiary);
    line-height: 1.4;
}

.feed-metric strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Type label in header */
.feed-type-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-active);
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}
.feed-card.type-earnings .feed-type-label { color: var(--color-brand); background: var(--color-brand-soft); }
/* Pre-announce sub-variant of earnings */
.feed-card.type-earnings.pre-announce .feed-card-header { border-left-color: #f97316; border-left-width: 4px; }
.feed-card.type-earnings.pre-announce .feed-card-punchline { border-left-color: #f97316; }
.feed-card.type-earnings.pre-announce .feed-type-label { color: #c2410c; background: rgba(249,115,22,0.12); }
.feed-preannounce-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ea580c);
    text-transform: uppercase;
    flex-shrink: 0;
}
.feed-preannounce-note {
    margin: 10px 0;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--color-text-secondary);
    background: rgba(249,115,22,0.06);
    border-left: 3px solid #f97316;
    border-radius: var(--radius-sm);
}
.feed-guidance-raise {
    margin: 14px 0;
}
.feed-guidance-raise-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}
.feed-guidance-raise-table th {
    text-align: left;
    padding: 6px 8px;
    font-weight: 600;
    font-size: 11px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--color-border);
}
.feed-guidance-raise-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--color-border-light, rgba(0,0,0,0.05));
}
.feed-guidance-raise-table .guidance-raise-metric { font-weight: 500; }
.feed-guidance-raise-table .guidance-raise-prior { color: var(--color-text-tertiary); text-decoration: line-through; }
.feed-guidance-raise-table .guidance-raise-arrow { color: #f97316; font-weight: 700; text-align: center; width: 20px; }
.feed-guidance-raise-table .guidance-raise-new { color: #16a34a; font-weight: 600; }
.feed-segment-highlights { margin: 14px 0; }
.feed-segment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.feed-segment-item {
    padding: 10px 12px;
    background: var(--color-bg-subtle, rgba(0,0,0,0.02));
    border-radius: var(--radius-md, 6px);
    border-left: 3px solid var(--color-brand);
}
.feed-segment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    gap: 8px;
}
.feed-segment-name { font-weight: 600; font-size: 13px; }
.feed-segment-verdict {
    font-size: 11px;
    color: var(--color-text-tertiary);
    font-style: italic;
    text-align: right;
}
.feed-segment-lines { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.5; }
.feed-segment-lines li { margin-bottom: 2px; }

/* Quarter results recap table (pre-announce + future variants) */
.feed-quarter-results { margin: 14px 0; }
.feed-quarter-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}
.feed-quarter-results-table th {
    text-align: left;
    padding: 6px 8px;
    font-weight: 600;
    font-size: 11px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--color-border);
}
.feed-quarter-results-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--color-border-light, rgba(0,0,0,0.05));
}
.feed-quarter-results-table .qrt-metric { font-weight: 500; }
.feed-quarter-results-table .qrt-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.feed-quarter-results-table .qrt-yoy { color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.feed-quarter-results-table .qrt-cons { font-variant-numeric: tabular-nums; font-weight: 600; }
.feed-quarter-results-table .qrt-cons.positive { color: #15803d; }
.feed-quarter-results-table .qrt-cons.negative { color: var(--color-negative-text); }
.feed-quarter-results-table .qrt-cons.neutral { color: var(--color-text-tertiary); }
.feed-quarter-results-note {
    margin-top: 6px;
    font-size: 11px;
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* Peer read-throughs */
.feed-peer-readthroughs { margin: 14px 0; }
.feed-peer-context {
    font-size: 12px;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: 10px;
}
.feed-peer-consolidated {
    padding: 10px 12px;
    background: rgba(59,130,246,0.06);
    border-left: 3px solid #3b82f6;
    border-radius: var(--radius-md, 6px);
    margin-bottom: 10px;
}
.feed-peer-consolidated-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3b82f6;
    margin-bottom: 4px;
}
.feed-peer-consolidated-read { font-size: 12px; line-height: 1.5; }
.feed-peer-cons-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.feed-peer-cons-table th {
    text-align: left;
    padding: 6px 8px;
    font-weight: 600;
    font-size: 11px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--color-border);
}
.feed-peer-cons-table td {
    padding: 6px 8px;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border-light, rgba(0,0,0,0.05));
}
.feed-peer-cons-table .ppr-dim { font-weight: 600; }
.feed-peer-cons-table .ppr-enr,
.feed-peer-cons-table .ppr-peer { font-variant-numeric: tabular-nums; }
.feed-peer-cons-table .ppr-delta { font-size: 11px; color: var(--color-text-secondary); font-style: italic; }
.feed-peer-cons-table .ppr-read-row td {
    padding: 4px 8px 10px 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.feed-peer-seg-metrics {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 4px 0 8px 0;
}
.feed-peer-seg-metrics td {
    padding: 2px 4px;
    vertical-align: top;
}
.feed-peer-seg-metrics .ppr-m-dim {
    color: var(--color-text-tertiary);
    font-weight: 500;
    width: 35%;
}
.feed-peer-seg-metrics .ppr-m-enr,
.feed-peer-seg-metrics .ppr-m-peer {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.feed-peer-seg-metrics .ppr-m-sep { color: var(--color-text-tertiary); padding: 0 2px; }
.feed-peer-segments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}
.feed-peer-seg {
    padding: 10px 12px;
    background: var(--color-bg-subtle, rgba(0,0,0,0.02));
    border-radius: var(--radius-md, 6px);
    border-left: 3px solid var(--color-border);
}
.feed-peer-seg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.feed-peer-seg-label { font-weight: 600; font-size: 12px; }
.feed-peer-seg-direction {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}
.feed-peer-seg-direction.positive { color: #15803d; background: rgba(34,197,94,0.12); }
.feed-peer-seg-direction.negative { color: var(--color-negative-text); background: var(--color-negative-soft); }
.feed-peer-seg-direction.mixed { color: #b45309; background: rgba(245,158,11,0.12); }
.feed-peer-seg-direction.neutral { color: var(--color-text-tertiary); background: var(--color-bg-active); }
.feed-peer-seg-read { font-size: 12px; line-height: 1.5; color: var(--color-text-secondary); }

.feed-card.type-conference .feed-type-label { color: #8b5cf6; background: rgba(139,92,246,0.1); }
.feed-card.type-podcast .feed-type-label { color: #a855f7; background: rgba(168,85,247,0.1); }
.feed-card.type-research .feed-type-label { color: #f59e0b; background: rgba(245,158,11,0.1); }
.feed-card.type-expert_call .feed-type-label { color: #14b8a6; background: rgba(20,184,166,0.1); }
.feed-card.type-meeting_note .feed-type-label { color: #6b7280; background: rgba(107,114,128,0.1); }
.feed-card.type-ai_hiring .feed-type-label { color: #22c55e; background: rgba(34,197,94,0.1); }
.feed-card.type-document .feed-card-header { border-left-color: #0ea5e9; }
.feed-card.type-document .feed-card-punchline { border-left-color: #0ea5e9; }
.feed-card.type-document .feed-type-label { color: #0ea5e9; background: rgba(14,165,233,0.1); }

/* Podcast episode card */
.podcast-episode-card .feed-card-header { border-left-color: #a855f7; }
.podcast-episode-card .feed-card-punchline { border-left-color: #a855f7; }
.podcast-episode-card .feed-type-label { color: #a855f7; background: rgba(168,85,247,0.1); }
.podcast-episode-card .episode-section { margin: 10px 0; }
.podcast-episode-card .episode-section h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--color-text-tertiary);
    margin: 0 0 6px 0;
}
.podcast-episode-card .episode-section ul { margin: 0; padding-left: 16px; }
.podcast-episode-card .episode-section li {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 4px;
}
.episode-children {
    margin-top: 10px;
    padding-left: 16px;
    border-left: 2px solid rgba(168,85,247,0.2);
}
.episode-children .feed-card {
    margin-bottom: 4px;
    border: none;
    box-shadow: none;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}
.episode-children .feed-card .feed-card-header {
    border-left: none;
    padding: 6px 10px;
}
.episode-children .feed-card .feed-card-punchline {
    border-left: none;
    padding: 2px 10px 6px;
    font-size: 11px;
}

/* Filter count badges */
.feed-filter-count {
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    opacity: 0.7;
}

.feed-card-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.feed-company-name {
    font-weight: var(--font-semibold);
    font-size: 13px;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-ticker-label {
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.feed-quarter {
    color: var(--color-text-tertiary);
    font-size: 10px;
    background: var(--color-bg-active);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-weight: var(--font-medium);
}

.feed-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.feed-date {
    color: var(--color-text-tertiary);
    font-size: 11px;
}

.feed-expand-icon {
    color: var(--color-text-tertiary);
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.feed-quote-count {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    background: var(--color-bg-active);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
}

.feed-card-summary {
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-subtle);
}

.feed-card-content {
    padding: var(--space-4);
    transition: max-height var(--transition-slow), opacity var(--transition-base), padding var(--transition-base);
    overflow: hidden;
    max-height: 5000px;
    opacity: 1;
}

.feed-card-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 var(--space-4);
}

.feed-card-loading {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: var(--space-4);
}

.feed-error {
    color: var(--color-negative);
    padding: var(--space-3);
    background: var(--color-negative-soft);
    border-radius: var(--radius-md);
}

.feed-no-details {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: var(--space-4);
}

/* Feed Rating Badges */
.feed-rating-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feed-rating-badge.strong-beat {
    background: var(--color-positive-soft);
    color: var(--color-positive-text);
}

.feed-rating-badge.beat {
    background: var(--color-positive-soft);
    color: var(--color-positive-text);
}

.feed-rating-badge.inline,
.feed-rating-badge.in-line {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

.feed-rating-badge.miss {
    background: var(--color-negative-soft);
    color: var(--color-negative-text);
}

.feed-rating-badge.strong-miss {
    background: var(--color-negative-soft);
    color: var(--color-negative-text);
}

/* Feed Sentiment Badges */
.feed-sentiment-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feed-sentiment-badge.very-bullish,
.feed-sentiment-badge.bullish,
.feed-sentiment-badge.positive {
    background: var(--color-positive-soft);
    color: var(--color-positive-text);
}

.feed-sentiment-badge.neutral {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

.feed-sentiment-badge.bearish,
.feed-sentiment-badge.very-bearish,
.feed-sentiment-badge.negative {
    background: var(--color-negative-soft);
    color: var(--color-negative-text);
}

/* Feed Section Titles */
.feed-section-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border-subtle);
}

/* Feed Recap Sections */
.feed-recap-section {
    margin-bottom: var(--space-5);
}

.feed-recap-section:last-child {
    margin-bottom: 0;
}

/* Feed Metrics Grid */
.feed-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
}

.feed-metric-item {
    background: var(--color-bg-tertiary);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
}

.feed-metric-name {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feed-metric-value {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.feed-metric-trend {
    font-size: var(--text-xs);
    margin-top: var(--space-1);
}

.feed-metric-trend.trend-positive {
    color: var(--color-positive);
}

.feed-metric-trend.trend-negative {
    color: var(--color-negative);
}

.feed-metric-trend.trend-neutral {
    color: var(--color-text-secondary);
}

/* Feed Commentary */
.feed-commentary-item {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-brand);
}

.feed-commentary-item:last-child {
    margin-bottom: 0;
}

.feed-commentary-theme {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.feed-commentary-quote {
    font-style: italic;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* Feed Guidance List */
.feed-guidance-list {
    margin: 0;
    padding-left: var(--space-5);
    color: var(--color-text-secondary);
}

.feed-guidance-list li {
    margin-bottom: var(--space-2);
    line-height: var(--leading-relaxed);
}

/* Feed Bottom Line */
.feed-bottom-line {
    background: var(--color-bg-tertiary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-brand);
}

.feed-bottom-line p {
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* Feed Quotes Section */
.feed-quotes-section {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border-primary);
}

.feed-quote-item {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-text-muted);
}

.feed-quote-item:last-child {
    margin-bottom: 0;
}

.feed-quote-text {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.feed-quote-text strong {
    background: var(--color-warning-soft);
    padding: 0 var(--space-1);
    border-radius: var(--radius-xs);
}

.feed-quote-subject {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Feed Results Summary */
.feed-consolidated {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.feed-result-line {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-brand);
}

.feed-trend-context {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: var(--space-2);
    line-height: var(--leading-relaxed);
}

.feed-guidance-punchline {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--color-positive-soft);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
}

/* Feed Segments */
.feed-segment {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-brand);
}

.feed-segment:last-child {
    margin-bottom: 0;
}

.feed-segment-name {
    font-weight: var(--font-bold);
    font-size: var(--text-md);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.feed-segment-headline {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    font-weight: var(--font-medium);
}

.feed-segment-detail {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
    line-height: var(--leading-relaxed);
}

.feed-segment-trajectory {
    display: inline-block;
    margin-top: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
}

.feed-segment-trajectory.accelerating {
    background: var(--color-positive-soft);
    color: var(--color-positive-text);
}

.feed-segment-trajectory.stable {
    background: var(--color-bg-active);
    color: var(--color-text-secondary);
}

.feed-segment-trajectory.decelerating {
    background: var(--color-negative-soft);
    color: var(--color-negative-text);
}

/* Feed Trajectory */
.feed-trajectory p {
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* Feed Commentary Implication */
.feed-commentary-implication {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
}

/* Feed Thesis */
.feed-thesis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.feed-thesis-item {
    padding: var(--space-3);
    border-radius: var(--radius-md);
}

.feed-thesis-item.bull {
    background: var(--color-positive-soft);
    border-left: 4px solid var(--color-positive);
}

.feed-thesis-item.bear {
    background: var(--color-negative-soft);
    border-left: 4px solid var(--color-negative);
}

.feed-thesis-label {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.feed-thesis-status {
    text-transform: uppercase;
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.feed-thesis-status.strengthened {
    background: var(--color-positive);
    color: white;
}

.feed-thesis-status.unchanged {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

.feed-thesis-status.weakened {
    background: var(--color-negative);
    color: white;
}

.feed-thesis-analysis {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
}

/* -----------------------------------------------------------------------------
   FEED CARD - CURATED CONTENT LAYOUT (Option 2)
   ----------------------------------------------------------------------------- */

/* Highlighted Metrics Table - Multi-Quarter */
.feed-highlighted-metrics {
    margin-bottom: var(--space-4);
    overflow-x: auto;
}

.feed-metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border-primary);
}

.feed-metrics-table thead {
    background: var(--color-bg-tertiary);
}

.feed-metrics-table th {
    padding: var(--space-2) var(--space-3);
    text-align: left;
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.feed-metrics-table th.feed-metric-name-header {
    text-align: left;
    min-width: 140px;
}

.feed-metrics-table th.current-quarter {
    color: var(--color-brand);
    font-weight: var(--font-bold);
}

.feed-metrics-table td {
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
    text-align: left;
    vertical-align: top;
}

.feed-metric-name {
    text-align: left;
    color: var(--color-text-primary);
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.feed-metric-value {
    font-variant-numeric: tabular-nums;
}

.feed-metric-value.current-quarter {
    background: var(--color-bg-active);
}

.feed-value-main {
    color: var(--color-text-primary);
    font-weight: var(--font-medium);
}

.feed-value-yoy {
    margin-top: 2px;
}

.feed-yoy {
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}

.feed-yoy.positive {
    color: var(--color-positive);
}

.feed-yoy.negative {
    color: var(--color-negative);
}

/* Consolidated Results Section */
.feed-consolidated-results {
    margin-bottom: var(--space-5);
}

.feed-results-box {
    background: var(--color-bg-secondary);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-primary);
}

.feed-punchline {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.feed-results-list {
    margin: 0;
    padding-left: var(--space-5);
    line-height: 1.6;
    font-size: 13px;
    color: var(--color-text-primary);
}

.feed-results-list li {
    margin-bottom: 2px;
}

.feed-results-tree {
    margin: 0;
    padding: var(--space-3) 0 0 var(--space-5);
    list-style: none;
    font-size: 13px;
    line-height: 1.6;
    border-top: 1px solid var(--color-border-subtle);
    margin-top: var(--space-3);
}

.feed-tree-item {
    color: var(--color-text-secondary);
    margin-bottom: 2px;
}

.feed-tree-item.trend,
.feed-tree-item.management,
.feed-tree-item.outlook {
    color: var(--color-text-primary);
}

.feed-tree-branch {
    display: none;
}

.feed-tree-label {
    font-weight: var(--font-semibold);
    color: var(--color-text-tertiary);
    margin-right: var(--space-1);
    font-size: 13px;
}

/* Thesis Impact Full */
.feed-thesis-full {
    margin-bottom: var(--space-5);
}

.feed-thesis-full .feed-thesis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.feed-thesis-full .feed-thesis-item {
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

.feed-thesis-full .feed-thesis-item.bull {
    background: var(--color-positive-soft);
    border-left: 4px solid var(--color-positive);
}

.feed-thesis-full .feed-thesis-item.bear {
    background: var(--color-negative-soft);
    border-left: 4px solid var(--color-negative);
}

.feed-thesis-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.feed-thesis-icon {
    flex-shrink: 0;
    font-size: var(--text-sm);
}

.feed-thesis-full .feed-thesis-label {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
}

.feed-thesis-full .feed-thesis-status {
    font-weight: var(--font-bold);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-left: auto;
}

.feed-thesis-full .feed-thesis-status.strengthened {
    color: white;
    background: var(--color-positive);
}

.feed-thesis-full .feed-thesis-status.unchanged {
    color: var(--color-text-secondary);
    background: var(--color-bg-tertiary);
}

.feed-thesis-full .feed-thesis-status.weakened {
    color: white;
    background: var(--color-negative);
}

.feed-thesis-full .feed-thesis-analysis {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
}

/* Standout Quote */
.feed-standout-quote {
    margin-bottom: var(--space-5);
}

.feed-quote-box {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-brand);
}

.feed-quote-mark {
    font-size: var(--text-3xl);
    line-height: 1;
    color: var(--color-brand);
    opacity: 0.5;
    font-family: Georgia, serif;
    flex-shrink: 0;
}

.feed-quote-content {
    flex: 1;
    min-width: 0;
}

.feed-quote-text-main {
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
    margin: 0 0 var(--space-2) 0;
}

.feed-quote-attribution {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin: 0;
    font-style: normal;
}

/* CTA Section */
.feed-cta-section {
    text-align: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-subtle);
}

.feed-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--color-brand);
    color: var(--color-text-inverse);
    font-size: var(--text-md);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition-fast);
}

.feed-cta-button:hover {
    background: var(--color-brand-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Responsive adjustments for feed */
@media (max-width: 768px) {
    .feed-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .feed-card-right {
        width: 100%;
        justify-content: flex-start;
    }

    .feed-metrics-grid {
        grid-template-columns: 1fr;
    }

    .feed-thesis-grid,
    .feed-thesis-full .feed-thesis-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   BENCHMARKS FEED STYLES
   ===================================================== */

.benchmarks-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-4);
}

.benchmark-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.benchmark-card-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
}

.benchmark-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    margin: 0 0 var(--space-2) 0;
}

.benchmark-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.benchmark-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}

.benchmark-table thead {
    background: var(--color-bg-tertiary);
}

.benchmark-table th {
    padding: var(--space-2) var(--space-3);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border-primary);
    text-align: right;
}

.benchmark-table th.sticky-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--color-bg-tertiary);
    z-index: 2;
    min-width: 80px;
}

.benchmark-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-border-subtle);
}

.benchmark-table td.sticky-col {
    position: sticky;
    left: 0;
    background: var(--color-bg-secondary);
    z-index: 1;
    font-weight: var(--font-medium);
}

.benchmark-table tr.alt-row td {
    background: var(--color-bg-tertiary);
}

.benchmark-table tr.alt-row td.sticky-col {
    background: var(--color-bg-tertiary);
}

.benchmark-table .company-cell {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.benchmark-table .value-cell {
    text-align: right;
    color: var(--color-text-primary);
}

.benchmark-table .value-cell.empty {
    color: var(--color-text-muted);
}

.benchmark-table .value-cell .positive {
    color: var(--color-positive);
}

.benchmark-table .value-cell .negative {
    color: var(--color-negative);
}

@media (max-width: 768px) {
    .benchmarks-feed {
        padding: var(--space-3);
        gap: var(--space-4);
    }

    .benchmark-card-header {
        padding: var(--space-3);
    }

    .benchmark-title {
        font-size: var(--text-base);
    }

    .benchmark-table-wrapper {
        margin: 0 calc(-1 * var(--space-3));
        padding: 0 var(--space-3);
    }
}

/* =====================================================
   SENTIMENT DASHBOARD STYLES
   ===================================================== */

.sentiment-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.sentiment-period {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.sentiment-industry-row {
    display: grid;
    grid-template-columns: 180px 1fr 80px 100px 120px;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.sentiment-industry-row:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border-secondary);
}

.sentiment-industry-name {
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: capitalize;
}

.sentiment-bar-container {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sentiment-bar-track {
    flex: 1;
    height: 24px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.sentiment-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.sentiment-bar-fill.tailwind {
    left: 50%;
    background: linear-gradient(90deg, var(--color-success-bg) 0%, var(--color-success) 100%);
}

.sentiment-bar-fill.headwind {
    right: 50%;
    background: linear-gradient(270deg, var(--color-error-bg) 0%, var(--color-error) 100%);
}

.sentiment-bar-fill.neutral {
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text-tertiary);
}

.sentiment-bar-center {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border-secondary);
    transform: translateX(-50%);
}

.sentiment-score {
    font-weight: 700;
    font-size: var(--font-size-lg);
    min-width: 60px;
    text-align: right;
}

.sentiment-score.positive {
    color: var(--color-success);
}

.sentiment-score.negative {
    color: var(--color-error);
}

.sentiment-score.neutral {
    color: var(--color-text-secondary);
}

.sentiment-direction {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.sentiment-direction.tailwind {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.sentiment-direction.headwind {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.sentiment-direction.neutral {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

.sentiment-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-align: right;
}

.sentiment-trend {
    font-size: var(--font-size-xs);
    margin-left: var(--space-1);
}

.sentiment-trend.improving {
    color: var(--color-success);
}

.sentiment-trend.worsening {
    color: var(--color-error);
}

.sentiment-trend.stable {
    color: var(--color-text-tertiary);
}

/* Industry Detail View */
.sentiment-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.sentiment-detail-score {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.sentiment-detail-score-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.sentiment-detail-stats {
    display: flex;
    gap: var(--space-6);
}

.sentiment-detail-stat {
    text-align: center;
}

.sentiment-detail-stat-value {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text-primary);
}

.sentiment-detail-stat-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
}

/* Company sentiment breakdown */
.sentiment-company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.sentiment-company-card {
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-primary);
}

.sentiment-company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.sentiment-company-ticker {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.sentiment-company-score {
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.sentiment-company-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

/* Sentiment quotes */
.sentiment-quotes-section {
    margin-top: var(--space-6);
}

.sentiment-quotes-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

.sentiment-quote-card {
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-primary);
    margin-bottom: var(--space-3);
}

.sentiment-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.sentiment-quote-ticker {
    font-weight: 600;
    color: var(--color-text-primary);
}

.sentiment-quote-score-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.sentiment-quote-score-badge.bullish,
.sentiment-quote-score-badge.positive {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.sentiment-quote-score-badge.bearish,
.sentiment-quote-score-badge.negative {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.sentiment-quote-score-badge.neutral {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

.sentiment-quote-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.sentiment-quote-reason {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* Empty state */
.sentiment-empty {
    text-align: center;
    padding: var(--space-8);
    color: var(--color-text-tertiary);
}

.sentiment-empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.sentiment-empty-text {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-2);
}

.sentiment-empty-subtext {
    font-size: var(--font-size-sm);
}

/* Back button */
.sentiment-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: var(--space-4);
}

.sentiment-back-btn:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .sentiment-industry-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .sentiment-bar-container {
        width: 100%;
    }

    .sentiment-company-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   EARNINGS CALENDAR STYLES — column layout
   ============================================================================= */

.ec-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.ec-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.ec-toolbar-spacer { flex: 1; }

.ec-select {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    border: 1px solid var(--color-border-primary);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    cursor: pointer;
}

.ec-icon-btn {
    height: 30px;
    width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: 6px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ec-icon-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.ec-status {
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-left: 6px;
}

/* Each week is its own grid row of up to 5 day columns. Multiple weeks
   stack vertically. */
.ec-week {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}

.ec-week:last-child { margin-bottom: 0; }

/* Legacy: preserved so cached pages render acceptably */
.ec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    align-items: start;
}

.ec-col {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ec-col-today {
    box-shadow: 0 0 0 2px var(--color-brand);
}

.ec-col-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid var(--color-border-primary);
    letter-spacing: 0.01em;
    background: var(--color-bg-tertiary);
}

/* Day-of-week tinted headers — matches the reference: Mon=indigo, Tue=blue,
   Wed=green, Thu=purple, Fri=amber. Soft tints, full-saturation text. */
.ec-day-mon { color: #4f46e5; background: rgba(99, 102, 241, 0.08); }
.ec-day-tue { color: #2563eb; background: rgba(59, 130, 246, 0.08); }
.ec-day-wed { color: #059669; background: rgba(16, 185, 129, 0.08); }
.ec-day-thu { color: #7c3aed; background: rgba(139, 92, 246, 0.08); }
.ec-day-fri { color: #b45309; background: rgba(245, 158, 11, 0.10); }

.ec-col-body {
    display: flex;
    flex-direction: column;
}

.ec-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-primary);
    transition: background 0.12s ease;
    position: relative;
}

.ec-row:last-child { border-bottom: none; }

.ec-row:hover {
    background: var(--color-bg-hover);
}

.ec-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.ec-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
    padding: 1px;
    border: 1px solid var(--color-border-primary);
}

.ec-ticker {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: 0.01em;
}

/* BMO/AMC indicated as a thin colored stripe on the left edge */
.ec-row.bmo::before,
.ec-row.amc::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
}

.ec-row.bmo::before { background: var(--color-warning); }
.ec-row.amc::before { background: var(--color-info); }

/* Source indicator: Nasdaq estimates render slightly muted */
.ec-row.src-nasdaq .ec-ticker {
    color: var(--color-text-secondary);
}

/* Legend */
.ec-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 4px 0;
    margin-top: 12px;
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.ec-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ec-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.ec-dot.bmo { background: var(--color-warning); }
.ec-dot.amc { background: var(--color-info); }
.ec-dot.va { background: var(--color-brand); }
.ec-dot.nasdaq {
    background: transparent;
    border: 1px solid var(--color-border-primary);
}

@media (max-width: 768px) {
    .ec-week,
    .ec-grid {
        grid-template-columns: 1fr;
    }
    .ec-toolbar {
        flex-wrap: wrap;
    }
}

/* =============================================================================
   ADMIN AUTHENTICATION
   ============================================================================= */

/* Admin Login Button in Header */
.admin-login-btn {
    height: 32px;
    padding: 0 var(--space-3);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.admin-login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Modal Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

/* Modal Content */
.modal-content {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    margin: var(--space-4);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-primary);
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text-primary);
}

.modal-body {
    padding: var(--space-4);
}

.modal-body input[type="password"] {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: border-color var(--transition-fast);
}

.modal-body input[type="password"]:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-soft);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4);
    border-top: 1px solid var(--color-border-primary);
    background: var(--color-bg-tertiary);
}

/* Admin-only elements - hidden by default */
.admin-only {
    display: none !important;
}

/* When admin is authenticated, body gets .is-admin class and elements are shown */
body.is-admin .admin-only {
    display: revert !important;
}

/* =============================================================================
   BULK EARNINGS DROP ZONE
   ============================================================================= */
.bulk-drop-zone {
    border: 2px dashed var(--color-border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-4);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text-tertiary);
    background: var(--color-bg-tertiary);
}

.bulk-drop-zone:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-hover);
}

.bulk-drop-zone.drag-over {
    border-color: var(--color-accent);
    background: rgba(16, 185, 129, 0.05);
    border-style: solid;
}

.bulk-file-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--color-bg-tertiary);
    margin-bottom: var(--space-2);
    font-size: 13px;
}

.bulk-file-item .file-ticker {
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 60px;
}

.bulk-file-item .file-date {
    color: var(--color-text-secondary);
    min-width: 90px;
}

.bulk-file-item .file-status {
    margin-left: auto;
    font-size: 12px;
}

.bulk-file-item .file-status.pending { color: var(--color-text-muted); }
.bulk-file-item .file-status.processing { color: var(--color-warning); }
.bulk-file-item .file-status.success { color: var(--color-accent); }
.bulk-file-item .file-status.error { color: var(--color-danger); }

/* =====================================================================
   CONFERENCE CARD STYLES
   ===================================================================== */

.conference-card .feed-card-header {
    border-left: 4px solid var(--color-info);
}

.conference-badge {
    display: inline-block;
    background: var(--color-info-soft);
    color: var(--color-info-text);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-left: 6px;
}

.analyst-day-badge {
    background: var(--color-info-soft);
    color: var(--color-info-text);
}

.podcast-badge {
    background: #2d1f4e;
    color: #c4a5ff;
}

.analyst-day-card .feed-card-header {
    border-left-color: var(--color-info);
}

.conference-key-points {
    margin: 12px 0 0 0;
    padding-left: 20px;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.conference-key-points li {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
}

.conference-key-points li strong {
    color: var(--color-brand);
}

.conference-sub-detail {
    margin: 4px 0 2px 0;
    padding-left: 16px;
    list-style: none;
}

.conference-sub-detail li {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    padding: 3px 0;
}

.conference-sub-detail li.sig-high {
    color: var(--color-text-primary);
}

.conference-sub-detail .conference-sig-badge {
    margin-right: 6px;
    vertical-align: middle;
}

.conference-new-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.conference-new-item {
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-tertiary);
}

.conference-new-item.sig-high {
    border-left: 3px solid var(--color-negative);
}

.conference-new-item.sig-medium {
    border-left: 3px solid #f59e0b;
}

.conference-new-item.sig-low {
    border-left: 3px solid #9ca3af;
}

.conference-new-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.conference-new-topic {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

.conference-sig-badge {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.conference-sig-badge.sig-high {
    background: var(--color-negative-soft);
    color: var(--color-negative-text);
}

.conference-sig-badge.sig-medium {
    background: var(--color-warning-soft);
    color: var(--color-warning-text);
}

.conference-sig-badge.sig-low {
    background: var(--color-bg-active);
    color: var(--color-text-muted);
}

.conference-new-detail {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
}

.conference-new-implication {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
    font-style: italic;
}

.conference-guidance-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.conference-guidance-item {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border-subtle);
}

.conference-guidance-item:last-child {
    border-bottom: none;
}

.conference-vs-prior {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-left: var(--space-2);
}

.conference-tone {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.conference-quotes {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.conference-mgmt-quote {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    border-left: 3px solid #7c3aed;
    padding-left: var(--space-3);
    margin: 0;
}

.conference-bottom-line {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
    background: var(--color-bg-tertiary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border-left: 3px solid #7c3aed;
}

.feed-section {
    margin-bottom: var(--space-5);
}

/* Dark theme adjustments for conference cards */
[data-theme="dark"] .conference-sig-badge.sig-high {
    background: rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .conference-sig-badge.sig-medium {
    background: rgba(217, 119, 6, 0.15);
}

/* =====================================================================
   RESEARCH CARD STYLES
   ===================================================================== */

.research-card .feed-card-header {
    border-left: 4px solid #6366f1;
}

.research-badge {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    letter-spacing: 0.015em;
    margin-left: 6px;
    white-space: nowrap;
}

[data-theme="dark"] .research-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.research-card-subject {
    padding: var(--space-2) var(--space-5);
    padding-left: calc(var(--space-5) + 4px); /* align with header content past border */
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border-subtle);
    line-height: var(--leading-relaxed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.research-ticker-badges {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.research-ticker-badge {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    background: var(--color-bg-active);
    color: var(--color-text-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.research-ticker-badge.primary {
    background: #eef2ff;
    color: #4338ca;
    font-weight: var(--font-semibold);
}

[data-theme="dark"] .research-ticker-badge.primary {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.research-bottom-line {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
    background: var(--color-bg-tertiary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border-left: 3px solid #6366f1;
}

.research-type-badge {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: capitalize;
}

/* =====================================================================
   MEETING NOTE CARD STYLES
   ===================================================================== */

.meeting-note-card .feed-card-header {
    border-left: 4px solid #d97706;
}

.meeting-note-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    letter-spacing: 0.015em;
    margin-left: 6px;
    white-space: nowrap;
    text-transform: capitalize;
}

[data-theme="dark"] .meeting-note-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .meeting-note-card .feed-card-header {
    border-left-color: #fbbf24;
}

.meeting-note-card-title {
    padding: var(--space-2) var(--space-5);
    padding-left: calc(var(--space-5) + 4px);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border-subtle);
    line-height: var(--leading-relaxed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-note-bottom-line {
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    line-height: var(--leading-relaxed);
    background: var(--color-bg-tertiary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border-left: 3px solid #d97706;
}

.feed-type-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.feed-type-filter-btn {
    padding: 3px 10px;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-full);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.feed-type-filter-btn:hover {
    background: var(--color-bg-hover);
}

.feed-type-filter-btn.active {
    background: var(--color-brand);
    color: var(--color-text-inverse);
    border-color: var(--color-brand);
}

/* =============================================================================
   TWO-COLUMN FEED + NEWS LAYOUT
   ============================================================================= */

.feed-two-col {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-4);
    min-height: 0;
    align-items: start;
}

.feed-signals-col {
    min-width: 0;
}

/* Data Center Agent — main content + "Major assets" right rail (mirrors feed-two-col) */
.dc-two-col {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-4);
    align-items: start;
}
.dc-main-col {
    min-width: 0;
}
.dc-major-col .news-feed-container {
    max-height: calc(100vh - 200px);
}
@media (max-width: 1024px) {
    .dc-two-col {
        grid-template-columns: 1fr;
    }
    .dc-major-col {
        border-left: none;
        border-top: 1px solid var(--color-border-primary);
        padding-left: 0;
        padding-top: var(--space-4);
        position: static;
        max-height: none;
    }
}

.news-sidebar-col {
    border-left: 1px solid var(--color-border-primary);
    padding-left: var(--space-4);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 80px;
}

.news-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border-primary);
    margin-bottom: var(--space-3);
    flex-shrink: 0;
}

.news-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.news-source-select {
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.news-feed-container {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.news-item {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.news-item:hover {
    background: var(--color-bg-hover);
}

.news-item-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.news-item-source {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.news-item-time {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

.news-item-punchline {
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.news-item-punchline strong {
    font-weight: 600;
    color: var(--color-text-primary);
}

.news-item-tickers {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
}

.news-item-ticker {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: var(--color-brand-soft);
    color: var(--color-accent, var(--color-brand));
}

.news-item-incremental {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    color: var(--color-positive-text);
    background: var(--color-positive-soft);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.news-item-brief {
    font-size: 11px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-top: 6px;
    display: none;
}

.news-item.expanded .news-item-brief {
    display: block;
}

.news-item-incremental-detail {
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-text-tertiary);
    margin-top: 4px;
    padding: 4px 8px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--color-positive);
    display: none;
}

.news-item.expanded .news-item-incremental-detail {
    display: block;
}

/* =============================================================================
   PODCAST SIGNALS RAIL — replaces news sidebar when podcast filter is active.
   Mirrors .news-sidebar-col layout so the swap is visually seamless.
   ============================================================================= */

.podcast-signals-col {
    border-left: 1px solid var(--color-border-primary);
    padding-left: var(--space-4);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 80px;
}

.podcast-signals-meta {
    font-size: 10px;
    color: var(--color-text-muted);
}

.signal-item {
    padding: 8px var(--space-3);
    border-bottom: 1px solid var(--color-border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.signal-item:hover {
    background: var(--color-bg-hover);
}

/* Tighter header row inside the rail vs the news bar */
.signal-item .news-item-header {
    margin-bottom: 2px;
    gap: 3px;
}

.signal-item .news-item-punchline {
    font-size: 12px;
    line-height: 1.35;
}

.signal-take-kind {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.signal-kind-datapoint {
    background: var(--color-brand-soft);
    color: var(--color-accent);
}

.signal-kind-quote {
    background: var(--color-warning-soft);
    color: var(--color-warning-text, var(--color-warning));
}

.signal-kind-claim {
    background: var(--color-positive-soft);
    color: var(--color-positive-text, var(--color-accent));
}

.signal-item-speaker {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

/* Detail clamped to 2 lines so each tile stays compact; full text is one
   click away in the episode summary card or transcript panel. Hovering the
   tile expands to show the full detail without committing to a click. */
.signal-item-detail {
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-text-secondary);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signal-item:hover .signal-item-detail {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.signal-item-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
}

.signal-item-episode {
    font-size: 10px;
    color: var(--color-text-muted);
    font-style: italic;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-item-links {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.signal-item-link {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-accent);
    cursor: pointer;
    text-decoration: none;
}

.signal-item-link:hover {
    text-decoration: underline;
}

.signal-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
}

/* Thesis chips inside the rail are scaled down vs the original pinned panel
   (.pa-tag is shared with the legacy panel CSS which sized them larger). */
.signal-item-tags .pa-tag {
    font-size: 9px;
    font-weight: 500;
    padding: 0 4px;
    line-height: 1.4;
    letter-spacing: 0.2px;
    text-transform: none;
    opacity: 0.85;
}

/* Notice rendered in the transcript panel when full_transcript looks incomplete */
.transcript-incomplete-notice {
    max-width: 960px;
    margin: 0 auto var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-warning-soft);
    color: var(--color-warning-text, var(--color-warning));
    border-left: 3px solid var(--color-warning);
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
}

/* Responsive: collapse to stacked layout on narrow screens */
@media (max-width: 768px) {
    .feed-two-col {
        grid-template-columns: 1fr;
    }

    .news-sidebar-col,
    .podcast-signals-col {
        border-left: none;
        border-top: 1px solid var(--color-border-primary);
        padding-left: 0;
        padding-top: var(--space-4);
        max-height: 400px;
        position: static;
    }
}

/* =============================================================================
   TOP STORIES BAR
   ============================================================================= */

.top-stories-bar {
    border-bottom: 1px solid var(--color-border-primary);
    padding: var(--space-3) var(--space-3) var(--space-2);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.top-stories-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.top-stories-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-accent);
}

.top-stories-period {
    font-size: 10px;
    color: var(--color-text-muted);
}

.top-stories-list {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-1);
}

.top-story-card {
    flex: 0 0 auto;
    width: 260px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    background: var(--color-bg-primary);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.top-story-card:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-accent);
}

.top-story-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.top-story-source {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-accent);
}

.top-story-tickers {
    display: inline-flex;
    gap: 3px;
    margin-left: auto;
}

.top-story-time {
    font-size: 9px;
    color: var(--color-text-muted);
}

.top-story-punchline {
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-story-punchline strong {
    font-weight: 600;
}

.top-stories-empty {
    font-size: 11px;
    color: var(--color-text-muted);
    padding: var(--space-2);
}

@media (max-width: 768px) {
    .top-story-card {
        width: 200px;
    }
}

/* =============================================================================
   NEWS ROOM — THREE-COLUMN LAYOUT
   ============================================================================= */

.newsroom-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    min-height: 0;
    flex: 1;
}

#newsroomTab.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    overflow: hidden;
}

.newsroom-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid var(--color-border-primary);
}

.newsroom-col:last-child {
    border-right: none;
}

.newsroom-col-middle {
    border-left: none;
}

.newsroom-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-3);
    border-bottom: 1px solid var(--color-border-primary);
    flex-shrink: 0;
    background: var(--color-bg-primary);
}

.newsroom-col-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.newsroom-col .news-feed-container {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Tweet-specific styles */
.tweet-item {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.tweet-item:hover {
    background: var(--color-bg-hover);
}

.tweet-item-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 4px;
}

.tweet-item-author {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.tweet-item-handle {
    font-size: 10px;
    color: var(--color-text-muted);
}

.tweet-item-time {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

.tweet-item-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    white-space: pre-wrap;
}

.tweet-item-metrics {
    display: flex;
    gap: var(--space-3);
    font-size: 10px;
    color: var(--color-text-muted);
}

.tweet-item-metric {
    display: flex;
    align-items: center;
    gap: 3px;
}

.tweet-item-media {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    overflow-x: auto;
}

.tweet-item-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    object-fit: cover;
    cursor: zoom-in;
}

.tweet-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.tweet-item-timestamp {
    font-size: 10px;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.tweet-item-tickers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

/* Responsive: stack columns on narrow screens */
@media (max-width: 1024px) {
    .newsroom-layout {
        grid-template-columns: 1fr 1fr;
        height: auto;
    }
    .newsroom-col:last-child {
        display: none;
    }
}

@media (max-width: 768px) {
    .newsroom-layout {
        grid-template-columns: 1fr;
    }
    .newsroom-col {
        border-right: none;
        border-bottom: 1px solid var(--color-border-primary);
        max-height: 50vh;
    }
    .newsroom-col:last-child {
        display: flex;
    }
}

/* =============================================================================
   TRANSCRIPT VIEWER PANEL
   ============================================================================= */

/* Backdrop overlay */
.transcript-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1100;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Slide-out panel */
.transcript-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 96%;
    max-width: 1600px;
    height: 100vh;
    background: var(--color-bg-secondary);
    z-index: 1200;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.transcript-panel.open {
    transform: translateX(0);
}

/* Panel header */
.transcript-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-primary);
    background: var(--color-bg-elevated);
    flex-shrink: 0;
}

.transcript-panel-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.transcript-ticker {
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--color-text-primary);
}

.transcript-date {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.transcript-type-badge {
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--color-info-soft);
    color: var(--color-info-text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transcript-panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.transcript-search-toggle,
.transcript-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    line-height: 1;
}

.transcript-search-toggle:hover,
.transcript-close-btn:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

/* Search bar */
.transcript-search-bar {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-5);
    border-bottom: 1px solid var(--color-border-primary);
    background: var(--color-bg-tertiary);
    gap: var(--space-2);
    flex-shrink: 0;
}

.transcript-search-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    outline: none;
}

.transcript-search-input:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 2px var(--color-brand-soft);
}

.transcript-search-count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* Quote navigation chips */
.transcript-quote-nav {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    overflow-x: auto;
    border-bottom: 1px solid var(--color-border-primary);
    background: var(--color-bg-elevated);
    flex-shrink: 0;
    scrollbar-width: thin;
}

.transcript-quote-nav:empty {
    display: none;
    padding: 0;
    border-bottom: none;
}

.transcript-quote-chip {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    cursor: pointer;
    border: 1px solid var(--color-border-primary);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transcript-quote-chip.matched {
    background: #fef9c3;
    border-color: #eab308;
    color: #854d0e;
}

.transcript-quote-chip.unmatched {
    opacity: 0.5;
    cursor: default;
}

.transcript-quote-chip.matched:hover {
    background: #fde68a;
    border-color: #ca8a04;
}

.transcript-quote-chip.active {
    background: #eab308;
    color: #fff;
    border-color: #ca8a04;
}

/* =============================================================================
   TRANSCRIPTS TAB — two-column news-feed-style layout
   ============================================================================= */

.transcripts-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    align-items: start;
    margin-top: var(--space-3);
}

.transcripts-col {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    min-height: 0;
    overflow: hidden;
}

.transcripts-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-primary);
    background: var(--color-bg-primary);
}

.transcripts-col-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary);
}

.transcripts-col-count {
    font-size: 11px;
    color: var(--color-text-muted);
}

.transcripts-col-body {
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    min-height: 0;
}

.transcripts-col-footer {
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
    text-align: center;
}

.transcripts-col-footer .btn-secondary {
    font-size: 11px;
    padding: 4px 12px;
}

/* Individual transcript card (mirrors news-item compact design) */
.transcript-card {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.transcript-card:last-child {
    border-bottom: none;
}

.transcript-card:hover {
    background: var(--color-bg-hover);
}

.transcript-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.transcript-card-source {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-accent);
}

.transcript-card-source-youtube { color: var(--color-negative); }
.transcript-card-source-pdf    { color: #2563eb; }
.transcript-card-source-api    { color: var(--color-accent); }

.transcript-card-date {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-left: auto;
}

.transcript-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.transcript-card-channel {
    font-size: 11px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.transcript-card-channel a {
    color: var(--color-text-secondary);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-border-secondary);
}

.transcript-card-channel a:hover {
    color: var(--color-brand);
}

.transcript-card-tickers {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.transcript-card-ticker {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: var(--color-brand-soft);
    color: var(--color-accent, var(--color-brand));
}

.transcript-card-meta {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.transcript-card-preview {
    font-size: 11px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 900px) {
    .transcripts-two-col {
        grid-template-columns: 1fr;
    }
}

/* Scrollable transcript body */
.transcript-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
    scroll-behavior: smooth;
}

/* Keep reading column readable even when panel is very wide */
.transcript-body > .transcript-turn,
.transcript-body > .transcript-section-divider {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

/* Section dividers */
.transcript-section-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-6) 0 var(--space-4);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transcript-section-divider::before,
.transcript-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border-primary);
}

.transcript-section-divider:first-child {
    margin-top: 0;
}

/* Speaker turns */
.transcript-turn {
    margin-bottom: var(--space-5);
    line-height: 1.7;
}

.transcript-speaker-name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-brand);
    margin-bottom: 2px;
}

.transcript-speaker-role {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.transcript-turn-text {
    font-size: var(--text-base);
    color: var(--color-text-primary);
    line-height: 1.75;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Speaker color differentiation */
.transcript-turn[data-section="qa"] .transcript-speaker-name {
    color: #7c3aed;
}

/* Quote highlights */
.transcript-highlight {
    background: #fef08a;
    border-radius: 2px;
    padding: 1px 0;
    scroll-margin-top: 120px;
}

.transcript-highlight.pulse {
    animation: highlightPulse 1.5s ease-out;
}

@keyframes highlightPulse {
    0% { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
    100% { background: #fef08a; box-shadow: none; }
}

/* Search highlights */
.transcript-search-match {
    background: #bbf7d0;
    border-radius: 2px;
    padding: 1px 0;
}

.transcript-search-match.current {
    background: #22c55e;
    color: #fff;
}

/* View Transcript button */
.feed-transcript-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.feed-transcript-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
    background: var(--color-brand-soft);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .transcript-panel {
        width: 100%;
        max-width: 100%;
    }
}

/* Dark mode overrides for transcript panel */
[data-theme="dark"] .transcript-quote-chip.matched {
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(234, 179, 8, 0.5);
    color: #fde68a;
}

[data-theme="dark"] .transcript-quote-chip.matched:hover {
    background: rgba(234, 179, 8, 0.3);
}

[data-theme="dark"] .transcript-quote-chip.active {
    background: rgba(234, 179, 8, 0.6);
    color: #fff;
}

[data-theme="dark"] .transcript-highlight {
    background: rgba(234, 179, 8, 0.25);
}

@keyframes highlightPulseDark {
    0% { background: rgba(245, 158, 11, 0.6); box-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
    100% { background: rgba(234, 179, 8, 0.25); box-shadow: none; }
}

[data-theme="dark"] .transcript-highlight.pulse {
    animation: highlightPulseDark 1.5s ease-out;
}

[data-theme="dark"] .transcript-search-match {
    background: rgba(34, 197, 94, 0.25);
}

[data-theme="dark"] .transcript-search-match.current {
    background: rgba(34, 197, 94, 0.6);
    color: #fff;
}

/* =============================================================================
   AUTH GATE - Full-page login overlay
   ============================================================================= */

.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D1B2A 0%, #1B2A4A 50%, #2A4060 100%);
}

.auth-gate-card {
    width: 100%;
    max-width: 380px;
    padding: 40px 32px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.auth-gate-brand {
    margin-bottom: 32px;
}

.auth-gate-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.auth-gate-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 6px;
}

.auth-gate-subtitle {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin: 0;
}

.auth-gate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-gate-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.auth-gate-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(74, 122, 181, 0.2);
}

.auth-gate-btn {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--color-brand);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s;
}

.auth-gate-btn:hover {
    background: var(--color-brand-hover);
}

.auth-gate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-gate-error {
    font-size: 13px;
    color: var(--color-negative);
    padding: 8px;
    background: var(--color-negative-soft);
    border-radius: var(--radius-sm);
}

/* =============================================================================
   SECURITY BADGE
   ============================================================================= */

.security-badge {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--text-lg);
    line-height: 1;
    position: relative;
}

.security-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.security-badge.alert {
    border-color: var(--color-negative);
    color: var(--color-negative);
}

.security-badge.alert:hover {
    background: var(--color-negative-soft);
}

.badge-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    background: var(--color-negative);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-secondary);
}

.security-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.security-popover-header {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-primary);
}

.security-popover-body {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.security-ip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-1) 0;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
}

.security-ip-row .ip-blocked {
    color: var(--color-negative);
    font-weight: var(--font-semibold);
}

/* -----------------------------------------------------------------------------
   VOXEL LOGO & HEADER BRANDING
   ----------------------------------------------------------------------------- */
.app-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
}
[data-theme="dark"] .app-logo-img {
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.header-brand-icon {
    font-size: var(--text-2xl);
}
.header-brand-subtitle {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.auth-gate-logo {
    width: 180px;
    height: auto;
    margin-bottom: 16px;
}
[data-theme="dark"] .auth-gate-logo {
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
}

/* Sidebar responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        top: 52px;
        z-index: var(--z-overlay);
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
        box-shadow: none;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
    }

    .sidebar-mobile-toggle {
        display: flex;
    }

    .sidebar-toggle {
        display: none;
    }
}

/* ============================================================================
   COMPANY OVERVIEW
   ============================================================================ */

.company-overview-header {
    margin-bottom: 24px;
}

.company-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.company-ticker-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
    vertical-align: middle;
}

.company-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.company-industry {
    text-transform: capitalize;
}

.company-price {
    font-weight: 600;
    font-size: 18px;
    color: var(--color-text-primary);
}

.company-ext-hours {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
}

.company-ext-hours .ext-hours-label {
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.company-ext-hours.ext-hours-up {
    color: var(--color-positive);
}

.company-ext-hours.ext-hours-down {
    color: var(--color-negative);
}

.company-overview-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 24px;
    margin-bottom: 24px;
}

.company-section {
    margin-bottom: 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
}

.company-section-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.company-description p {
    margin-bottom: 6px;
}

.company-desc-bullets {
    margin: 4px 0 0 16px;
    padding: 0;
    list-style: disc;
}

.company-desc-bullets li {
    margin-bottom: 3px;
}

.company-description-collapsed {
    max-height: 60px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, black 40px, transparent 60px);
    mask-image: linear-gradient(to bottom, black 40px, transparent 60px);
}

.company-description-toggle {
    font-size: 12px;
    margin-top: 4px;
    color: var(--color-accent);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

/* Stock Chart */
.company-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.company-chart-periods {
    display: flex;
    gap: 4px;
}

.chart-period-btn {
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.15s;
}

.chart-period-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-text-primary);
}

.chart-period-btn.active {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: #fff;
}

.company-stock-chart {
    min-height: 320px;
    border-radius: 8px;
}

.chart-expand-btn {
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-secondary);
    margin-left: 4px;
    transition: all 0.15s;
}
.chart-expand-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-text-primary);
}

/* Fullscreen Chart Modal */
.chart-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--color-bg-primary);
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    box-sizing: border-box;
}
.chart-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.chart-fullscreen-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.chart-fs-pct-badge {
    font-size: 16px;
    font-weight: 700;
}
.chart-fullscreen-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.chart-fullscreen-periods {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.chart-fs-mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}

.chart-fullscreen-overlays {
    display: flex;
    gap: 4px;
    align-items: center;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
}
.chart-fullscreen-overlays input {
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--color-text-primary);
    width: 160px;
    text-transform: uppercase;
}
.chart-fullscreen-overlays input:focus {
    outline: none;
    border-color: var(--color-brand);
}
.chart-overlay-add {
    background: var(--color-brand);
    border: 1px solid var(--color-brand);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
}
.chart-overlay-add:hover { opacity: 0.9; }
.chart-fullscreen-close {
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    color: var(--color-text-secondary);
}
.chart-fullscreen-close:hover {
    border-color: var(--color-negative);
    color: var(--color-negative);
}
.chart-fs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    min-height: 0;
}
.chart-fs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--color-bg-secondary);
}
.chart-fs-chip .chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.chart-fs-chip .chip-remove {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 2px;
    font-size: 11px;
}
.chart-fs-chip .chip-remove:hover { opacity: 1; }
.chart-fullscreen-chart {
    flex: 1;
    min-height: 200px;
    width: 100%;
    position: relative;
    cursor: crosshair;
    user-select: none;
}

.chart-drag-selection {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(33, 150, 243, 0.12);
    border-left: 1px dashed rgba(33, 150, 243, 0.6);
    border-right: 1px dashed rgba(33, 150, 243, 0.6);
    pointer-events: none;
    z-index: 5;
}
[data-theme="dark"] .chart-drag-selection {
    background: rgba(38, 166, 154, 0.12);
    border-left-color: rgba(38, 166, 154, 0.6);
    border-right-color: rgba(38, 166, 154, 0.6);
}

.chart-drag-label {
    position: absolute;
    top: 8px;
    background: var(--color-bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-text-primary);
    pointer-events: none;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.chart-drag-label .drag-header {
    font-size: 10px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}
.chart-drag-label .drag-line {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.chart-drag-label .drag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.chart-drag-label .drag-name { font-weight: 600; }
.chart-drag-label .drag-pct { font-weight: 700; }
.chart-drag-label .drag-ann {
    color: var(--color-text-secondary);
    font-weight: 400;
    font-size: 10px;
}

.chart-fs-hint {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 11px;
    padding: 4px 0 0;
    opacity: 0.7;
}
.chart-fullscreen-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--color-text-secondary);
}
.chart-fs-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chart-fs-legend-item .chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.chart-fs-legend-item .legend-name { font-weight: 600; color: var(--color-text-primary); }
.chart-fs-legend-item .legend-pct { font-weight: 700; }

/* Valuation Row: waterfall left, multiples right */
.company-cap-val-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.company-cap-section {
    flex: 0 0 280px;
    margin-bottom: 0;
}

.company-val-section {
    flex: 1;
    margin-bottom: 0;
}

/* Capitalization Waterfall */
.company-valuation-waterfall {
}

.waterfall-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
}

.waterfall-label {
    color: var(--color-text-secondary);
}

.waterfall-value {
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.waterfall-subtotal {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 4px;
}

.waterfall-subtotal .waterfall-label,
.waterfall-subtotal .waterfall-value {
    font-weight: 600;
    color: var(--color-text-primary);
}

.waterfall-total {
    border-top: 2px solid var(--border-color);
    padding-top: 8px;
    margin-top: 4px;
}

.waterfall-total .waterfall-label,
.waterfall-total .waterfall-value {
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Valuation Multiples */
.company-valuation-multiples {
    flex: 1;
}

.valuation-multiples-table {
    width: 100%;
}

.valuation-multiples-table td.metric-name {
    max-width: 110px;
    white-space: nowrap;
}

/* Summary Financials Header + Toggle */
.company-financials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.company-financials-header .company-section-title {
    margin: 0;
}

.financials-period-toggle {
    display: flex;
    gap: 2px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px;
}

.period-toggle-btn {
    background: none;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.15s;
}

.period-toggle-btn:hover {
    color: var(--color-text-primary);
}

.period-toggle-btn.active {
    background: var(--color-brand);
    color: #fff;
}

/* Summary Financials Table */
.company-financials-wrapper {
    overflow-x: auto;
}

.company-financials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.company-financials-table th,
.company-financials-table td {
    padding: 6px 10px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.company-financials-table th {
    font-weight: 600;
    font-size: 11px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.company-financials-table td.metric-name {
    text-align: left;
    font-weight: 500;
    color: var(--color-text-primary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-financials-table td.fwd-estimate,
.company-financials-table th.fwd-estimate {
    background-color: var(--color-brand-soft);
    color: var(--color-text-primary);
}

.company-financials-table .na {
    color: var(--color-text-tertiary);
}

.company-financials-table .our-eps-row td {
    color: var(--color-accent);
    font-weight: 600;
}

.company-financials-table .our-eps-row td.metric-name {
    color: var(--color-accent);
}

/* Company Sub-Navigation (Records / Transcripts / Filings) */
.company-sub-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.company-sub-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.company-sub-tab:hover {
    color: var(--color-text-primary);
}

.company-sub-tab.active {
    color: var(--color-brand);
    border-bottom-color: var(--color-brand);
    font-weight: 600;
}

.company-sub-panel {
    display: none;
}

.company-sub-panel.active {
    display: block;
}

/* SEC Filings Grid (BAMSEC-style) */
.filings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.filings-category {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.filings-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--color-bg-secondary, var(--bg-secondary));
    border-bottom: 1px solid var(--border-color);
}

.filings-category-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.filings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.filings-table tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.1s;
}

.filings-table tr:last-child {
    border-bottom: none;
}

.filings-table tr:hover {
    background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

.filings-table td {
    padding: 7px 12px;
    vertical-align: middle;
}

.filings-table a {
    text-decoration: none;
    color: inherit;
    display: contents;
}

.filing-type-badge {
    display: inline-block;
    font-weight: 600;
    color: var(--color-brand);
    font-size: 12px;
    min-width: 50px;
}

.filing-desc {
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.filing-date {
    color: var(--color-text-secondary);
    white-space: nowrap;
    text-align: right;
    font-size: 11px;
}

.filings-show-more {
    text-align: center;
    padding: 6px;
}

.filings-show-more button {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 11px;
    padding: 4px 12px;
}

.filings-show-more button:hover {
    color: var(--color-text-primary);
}

/* Company Transcripts Table */
.company-transcripts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.company-transcripts-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.company-transcripts-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.company-transcripts-table tr {
    cursor: pointer;
    transition: background 0.1s;
}

.company-transcripts-table tbody tr:hover {
    background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

.transcript-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.transcript-type-badge.earnings {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-brand);
}

.transcript-type-badge.conference {
    background: rgba(139, 92, 246, 0.12);
    color: rgb(139, 92, 246);
}

.transcript-type-badge.expert {
    background: rgba(245, 158, 11, 0.12);
    color: rgb(180, 120, 10);
}

.transcript-type-badge.other {
    background: rgba(107, 114, 128, 0.12);
    color: rgb(107, 114, 128);
}

@media (max-width: 900px) {
    .filings-grid {
        grid-template-columns: 1fr;
    }
}

/* Company Records */
.company-records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.company-records-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.company-record-tab {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--color-text-secondary);
    white-space: nowrap;
    transition: all 0.15s;
}

.company-record-tab:hover {
    border-color: var(--color-brand);
    color: var(--color-text-primary);
}

.company-record-tab.active {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: #fff;
}

.company-placeholder {
    padding: 60px 24px;
    text-align: center;
}

/* AI Hiring sub-tabs */
.ai-hiring-subtab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-secondary);
    margin-bottom: -2px;
    transition: all 0.15s;
}
.ai-hiring-subtab:hover {
    color: var(--color-text-primary);
}
.ai-hiring-subtab.active {
    color: var(--color-brand);
    border-bottom-color: var(--color-brand);
}

/* AI Pill leaderboard table */
.ai-pill-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ai-pill-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}
.ai-pill-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.ai-pill-table tr {
    cursor: pointer;
    transition: background 0.1s;
}
.ai-pill-table tbody tr:hover {
    background: var(--hover-bg, rgba(100,100,100,0.06));
}
.ai-pill-table .ai-share-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    position: relative;
    min-width: 80px;
}
.ai-pill-table .ai-share-bar-fill {
    height: 100%;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
}
.ai-pill-section-label {
    font-weight: 700;
    font-size: 13px;
    padding: 16px 12px 8px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-brand);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
}

/* Responsive */
/* Financials + Guidance side by side */
.company-financials-guidance-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.company-financials-side {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.company-guidance-side {
    flex: 0 0 260px;
    max-width: 280px;
}

/* Guidance Panel */
.guidance-fact {
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.guidance-fact:last-child {
    border-bottom: none;
}

.guidance-fact-source {
    font-size: 10px;
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* Compact feed cards inside company records */
#companyRecordsFeed .feed-card {
    padding: 8px 12px;
    margin-bottom: 4px;
}

#companyRecordsFeed .feed-card-header {
    margin-bottom: 2px;
}

#companyRecordsFeed .feed-card-body,
#companyRecordsFeed .feed-card-footer,
#companyRecordsFeed .feed-highlights,
#companyRecordsFeed .feed-card-metrics {
    display: none;
}

/* Bottom grid: records + news side by side */
.company-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 24px;
}

.company-bottom-news {
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
    max-height: 800px;
    overflow-y: auto;
}

/* News oneliners */
.news-oneliner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    line-height: 1.4;
}

.news-oneliner:last-child {
    border-bottom: none;
}

.news-oneliner-date {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--color-text-tertiary);
    min-width: 65px;
}

.news-oneliner-source {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 60px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-oneliner-headline {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 500;
    flex: 1 1 100%;
}

.news-oneliner-headline:hover {
    color: var(--color-brand);
}

.news-oneliner-punchline {
    flex: 1 1 100%;
    font-size: 11px;
    color: var(--color-text-tertiary);
    line-height: 1.4;
}

@media (max-width: 900px) {
    .company-overview-grid {
        grid-template-columns: 1fr;
    }
    .company-cap-val-row {
        flex-direction: column;
    }
    .company-financials-guidance-row {
        flex-direction: column;
    }
    .company-guidance-side {
        flex: 1;
        max-width: 100%;
    }
    .company-bottom-grid {
        grid-template-columns: 1fr;
    }
    .company-bottom-news {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 16px;
    }
}

@media (max-width: 600px) {
    .company-valuation-multiples {
        grid-template-columns: repeat(2, 1fr);
    }

    .company-records-tabs {
        flex-wrap: nowrap;
    }
}

/* ============================================
   Pricing Monitor — Bloomberg-style table
   ============================================ */

.monitor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border-primary);
    background: var(--color-bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.monitor-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.monitor-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.monitor-count {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.monitor-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-filter-group {
    display: flex;
    border: 1px solid var(--color-border-primary);
    border-radius: 5px;
    overflow: hidden;
}

.monitor-filter-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--color-text-secondary);
    transition: background 0.15s, color 0.15s;
}

.monitor-filter-btn.active {
    background: var(--color-brand);
    color: #fff;
}

.monitor-filter-btn:hover:not(.active) {
    background: var(--color-bg-hover);
}

.monitor-interval-select {
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid var(--color-border-primary);
    border-radius: 5px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: pointer;
}

/* Edit-layout controls */
.monitor-edit-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--color-border-primary);
    border-radius: 5px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.monitor-edit-btn.active {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}

.monitor-edit-btn:hover:not(.active) {
    background: var(--color-bg-hover);
}

.mon-add-ticker {
    float: right;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-brand);
    cursor: pointer;
}

.mon-add-ticker:hover {
    text-decoration: underline;
}

.mon-override-dot {
    color: var(--color-brand);
    font-size: 8px;
    vertical-align: middle;
}

.mon-cell-edit {
    text-align: right;
    white-space: nowrap;
}

.mon-move-select {
    font-size: 11px;
    padding: 1px 2px;
    max-width: 110px;
    border: 1px solid var(--color-border-primary);
    border-radius: 4px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
}

.mon-remove-ticker {
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
}

.mon-remove-ticker:hover {
    color: var(--color-negative, #d33);
}

.monitor-status {
    font-size: 11px;
    color: var(--color-text-muted);
    min-width: 70px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Two-column grid of group blocks */
.monitor-grid {
    columns: 2;
    column-gap: 16px;
    padding: 12px 16px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

/* Individual group block */
.mon-block {
    break-inside: avoid;
    margin-bottom: 12px;
}

.mon-block-header {
    padding: 6px 8px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-tertiary);
    border-bottom: 1px solid var(--color-border-primary);
    cursor: pointer;
    user-select: none;
    background: var(--color-bg-tertiary);
    border-radius: 4px 4px 0 0;
}

.mon-block-header:hover {
    background: var(--color-bg-hover);
}

/* Per-group table */
.mon-block-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
    border: 1px solid var(--color-border-subtle);
    border-top: none;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.mon-block-table th {
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border-primary);
    text-align: right;
    white-space: nowrap;
    background: var(--color-bg-secondary);
}

.mon-block-table th.mon-bth-ticker {
    text-align: left;
    width: 60px;
}

.mon-bth-price { width: 70px; }
.mon-bth-chg   { width: 62px; }
.mon-bth-ytd   { width: 58px; }
.mon-bth-pe    { width: 52px; }

.monitor-group-arrow {
    display: inline-block;
    width: 14px;
    font-size: 10px;
    color: var(--color-text-muted);
}

.monitor-group-count {
    float: right;
    font-weight: 400;
    font-size: 10px;
    color: var(--color-text-muted);
}

/* Data rows */
.monitor-data-row td {
    padding: 3px 6px;
    border-bottom: 1px solid var(--color-border-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monitor-data-row {
    cursor: pointer;
    transition: background 0.1s;
}

.monitor-data-row:hover td {
    background: var(--color-bg-hover);
}

/* Cell alignment and fonts */
.mon-cell-ticker {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 12px;
}

.mon-cell-price,
.mon-cell-chg,
.mon-cell-ytd,
.mon-cell-pe {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
}

.mon-cell-price {
    color: var(--color-text-primary);
    font-weight: 500;
}

.mon-cell-pe {
    color: var(--color-text-secondary);
}

/* Color coding */
.mon-positive {
    color: #10b981;
}

.mon-negative {
    color: var(--color-negative);
}

/* Flash animation for price updates */
@keyframes mon-flash-up {
    0% { background: rgba(16, 185, 129, 0.15); }
    100% { background: transparent; }
}

@keyframes mon-flash-down {
    0% { background: rgba(217, 119, 6, 0.18); }
    100% { background: transparent; }
}

.mon-flash-up td {
    animation: mon-flash-up 0.8s ease-out;
}

.mon-flash-down td {
    animation: mon-flash-down 0.8s ease-out;
}

/* Empty state */
.monitor-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .monitor-grid {
        columns: 1;
    }
    .monitor-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Podcast Agent Panel — pinned above podcast feed */
.podcast-agent-panel {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-left: 3px solid var(--color-accent);
    border-radius: 8px;
}
.podcast-agent-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
}
.podcast-agent-panel-header .pa-badge {
    color: var(--color-accent);
    font-weight: 600;
}
.podcast-agent-panel-header .pa-meta {
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
}
.podcast-agent-pick {
    padding: 8px 0;
    border-top: 1px dashed var(--color-border-subtle);
    cursor: pointer;
}
.podcast-agent-pick:first-of-type {
    border-top: none;
    padding-top: 4px;
}
.podcast-agent-pick:hover .pa-headline {
    text-decoration: underline;
}
.pa-rank {
    display: inline-block;
    min-width: 18px;
    margin-right: 8px;
    font-weight: 700;
    color: var(--color-accent);
    font-size: 13px;
}
.pa-headline {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.pa-why {
    margin: 4px 0 0 26px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-secondary);
}
.pa-tags {
    margin: 6px 0 0 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}
.pa-tag {
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--color-border-subtle);
    color: var(--color-text-secondary);
}
.pa-tag.pa-thesis-supports { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.pa-tag.pa-thesis-challenges { background: var(--color-negative-soft); color: var(--color-negative); }
.pa-tag.pa-thesis-raises_question { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }

/* Brief highlight when scrolling to a feed card from a pick */
@keyframes pa-card-flash {
    0% { box-shadow: 0 0 0 2px var(--color-accent); }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.pa-card-highlight {
    animation: pa-card-flash 1.6s ease-out;
}

/* Jobs Agent Panel — pinned above AI Hiring grid; surfaces cross-company themes */
.jobs-agent-panel {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-left: 3px solid #6366f1;
    border-radius: 8px;
}
.jobs-agent-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
}
.jobs-agent-panel-header .ja-badge {
    color: #6366f1;
    font-weight: 600;
}
.jobs-agent-panel-header .ja-meta {
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
}
.jobs-agent-pick {
    padding: 10px 0;
    border-top: 1px dashed var(--color-border-subtle);
}
.jobs-agent-pick:first-of-type {
    border-top: none;
    padding-top: 4px;
}
.ja-rank {
    display: inline-block;
    min-width: 18px;
    margin-right: 8px;
    font-weight: 700;
    color: #6366f1;
    font-size: 13px;
}
.ja-theme {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ja-headline {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.ja-why {
    margin: 4px 0 0 26px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-secondary);
}
.ja-evidence {
    margin: 6px 0 0 26px;
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.6;
}
.ja-evidence-item {
    display: inline-block;
    margin-right: 12px;
}
.ja-evidence-co {
    font-weight: 600;
    color: var(--color-text-secondary);
}
.ja-tags {
    margin: 6px 0 0 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}
.ja-tag {
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--color-border-subtle);
    color: var(--color-text-secondary);
}
.ja-tag.ja-thesis-supports { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.ja-tag.ja-thesis-challenges { background: var(--color-negative-soft); color: var(--color-negative); }
.ja-tag.ja-thesis-raises_question { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }

/* Thesis Highlights Panel — visually distinct from thesis cards */
.thesis-highlights-panel {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.thesis-highlights-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
}
.thesis-highlights-panel-header .th-badge {
    color: #f59e0b;
    font-weight: 700;
    font-size: 12px;
}
.thesis-highlights-panel-header .th-meta {
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: none;
    letter-spacing: 0;
}
.thesis-highlight-pick {
    padding: 9px 0;
    border-top: 1px dashed var(--color-border-subtle);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;
}
.thesis-highlight-pick:first-of-type {
    border-top: none;
    padding-top: 4px;
}
.thesis-highlight-pick:hover {
    background: rgba(245, 158, 11, 0.06);
}
.thesis-highlight-pick:hover .th-headline {
    text-decoration: underline;
}
.th-rank {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    margin-right: 8px;
    font-weight: 700;
    color: #fff;
    background: #f59e0b;
    border-radius: 50%;
    font-size: 11px;
    vertical-align: middle;
}
.th-headline {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.th-company {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-left: 4px;
    font-weight: 400;
}
.th-why {
    margin: 4px 0 0 28px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-secondary);
}
.th-tags {
    margin: 6px 0 0 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}
@keyframes th-card-flash {
    0% { box-shadow: 0 0 0 2px #f59e0b; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.th-card-highlight {
    animation: th-card-flash 1.6s ease-out;
}
@keyframes th-evidence-pulse {
    0% { background: rgba(245, 158, 11, 0.25); }
    40% { background: rgba(245, 158, 11, 0.12); }
    70% { background: rgba(245, 158, 11, 0.2); }
    100% { background: transparent; }
}
.th-evidence-flash {
    animation: th-evidence-pulse 2.2s ease-out;
    border-radius: 4px;
}
.th-tag {
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--color-border-subtle);
    color: var(--color-text-secondary);
}
.th-tag.th-supports { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.th-tag.th-contradicts { background: var(--color-negative-soft); color: var(--color-negative); }
