/* ==========================================================================
   CORTEX 2026 DESIGN SYSTEM & MASTER STYLESHEET
   Inspired by: Refero Design, Recent.design, Inspora, Best Designs on X
   Aesthetics: Deep Space OLED Void, Specular Glassmorphism 2.0, Electric Cyan
   ========================================================================== */
:root {
    /* Welcoming, Clean Velvet Slate & Obsidian Dark Palette */
    --bg-void: #0a0e17;
    --bg-surface: #0f1523;
    --bg-surface-elevated: #151d30;
    --bg-glass: rgba(15, 23, 42, 0.78);
    --bg-glass-heavy: rgba(11, 16, 26, 0.94);
    --bg-glass-card: rgba(255, 255, 255, 0.045);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    --bg-glass-active: rgba(56, 189, 248, 0.14);

    /* Electric Accents & Radiant Glows */
    --accent-cyan: #38bdf8;
    --accent-cyan-light: #7dd3fc;
    --accent-cyan-glow: rgba(56, 189, 248, 0.28);
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.28);
    --accent-teal: #2dd4bf;
    --accent-teal-glow: rgba(45, 212, 191, 0.28);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.28);
    --accent-amethyst: #a855f7;
    --accent-amethyst-glow: rgba(168, 85, 247, 0.28);
    --accent-amber: #f59e0b;
    --accent-amber-glow: rgba(245, 158, 11, 0.28);
    --accent-rose: #fb7185;

    /* Gradients - Welcoming, Luminous & Friendly */
    --gradient-hero-title: linear-gradient(135deg, #ffffff 30%, #e2e8f0 60%, #7dd3fc 100%);
    --gradient-brand: linear-gradient(135deg, #2563eb 0%, #00f2fe 100%);
    --gradient-card-border: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.04) 100%);
    --gradient-pro-badge: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
    --gradient-ambient-mesh: radial-gradient(circle at 50% -10%, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.05) 45%, transparent 80%);

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Text Colors - High Readability & Clean Welcoming Contrast */
    --text-primary: #f8fafc;
    --text-secondary: #9cb0c9;
    --text-muted: #72849c;
    --text-dim: #54647a;

    /* Glassmorphism 2.0 Borders & Specular Highlights */
    --border-glass: rgba(255, 255, 255, 0.09);
    --border-glass-subtle: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(255, 255, 255, 0.18);
    --border-cyan-glow: rgba(56, 189, 248, 0.45);

    /* Shadows & Specular Inner Glows */
    --shadow-specular: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --shadow-dock: 0 20px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    --shadow-modal: 0 25px 70px -10px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.16);
    --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);

    /* Radii & Physics (rem-based: identical to 8/12/18/24px at the 15px base, scales on large monitors) */
    --radius-sm: 0.5333rem;
    --radius-md: 0.8rem;
    --radius-lg: 1.2rem;
    --radius-xl: 1.6rem;
    --radius-full: 9999px;
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout Geometry Tokens (rem-based: 860px / 820px / 270px at the 15px base,
       scale proportionally with the fluid root font on 1080p, 1440p, ultrawide and 4K) */
    --content-max-width: 57.333rem;
    --hero-max-width: 54.667rem;
    --sidebar-width: 18rem;
}

/* Reset & Global Canvas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* FLUID ROOT TYPE SCALE
   15px on phones, tablets and laptops up to 1366x768 (design baseline),
   then grows with the viewport: ~17.8px @1920x1080, ~21px @2560x1440, capped at 26px on 4K.
   The vh term keeps short-but-wide windows (ultrawide / docked browsers) from overflowing vertically.
   Every rem-based size in the design system scales proportionally from this single value. */
html {
    font-size: clamp(15px, calc(min(0.5vw, 1.05vh) + 8.15px), 26px);
}

body {
    font-size: 1rem;
}

/* Modern Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   APPLICATION MASTER LAYOUT
   ========================================================================== */
.app-container {
    display: flex;
    width: 100vw;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-void);
    background-image: var(--gradient-ambient-mesh);
    position: relative;
    overflow: hidden;
}

/* Ambient Radial Glow Elements (Subtle Refero Aesthetic) */
.ambient-glow-1 {
    position: absolute;
    top: -120px;
    left: 20%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.11) 0%, rgba(37, 99, 235, 0.05) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(70px);
}

.ambient-glow-2 {
    position: absolute;
    bottom: -120px;
    right: 15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.09) 0%, rgba(99, 102, 241, 0.04) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(70px);
}

/* ==========================================================================
   SIDEBAR COMPONENT
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width, 270px);
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    z-index: 50;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 45;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-glass-subtle);
}

.sidebar .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.4));
    border: 1px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.1rem;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.sidebar .brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.sidebar .brand-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.btn-mobile-close {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
}

.btn-new-thread {
    margin: 10px 14px 6px 14px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #ffffff;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-new-thread:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(37, 99, 235, 0.18));
    border-color: rgba(56, 189, 248, 0.5);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.sidebar-kbd-hint {
    margin-left: auto;
    font-size: 0.65rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.sidebar-focus-section {
    display: flex;
    flex-direction: column;
    padding-bottom: 4px;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 8px 16px 4px 16px;
}

.focus-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.focus-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.80rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.focus-nav-item i {
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
}

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

.focus-nav-item.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 4px 16px;
}

.thread-count-badge {
    font-size: 0.68rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 10px;
}

.thread-history-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 4px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.thread-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.80rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.thread-item.active {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-weight: 600;
    border-left: 2px solid var(--accent-cyan);
}

.thread-del-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.72rem;
    opacity: 0;
    transition: var(--transition);
}

.thread-item:hover .thread-del-btn {
    opacity: 1;
}

.thread-del-btn:hover {
    color: var(--accent-rose);
}

.sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 10px 12px;
    border-top: 1px solid var(--border-glass-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(3, 7, 18, 0.4);
}

.btn-sidebar-digest {
    width: 100%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04));
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sidebar-digest:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.45);
}

.sidebar-icon-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.btn-icon-footer {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-footer:hover {
    color: #fff;
    background: var(--bg-glass-hover);
}

/* ==========================================================================
   MAIN CONTENT & TOP HEADER
   ========================================================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.top-header {
    height: 54px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 40;
    gap: 16px;
    transition: padding 0.2s ease, height 0.2s ease;
}

.btn-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
}

.mobile-brand-title {
    display: none;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.desktop-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
    gap: 8px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
}

.header-desk-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.22);
    font-size: 0.74rem;
    font-weight: 600;
    color: #38bdf8;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.desk-indicator-dot {
    width: 6px;
    height: 6px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 8px #38bdf8;
    animation: pulseDot 2s infinite ease-in-out;
}

.header-ticker-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 3px 14px;
    cursor: grab;
    user-select: none;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

.header-ticker-group:active {
    cursor: grabbing;
}

.header-ticker-group::-webkit-scrollbar {
    display: none;
}

.ticker-pill {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.ticker-pill:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(56, 189, 248, 0.4);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
}

.ticker-symbol {
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.ticker-val.up {
    color: #34d399;
    font-weight: 600;
}

.ticker-val.down {
    color: #f87171;
    font-weight: 600;
}

.ticker-val.neutral {
    color: var(--accent-cyan);
    font-weight: 600;
}

.header-auth-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-auth-badge {
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    transition: var(--transition);
    user-select: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.auth-tier-free,
.auth-tier-pro {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: inherit;
    color: inherit;
}

.header-auth-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* LIVE HEADER CLOCK COUNTER */
.header-live-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    color: var(--text-secondary);
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.header-live-clock:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
}

.live-clock-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulseDot 2s infinite ease-in-out;
}

.clock-time-mono {
    font-family: var(--font-mono);
    font-weight: 600;
    color: #38bdf8;
    letter-spacing: 0.2px;
}

.btn-header-auth {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: var(--accent-cyan);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: var(--shadow-specular);
}

.btn-header-auth:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.btn-header-auth.logged-in {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.18);
}

.btn-header-auth.logged-in:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   VIEWPORT SCROLL AREA & EMPTY HERO STAGE
   ========================================================================== */
.view-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 280px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* RELATED & FOLLOW-UP SUGGESTED SEARCHES */
.related-questions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    margin-bottom: 24px;
    width: 100%;
}

.related-label {
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 700;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.02em;
    text-transform: none;
}

.related-label i {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.4));
}

.related-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.cortex-followups {
    display: none !important;
}

.related-chip-btn {
    font-family: var(--font-body);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 10px;
    padding: 11px 16px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    width: 100%;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.related-chip-btn:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(56, 189, 248, 0.45);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.18);
}

.related-chip-btn .related-chip-text {
    flex: 1;
}

