/* ==========================================================================
   Locally Hosted — Modern Site Styles
   Dark theme with purple/indigo accents, glassmorphism, animated gradients
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Core palette */
    --primary: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #4f46e5;
    --accent: #f472b6;
    --accent-secondary: #06b6d4;
    --success: #34d399;
    --warning: #fbbf24;
    
    /* Surface layers (deep dark) */
    --bg: #030308;
    --bg-elevated: #0a0a14;
    --surface: #111125;
    --surface-hover: #1a1a35;
    --surface-dark: #0a0a18;
    --border: #1e1e3a;
    --border-hover: #2a2a50;
    
    /* Typography */
    --ink: #e2e8f0;
    --ink-light: #94a3b8;
    --ink-muted: #64748b;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Layout */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(129,140,248,0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

::selection {
    background: rgba(129, 140, 248, 0.3);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Animated Background --- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(129,140,248,0.3), transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244,114,182,0.2), transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
    text-align: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: var(--space-lg);
    animation: fadeInDown 0.6s ease-out;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-title-line {
    display: block;
    color: var(--ink-light);
    font-weight: 400;
}

.hero-title-gradient {
    display: block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* Title sweep/pulse effect */
.hero-title-gradient::before {
    content: ""; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 60%; 
    height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); 
    mix-blend-mode: overlay; 
    animation: textSweep 4s ease-in-out infinite; 
}

.hero-title-gradient {
    position: relative; 
    display: inline-block; 
}

@keyframes textSweep {
    0%, 100% { left: -100%; opacity: 0; } 
    10%, 90% { opacity: 1; } 
    50% { left: 150%; } 
}

.hero-description {
    font-size: 1.15rem;
    color: var(--ink-light);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(17, 17, 37, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-xs);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* --- Controls Bar (Search + Filters) --- */
.controls-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-lg);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

/* --- Hero Agent Section --- */
.hero-agent {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-agent .hero-content {
    max-width: 700px;
    width: 100%;
}

.hero-agent .hero-badge {
    margin-bottom: var(--space-md);
}

.hero-agent .hero-title-line {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

.hero-agent .hero-description {
    font-size: 1.1rem;
    color: var(--ink-light);
    max-width: 500px;
    margin: var(--space-sm) auto var(--space-xl);
}

/* Agent prompt container */
.agent-prompt-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.agent-prompt-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    color: var(--ink-light);
    margin-bottom: var(--space-md);
}

.agent-prompt-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Futuristic progress bar */
.agent-prompt-progress {
    width: 100%;
    margin-top: var(--space-sm);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar.futuristic .fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--primary-light) 30%, 
        rgba(255, 255, 255, 0.9) 50%, 
        var(--primary-light) 70%, 
        var(--primary) 100%
    );
    background-size: 200% 100%;
    border-radius: 3px;
    animation: futuristicSweep 2s ease-in-out infinite;
    box-shadow: 
        0 0 10px var(--primary-light),
        0 0 20px rgba(129, 140, 248, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes futuristicSweep {
    0% {
        background-position: -200% 0;
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        background-position: 200% 0;
        opacity: 0.6;
    }
}

/* Panel loading overlay */
.ai-agent-loading {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.ai-agent-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.ai-agent-loading p {
    font-size: 13px;
    color: var(--ink-light);
    text-align: center;
}

.ai-agent-loading .progress-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.ai-agent-loading .progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: width 0.3s;
}

.ai-agent-config span.success {
    color: var(--success);
}

/* Hero agent input */
.agent-prompt-input-row {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    backdrop-filter: blur(10px);
}

.agent-prompt-input-row:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.agent-prompt-icon {
    flex-shrink: 0;
    color: var(--ink-light);
}

.hero-agent-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 200px;
    line-height: 1.5;
}

.hero-agent-input::placeholder {
    color: var(--ink-muted);
}

.hero-agent-input:disabled {
    color: var(--ink-muted);
    cursor: not-allowed;
}

.hero-agent-send {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), opacity var(--transition-fast);
}

.hero-agent-send:hover {
    background: var(--primary-dark);
}

.hero-agent-send:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* === Hero chat thread (shown after model loads) === */
/* == AI Agent Hero (unified chat UI) == */
.agent-chat-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 300px;
}