.related-chip-btn i {
    color: var(--accent-cyan);
    font-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.related-chip-btn:hover i {
    opacity: 1;
    transform: translateX(3px);
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

.empty-hero {
    max-width: var(--hero-max-width, 820px);
    width: 100%;
    margin-top: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInHero 0.5s ease-out;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.18;
    background: var(--gradient-hero-title);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 30px auto;
    line-height: 1.55;
}

.live-status-pill {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent-cyan);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pulse-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

/* SUGGESTED CARDS BENTO GRID (Inspora / Refero Layout) */
.suggested-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    width: 100%;
    margin-top: 10px;
}

.suggested-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    text-align: left;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 125px;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.suggested-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
    opacity: 0;
    transition: all 0.24s ease;
}

.suggested-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -8px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.suggested-card:hover::before {
    opacity: 1;
}

.suggested-card-icon {
    font-size: 1.15rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.22);
    transition: all 0.2s ease;
}

.suggested-card:hover .suggested-card-icon {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.5);
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.suggested-card-title, .suggested-card-text {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.42;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: normal;
    overflow-wrap: break-word;
}

.suggested-card-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   SPOTLIGHT SEARCH COMMAND DOCK (Floating Command Bar)
   ========================================================================== */
.bottom-search-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 30px 24px 20px 24px;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.88) 60%, rgba(3, 7, 18, 0) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 30;
}

.search-box-container {
    background: linear-gradient(180deg, rgba(18, 26, 42, 0.92) 0%, rgba(11, 16, 26, 0.97) 100%);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    padding: 12px 16px 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: var(--content-max-width, 860px);
    width: 100%;
    pointer-events: auto;
    position: relative;
}

.at-mention-menu {
    pointer-events: auto;
}

.search-box-container:focus-within {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 24px 70px -10px rgba(0, 0, 0, 0.95), 0 0 45px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.btn-attach-doc {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.btn-attach-doc:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    color: var(--accent-cyan);
    transform: scale(1.06);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.98rem;
    font-family: var(--font-body);
    line-height: 1.45;
    padding: 6px 4px;
    letter-spacing: -0.01em;
}

.search-input::placeholder {
    color: rgba(148, 163, 184, 0.65);
    font-size: 0.92rem;
}

.submit-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-submit-search {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.btn-submit-search:hover {
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 6px 22px rgba(56, 189, 248, 0.6);
    background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%);
}

.btn-submit-search:active {
    transform: scale(0.96);
}

/* HEAD-TO-HEAD COMPARISON DUAL ROW */
.compare-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-field-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 2px 8px;
}

.compare-pill-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

.compare-pill-badge.tag-a {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-cyan);
}

.compare-pill-badge.tag-b {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-amethyst);
}

.compare-vs-badge {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-dim);
}

/* SEARCH ACTIONS SUB-ROW (Single Unified Line) */
.search-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--border-glass-subtle);
    font-size: 0.78rem;
    flex-wrap: nowrap;
    width: 100%;
}

.effort-picker-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.effort-picker-label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
}

/* SELECT & DROPDOWN HIGH-CONTRAST STYLING */
select,
.chat-effort-select,
.select-input,
#chatModelSelect,
#settingsProviderSelect,
#settingsModelSelect {
    background-color: #090e18 !important;
    color: #f8fafc !important;
    border: 1px solid var(--border-glass) !important;
    outline: none;
    cursor: pointer;
}

.chat-effort-select {
    font-size: 0.74rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.chat-effort-select:hover,
select:hover {
    background-color: #0f172a !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

/* Explicit option styling to completely eliminate browser whiteout */
select option,
.chat-effort-select option,
.select-input option,
optgroup,
option {
    background-color: #060a12 !important;
    color: #f8fafc !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
}

select option:hover,
select option:focus,
select option:checked,
select option:active,
.chat-effort-select option:hover,
.chat-effort-select option:focus,
.chat-effort-select option:checked,
.chat-effort-select option:active,
option:hover,
option:focus,
option:checked,
option:active {
    background-color: #1e293b !important;
    color: #38bdf8 !important;
}

.search-hints-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.hint-prefix {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.hint-tag-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.hint-tag-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: var(--accent-cyan);
}

.watchdog-toggle-container {
    flex-shrink: 0;
    margin-left: auto;
}

.btn-watchdog-toggle {
    background: none;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-watchdog-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.btn-watchdog-toggle.active {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.35);
    color: var(--accent-teal);
}

/* @ MENTION AUTOCOMPLETE MENU */
.at-mention-menu {
    background: #090e18;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(56, 189, 248, 0.18);
    padding: 6px;
    margin-bottom: 8px;
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 100;
    max-width: var(--content-max-width, 860px);
    width: 100%;
}

.at-item, .at-mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}

.at-item:hover, .at-item.active, .at-item.selected,
.at-mention-item:hover, .at-mention-item.active, .at-mention-item.selected {
    background: rgba(56, 189, 248, 0.16) !important;
    color: #ffffff !important;
}

.at-item .at-tag {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.at-item .at-name {
    font-weight: 600;
    color: #f8fafc;
}

.at-item .at-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ==========================================================================
   RESEARCH THREAD & BENTO SYNTHESIS VIEWPORT
   ========================================================================== */
#activeThreadContainer {
    max-width: var(--content-max-width, 860px);
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

.query-thread-block {
    max-width: var(--content-max-width, 860px);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeInHero 0.35s ease-out;
}

.user-query-heading {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.35;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.research-compact-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 8px 12px;
}

.sources-pill-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.sources-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 6px;
}

.source-chips-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.source-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.source-chip:hover {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.source-chip-num {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-all-sources {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-all-sources:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.btn-workflow-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-workflow-pill:hover {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.35);
    color: var(--accent-teal);
}

/* SOURCES EXPANDABLE DRAWER */
.sources-drawer {
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-specular);
    padding: 16px;
    margin-bottom: 12px;
}

.sources-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #f1f5f9;
}

.btn-close-drawer {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
}

.btn-close-drawer:hover {
    color: #ffffff;
}

.sources-drawer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.source-drawer-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
}

.source-drawer-item:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.source-drawer-item-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
}

.source-drawer-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-drawer-item-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* WORKFLOW TIMELINE */
.spark-steps-timeline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
}

.spark-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.spark-step.step-done {
    color: #34d399;
}

.spark-step.step-active {
    color: #38bdf8;
    font-weight: 600;
}

.thread-step-box {
    max-width: var(--content-max-width, 860px);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInHero 0.4s ease-out;
}

.query-title-row {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.4px;
    line-height: 1.3;
}

/* SOURCES HORIZONTAL RIBBON (Refero Card Grid) */
.sources-ribbon-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sources-ribbon-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sources-cards-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.source-ribbon-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    min-width: 190px;
    max-width: 230px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.source-ribbon-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.source-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.source-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.source-card-num {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: auto;
}

/* AI ANSWER MEMO CONTAINER (Specular Bento Box) */
.ai-answer-box {
    background: linear-gradient(180deg, rgba(13, 19, 32, 0.94) 0%, rgba(8, 12, 22, 0.97) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 26px 30px;
    box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    border-left: 3.5px solid var(--accent-cyan);
    transition: border-color 0.2s ease;
}

.ai-answer-content {
    font-size: 0.95rem;
    line-height: 1.78;
    color: #cbd5e1;
}

.ai-answer-content h3 {
    font-family: var(--font-heading);
    font-size: 1.14rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 20px 0 10px 0;
    letter-spacing: -0.01em;
}

.ai-answer-content ul {
    margin: 0 0 16px 20px;
}

.ai-answer-content li {
    margin-bottom: 7px;
}

/* CORTEX DIRECT PRECISION SEARCH TYPOGRAPHY */
.cortex-search-response {
    color: #f1f5f9;
    font-size: 0.96rem;
    line-height: 1.8;
}

.cortex-lead-answer {
    color: #f8fafc;
    font-size: 1.04rem;
    line-height: 1.78;
    margin-bottom: 18px;
    font-weight: 400;
}

.cortex-lead-answer strong {
    color: #ffffff;
    font-weight: 600;
}

.cortex-search-subheading {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 24px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.cortex-subheading-num {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 7px;
    border-radius: 5px;
}

.cortex-search-bullets {
    margin: 0 0 18px 0;
    padding-left: 20px;
    color: #cbd5e1;
    line-height: 1.78;
}

.cortex-search-bullets li {
    margin-bottom: 10px;
}

.cortex-search-bullets strong {
    color: #f8fafc;
    font-weight: 600;
}

.cortex-search-paragraph {
    font-size: 0.96rem;
    color: #cbd5e1;
    line-height: 1.78;
    margin-bottom: 16px;
}

/* CORTEX STRUCTURED TAKEAWAY CARD (Gemini-Grade Visual Hierarchy) */
.cortex-takeaway-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.09) 0%, rgba(15, 23, 42, 0.92) 100%);
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-left: 4px solid var(--accent-amber);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-top: 20px;
    margin-bottom: 8px;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
}

.cortex-takeaway-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fbbf24;
    margin-bottom: 6px;
}

.cortex-takeaway-label i {
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.cortex-takeaway-text {
    font-size: 0.94rem;
    color: #f1f5f9;
    line-height: 1.68;
    margin: 0;
}

.cortex-search-code {
    font-family: var(--font-mono);
    font-size: 0.84em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-cyan);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bento-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-glass-subtle);
}

.bento-section-num {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

.bento-section-title {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 700;
    color: #f8fafc;
}

/* INTERACTIVE CITATION BADGE BUTTON */
.citation-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    vertical-align: baseline;
    margin: 0 2px;
}

.citation-ref:hover {
    background: rgba(56, 189, 248, 0.32);
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.source-chip.source-highlighted,
.source-drawer-item.source-highlighted {
    background: rgba(56, 189, 248, 0.35) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.6) !important;
    transform: translateY(-2px) scale(1.06) !important;
    animation: pulse-source-glow 1.5s ease-in-out infinite alternate !important;
    z-index: 10;
}

@keyframes pulse-source-glow {
    0% { box-shadow: 0 0 8px rgba(56, 189, 248, 0.4); }
    100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.85); }
}

/* INTERACTIVE CITATION PREVIEW POPOVER */
.citation-preview-popover {
    position: fixed;
    z-index: 99999;
    width: 320px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    pointer-events: auto;
    font-family: var(--font-sans);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.citation-preview-popover.visible {
    opacity: 1;
    visibility: visible;
}

.citation-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.72rem;
}

.citation-popover-domain {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #38bdf8;
    font-weight: 600;
}

.citation-popover-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.citation-popover-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.citation-popover-snippet {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.citation-popover-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #38bdf8;
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.citation-popover-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.citation-grounded-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.citation-grounded-passage {
    background: rgba(56, 189, 248, 0.2);
    color: #f8fafc;
    border-bottom: 1.5px solid rgba(56, 189, 248, 0.7);
    border-radius: 2px;
    padding: 1px 3px;
    font-weight: 500;
}

.citation-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* TELEMETRY FOOTER BAR */
.unified-telemetry-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    font-size: 0.76rem;
    flex-wrap: wrap;
    clear: both;
}

.unified-telemetry-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.unified-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
}

.unified-pill.spend {
    color: #34d399;
    font-weight: 600;
    font-family: var(--font-mono);
}

.unified-pill.model {
    color: var(--accent-cyan);
    font-weight: 600;
}

.unified-telemetry-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-memo-action {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-memo-action:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    border-color: var(--border-highlight);
}

/* DYNAMIC SMART FOLLOW-UP CHIPS */
.dynamic-followup-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.dynamic-followup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}

.dynamic-followup-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dynamic-followup-chip:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ==========================================================================
   MODAL COMPONENT & GLASS DIALOGS
   ========================================================================== */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
    animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-box {
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 520px;
    padding: 24px;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass-subtle);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.text-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

.text-input:focus {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border: none;
    color: #fff;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ==========================================================================
   AUTH VAULT SPECIFIC STYLES
   ========================================================================== */
.auth-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin: 12px 0 16px 0;
    font-size: 0.8rem;
}

.auth-status-banner.free {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #e2e8f0;
}

.auth-status-banner.pro {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #e2e8f0;
}

.auth-status-icon {
    font-size: 1.3rem;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.auth-status-banner.pro .auth-status-icon {
    color: #34d399;
}

.auth-status-tier {
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.88rem;
}

.auth-status-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}