.agent-chat-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.agent-chat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 6px 16px;
    background: var(--surface);
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.agent-chat-label {
    color: var(--ink-light);
    font-weight: 500;
}

.agent-chat-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

.model-badge {
    padding: 4px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--ink-light);
    font-family: monospace;
}

.agent-chat-progress {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Chat message area — full width */
.agent-chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    min-height: 150px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    width: 100%;
}

.agent-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.agent-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.agent-chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Message bubbles */
.chat-message {
    display: flex;
    gap: 10px;
    max-width: 90%;
    animation: message-in 0.25s ease-out;
}

.chat-message.user {
    align-self: flex-end;
}
.chat-message.assistant {
    align-self: flex-start;
}

.chat-avatar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.chat-message.user .chat-avatar {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}
.chat-message.assistant .chat-avatar {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-bubble code {
    background: rgba(139, 92, 246, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.chat-bubble pre {
    background: rgba(15, 15, 20, 0.8);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.chat-bubble pre code {
    background: none;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.chat-bubble strong {
    color: #a78bfa;
}

/* Typing indicator */
.typing-bubble {
    max-width: 60px;
}
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}
.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: typing-bounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Hero chat input row — full width */
.agent-chat-input-row {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast);
}

.agent-chat-input-row:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

.agent-chat-icon {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 8px;
    color: var(--ink-muted);
    pointer-events: none;
}

/* Agent chat textarea — full width */
.agent-chat-input {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    min-height: 24px;
    max-height: 200px;
    width: 100%;
}

.agent-chat-input::placeholder {
    color: var(--ink-muted);
}

.agent-chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Send button */
.agent-chat-send {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.agent-chat-send:hover:not(:disabled) {
    background: var(--primary-light);
    transform: scale(1.05);
}

.agent-chat-send:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Mic / dictation button */
.agent-chat-mic {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.agent-chat-mic:hover:not(:disabled) {
    color: var(--ink);
    border-color: var(--primary);
    transform: scale(1.05);
}

.agent-chat-mic:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.agent-chat-mic.recording {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    animation: mic-pulse 1.4s ease-in-out infinite;
}

@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Speak (TTS) toggle in header */
.speak-toggle {
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all var(--transition-fast);
}

.speak-toggle:hover {
    border-color: var(--primary);
    color: var(--ink);
}

.speak-toggle.active {
    border-color: var(--primary);
    color: var(--primary);
}

/* Voice picker dropdown in header */
select.voice-select {
    cursor: pointer;
    max-width: 160px;
    background: var(--surface);
    color: var(--ink);
    transition: all var(--transition-fast);
}

select.voice-select:hover {
    border-color: var(--primary);
    color: var(--ink);
}

select.voice-select option {
    background: var(--surface-dark);
    color: var(--ink);
}

/* Per-message replay button */
.chat-replay {
    display: block;
    width: fit-content;
    margin-top: 6px;
    padding: 2px 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chat-replay:hover {
    border-color: var(--primary);
    color: var(--ink);
}

/* Suggestions row */
.agent-suggestions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.agent-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(129, 140, 248, 0.08);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 500;
}

.agent-greeting-text {
    color: var(--ink-light);
    font-size: 0.95rem;
    text-align: center;
}

.suggestions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Suggestion chips */
.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--ink-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
}

.suggestion-chip:hover {
    background: rgba(129, 140, 248, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-1px);
}

/* Start chat button */
.start-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 100px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}

.start-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.4);
}

.start-chat-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.webgpu-diag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border, rgba(148, 163, 184, 0.4));
    border-radius: 100px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.webgpu-diag-btn:hover {
    border-color: var(--primary, #818cf8);
    color: var(--text, #e2e8f0);
}

.webgpu-diag-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.clear-models-link {
    font-size: 0.8rem;
}

.clear-models-link a {
    color: var(--ink-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.clear-models-link a:hover {
    color: var(--accent);
}

/* Model info badges */
.agent-model-info {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-md);
}

.model-badge {
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--ink-light);
    backdrop-filter: blur(5px);
}

.model-badge[style*="color"] {
    border-color: currentColor;
}

/* --- Responsive --- */

    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-lg) var(--space-sm) calc(var(--space-lg) + 28px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--ink);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-base);
}