.auth-tabs-nav {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    margin-bottom: 14px;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.auth-tab-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.auth-feedback-msg {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-feedback-msg.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    animation: authShake 0.4s ease-in-out;
}

.auth-feedback-msg.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #86efac;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ==========================================================================
   LARGE MONITORS & ULTRAWIDE RESPONSIVE SCALING (27", 33", 34", 4K)
   Handled by the fluid root font-size on <html> plus rem-based layout tokens
   (--content-max-width, --hero-max-width, --sidebar-width). The whole workstation
   scales proportionally, so no per-breakpoint font or width overrides are needed.
   ========================================================================== */

/* 1440px - Standard 2K / 1440p / Large Laptop screens */
@media (min-width: 1440px) {
    :root {
        --content-max-width: 60rem;
    }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Mobile, Tablet, Desktop)
   ========================================================================== */
@media (max-width: 1024px) {
    .suggested-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* Hide desktop-only export, save, and print actions on mobile & tablet screens */
    .btn-memo-action.desktop-only-action,
    .btn-memo-action.btn-studio-ppt,
    .btn-memo-action.btn-studio-doc,
    .btn-memo-action.btn-memo-save,
    .btn-memo-action.btn-memo-export-md,
    .btn-memo-action.btn-memo-print {
        display: none !important;
    }

    .unified-telemetry-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 900px) {
    /* Mobile Form Controls & Prevent iOS Auto-Zoom */
    .search-input,
    .compare-input,
    input[type="text"],
    input[type="password"],
    input[type="file"],
    select {
        font-size: 16px !important; /* Prevents unwanted iOS Safari auto-zoom on focus */
    }

    /* Mobile Sidebar Drawer with Safe Area Insets (iPhone Notch & Home Indicator) */
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: min(300px, 86vw);
        height: 100%;
        height: 100dvh;
        z-index: 1000;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
        border-right: 1px solid var(--border-glass-subtle);
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        padding-top: env(safe-area-inset-top);
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        padding-left: max(0px, env(safe-area-inset-left));
        background: rgba(6, 10, 18, 0.96);
    }
    .sidebar.open, .sidebar.active {
        left: 0;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .btn-mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-glass);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        cursor: pointer;
    }
    .mobile-brand-title {
        display: block;
        font-family: var(--font-heading);
        font-weight: 800;
        font-size: 0.98rem;
        letter-spacing: -0.02em;
        background: linear-gradient(135deg, #38bdf8, #818cf8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .desktop-header-content {
        display: none;
    }

    /* Top Header on Mobile (Safe for Dynamic Island, Notch & Status Bar) */
    .top-header {
        height: auto;
        min-height: 54px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
        gap: 10px;
        box-sizing: border-box;
    }
    .header-auth-container {
        gap: 8px;
    }
    .header-live-clock {
        padding: 3px 8px;
        font-size: 0.72rem;
    }
    #cortexLiveClockDate {
        display: none; /* Keep clean & uncluttered on mobile */
    }
    .btn-header-auth {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* Mobile Master Canvas Boundaries (Eliminates horizontal drift & 50% void) */
    html, body, .app-container, .main-content {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    .ambient-glow-1,
    .ambient-glow-2 {
        display: none !important; /* Prevents 700px invisible overflow */
    }

    /* Scroll Viewport on Mobile: Full-Width Stretch without Flex Center Clipping */
    .view-scroll-area {
        align-items: stretch !important; /* Critical: Prevents CSS flexbox centering data loss */
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        padding-top: 12px;
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: calc(230px + env(safe-area-inset-bottom));
        -webkit-overflow-scrolling: touch;
    }
    .empty-hero {
        padding: 16px 4px 20px 4px;
        max-width: 100%;
        width: 100%;
        margin-top: 2vh;
        box-sizing: border-box;
    }
    .hero-title {
        font-size: 1.55rem;
        line-height: 1.25;
        margin-bottom: 8px;
    }
    .hero-subtitle {
        font-size: 0.84rem;
        margin-bottom: 16px;
    }
    .suggested-cards-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .suggested-card {
        padding: 14px 16px;
        border-radius: 14px;
        min-height: 95px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Floating Spotlight Command Search Dock on Mobile (Safe for Home Swipe Bar) */
    .bottom-search-wrapper {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        padding-top: 10px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 6px));
        background: linear-gradient(to top, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.92) 65%, rgba(3, 7, 18, 0) 100%);
    }
    .search-box-container {
        border-radius: 16px;
        padding: 10px 12px 8px 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .search-input-row {
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    .btn-attach-doc {
        width: 34px;
        height: 34px;
        font-size: 0.86rem;
        flex-shrink: 0;
    }
    .btn-submit-search {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    .search-input {
        font-size: 16px !important;
        padding: 3px 4px;
        min-width: 0;
    }
    .search-actions-row {
        display: flex;
        align-items: center;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
        gap: 6px;
        padding-top: 6px;
        min-width: 0;
    }
    .effort-picker-container {
        font-size: 0.72rem;
    }
    .chat-effort-select {
        font-size: 0.72rem;
        padding: 2px 6px;
    }
    .search-hints-strip {
        display: flex;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
        flex: 1 1 auto;
        min-width: 0 !important; /* Critical for flex item horizontal scroll */
    }
    .search-hints-strip::-webkit-scrollbar {
        display: none;
    }
    .hint-tag-btn {
        padding: 2px 8px;
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .watchdog-toggle-container {
        margin-left: auto;
        flex-shrink: 0;
    }
    .btn-watchdog-toggle {
        font-size: 0.7rem;
        padding: 2px 8px;
        white-space: nowrap;
    }

    /* Bento Research Memo Layout on Mobile: Edge-to-Edge 100% Width */
    #activeThreadContainer {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        align-items: stretch !important;
    }
    .query-thread-block {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
        box-sizing: border-box !important;
        align-items: stretch !important;
    }
    .user-query-heading {
        font-size: 1.15rem;
        line-height: 1.35;
        margin-bottom: 10px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .ai-answer-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 18px 14px;
        border-radius: 14px;
        font-size: 0.92rem;
        line-height: 1.65;
        overflow-x: hidden !important;
    }
    .bento-section-header {
        margin: 18px 0 10px 0;
        gap: 8px;
    }
    .bento-section-title {
        font-size: 1.02rem;
    }
    .source-chips-row {
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        width: 100%;
        box-sizing: border-box;
    }
    .source-chips-row::-webkit-scrollbar {
        display: none;
    }
    .source-chip {
        padding: 4px 8px;
        font-size: 0.72rem;
        flex-shrink: 0;
    }

    /* Mobile Structured Takeaway Card */
    .cortex-takeaway-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 14px 14px !important;
        margin: 16px 0 10px 0 !important;
    }
    .cortex-takeaway-label {
        font-size: 0.78rem;
    }
    .cortex-takeaway-text {
        font-size: 0.88rem;
        line-height: 1.6;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Mobile Unified Telemetry Bar: 2-Column Responsive Action Grid */
    .unified-telemetry-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 10px !important;
        margin-top: 16px !important;
    }
    .unified-telemetry-left {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }
    .unified-pill {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
    .unified-telemetry-actions {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .btn-memo-action {
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 9px 8px !important;
        font-size: 0.74rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
    }
    .btn-memo-action.btn-studio-ppt {
        grid-column: 1 / -1 !important; /* Full width button for slide presentation */
        padding: 10px !important;
        font-weight: 600;
        font-size: 0.78rem !important;
    }

    /* Mobile Follow-up Searches */
    .related-questions-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 16px !important;
    }
    .related-chips {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .related-chip-btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 0.82rem !important;
        padding: 10px 12px !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Modal Layouts on Mobile (Safe for Notches and Viewport Bounds) */
    .modal-backdrop {
        padding: 12px;
        padding-top: max(14px, env(safe-area-inset-top));
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    .modal-box {
        max-width: calc(100vw - 24px) !important;
        margin: auto;
        padding: 18px 14px;
        border-radius: 18px;
        max-height: calc(88dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
    }
    .auth-tabs-nav {
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .auth-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    .auth-tab-btn {
        padding: 6px 10px;
        font-size: 0.76rem;
        flex-shrink: 0;
    }

    /* Studio & Deep Research Mobile Enhancements */
    .cortex-slide-deck-viewer {
        padding: 12px 10px;
        margin: 12px 0;
    }
    .deck-stage {
        aspect-ratio: auto;
        min-height: 290px;
        padding: 16px 14px;
    }
    .slide-title {
        font-size: 1.15rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    .slide-bullet-item {
        font-size: 0.82rem;
        gap: 8px;
    }
    .slide-takeaway-box {
        font-size: 0.74rem;
        padding: 6px 10px;
    }
    .cortex-deliverable-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .cortex-deliverable-tabs > div {
        margin-left: 0 !important;
        display: flex;
        justify-content: stretch;
        gap: 6px;
        width: 100%;
    }
    .btn-deliverable-tab,
    .btn-deck-action {
        width: 100%;
        justify-content: center;
    }
    .whitepaper-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .deep-research-stepper {
        padding: 12px 10px;
    }
    .stepper-stage {
        font-size: 0.76rem;
        padding: 4px 6px;
    }
}

/* ==========================================================================
   PRINT STYLESHEET
   ========================================================================== */
@media print {
    body, .app-container, .main-content {
        background: #ffffff !important;
        color: #0f172a !important;
        height: auto !important;
        overflow: visible !important;
    }
    .sidebar, .top-header, .bottom-search-wrapper, .unified-telemetry-actions, .btn-memo-action {
        display: none !important;
    }
    .view-scroll-area {
        padding: 0 !important;
        overflow: visible !important;
    }
    .ai-answer-box {
        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .ai-answer-content {
        color: #1e293b !important;
    }
    .citation-ref {
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        color: #0284c7 !important;
    }
}

/* ==========================================================================
   TEMPORAL LIMITATION NOTICES & TOKEN CAPACITY BANNERS
   ========================================================================== */
.temporal-limitation-notice {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 16px 0;
    backdrop-filter: blur(8px);
}

.temporal-notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.temporal-timestamp {
    font-size: 0.76rem;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
    margin-left: auto;
}

.temporal-notice-body {
    color: #f1f5f9;
    font-size: 0.88rem;
    line-height: 1.6;
}

.api-limit-error-banner {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 0 18px 0;
    backdrop-filter: blur(8px);
}

.api-limit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fca5a5;
    font-size: 0.96rem;
    margin-bottom: 8px;
}

.api-limit-desc {
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.api-limit-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   EXECUTIVE DAILY DIGEST & BENTO DASHBOARD STYLES
   ========================================================================== */
.digest-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: 4px;
    color: #f1f5f9;
}

.digest-lead-banner {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 18px 22px;
    position: relative;
    overflow: hidden;
}

.digest-lead-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.digest-lead-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 6px;
}

.digest-lead-date {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.digest-lead-headline {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.digest-lead-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

.digest-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.digest-bento-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.digest-bento-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-2px);
}

.digest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

.digest-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.digest-num-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.digest-num-pill.c-cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.digest-num-pill.c-purple { background: rgba(192, 132, 252, 0.15); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.3); }
.digest-num-pill.c-teal { background: rgba(45, 212, 191, 0.15); color: #2dd4bf; border: 1px solid rgba(45, 212, 191, 0.3); }
.digest-num-pill.c-amber { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }

.digest-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* SPARKLINE PILL ROW & SVGs - STRICT COMPACT CONSTRAINTS */
.sparkline-pill-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.sparkline-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sparkline-pill.up {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.08);
}

.sparkline-pill.down {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.08);
}

.sparkline-pill.neutral {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.08);
}

.sparkline-svg {
    width: 28px !important;
    height: 12px !important;
    max-width: 28px !important;
    max-height: 12px !important;
    min-width: 28px !important;
    min-height: 12px !important;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.digest-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.2s ease;
    margin-top: 0;
}

.digest-accordion-body.open {
    max-height: 400px;
    margin-top: 10px;
}

.digest-accordion-body ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.digest-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 8px;
    flex-wrap: wrap;
}

.btn-digest-accordion {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-digest-accordion:hover {
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.btn-digest-deepdive {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-digest-deepdive:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: translateX(2px);
}

.digest-discovery-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 4px;
}

.digest-discovery-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.digest-discovery-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.digest-topic-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.digest-topic-chip:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

/* ==========================================================================
   CORTEX v5.0: AUTONOMOUS DEEP RESEARCH & MULTI-FORMAT COMPUTE STUDIO
   ========================================================================== */

.btn-studio-toggle {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-studio-toggle:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fde68a;
    transform: translateY(-1px);
}

.btn-studio-toggle.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

/* DEEP RESEARCH LIVE MULTI-STAGE STEPPER */
.deep-research-stepper {
    margin: 14px 0 20px 0;
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

.stepper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stepper-stage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stepper-stage {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: #94a3b8;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.stepper-stage.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.09);
    border-color: rgba(56, 189, 248, 0.3);
    font-weight: 600;
}

.stepper-stage.done {
    color: #34d399;
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
}

/* DELIVERABLE TABS SWITCHER */
.cortex-deliverable-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.btn-deliverable-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-deliverable-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

.btn-deliverable-tab.active {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.btn-deliverable-tab.active.deck {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

/* INTERACTIVE SLIDE DECK VIEWER */
.cortex-slide-deck-viewer {
    background: #090e18;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 12px;
    padding: 18px 22px;
    margin: 16px 0;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    position: relative;
}

.deck-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.deck-badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: inline-block;
    margin-bottom: 4px;
}

.deck-main-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
}

.deck-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-deck-action {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-deck-action:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.deck-stage {
    aspect-ratio: 16 / 9;
    min-height: 320px;
    background: linear-gradient(145deg, #0b132b 0%, #060a14 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.slide-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.slide-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #38bdf8;
    margin: 0 0 14px 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.slide-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slide-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.slide-bullet-icon {
    color: #38bdf8;
    font-size: 0.65rem;
    margin-top: 5px;
    flex-shrink: 0;
}

.slide-takeaway-box {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-left: 4px solid #38bdf8;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #7dd3fc;
    font-style: italic;
    margin-top: 6px;
}

.slide-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
    margin-top: 10px;
}

.deck-viewer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-slide-nav {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-slide-nav:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
}

.btn-slide-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.deck-slide-counter {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
    font-family: var(--font-mono);
}

.deck-thumbnails {
    display: flex;
    gap: 6px;
}

.deck-thumb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.deck-thumb-dot.active {
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
    transform: scale(1.2);
}

/* EXECUTIVE WHITEPAPER PRESENTATION STYLES */
.cortex-whitepaper-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.whitepaper-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin: 12px 0 16px 0;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
}

.whitepaper-meta-item {
    font-size: 0.74rem;
    color: #94a3b8;
}

.whitepaper-meta-item strong {
    color: #f1f5f9;
    display: block;
    margin-bottom: 2px;
}

/* BUTTON MEMO ACTIONS FOR PPT & DOCX */
.btn-memo-action.btn-studio-ppt {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.btn-memo-action.btn-studio-ppt:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #ffffff;
}

.btn-memo-action.btn-studio-doc {
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.btn-memo-action.btn-studio-doc:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #ffffff;
}

/* ==========================================================================
   PARALLEL DUAL-ENGINE PIPELINE & COMPARISON CONTAINERS
   ========================================================================== */
.cortex-parallel-container,
.cortex-compare-container {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.parallel-pipeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.parallel-pipeline-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #c084fc;
    letter-spacing: -0.01em;
}

.parallel-flow-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.parallel-step-pill {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.parallel-step-pill.fast {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.parallel-step-pill.deep {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
}

.parallel-status-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(45, 212, 191, 0.15);
    border: 1px solid rgba(45, 212, 191, 0.3);
    color: #2dd4bf;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cortex-compare-header {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.btn-compare-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-compare-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.15);
}

.parallel-pane-split,
.compare-pane-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.compare-split-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.compare-split-card.gemini {
    border-left: 3px solid #38bdf8;
}

.compare-split-card.claude {
    border-left: 3px solid #c084fc;
}

@media (max-width: 768px) {
    .parallel-pane-split,
    .compare-pane-split {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .parallel-pipeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   CORTEX ALL-IN-ONE: CODE SANDBOX, TERMINAL RUNNER & SVG CHART STUDIO
   ========================================================================== */

.cortex-code-sandbox-card {
    margin: 20px 0;
    background: #090d14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cortex-code-sandbox-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(56, 189, 248, 0.12);
}

.cortex-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #111722;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cortex-code-title,
.cortex-code-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #e2e8f0;
}

.cortex-code-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.cortex-code-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-code-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-code-action:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-code-run {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.32));
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
    font-weight: 600;
}

.btn-code-run:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(5, 150, 105, 0.48));
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.65);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-code-run:active {
    transform: scale(0.97);
}

.cortex-code-pre {
    margin: 0;
    padding: 14px 16px;
    background: #0d1117;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

.cortex-code-content {
    color: #e2e8f0;
    white-space: pre;
}

.cortex-code-terminal {
    background: #090d13;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeInSlideDown 0.2s ease forwards;
}

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

.cortex-terminal-head,
.cortex-terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 14px;
    background: #111620;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.cortex-terminal-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
}

.cortex-terminal-time {
    font-size: 11px;
    color: #64748b;
    font-family: var(--font-mono, monospace);
}

.cortex-terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.cortex-terminal-body,
.cortex-terminal-stdout {
    padding: 12px 16px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #38bdf8;
    max-height: 240px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.cortex-terminal-stdout.error {
    color: #f87171;
}

.cortex-terminal-stdout.success {
    color: #34d399;
}

/* SVG Chart Studio */
.cortex-chart-card {
    margin: 18px 0;
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.cortex-chart-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cortex-chart-title svg {
    color: #38bdf8;
}

.cortex-chart-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* Horizontal Bar Chart Rows */
.cortex-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.cortex-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 70px;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
}

.cortex-bar-label {
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cortex-bar-track {
    background: rgba(255, 255, 255, 0.08);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.cortex-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cortex-bar-val {
    color: #94a3b8;
    text-align: right;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
}

/* Slash Commands Menu */
.slash-commands-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 14px;
    width: 340px;
    max-height: 300px;
    background: rgba(13, 19, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    overflow-y: auto;
    z-index: 1000;
    padding: 8px;
    display: none;
    backdrop-filter: blur(24px) saturate(190%);
}

.slash-commands-popup.active {
    display: block;
    animation: fadeInSlideDown 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slash-cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.slash-cmd-item:hover,
.slash-cmd-item.selected {
    background: rgba(56, 189, 248, 0.16);
    transform: translateX(2px);
}

.slash-cmd-badge {
    font-size: 12px;
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 3px 7px;
    border-radius: 5px;
    flex-shrink: 0;
}

.slash-cmd-desc {
    font-size: 12px;
    color: #94a3b8;
}

/* ==========================================================================
   PRODUCTION & REGULATORY SUITE (v6.3.0)
   Above-the-Fold CTA, Sticky Mobile CTA, Loading & Error States,
   Cookie Consent Banner, Legal Layouts & Contact Information
   ========================================================================== */

/* 1. Above-The-Fold Hero CTA */
.hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 18px 0 24px 0;
    width: 100%;
    max-width: 680px;
}

.hero-cta-btn {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #818cf8 100%);
    color: #030712;
    border: none;
    padding: 13px 28px;
    border-radius: 9999px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4), 0 0 40px rgba(56, 189, 248, 0.2);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
}

.hero-cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.6), 0 0 50px rgba(56, 189, 248, 0.3);
    color: #000;
}

.hero-cta-btn:active {
    transform: translateY(0) scale(0.98);
}

.hero-quick-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-action-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
}

.hero-action-pill:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    transform: translateY(-1px);
}

/* 2. Sticky Mobile CTA */
.sticky-mobile-cta {
    display: none;
    position: fixed;
    bottom: 82px;
    right: 16px;
    z-index: 998;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(99, 102, 241, 0.95));
    color: #fff;
    padding: 10px 18px;
    border-radius: 9999px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(12px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-mobile-cta:hover,
.sticky-mobile-cta:active {
    transform: scale(1.04);
}

@media (max-width: 768px) {
    .sticky-mobile-cta {
        display: inline-flex;
    }
}

/* 3. Loading States */
.btn-submit-search.is-loading {
    pointer-events: none;
    position: relative;
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: rgba(56, 189, 248, 0.5) !important;
}

.btn-submit-search.is-loading i {
    opacity: 0;
}

.btn-submit-search.is-loading::after {
    content: '';
    position: absolute;
    top: calc(50% - 9px);
    left: calc(50% - 9px);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spinLoader 0.75s infinite linear;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: shimmerSlide 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmerSlide {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 4. Form Error States */
.search-box-container.has-error,
.text-input.has-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.35) !important;
    animation: shakeError 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeError {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.form-error-feedback {
    display: none;
    color: #f87171;
    font-size: 0.76rem;
    font-weight: 500;
    margin-top: 6px;
    align-items: center;
    gap: 6px;
}

.form-error-feedback.active {
    display: flex;
}

/* 5. Cookie Consent Banner (Bottom-Right Non-Intrusive Toast) */
.cookie-consent-banner {
    position: fixed;
    bottom: 96px;
    right: 24px;
    left: auto;
    transform: translateY(180%);
    max-width: 360px;
    width: calc(100% - 48px);
    background: rgba(13, 19, 34, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cookie-consent-header h4 {
    font-size: 0.92rem;
    color: #f1f5f9;
    margin: 0;
}

.cookie-consent-text {
    font-size: 0.80rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0 0 14px 0;
}

.cookie-consent-text a {
    color: #38bdf8;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cookie-accept {
    background: #0284c7;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
}

.btn-cookie-accept:hover {
    background: #0369a1;
}

.btn-cookie-reject {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-cookie-reject:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* 6. Standalone Secondary & Legal Pages (Privacy, Terms, Thank You, 404) */
html.legal-html,
html:has(body.legal-page-body),
body.legal-page-body {
    position: static !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100% !important;
    width: 100% !important;
    display: block !important;
    background: #030712 !important;
}

.legal-page-wrapper {
    min-height: 100vh;
    width: 100%;
    background: #030712;
    background-image: radial-gradient(circle at 50% -20%, rgba(56, 189, 248, 0.12) 0%, transparent 60%), radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    display: flex;
    justify-content: center;
    padding: 40px 24px 80px 24px;
    box-sizing: border-box;
}

.legal-container {
    display: flex !important;
    flex-direction: column !important;
    max-width: 860px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.legal-header {
    width: 100% !important;
    display: block !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.legal-nav-content {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

.legal-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
}

.legal-brand-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(37, 99, 235, 0.45)) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #38bdf8 !important;
    font-size: 1.25rem !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25) !important;
}

.legal-brand-text {
    display: flex !important;
    flex-direction: column !important;
}

.legal-brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.legal-brand-tag {
    font-size: 0.72rem !important;
    color: #38bdf8 !important;
    font-family: 'JetBrains Mono', monospace !important;
    letter-spacing: 0.04em !important;
}

.btn-legal-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    backdrop-filter: blur(8px) !important;
}

.btn-legal-back:hover {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
    transform: translateX(-2px) !important;
}

.legal-content-card {
    width: 100% !important;
    display: block !important;
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 18px !important;
    padding: 40px 36px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    box-sizing: border-box !important;
}

.legal-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    padding: 5px 12px !important;
    border-radius: 9999px !important;
    margin-bottom: 16px !important;
}

.legal-title {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: #f8fafc !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.02em !important;
}

.legal-subtitle {
    font-size: 0.88rem !important;
    color: #94a3b8 !important;
    margin: 0 0 32px 0 !important;
}

.legal-section {
    margin-bottom: 28px !important;
}

.legal-section h2 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    margin: 0 0 12px 0 !important;
}

.legal-section p {
    font-size: 0.92rem !important;
    line-height: 1.75 !important;
    color: #cbd5e1 !important;
    margin: 0 0 14px 0 !important;
}

.legal-section ul {
    margin: 0 0 16px 20px !important;
    padding: 0 !important;
    font-size: 0.90rem !important;
    line-height: 1.75 !important;
    color: #cbd5e1 !important;
}

.legal-section li {
    margin-bottom: 8px !important;
}

.contact-card {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 18px 22px !important;
    margin: 16px 0 !important;
    font-size: 0.88rem !important;
    line-height: 1.7 !important;
}

.contact-card p {
    margin: 4px 0 !important;
}

.legal-footer-nav {
    display: flex !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    margin-top: 40px !important;
    padding-top: 24px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    font-size: 0.88rem !important;
}

.legal-footer-nav a {
    color: #38bdf8 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: color 0.15s !important;
}

.legal-footer-nav a:hover {
    color: #7dd3fc !important;
    text-decoration: underline !important;
}

@media (max-width: 640px) {
    .legal-page-wrapper {
        padding: 20px 14px 60px 14px !important;
    }
    .legal-nav-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    .btn-legal-back {
        width: 100% !important;
        justify-content: center !important;
    }
    .legal-content-card {
        padding: 24px 16px !important;
        border-radius: 14px !important;
    }
    .legal-title {
        font-size: 1.65rem !important;
    }
}

/* 7. Application Site Footer */
.app-site-footer {
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(3, 7, 18, 0.6);
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-legal-links a:hover {
    color: #38bdf8;
}

/* ==========================================================================
   8. EXECUTIVE BENTO-GRID UI & MASTER WORKSPACE DESIGN
   ========================================================================== */

/* Brand Title in Sidebar */
.brand-title-cortex {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #f8fafc;
    background: linear-gradient(135deg, #ffffff 40%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Header Brand Badge - Hidden on Desktop to eliminate redundant brand logo beside sidebar */
.header-brand-badge {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .header-brand-badge {
        display: flex;
    }
}

.header-brand-badge:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}

.header-brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.header-brand-sub {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Top Header Customizations */
.top-header {
    height: 54px !important;
    padding: 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(3, 7, 18, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    gap: 14px !important;
    z-index: 50 !important;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-section-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #f1f5f9;
}

/* Integrated Header Search Bar */
.header-search-bar {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 7px 14px;
    cursor: text;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.header-search-bar:hover {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(15, 23, 42, 0.85);
}

.header-search-bar:focus-within {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.22), inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.header-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 0.84rem;
    font-family: var(--font-body);
}

.header-search-bar input::placeholder {
    color: #64748b;
}

.search-kbd-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 0.68rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.92rem;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-icon-action:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.header-alert-indicator {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
}

/* Master Bento Grid Viewport */
.bento-dashboard-view {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 28px 40px 28px;
    box-sizing: border-box;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 22px;
    align-items: start;
    width: 100%;
}

.bento-right-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Bento Glass Card */
.bento-card {
    background: rgba(13, 19, 34, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    padding: 24px 26px;
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.65), 0 0 35px rgba(56, 189, 248, 0.09);
}

.bento-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.bento-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.16rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
    margin: 0;
}

.bento-card-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    margin: 3px 0 0 0;
}

.bento-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-bento-scan {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.35));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #ffffff;
    padding: 7px 15px;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

.btn-bento-scan:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(14, 165, 233, 0.5));
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.38);
    transform: translateY(-1px);
}

.bento-icon-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    padding: 5px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s;
}

.bento-icon-btn:hover {
    color: #38bdf8;
}

/* Stat Chips Row */
.bento-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.bento-stat-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 14px;
}

.bento-stat-icon {
    font-size: 1.15rem;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-stat-meta {
    display: flex;
    flex-direction: column;
}

.bento-stat-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.bento-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

/* SVG Chart Container */
.bento-chart-container {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.bento-chart-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
}

.bento-svg-chart {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.chart-callout-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(3, 7, 18, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 7px;
    padding: 4px 9px;
    font-size: 0.72rem;
    color: #e2e8f0;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 5;
}

.callout-nasdaq {
    top: 54px;
    left: 48%;
}

.callout-ai {
    top: 24px;
    right: 14%;
}

/* Citations Footer Strip */
.bento-citations-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-wrap: wrap;
    gap: 12px;
}

.bento-citations-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
}

.bento-citation-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bento-citation-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: #38bdf8;
    font-size: 0.76rem;
    font-weight: 500;
    border-radius: 8px;
    padding: 5px 11px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-citation-pill:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.bento-citation-pill .citation-num {
    color: #7dd3fc;
    margin-right: 2px;
    font-family: 'JetBrains Mono', monospace;
}

/* Top Insights List */
.bento-insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bento-insight-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 11px 15px;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    text-align: left;
}

.bento-insight-item:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateX(3px);
}

.bento-insight-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.insight-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.insight-name {
    font-size: 0.86rem;
    font-weight: 600;
}