.search-input::placeholder {
    color: var(--ink-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.search-clear {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--ink-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-clear:hover {
    background: var(--surface-hover);
    color: var(--ink);
}

.filter-tabs {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.filter-tab {
    padding: var(--space-xs) var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--ink-light);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: var(--border-hover);
    color: var(--ink);
}

.filter-tab.active {
    background: rgba(129, 140, 248, 0.15);
    border-color: rgba(129, 140, 248, 0.3);
    color: var(--primary-light);
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-2xl);
}

/* --- Episodes Section --- */
.episodes-section {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.episodes-section-header {
    margin-bottom: var(--space-lg);
}

.episodes-section-title {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}

.title-line {
    border-bottom: 2px solid var(--primary);
    padding-bottom: var(--space-xs);
}

.title-count {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--ink-muted);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

/* --- Episode Card --- */
.episode-card {
    background: rgba(17, 17, 37, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    animation: cardEnter 0.5s ease-out both;
    animation-fill-mode: backwards;
}

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

.episode-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.episode-card:hover .thumbnail-placeholder svg {
    transform: scale(1.1);
    color: rgba(129, 140, 248, 0.6);
}

.card-thumbnail-wrapper {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface);
}

.episode-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.thumbnail-placeholder svg {
    transition: all var(--transition-base);
}

.gradient-alt {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(129, 140, 248, 0.05) 100%);
}

.play-button {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.episode-card:hover .play-button {
    opacity: 1;
}

.card-body {
    padding: var(--space-md);
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.episode-date {
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.episode-id {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--ink-muted);
    padding: 2px var(--space-xs);
    background: rgba(100, 116, 139, 0.1);
    border-radius: var(--radius-sm);
}

.episode-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--ink);
}

.episode-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.episode-title a:hover {
    color: var(--primary-light);
}

.episode-description {
    font-size: 0.85rem;
    color: var(--ink-light);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    margin-top: var(--space-sm);
}

.card-tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

/* --- Tags --- */
.tag {
    display: inline-block;
    padding: 2px var(--space-sm);
    border: 1px solid;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.episode-source {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}

/* --- Empty State --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    color: var(--ink-muted);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}

.empty-state-text {
    font-size: 0.95rem;
    color: var(--ink-muted);
}

/* --- Episode Detail Page --- */
.episode-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary-light);
}

.episode-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.episode-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.video-embed {
    margin: var(--space-xl) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.video-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

.audio-player {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.audio-player h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.audio-player audio {
    width: 100%;
    margin-top: var(--space-sm);
    border-radius: var(--radius-sm);
}

.transcript-section,
.episode-description-section {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.transcript-section h2,
.episode-description-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.transcript-content {
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--ink-light);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    color: var(--ink-light);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .controls-bar {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .episodes-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Give the chat input room so the placeholder can wrap to a second
       line instead of being clipped on narrow screens. */
    .agent-chat-input {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .episodes-section-title {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .agent-chat-input {
        font-size: 0.9rem;
        min-height: 46px;
    }
}

.ai-agent-status {
    font-size: 11px;
    color: var(--ink-muted);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-agent-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

/* Loading dot for hero */
.loading-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

    color: var(--ink);
    border: 1px solid var(--border);
}

.ai-agent-typing {
    align-self: flex-start;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    gap: 4px;
}

.ai-agent-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: typing 1.4s infinite;
}

.ai-agent-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-agent-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

.ai-agent-config {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--ink-muted);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.ai-agent-config span {
    padding: 2px 6px;
    background: var(--surface);
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* Model loading overlay */
.ai-agent-loading {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.ai-agent-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.ai-agent-loading p {
    font-size: 13px;
    color: var(--ink-light);
    text-align: center;
}

.ai-agent-loading .progress-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.ai-agent-loading .progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: width 0.3s;
}

.ai-agent-config span.success {
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .ai-agent-panel {
        width: calc(100vw - var(--space-lg));
        right: var(--space-sm);
        bottom: calc(var(--space-xl) + 72px);
        max-height: 70vh;
    }
    
    .ai-agent-toggle {
        bottom: var(--space-lg);
        right: var(--space-lg);
    }
}

/* Model Picker */
.model-picker {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.7rem;
    padding: 4px 6px;
    cursor: pointer;
    max-width: 140px;
    transition: border-color var(--transition);
}

.model-picker:hover,
.model-picker:focus {
    border-color: var(--primary);
    outline: none;
}

.model-picker option {
    background: var(--surface-dark);
    color: var(--text);
    font-size: 0.75rem;
    padding: 4px;
}

/* ===== Episodes Table View ===== */
.episodes-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    max-height: 600px;
    overflow-y: auto;
}

.episodes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.episodes-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.episodes-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-light);
    background: var(--surface-dark);
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

.episodes-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.episodes-table tr:last-child td {
    border-bottom: none;
}

.episodes-table tr:hover td {
    background: rgba(129, 140, 248, 0.04);
}

.episodes-table .col-title {
    min-width: 200px;
}

.col-title-link {
    display: block;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.col-title-link:hover {
    color: var(--primary);
}

.col-desc {
    display: block;
    color: var(--ink-light);
    font-size: 0.8rem;
    margin-top: 2px;
}

.col-empty {
    color: var(--ink-muted);
    font-size: 0.85rem;
}

.col-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.col-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.col-link-yt,
.col-link-yt-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.col-link-yt-mini {
    font-size: 0.85rem;
}

.col-thumb {
    border-radius: 4px;
    width: 48px;
    height: 27px;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}

.col-thumb-sm {
    width: 60px;
    height: 34px;
}

.col-thumb:hover {
    border-color: var(--primary);
}

.col-link-spotify {
    color: #1DB954;
}

.col-link-spotify:hover {
    color: #1ed760;
}

/* ===== View Toggle ===== */
.episodes-controls {
    display: flex;
    gap: var(--space-sm);
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--ink-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
}

.view-toggle:hover {
    border-color: var(--primary);
    color: var(--ink);
}

.view-toggle .icon-table,
.view-toggle .icon-cards {
    display: none;
}

.view-toggle svg {
    width: 14px;
    height: 14px;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: var(--space-2xl) var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.cta-card {
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.cta-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 24px rgba(129, 140, 248, 0.08);
}

.cta-card--highlight {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.05), rgba(168, 85, 247, 0.05));
}

.cta-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(129, 140, 248, 0.1);
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.cta-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.cta-desc {
    font-size: 0.85rem;
    color: var(--ink-light);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.cta-desc code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--surface-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
}

.cta-button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.cta-button svg {
    width: 14px;
    height: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .episodes-table th,
    .episodes-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .col-thumb {
        width: 40px;
        height: 23px;
    }
    
    .col-thumb-sm {
        width: 48px;
        height: 27px;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
    }
    
    .episodes-controls {
        margin-top: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .episodes-table-wrap {
        font-size: 0.75rem;
    }
    
    .episodes-table th,
    .episodes-table td {
        padding: 6px 8px;
    }
    
    .episodes-table .col-title {
        min-width: 140px;
    }
    
    .col-desc {
        display: none;
    }
}

/* ===== Video modal (inline episode playback) ===== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.video-modal[hidden] { display: none; }
.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 15, 0.8);
    backdrop-filter: blur(4px);
}
.video-modal-content {
    position: relative;
    width: min(900px, 100%);
    background: var(--surface, #12122a);
    border: 1px solid var(--border, rgba(129, 140, 248, 0.2));
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
}
.video-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--ink, #fff);
}
.video-modal-close {
    background: transparent;
    border: none;
    color: var(--ink-muted, #9aa1c9);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}
.video-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.video-modal-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}
.video-modal-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 18px;
}
.video-modal-yt {
    color: var(--primary, #818cf8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.video-modal-yt:hover { text-decoration: underline; }

/* === Hallucination disclaimer === */
.hallucination-disclaimer {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--ink-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px 14px;
    text-align: center;
    margin: 4px auto 0;
    max-width: 420px;
    line-height: 1.4;
    user-select: none;
}

/* === Persistent "Explore by topic" bar (now in the agent header) === */
.agent-suggested-topics-bar {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.suggested-topics-label {
    font-size: 0.7rem;
    color: var(--ink-muted);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggested-topics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.topic-chip {
    padding: 5px 12px;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--primary-light);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.topic-chip:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