.insight-trend-icon {
    font-size: 0.88rem;
    opacity: 0.8;
    transition: transform 0.2s;
}

.bento-insight-item:hover .insight-trend-icon {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* Active Projects Card */
.bento-project-progress {
    margin-bottom: 16px;
}

.project-progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.project-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #a855f7);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.bento-agent-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.agent-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.25));
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 1.1rem;
}

.agent-info {
    display: flex;
    flex-direction: column;
}

.agent-name-role {
    font-size: 0.84rem;
    color: #f8fafc;
}

.agent-name {
    font-weight: 700;
}

.agent-role-sep {
    color: #475569;
    margin: 0 4px;
}

.agent-role {
    color: #94a3b8;
    font-weight: 500;
}

.agent-status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #38bdf8;
}

.status-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.bento-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bento-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transition: all 0.2s;
}

.bento-dot.active {
    background: #38bdf8;
    width: 18px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* Return to Dashboard Button in Active Thread */
.btn-return-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.80rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.btn-return-dashboard:hover {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
}

/* Responsive Breakpoints for Bento Grid */
@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .header-search-bar {
        max-width: 360px;
    }
}

@media (max-width: 768px) {
    .top-header {
        height: auto !important;
        padding: 10px 16px !important;
        flex-wrap: wrap;
    }
    .header-search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 4px;
    }
    .bento-dashboard-view {
        padding: 14px 12px 30px 12px;
    }
    .bento-stats-row {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }
    .bento-card {
        padding: 18px 16px;
    }
    .bento-chart-wrapper {
        height: 190px;
    }
}

/* ==========================================================================
   PURE AI SEARCH WORKSTATION HERO DESIGN
   ========================================================================== */

.pure-search-hero-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 16px 12px 16px;
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
}

.search-hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: var(--content-max-width, 860px);
    text-align: center;
    margin-top: 0;
    padding-top: 0;
}

.hero-badge-row {
    margin-top: 0;
    margin-bottom: 6px;
}

.hero-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pure-search-hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: clamp(4px, 0.8vh, 8px);
    background: linear-gradient(135deg, #ffffff 40%, #bae6fd 80%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pure-search-hero-subtitle {
    font-size: clamp(0.78rem, 1vw, 0.90rem);
    color: #94a3b8;
    line-height: 1.4;
    max-width: 620px;
    margin-bottom: clamp(6px, 1.2vh, 12px);
}

/* In-line Focus Desk Pills */
.hero-focus-desk-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.hero-desk-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: all 0.18s ease;
}

.hero-desk-pill:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.hero-desk-pill.active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.38);
    font-weight: 600;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

/* Primary Hero Research CTA Button (Above the Fold) */
.btn-hero-start-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #ffffff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.15);
}

.btn-hero-start-cta:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.26) 0%, rgba(37, 99, 235, 0.22) 100%);
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

/* Trending Research Section */
.trending-research-section {
    margin-top: 2px;
    width: 100%;
    text-align: left;
}

.trending-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 2px;
}

.trending-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-refresh-trends {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #9cb0c9;
    padding: 4px 11px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-refresh-trends:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    transform: translateY(-1px);
}

.btn-refresh-trends i.spinning {
    animation: spinRefresh 0.7s linear infinite;
}

@keyframes spinRefresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.trending-refresh-hint {
    font-size: 0.72rem;
    color: #72849c;
}

.trending-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trending-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0%, rgba(18, 26, 42, 0.75) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.trending-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.45);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.10) 0%, rgba(24, 34, 53, 0.85) 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(56, 189, 248, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.trending-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trending-card-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.03em;
}

.trending-card-tag.tag-finance {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.trending-card-tag.tag-ai {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.trending-card-tag.tag-tech {
    background: rgba(20, 184, 166, 0.12);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.25);
}

.trending-card-tag.tag-strategy {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.trending-arrow {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.2s, color 0.2s;
}

.trending-card:hover .trending-arrow {
    color: #38bdf8;
    transform: translateX(3px);
}

.trending-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.trending-card-meta {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .pure-search-hero-view {
        padding: 14px 12px 20px 12px;
    }
    .pure-search-hero-title {
        font-size: 1.7rem;
    }
    .trending-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   EXECUTIVE BENTO-GRID UI & WORKSPACE DESIGN
   ========================================================================== */

.bento-dashboard-view {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 6px 16px 2px 16px;
    box-sizing: border-box;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.bento-right-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Bento Glass Card */
.bento-card {
    background: rgba(13, 19, 34, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 13px 16px;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(56, 189, 248, 0.08);
}

.bento-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.bento-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
    margin: 0;
}

.bento-card-subtitle {
    font-size: 0.7rem;
    color: #64748b;
    margin: 1px 0 0 0;
}

.bento-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bento-icon-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.86rem;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s;
}

.bento-icon-btn:hover {
    color: #38bdf8;
}

/* Stat Chips Row */
.bento-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.bento-stat-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 5px 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bento-stat-chip:hover {
    background: rgba(56, 189, 248, 0.06);
    border-color: rgba(56, 189, 248, 0.25);
}

.bento-stat-icon {
    font-size: 0.9rem;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-stat-meta {
    display: flex;
    flex-direction: column;
}

.bento-stat-label {
    font-size: 0.64rem;
    color: #94a3b8;
    font-weight: 500;
}

.bento-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

/* SVG Chart Container */
.bento-chart-container {
    position: relative;
    width: 100%;
    margin-bottom: 6px;
    flex: 1 1 auto;
}

.bento-chart-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
}

.bento-svg-chart {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.chart-callout-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(3, 7, 18, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.65rem;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.chart-callout-badge.callout-nasdaq {
    top: 48%;
    left: 45%;
}

.chart-callout-badge.callout-ai {
    top: 14%;
    right: 22%;
}

/* Citations Footer Strip */
.bento-citations-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 6px;
}

.bento-citations-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #cbd5e1;
}

.bento-citation-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bento-citation-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    font-size: 0.68rem;
    font-weight: 500;
    border-radius: 6px;
    padding: 2px 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bento-citation-pill:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
}

.bento-citation-pill .citation-num {
    color: #7dd3fc;
    margin-right: 2px;
    font-family: 'JetBrains Mono', monospace;
}

/* Top Insights List */
.bento-insights-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bento-insight-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 6px 9px;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
}

.bento-insight-item:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateX(2px);
}

.bento-insight-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-icon-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.insight-name {
    font-size: 0.76rem;
    font-weight: 500;
}

.insight-trend-icon {
    font-size: 0.72rem;
    opacity: 0.7;
    transition: all 0.15s;
}

.bento-insight-item:hover .insight-trend-icon {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* Active Projects Card */
.bento-project-progress {
    margin-bottom: 8px;
}

.project-progress-bar {
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.project-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #a855f7);
}

.bento-agent-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 6px 9px;
    margin-bottom: 6px;
}

.agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 0.8rem;
}

.agent-name-role {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
}

.agent-name {
    color: #f1f5f9;
}

.agent-role-sep {
    color: #475569;
}

.agent-role {
    color: #94a3b8;
}

.agent-status-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.66rem;
    color: #34d399;
}

.bento-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bento-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transition: all 0.2s;
}

.bento-dot.active {
    background: #38bdf8;
    width: 12px;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   HERO MODE & ZERO-SCROLL RESPONSIVE SINGLE-SCREEN WORKSTATION
   ========================================================================== */

.main-content.hero-mode,
.main-content:has(#emptyHeroView:not([style*="display: none"])) {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.main-content.hero-mode .view-scroll-area,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .view-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: center;
    padding: clamp(2.4rem, 5.5vh, 3.8667rem) 1.0667rem 0.5333rem 1.0667rem !important;
    box-sizing: border-box;
}

.main-content.hero-mode .pure-search-hero-view,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .pure-search-hero-view {
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: var(--content-max-width, 860px);
    width: 100%;
}

.main-content.hero-mode .bottom-search-wrapper,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .bottom-search-wrapper {
    flex-shrink: 0;
    max-width: calc(var(--content-max-width, 860px) + 2.1333rem);
    width: 100%;
    margin: 0.1333rem auto 0.2667rem auto;
    padding: 0 1.0667rem;
    z-index: 40;
}

.main-content.hero-mode .trending-cards-grid,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .trending-cards-grid {
    gap: clamp(0.2667rem, 0.8vh, 0.5333rem);
}

.main-content.hero-mode .trending-card,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .trending-card {
    padding: clamp(0.4rem, 1vh, 0.6667rem) 0.8rem;
    gap: 0.2667rem;
}

.main-content.hero-mode .trending-card-title,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .trending-card-title {
    font-size: 0.82rem;
    line-height: 1.35;
}

.main-content.hero-mode .trending-card-meta,
.main-content:has(#emptyHeroView:not([style*="display: none"])) .trending-card-meta {
    font-size: 0.68rem;
}

/* Footer in Hero Mode */
.hero-mode .app-site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2667rem 1.0667rem;
    font-size: 0.67rem;
    color: #64748b;
    margin: 0 auto;
    flex-shrink: 0;
    max-width: calc(var(--content-max-width, 860px) + 2.1333rem);
    width: 100%;
    box-sizing: border-box;
}

.hero-mode .app-site-footer a {
    color: #38bdf8;
    text-decoration: none;
}

.hero-mode .footer-legal-links {
    display: flex;
    gap: 12px;
}

/* Responsive Breakpoints for Bento Grid */
@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-chart-wrapper {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .bento-dashboard-view {
        padding: 8px 10px 14px 10px;
    }
    .bento-stats-row {
        grid-template-columns: repeat(1, 1fr);
        gap: 6px;
    }
    .bento-card {
        padding: 12px 14px;
    }
    .bento-chart-wrapper {
        height: 140px;
    }
    .hero-mode .app-site-footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* Responsive adjustments for compact height viewports */
@media (max-height: 720px) {
    .main-content.hero-mode,
    .main-content:has(#emptyHeroView:not([style*="display: none"])) {
        overflow-y: hidden;
    }
    .main-content.hero-mode .view-scroll-area,
    .main-content:has(#emptyHeroView:not([style*="display: none"])) .view-scroll-area {
        justify-content: flex-start !important;
        padding: 10px 16px 4px 16px !important;
    }
    .pure-search-hero-title {
        font-size: 1.65rem !important;
        margin-bottom: 3px !important;
    }
    .pure-search-hero-subtitle {
        font-size: 0.78rem !important;
        margin-bottom: 6px !important;
    }
    .main-content.hero-mode .trending-card-title,
    .main-content:has(#emptyHeroView:not([style*="display: none"])) .trending-card-title {
        font-size: 0.76rem !important;
    }
    .main-content.hero-mode .trending-card-meta,
    .main-content:has(#emptyHeroView:not([style*="display: none"])) .trending-card-meta {
        font-size: 0.64rem !important;
    }
    .main-content.hero-mode .bottom-search-wrapper,
    .main-content:has(#emptyHeroView:not([style*="display: none"])) .bottom-search-wrapper {
        margin: 2px auto 2px auto !important;
    }
}

/* ==========================================================================
   DESKTOP FLUID SCALING LAYER (>= 901px)
   Converts the remaining fixed-px chrome (sidebar, header, hero cards, search dock,
   privacy toast) into rem equivalents (px / 15). At the 15px baseline these values are
   pixel-identical to the original design; on 1080p, 1440p, ultrawide and 4K monitors they
   scale together with the fluid root font so the workstation never looks tiny.
   Mobile & tablet (<= 900px) layouts are intentionally untouched.
   Pure presentation layer: no impact on retrieval, ranking or synthesis logic.
   ========================================================================== */
@media (min-width: 901px) {
    /* Sidebar */
    .sidebar .brand { gap: 0.8rem; padding: 1.2rem 1.3333rem; }
    .sidebar .brand-icon { width: 2.4rem; height: 2.4rem; border-radius: 0.6667rem; }
    .btn-new-thread { margin: 0.6667rem 0.9333rem 0.4rem 0.9333rem; padding: 0.6rem 0.8rem; gap: 0.6rem; }
    .sidebar-kbd-hint { padding: 0.1333rem 0.4rem; border-radius: 0.2667rem; }
    .sidebar-section-title { padding: 0.5333rem 1.0667rem 0.2667rem 1.0667rem; }
    .focus-nav { gap: 0.1333rem; padding: 0 0.6667rem; }
    .focus-nav-item { gap: 0.6rem; padding: 0.4rem 0.6667rem; }
    .focus-nav-item i { width: 1.0667rem; }
    .sidebar-section-header { padding: 0.6667rem 1.0667rem 0.2667rem 1.0667rem; }
    .thread-count-badge { padding: 0.1333rem 0.4rem; }
    .thread-history-list { padding: 0.2667rem 0.6667rem; gap: 0.2rem; }
    .thread-item { padding: 0.4667rem 0.6667rem; }
    .sidebar-footer { padding: 0.6667rem 0.8rem; gap: 0.5333rem; }
    .btn-sidebar-digest { padding: 0.5333rem 0.8rem; gap: 0.5333rem; }
    .btn-icon-footer { padding: 0.5333rem; }

    /* Top header & live telemetry strip */
    .top-header { height: 3.6rem !important; padding: 0 1.2rem !important; gap: 0.9333rem !important; }
    .header-ticker-group { gap: 0.5333rem; }
    .ticker-pill,
    .header-live-clock { padding: 0.3333rem 0.8rem; gap: 0.4667rem; }
    .header-right-actions { gap: 0.6667rem; }
    .header-icon-action { width: 2.4rem; height: 2.4rem; border-radius: 0.6667rem; }
    .header-alert-indicator { top: 0.4667rem; right: 0.4667rem; width: 0.4rem; height: 0.4rem; }
    .btn-header-auth { padding: 0.4rem 0.9333rem; gap: 0.4rem; }
    .live-clock-dot,
    .desk-indicator-dot { width: 0.4rem; height: 0.4rem; }

    /* Hero stage & trending research cards */
    .pure-search-hero-subtitle { max-width: 41.3333rem; }
    .hero-badge-row { margin-bottom: 0.4rem; }
    .hero-live-pill { padding: 0.2667rem 0.8rem; gap: 0.5333rem; border-radius: 1.3333rem; }
    .trending-header-row { margin-bottom: 0.6667rem; }
    .trending-section-label { gap: 0.5333rem; }
    .trending-card { border-radius: 0.9333rem; }
    .trending-card-tag { padding: 0.1333rem 0.4667rem; border-radius: 0.4rem; gap: 0.3333rem; }

    /* Spotlight search dock */
    .search-box-container { padding: 0.8rem 1.0667rem 0.6667rem 1.0667rem; gap: 0.5333rem; }
    .search-input-row { gap: 0.8rem; }
    .btn-attach-doc,
    .btn-submit-search { width: 2.5333rem; height: 2.5333rem; }
    .search-input { padding: 0.4rem 0.2667rem; }
    .search-actions-row { gap: 0.5333rem; padding-top: 0.4rem; }
    .search-hints-strip { gap: 0.4rem; }
    .hint-tag-btn { padding: 0.1333rem 0.4667rem; }
    .btn-watchdog-toggle { padding: 0.2rem 0.5333rem; gap: 0.3333rem; }
    .at-mention-menu { max-height: 16rem; }

    /* Privacy toast */
    .cookie-consent-banner { max-width: 24rem; padding: 1.0667rem 1.2rem; border-radius: 1.0667rem; right: 1.6rem; bottom: 6.4rem; }
    .btn-cookie-accept { padding: 0.4667rem 1.0667rem; }
}

/* ==========================================================================
   AUTONOMOUS RESEARCH & INTELLIGENCE MONITORING BOT STUDIO STYLES
   ========================================================================== */
.autonomous-bot-modal-box {
    max-width: 840px !important;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 22px 24px 18px 24px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(56, 189, 248, 0.1);
}

.bot-modal-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.bot-modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 12px;
}

.bot-control-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bot-status-container, .bot-frequency-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bot-control-label {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
}

.bot-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bot-status-pill.active {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
}

.bot-status-pill.paused {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.bot-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
    position: relative;
}

.bot-status-pill.active .bot-pulse-dot {
    box-shadow: 0 0 10px #34d399;
    animation: botPulse 1.8s infinite;
}

@keyframes botPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 14px #34d399; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-bot-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-bot-toggle:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.btn-bot-toggle.active {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.bot-select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.80rem;
    outline: none;
    cursor: pointer;
}

.bot-select:focus {
    border-color: #38bdf8;
}

.btn-run-cycle {
    padding: 6px 14px;
    font-size: 0.80rem;
    font-weight: 600;
    border-radius: 6px;
    gap: 6px;
    display: inline-flex;
    align-items: center;
}

.bot-tabs-bar {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

.bot-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}

.bot-tab-btn:hover {
    color: #e2e8f0;
}

.bot-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

.bot-tab-pane {
    display: none;
    animation: fadeInModal 0.2s ease;
}

.bot-tab-pane.active {
    display: block;
}

.bot-pane-desc {
    font-size: 0.80rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.bot-add-topic-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
}

.bot-input-field {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    outline: none;
    flex: 1;
    min-width: 140px;
}

.bot-input-field.flex-2 {
    flex: 2;
    min-width: 220px;
}

.bot-input-field:focus {
    border-color: #38bdf8;
}

.bot-topics-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 44vh;
    overflow-y: auto;
    padding-right: 2px;
}

.bot-topic-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.bot-topic-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(56, 189, 248, 0.3);
}

.bot-topic-info {
    flex: 1;
    min-width: 0;
}

.bot-topic-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.bot-topic-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.bot-topic-category-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.bot-topic-query {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bot-topic-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-topic-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 0.74rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-topic-action:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
}

.btn-topic-action.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

/* EXECUTIVE BRIEFS VAULT & CARDS */
.bot-vault-toolbar, .bot-logs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
}

.bot-briefs-vault-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 4px;
}

.cortex-brief-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cortex-brief-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.brief-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.brief-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.brief-meta {
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brief-sources-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 7px;
    border-radius: 12px;
    color: #cbd5e1;
}

.brief-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.brief-thesis-box {
    background: rgba(56, 189, 248, 0.07);
    border-left: 3px solid #38bdf8;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.thesis-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #38bdf8;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.thesis-text {
    font-size: 0.84rem;
    line-height: 1.55;
    color: #e2e8f0;
    margin: 0;
}

.brief-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.brief-pillar-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    gap: 10px;
}

.pillar-num {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    font-weight: 800;
    color: #38bdf8;
    padding-top: 1px;
}

.pillar-content {
    flex: 1;
}

.pillar-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 4px 0;
}

.pillar-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94a3b8;
    margin: 0 0 6px 0;
}

.pillar-metric-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.70rem;
}

.metric-val {
    font-weight: 700;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    padding: 1px 5px;
    border-radius: 3px;
}

.metric-conf {
    color: #64748b;
    font-style: italic;
}

.brief-sources-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
    margin-top: 4px;
}

.sources-label {
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sources-pill-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.brief-source-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 2px 7px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.70rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s ease;
}

.brief-source-chip:hover {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.08);
}

.brief-card-actions-strip {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* TERMINAL & TELEMETRY LOGS */
.bot-terminal-container {
    background: #030712;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px;
    max-height: 45vh;
    overflow-y: auto;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-line {
    display: flex;
    gap: 8px;
    line-height: 1.5;
}

.log-time {
    color: #64748b;
    flex-shrink: 0;
}

.log-level {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    padding: 0 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.log-level.info { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.log-level.warn { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.log-level.error { color: #f87171; background: rgba(239, 68, 68, 0.15); }

.log-msg {
    color: #e2e8f0;
    word-break: break-word;
}

/* SIDEBAR & HEADER INDICATORS */
.btn-sidebar-bot {
    position: relative;
    justify-content: space-between;
}

.bot-status-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    margin-left: auto;
}

.bot-status-indicator-dot.active {
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: botPulse 2s infinite;
}

.header-bot-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    display: none;
}

.header-bot-dot.active {
    display: block;
    animation: botPulse 2s infinite;
}


