        /* =========================================================================
           UNIFIED HERO CARD & COMPACT AUDIO BAR (Nature & Substack "Play & Read")
           ========================================================================= */

        .unified-hero-card {
            padding: 1.75rem 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            position: relative;
            border-color: rgba(6, 182, 212, 0.28);
            box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(6, 182, 212, 0.15);
            backdrop-filter: blur(16px);
            border-radius: var(--radius-lg);
        }

        /* Compact Audio Bar */
        .compact-audio-bar {
            background: rgba(10, 13, 20, 0.88);
            border: 1px solid rgba(6, 182, 212, 0.25);
            border-radius: var(--radius-md);
            padding: 0.75rem 1.25rem;
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .compact-audio-bar:hover {
            border-color: rgba(6, 182, 212, 0.45);
            box-shadow: 0 6px 24px rgba(6, 182, 212, 0.16);
        }

        .audio-bar-main-row {
            display: flex;
            align-items: center;
            gap: 1.25rem;
        }

        .audio-bar-transport {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            flex-shrink: 0;
        }

        .audio-bar-timeline-track {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            min-width: 0;
        }

        .audio-track-top-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .player-timestamp {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            color: var(--text-muted);
            font-weight: 600;
            min-width: 36px;
        }

        .compact-waveform {
            flex: 1;
            height: 26px !important;
            padding: 0 0.4rem;
            background: rgba(12, 14, 19, 0.75) !important;
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 2px;
            overflow: hidden;
            cursor: pointer;
            touch-action: none;
            user-select: none;
            transition: border-color 0.15s ease, background 0.15s ease;
        }

        .compact-waveform:hover {
            border-color: rgba(6, 182, 212, 0.45);
            background: rgba(12, 14, 19, 0.9) !important;
        }

        .compact-waveform .wave-bar {
            pointer-events: none;
        }

        .audio-bar-timeline-track .progress-bar-wrap {
            flex: none !important;
            margin: 0;
            width: 100%;
            height: 6px !important;
            min-height: 6px !important;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 3px;
            position: relative;
            cursor: pointer;
            touch-action: none;
            user-select: none;
            transition: height 0.15s ease, background 0.15s ease;
        }

        .audio-bar-timeline-track .progress-bar-wrap::before {
            content: '';
            position: absolute;
            top: -6px;
            bottom: -6px;
            left: 0;
            right: 0;
            z-index: 1;
        }

        .audio-bar-timeline-track .progress-bar-wrap:hover,
        .audio-bar-timeline-track .progress-bar-wrap.scrubbing {
            height: 8px !important;
            min-height: 8px !important;
            background: rgba(255, 255, 255, 0.14);
        }

        .progress-thumb {
            position: absolute;
            top: 50%;
            left: 0%;
            transform: translate(-50%, -50%);
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #ffffff;
            border: 2px solid var(--primary);
            box-shadow: 0 0 10px var(--glow-cyan);
            opacity: 0;
            transition: opacity 0.15s ease, transform 0.15s ease;
            pointer-events: none;
            z-index: 2;
        }

        .progress-bar-wrap:hover .progress-thumb,
        .progress-bar-wrap.scrubbing .progress-thumb {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.1);
        }

        .audio-bar-controls-right {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-shrink: 0;
        }

        .audio-quality-badge {
            font-size: 0.625rem;
            color: var(--primary);
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            padding: 0.25rem 0.5rem;
            background: rgba(6, 182, 212, 0.08);
            border: 1px solid rgba(6, 182, 212, 0.22);
            border-radius: var(--radius-sm);
            letter-spacing: 0.04em;
        }

        .audio-bar-subline {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 0.5rem;
            font-size: 0.6875rem;
        }

        .audio-sync-status {
            color: var(--text-muted);
            font-size: 0.6875rem;
            font-family: 'JetBrains Mono', monospace;
        }

        @media (max-width: 768px) {
            .audio-bar-main-row {
                flex-wrap: wrap;
            }
            .audio-bar-controls-right {
                width: 100%;
                justify-content: space-between;
            }
        }

        /* Legacy Fallback Classes */
        .hero-split-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.75rem;
        }

        @media (max-width: 1100px) {
            .hero-split-grid {
                grid-template-columns: 1fr;
            }
        }

        .podcast-studio-card {
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1.15rem;
            position: relative;
            border-color: rgba(6, 182, 212, 0.28);
            box-shadow: 0 0 20px -5px rgba(6, 182, 212, 0.12);
        }

        .studio-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .studio-card-title {
            font-size: 0.6875rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--primary);
            font-weight: 700;
        }

        .dual-track-selector {
            display: flex;
            background: var(--surface-container-lowest);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 2px;
        }

        .track-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 0.35rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 600;
            font-family: 'JetBrains Mono', monospace;
            cursor: pointer;
            border-radius: 2px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .track-btn.active {
            background: var(--primary-container);
            color: var(--canvas);
            box-shadow: 0 0 10px var(--glow-cyan);
            font-weight: 700;
        }

        .hosts-badge-row {
            display: flex;
            gap: 0.75rem;
            font-size: 0.6875rem;
        }

        .host-badge {
            background: var(--surface-container);
            border: 1px solid var(--seam-border-subtle);
            padding: 0.2rem 0.55rem;
            border-radius: var(--radius-sm);
            color: var(--text-surface);
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .host-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
        }
        .host-dot.alpha { background: var(--primary); }
        .host-dot.beta { background: var(--tertiary); }

        .waveform-visualizer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 48px;
            padding: 0 0.5rem;
            background: rgba(12, 14, 19, 0.6);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
            gap: 3px;
        }

        .wave-bar {
            flex: 1;
            background: var(--seam-border);
            height: 20%;
            border-radius: 1px;
            transition: height 0.2s ease;
        }

        .wave-bar.active {
            background: var(--primary);
            box-shadow: 0 0 4px var(--primary);
        }

        .player-timeline-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.6875rem;
            color: var(--text-muted);
        }

        .progress-bar-wrap {
            flex: 1;
            margin: 0 0.85rem;
            height: 4px;
            background: var(--surface-container);
            border-radius: 2px;
            position: relative;
            cursor: pointer;
        }

        .progress-fill {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 30%;
            background: var(--primary);
            border-radius: 2px;
            box-shadow: 0 0 6px var(--primary);
        }

        .transport-controls {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0.25rem;
        }

        .transport-btn-group {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .btn-transport {
            background: var(--surface-container);
            border: 1px solid var(--seam-border-subtle);
            color: var(--text-surface);
            padding: 0.35rem 0.6rem;
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            font-family: 'JetBrains Mono', monospace;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-transport:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .btn-play-pause-master {
            width: 44px;
            height: 44px;
            background: var(--primary-container);
            color: var(--canvas);
            border: none;
            border-radius: 50%;
            font-size: 1.1rem;
            font-weight: 800;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 0 16px var(--glow-cyan);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .btn-play-pause-master:hover {
            transform: scale(1.06);
            box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
        }

        .playback-speed-select {
            display: flex;
            gap: 2px;
            background: var(--surface-container-lowest);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
            padding: 2px;
        }

        .speed-opt {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 0.625rem;
            padding: 0.2rem 0.4rem;
            cursor: pointer;
            font-family: 'JetBrains Mono', monospace;
            border-radius: 2px;
        }

        .speed-opt.active {
            background: var(--surface-container-high);
            color: var(--primary);
            font-weight: 700;
        }


/* MASTER SYNTHESIS CARD */

        /* 2b. Daily Master Synthesis Card & Body Block */
        .synthesis-card {
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 1.15rem;
            border-color: rgba(16, 185, 129, 0.22);
        }

        .synthesis-body-block {
            display: flex;
            flex-direction: column;
            gap: 1.15rem;
        }

        .synthesis-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .synthesis-tag {
            font-size: 0.6875rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--secondary);
            font-weight: 700;
        }

        .synthesis-text {
            font-size: calc(0.95rem * var(--font-scale, 1));
            line-height: 1.68;
            color: var(--text-surface);
            font-family: 'Geist', -apple-system, sans-serif;
        }

        .synthesis-takeaways-wrap {
            margin-top: 0.25rem;
        }

        .synthesis-takeaways {
            list-style: none;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 0.75rem;
        }

        .takeaway-item {
            display: flex;
            align-items: flex-start;
            gap: 0.65rem;
            font-size: calc(0.84rem * var(--font-scale, 1));
            line-height: 1.5;
            color: var(--text-surface);
            background: rgba(14, 18, 26, 0.65);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
            padding: 0.75rem 0.85rem;
            transition: border-color 0.15s ease, background 0.15s ease;
        }

        .takeaway-item:hover {
            border-color: rgba(16, 185, 129, 0.35);
            background: rgba(16, 185, 129, 0.04);
        }

        .takeaway-icon {
            color: var(--secondary);
            font-weight: 700;
            flex-shrink: 0;
            margin-top: 1px;
        }

        .synthesis-actions-bar {
            display: flex;
            gap: 0.65rem;
            flex-wrap: wrap;
            margin-top: 0.25rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--seam-border-subtle);
        }

        .btn-action-outline {
            background: var(--surface-container);
            border: 1px solid var(--seam-border);
            color: var(--text-surface);
            padding: 0.35rem 0.75rem;
            border-radius: var(--radius-sm);
            font-size: 0.6875rem;
            font-family: 'JetBrains Mono', monospace;
            cursor: pointer;
            transition: all 0.15s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .btn-action-outline:hover {
            border-color: var(--primary);
            color: var(--primary);
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
        }


/* HEADLINER SPOTLIGHT CARDS */

        /* 3. HEADLINER SPOTLIGHT TRIO */
        .section-wrap {
            padding: 2.25rem 2.5rem;
            border-bottom: 1px solid var(--seam-border-subtle);
        }

        .section-header-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 1.25rem;
        }

        .section-title {
            font-size: calc(1.18rem * var(--font-scale, 1));
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.015em;
        }

        .section-subtitle {
            font-size: 0.6875rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .headliners-trio-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.25rem;
        }

        @media (max-width: 950px) {
            .headliners-trio-grid {
                grid-template-columns: 1fr;
            }
        }

        .headliner-card {
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            height: 100%;
            border: 1px solid rgba(245, 158, 11, 0.25);
            transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            position: relative;
        }

        .headliner-card:hover {
            transform: translateY(-2px);
            border-color: var(--tertiary-container);
            box-shadow: 0 6px 20px -3px rgba(245, 158, 11, 0.15);
        }

        .headliner-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            flex-wrap: wrap;
        }

        .headliner-badge-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.4);
            color: var(--tertiary);
            padding: 0.2rem 0.5rem;
            border-radius: var(--radius-sm);
            font-size: 0.625rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            width: fit-content;
        }

        .headliner-card-header .track-tag {
            padding: 0.2rem 0.55rem;
            border-radius: var(--radius-sm);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .headliner-card-body {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            margin-bottom: 0.75rem;
        }

        .headliner-card-title {
            font-size: calc(1.06rem * var(--font-scale, 1));
            font-weight: var(--font-weight-display, 600);
            line-height: var(--line-height-display, 1.38);
            color: var(--text-primary);
            font-family: var(--font-display, 'Geist', -apple-system, sans-serif);
            letter-spacing: var(--tracking-display, -0.02em);
            min-height: 4.2rem;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-top: 0;
            margin-bottom: 0.5rem;
        }

        .headliner-card-hook {
            font-size: calc(0.83rem * var(--font-scale, 1));
            line-height: 1.48;
            color: var(--text-surface);
            font-style: italic;
            border-left: 2px solid var(--tertiary-container);
            padding-left: 0.65rem;
            min-height: 4.8rem;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-top: 0;
        }

        .headliner-card-bottom {
            margin-top: auto;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .headliner-card-metrics {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            font-size: 0.6875rem;
            color: var(--text-muted);
            border-top: 1px solid var(--seam-border-subtle);
            padding-top: 0.65rem;
        }

        .headliner-card-metrics .surprise-badge {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.25);
            color: var(--secondary);
            padding: 0.2rem 0.55rem;
            border-radius: var(--radius-sm);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 700;
            white-space: nowrap;
        }

        .headliner-card-metrics .score-pill {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.25);
            color: var(--tertiary);
            padding: 0.2rem 0.55rem;
            border-radius: var(--radius-sm);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 700;
            margin-left: auto;
            white-space: nowrap;
        }

        .headliner-read-cta {
            color: var(--primary);
            font-size: 0.6875rem;
            font-weight: 700;
            font-family: 'JetBrains Mono', monospace;
            margin-left: 0.5rem;
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .headliner-card:hover .headliner-read-cta {
            color: var(--primary);
            transform: translateX(3px);
        }

        .spotlight-metric-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.2rem 0.6rem;
            border-radius: var(--radius-sm);
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.25);
            color: var(--tertiary);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 600;
        }

        /* Semantic track badges */
        .track-tag.track-robotics_embodied {
            background: rgba(236, 72, 153, 0.12);
            border: 1px solid rgba(236, 72, 153, 0.35);
            color: #f472b6;
        }
        .track-tag.track-ai_frontier {
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid rgba(6, 182, 212, 0.35);
            color: var(--primary);
        }
        .track-tag.track-biotech_synbio {
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.35);
            color: var(--secondary);
        }
        .track-tag.track-quantum_physics {
            background: rgba(168, 85, 247, 0.12);
            border: 1px solid rgba(168, 85, 247, 0.35);
            color: #c084fc;
        }
        .track-tag.track-energy_materials {
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.35);
            color: #fbbf24;
        }


/* LIVE RESEARCH FEED & ELI5 ACCORDIONS */

        /* 5. BOTTOM SECTION: LIVE RESEARCH STREAM FEED */
        .papers-stream-container {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            min-height: 480px;
        }

        .paper-card {
            padding: 1.35rem;
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            border-color: var(--seam-border-subtle);
            box-shadow: var(--card-micro-bevel);
            border-radius: var(--radius-md);
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
        }

        .paper-card:hover {
            border-color: var(--seam-border);
            box-shadow: var(--card-micro-bevel), 0 0 16px var(--glow-accent);
        }

        .paper-header-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
        }

        .paper-title {
            font-size: calc(1.18rem * var(--font-scale, 1));
            font-weight: var(--font-weight-display, 700);
            line-height: var(--line-height-display, 1.35);
            color: var(--text-primary);
            font-family: var(--font-display, 'Geist', -apple-system, sans-serif);
            letter-spacing: var(--tracking-display, -0.02em);
        }

        .paper-meta-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: calc(0.72rem * var(--font-scale, 1));
            color: var(--text-muted);
            flex-wrap: wrap;
        }

        .track-tag {
            color: var(--primary);
            font-weight: 600;
            text-transform: uppercase;
        }

        .evidence-badge {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: var(--secondary);
            padding: 0.15rem 0.45rem;
            border-radius: var(--radius-sm);
            font-weight: 600;
        }

        .score-pill {
            background: var(--surface-container);
            border: 1px solid var(--seam-border-subtle);
            color: var(--text-surface);
            padding: 0.15rem 0.45rem;
            border-radius: var(--radius-sm);
            font-weight: 600;
        }

        /* 3-Tier ELI5 Accordion */
        .eli5-accordion {
            background: var(--surface-container-lowest);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
            overflow: hidden;
            margin-top: 0.35rem;
        }

        .eli5-accordion details {
            border-bottom: 1px solid var(--seam-border-subtle);
        }

        .eli5-accordion details:last-child {
            border-bottom: none;
        }

        .eli5-accordion summary {
            padding: 0.65rem 0.9rem;
            font-size: calc(0.8rem * var(--font-scale, 1));
            font-weight: 700;
            cursor: pointer;
            user-select: none;
            color: var(--text-surface);
            background: rgba(29, 32, 37, 0.4);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .eli5-accordion summary:hover {
            color: var(--primary);
            background: rgba(6, 182, 212, 0.05);
        }

        .eli5-content {
            padding: 1.15rem 1.3rem;
            font-size: calc(0.92rem * var(--font-scale, 1));
            line-height: var(--line-height-prose, 1.7);
            color: var(--text-surface);
            font-family: var(--font-body, -apple-system, sans-serif);
            letter-spacing: var(--tracking-body, 0);
            background: var(--surface-container-lowest);
            border-top: 1px solid var(--seam-border-subtle);
        }

        /* Newsroom Editorial Article Typography */
        .news-article-body {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .news-lead {
            font-size: calc(0.94rem * var(--font-scale, 1));
            font-weight: 500;
            line-height: var(--line-height-prose, 1.68);
            font-family: var(--font-body, -apple-system, sans-serif);
            letter-spacing: var(--tracking-body, 0);
            color: var(--text-surface, #f1f5f9);
            border-left: 3px solid var(--primary);
            padding: 0.55rem 0.9rem;
            margin: 0;
            background: rgba(6, 182, 212, 0.05);
            border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
        }

        .news-para {
            margin: 0;
            color: var(--text-surface, #cbd5e1);
            font-size: calc(0.92rem * var(--font-scale, 1));
            line-height: var(--line-height-prose, 1.72);
            font-family: var(--font-body, -apple-system, sans-serif);
            letter-spacing: var(--tracking-body, 0);
        }

        .news-highlight {
            color: #ffffff;
            font-weight: 700;
        }

        .news-italic {
            font-style: italic;
            color: #94a3b8;
        }

        .news-metric {
            display: inline-block;
            padding: 0.05rem 0.35rem;
            font-size: calc(0.82rem * var(--font-scale, 1));
            font-weight: 700;
            font-family: 'JetBrains Mono', monospace;
            color: var(--primary);
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid rgba(6, 182, 212, 0.3);
            border-radius: 4px;
            margin: 0 0.15rem;
            vertical-align: baseline;
        }

        .news-math {
            font-family: 'KaTeX_Math', 'Cambria Math', 'Times New Roman', serif;
            font-style: italic;
            color: #38bdf8;
            background: rgba(56, 189, 248, 0.08);
            border: 1px solid rgba(56, 189, 248, 0.2);
            padding: 0.05rem 0.3rem;
            border-radius: 4px;
            margin: 0 0.15rem;
        }

        .news-math-block {
            font-family: 'KaTeX_Math', 'Cambria Math', 'Times New Roman', serif;
            color: #38bdf8;
            background: rgba(56, 189, 248, 0.06);
            border: 1px solid rgba(56, 189, 248, 0.15);
            padding: 0.5rem 0.75rem;
            border-radius: var(--radius-sm);
            margin: 0.5rem 0;
            text-align: center;
        }

        .news-code {
            font-family: 'JetBrains Mono', monospace;
            font-size: calc(0.82rem * var(--font-scale, 1));
            color: #c084fc;
            background: rgba(192, 132, 252, 0.1);
            border: 1px solid rgba(192, 132, 252, 0.2);
            padding: 0.1rem 0.35rem;
            border-radius: 4px;
        }

        /* Structured Points Grid (for FMEA & multi-factor takeaways) */
        .news-points-grid {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            margin-top: 0.25rem;
        }

        .news-point-card {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.65rem 0.85rem;
            background: rgba(30, 41, 59, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: var(--radius-sm);
            transition: all 0.2s ease;
        }

        .news-point-card:hover {
            border-color: rgba(6, 182, 212, 0.3);
            background: rgba(30, 41, 59, 0.65);
            transform: translateX(2px);
        }

        .news-point-num {
            font-family: 'JetBrains Mono', monospace;
            font-size: calc(0.75rem * var(--font-scale, 1));
            font-weight: 800;
            color: var(--primary);
            background: rgba(6, 182, 212, 0.15);
            border: 1px solid rgba(6, 182, 212, 0.3);
            padding: 0.15rem 0.45rem;
            border-radius: 4px;
            flex-shrink: 0;
            line-height: 1.2;
            margin-top: 0.15rem;
        }

        .news-point-body {
            flex: 1;
            font-size: calc(0.9rem * var(--font-scale, 1));
            line-height: 1.68;
            color: #cbd5e1;
        }

        /* =========================================================================
           LIGHT THEME PURE BLACK CONTRAST OVERRIDES FOR NEWSROOM & PAPER CARDS
           ========================================================================= */
        [data-theme="light"] .news-lead {
            color: #000000 !important;
            background: rgba(2, 132, 199, 0.08) !important;
            border-left: 3px solid #0284c7 !important;
            font-weight: 600 !important;
        }

        [data-theme="light"] .news-para,
        [data-theme="light"] .news-paragraph {
            color: #000000 !important;
            font-weight: 450 !important;
        }

        [data-theme="light"] .news-highlight,
        [data-theme="light"] .news-lead strong,
        [data-theme="light"] .news-para strong,
        [data-theme="light"] .news-point-body strong,
        [data-theme="light"] .eli5-content strong {
            color: #000000 !important;
            font-weight: 800 !important;
            background: rgba(2, 132, 199, 0.11);
            padding: 0.03rem 0.25rem;
            border-radius: 3px;
        }

        [data-theme="light"] .news-italic,
        [data-theme="light"] .eli5-content em {
            color: #000000 !important;
            font-weight: 500;
        }

        [data-theme="light"] .news-point-card {
            background: #f8fafc !important;
            border: 1px solid #cbd5e1 !important;
        }

        [data-theme="light"] .news-point-card:hover {
            background: #f1f5f9 !important;
            border-color: #0284c7 !important;
        }

        [data-theme="light"] .news-point-body {
            color: #000000 !important;
            font-weight: 450 !important;
        }

        [data-theme="light"] .news-math,
        [data-theme="light"] .news-math-block {
            color: #0369a1 !important;
            background: rgba(2, 132, 199, 0.09) !important;
            border-color: rgba(2, 132, 199, 0.3) !important;
        }

        [data-theme="light"] .news-code {
            color: #5b21b6 !important;
            background: rgba(109, 40, 217, 0.08) !important;
            border-color: rgba(109, 40, 217, 0.25) !important;
        }

        [data-theme="light"] .news-metric {
            color: #0369a1 !important;
            background: rgba(2, 132, 199, 0.13) !important;
            border-color: rgba(2, 132, 199, 0.38) !important;
        }

        [data-theme="light"] .paper-title,
        [data-theme="light"] .headliner-card-title,
        [data-theme="light"] .section-title {
            color: #000000 !important;
        }

        [data-theme="light"] .paper-original-title {
            color: #111827 !important;
        }

        [data-theme="light"] .headliner-card-hook,
        [data-theme="light"] .synthesis-text {
            color: #000000 !important;
        }

        [data-theme="light"] .paper-meta-row,
        [data-theme="light"] .section-subtitle,
        [data-theme="light"] .paper-tag-pill {
            color: #111827 !important;
        }

        [data-theme="light"] .sponsor-paper-card {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, #ffffff 50%, rgba(2, 132, 199, 0.06) 100%) !important;
        }

        [data-theme="light"] .sponsor-paper-title {
            color: #000000 !important;
        }

        .paper-tags-row {
            display: flex;
            gap: 0.45rem;
            flex-wrap: wrap;
            margin-top: 0.25rem;
        }

        .paper-tag-pill {
            font-size: 0.6875rem;
            font-family: 'JetBrains Mono', monospace;
            color: var(--text-muted);
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border-subtle);
            padding: 0.2rem 0.55rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.18s ease;
            user-select: none;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            text-decoration: none;
        }

        .paper-tag-pill:hover,
        .paper-tag-pill.clickable-tag:hover {
            color: var(--primary);
            border-color: rgba(6, 182, 212, 0.45);
            background: rgba(6, 182, 212, 0.1);
            transform: translateY(-1px);
        }

        .paper-tag-pill.active {
            color: #000 !important;
            background: var(--primary) !important;
            border-color: var(--primary) !important;
            font-weight: 700;
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.45);
        }

        .active-tag-filter-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.65rem 1rem;
            background: rgba(6, 182, 212, 0.08);
            border: 1px solid rgba(6, 182, 212, 0.35);
            border-radius: var(--radius-sm);
            margin-bottom: 1.25rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            animation: fadeIn 0.2s ease;
        }

        .active-tag-label {
            color: var(--text-primary);
        }

        .active-tag-label strong {
            color: var(--primary);
        }

        .btn-clear-tag-filter {
            background: transparent;
            border: 1px solid rgba(6, 182, 212, 0.4);
            color: var(--primary);
            padding: 0.25rem 0.65rem;
            border-radius: 3px;
            cursor: pointer;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 600;
            transition: all 0.15s ease;
        }

        .btn-clear-tag-filter:hover {
            background: var(--primary);
            color: #000;
        }


/* SPONSORS, AUTHOR ARTIFACTS & OBSIDIAN EXPORT */

        /* =========================================================================
           NATIVE INTELLIGENCE SPONSORSHIP MATRIX STYLES
           ========================================================================= */

        /* 1. Console Matrix Panel Sponsor Module */
        .matrix-sponsor-module {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(56, 189, 248, 0.05) 100%);
            border: 1px solid rgba(245, 158, 11, 0.35);
            box-shadow: 0 0 15px rgba(245, 158, 11, 0.06), inset 0 0 12px rgba(245, 158, 11, 0.03);
            position: relative;
            overflow: hidden;
            margin-bottom: 1.25rem;
        }

        .matrix-sponsor-module::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--tertiary), var(--primary));
        }

        .sponsor-module-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .sponsor-badge-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 700;
            color: var(--tertiary);
            background: rgba(245, 158, 11, 0.15);
            border: 1px solid rgba(245, 158, 11, 0.4);
            padding: 0.15rem 0.45rem;
            border-radius: 2px;
            letter-spacing: 0.05em;
            display: inline-block;
        }

        .sponsor-category-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.5625rem;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .sponsor-card-title {
            font-size: 0.8125rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.35;
            margin-bottom: 0.4rem;
        }

        .sponsor-card-desc {
            font-size: 0.6875rem;
            color: var(--text-muted);
            line-height: 1.45;
            margin-bottom: 0.75rem;
        }

        .sponsor-cta-btn {
            display: block;
            width: 100%;
            text-align: center;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 700;
            color: #0b0f14 !important;
            background: linear-gradient(135deg, var(--tertiary) 0%, #fbbf24 100%);
            border: none;
            border-radius: var(--radius-sm);
            padding: 0.5rem 0.75rem;
            text-decoration: none;
            transition: all 0.2s ease;
            box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
            letter-spacing: 0.04em;
        }

        .sponsor-cta-btn:hover {
            filter: brightness(1.1);
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
        }

        .sponsor-partner-link-wrap {
            margin-top: 0.5rem;
            text-align: center;
        }

        .sponsor-partner-link {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.5625rem;
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.15s ease;
            letter-spacing: 0.02em;
        }

        .sponsor-partner-link:hover {
            color: var(--primary);
            text-decoration: underline;
        }

        /* 2. Hero Podcast Sponsor Chip */
        .podcast-sponsor-chip {
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.4);
            color: var(--tertiary) !important;
            text-decoration: none;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            cursor: pointer;
        }

        .podcast-sponsor-chip:hover {
            background: rgba(245, 158, 11, 0.22);
            border-color: var(--tertiary);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
        }

        .sponsor-spark-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--tertiary);
            box-shadow: 0 0 6px var(--tertiary);
            display: inline-block;
            animation: sponsorPulse 2s infinite ease-in-out;
        }

        @keyframes sponsorPulse {
            0%, 100% { opacity: 0.8; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.3); }
        }

        /* 3. In-Feed Sponsored Paper Card */
        .sponsor-paper-card {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(17, 19, 25, 0.85) 40%, rgba(56, 189, 248, 0.04) 100%) !important;
            border: 1px solid rgba(245, 158, 11, 0.4) !important;
            box-shadow: 0 0 20px rgba(245, 158, 11, 0.07);
            position: relative;
        }

        .sponsor-paper-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--tertiary), transparent 60%);
        }

        .sponsor-card-topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.35rem;
        }

        .sponsor-brand-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }

        .sponsor-paper-title {
            color: #fef08a !important;
        }

        .sponsor-track {
            background: rgba(245, 158, 11, 0.15) !important;
            border-color: rgba(245, 158, 11, 0.4) !important;
            color: var(--tertiary) !important;
        }

        .sponsor-evidence {
            background: rgba(56, 189, 248, 0.15) !important;
            border-color: rgba(56, 189, 248, 0.4) !important;
            color: var(--primary) !important;
        }

        .sponsor-score {
            background: rgba(245, 158, 11, 0.2) !important;
            color: #fbbf24 !important;
            border-color: rgba(245, 158, 11, 0.5) !important;
        }

        .sponsor-tag-pill {
            color: var(--tertiary) !important;
            border-color: rgba(245, 158, 11, 0.3) !important;
            background: rgba(245, 158, 11, 0.08) !important;
        }

        .sponsor-action-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .sponsor-whitepaper-cta {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 700;
            color: var(--tertiary);
            background: rgba(245, 158, 11, 0.12);
            border: 1px solid rgba(245, 158, 11, 0.5);
            border-radius: var(--radius-sm);
            padding: 0.35rem 0.75rem;
            text-decoration: none;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .sponsor-whitepaper-cta:hover {
            background: var(--tertiary);
            color: #0b0f14;
            box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
        }

        /* 4. PRO UI & Author Artifact Badges */
        .author-artifacts-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.45rem;
            margin-top: 0.5rem;
        }

        .author-artifact-btn {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 600;
            padding: 0.2rem 0.55rem;
            border-radius: var(--radius-sm);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            transition: all 0.15s ease;
            user-select: none;
            cursor: pointer;
        }

        .author-artifact-btn.github {
            background: rgba(6, 182, 212, 0.1);
            border: 1px solid rgba(6, 182, 212, 0.4);
            color: var(--primary);
        }

        .author-artifact-btn.github:hover {
            background: rgba(6, 182, 212, 0.25);
            border-color: var(--primary);
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
            transform: translateY(-1px);
        }

        .author-artifact-btn.hf {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.4);
            color: var(--tertiary);
        }

        .author-artifact-btn.hf:hover {
            background: rgba(245, 158, 11, 0.25);
            border-color: var(--tertiary);
            box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
            transform: translateY(-1px);
        }

        .author-artifact-btn.dataset {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.4);
            color: var(--secondary);
            cursor: default;
        }

        .author-artifact-btn.dataset:hover {
            background: rgba(16, 185, 129, 0.25);
            border-color: var(--secondary);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
        }

        .pro-level-badge {
            display: inline-block;
            font-size: 0.5625rem;
            font-weight: 800;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: 0.05em;
            padding: 0.08rem 0.35rem;
            border-radius: var(--radius-sm);
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(6, 182, 212, 0.2));
            border: 1px solid rgba(245, 158, 11, 0.6);
            color: var(--tertiary);
            vertical-align: middle;
            margin-left: 0.35rem;
        }

        .btn-obsidian-export-level {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 600;
            color: var(--text-surface);
            background: var(--surface-container-high);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 0.25rem 0.55rem;
            cursor: pointer;
            transition: all 0.15s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
        }

        .btn-obsidian-export-level:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: rgba(6, 182, 212, 0.1);
            box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
        }

        /* Bookmarks & Paper Card Enhancements */
        .paper-header-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-shrink: 0;
        }

        .paper-original-title {
            font-size: 0.71875rem;
            color: var(--text-muted);
            font-style: italic;
            margin-top: 0.2rem;
            line-height: 1.35;
        }

        .btn-bookmark-paper {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65625rem;
            font-weight: 600;
            color: var(--text-muted);
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 0.25rem 0.6rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .btn-bookmark-paper:hover {
            color: var(--primary);
            border-color: var(--primary);
            background: rgba(6, 182, 212, 0.08);
        }

        .btn-bookmark-paper.active {
            color: var(--tertiary);
            border-color: var(--tertiary);
            background: rgba(245, 158, 11, 0.12);
            box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
        }

        .bookmarks-empty-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 1.5rem;
            text-align: center;
            gap: 0.75rem;
            color: var(--text-muted);
            font-size: 0.875rem;
        }

        .bookmarks-empty-icon {
            font-size: 2.2rem;
            opacity: 0.7;
        }

        /* Responsive */
        @media (max-width: 1200px) {
            aside.console-matrix-panel {
                display: none;
            }
        }

        /* =========================================================================
           PHASE 2 & 4: FOCUS PULSE, HEADLINER DEEP-LINKING & RADAR SPONSORS
           ========================================================================= */

        /* 1. Refined, High-Craft Focus for Active & Targeted Paper (Zero Layout Shift) */
        .paper-card.active-paper,
        .paper-card.paper-card-highlighted {
            border: 1px solid rgba(245, 158, 11, 0.55) !important;
            background: linear-gradient(180deg, rgba(245, 158, 11, 0.035) 0%, rgba(18, 22, 26, 0.98) 100%) !important;
            box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28), 0 4px 20px rgba(245, 158, 11, 0.10), 0 10px 30px rgba(0, 0, 0, 0.45) !important;
            transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
        }

        [data-theme="light"] .paper-card.active-paper,
        [data-theme="light"] .paper-card.paper-card-highlighted {
            border: 1px solid rgba(217, 119, 6, 0.50) !important;
            background: #ffffff !important;
            box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.20), 0 4px 16px rgba(217, 119, 6, 0.08), 0 6px 18px rgba(0, 0, 0, 0.05) !important;
        }

        .paper-card.active-paper .paper-title,
        .paper-card.paper-card-highlighted .paper-title {
            color: var(--text-primary) !important;
            text-shadow: none !important;
        }

        [data-theme="light"] .paper-card.active-paper .paper-title,
        [data-theme="light"] .paper-card.paper-card-highlighted .paper-title {
            color: var(--text-primary) !important;
            text-shadow: none !important;
        }

        .paper-card.active-paper .news-lead,
        .paper-card.paper-card-highlighted .news-lead {
            border-left: 3px solid rgba(245, 158, 11, 0.45) !important;
            background: rgba(245, 158, 11, 0.03) !important;
        }

        .paper-card.active-paper .score-pill,
        .paper-card.paper-card-highlighted .score-pill {
            background: rgba(245, 158, 11, 0.12) !important;
            color: #f59e0b !important;
            border-color: rgba(245, 158, 11, 0.35) !important;
        }

        .paper-card.active-paper .eli5-accordion summary:hover,
        .paper-card.paper-card-highlighted .eli5-accordion summary:hover {
            color: #f59e0b !important;
            background: rgba(245, 158, 11, 0.05) !important;
        }

        /* 2. Headliner Card Footer & Source Chips */
        .headliner-card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding-top: 0.65rem;
            border-top: 1px solid var(--seam-border-subtle);
            flex-wrap: wrap;
        }

        .headliner-sources-chips {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .headliner-src-chip {
            font-size: 0.625rem;
            color: var(--text-muted);
            text-decoration: none;
            background: var(--surface-container);
            padding: 0.15rem 0.4rem;
            border-radius: 2px;
            border: 1px solid var(--seam-border-subtle);
            transition: all 0.15s ease;
            font-family: 'JetBrains Mono', monospace;
        }

        .headliner-src-chip:hover {
            color: var(--primary);
            border-color: var(--primary);
        }

        .headliner-src-chip.gh:hover {
            color: var(--secondary);
            border-color: var(--secondary);
        }

        .btn-read-deep {
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid var(--seam-border);
            color: var(--primary);
            font-size: 0.6875rem;
            font-weight: 700;
            padding: 0.3rem 0.65rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
        }

        .btn-read-deep:hover {
            background: var(--primary);
            color: var(--canvas);
            box-shadow: 0 0 10px var(--glow-cyan);
        }

        /* 3. Radar Active Concept Filter Button */
        .radar-filter-btn {
            width: 100%;
            margin-top: 0.5rem;
            padding: 0.4rem 0.6rem;
            font-size: 0.6875rem;
            font-weight: 700;
            text-align: center;
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid var(--primary-container);
            color: var(--primary);
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
        }

        .radar-filter-btn:hover {
            background: var(--primary);
            color: var(--canvas);
            box-shadow: 0 0 10px var(--glow-cyan);
        }

        /* 4. Radar B2B Sponsor Matrix Cards */
        .radar-sponsors-section {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-top: 0.25rem;
        }

        .radar-sponsors-header {
            font-size: 0.625rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            font-weight: 700;
        }

        .radar-sponsor-card {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
            padding: 0.75rem;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
        }

        .radar-sponsor-card:hover {
            border-color: var(--seam-border);
            background: var(--surface-container);
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
        }

        .sponsor-card-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .sponsor-badge-tag {
            font-size: 0.5625rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            color: var(--tertiary);
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.3);
            padding: 1px 5px;
            border-radius: 2px;
        }

        .sponsor-cat-label {
            font-size: 0.5625rem;
            color: var(--text-dim);
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .sponsor-card-title {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.3;
        }

        .sponsor-card-desc {
            font-size: 0.625rem;
            color: var(--text-muted);
            line-height: 1.4;
        }

        .sponsor-cta-btn {
            display: inline-block;
            margin-top: 0.2rem;
            background: rgba(6, 182, 212, 0.1);
            border: 1px solid var(--seam-border);
            color: var(--primary);
            font-size: 0.625rem;
            font-weight: 700;
            padding: 0.3rem 0.55rem;
            border-radius: var(--radius-sm);
            text-decoration: none;
            text-align: center;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
        }

        .sponsor-cta-btn:hover {
            background: var(--primary-container);
            color: var(--canvas);
            box-shadow: 0 0 8px var(--glow-cyan);
        }

        .sponsor-partner-link-wrap {
            text-align: center;
            padding: 0.35rem 0;
        }

        .sponsor-partner-link {
            font-size: 0.625rem;
            color: var(--text-dim);
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .sponsor-partner-link:hover {
            color: var(--primary);
            text-decoration: underline;
        }

        /* =========================================================================
           HEADER ACTIONS: UPGRADE PRO BUTTON & AUTH PROFILE PILL
           ========================================================================= */

        .btn-upgrade-pro-header {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            background: linear-gradient(135deg, rgba(6, 182, 212, 0.18) 0%, rgba(16, 185, 129, 0.18) 100%);
            border: 1px solid rgba(6, 182, 212, 0.4);
            color: var(--text-primary);
            font-size: 0.6875rem;
            font-weight: 700;
            padding: 0.35rem 0.75rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            font-family: inherit;
            white-space: nowrap;
        }

        .btn-upgrade-pro-header:hover {
            background: linear-gradient(135deg, rgba(6, 182, 212, 0.35) 0%, rgba(16, 185, 129, 0.35) 100%);
            border-color: var(--primary);
            box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
            transform: translateY(-1px);
        }

        .btn-upgrade-pro-header.pro-active {
            background: rgba(16, 185, 129, 0.12);
            border-color: rgba(16, 185, 129, 0.35);
            color: var(--secondary);
        }

        .auth-control-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .btn-auth-header {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            color: var(--text-surface);
            font-size: 0.6875rem;
            font-weight: 600;
            padding: 0.35rem 0.75rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
            white-space: nowrap;
        }

        .btn-auth-header:hover {
            background: var(--surface-container);
            color: var(--text-primary);
            border-color: var(--primary);
        }

        .user-profile-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            padding: 0.2rem 0.55rem 0.2rem 0.35rem;
            border-radius: 9999px;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
        }

        .user-profile-pill:hover {
            border-color: var(--primary);
            background: var(--surface-container);
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
        }

        .user-avatar-mini {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            object-fit: cover;
            border: 1px solid var(--seam-border-subtle);
        }

        .user-name-mini {
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--text-primary);
            max-width: 100px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-tier-badge {
            font-size: 0.5625rem;
            font-weight: 800;
            padding: 1px 5px;
            border-radius: 3px;
            letter-spacing: 0.05em;
        }

        .user-tier-badge.tier-pro {
            background: rgba(6, 182, 212, 0.15);
            color: var(--primary);
            border: 1px solid rgba(6, 182, 212, 0.35);
        }

        .user-tier-badge.tier-enterprise {
            background: rgba(168, 85, 247, 0.15);
            color: #c084fc;
            border: 1px solid rgba(168, 85, 247, 0.35);
        }

        .user-tier-badge.tier-free {
            background: var(--surface-container);
            color: var(--text-muted);
            border: 1px solid var(--seam-border-subtle);
        }

        /* User Profile Floating Dropdown */
        .user-profile-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 240px;
            background: rgba(14, 18, 28, 0.96);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-md);
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.1);
            backdrop-filter: blur(16px);
            padding: 0.5rem;
            display: none;
            flex-direction: column;
            gap: 0.2rem;
            z-index: 2200;
        }

        .user-profile-dropdown.active {
            display: flex;
            animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes dropdownFadeIn {
            from { opacity: 0; transform: translateY(-6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .dropdown-header {
            padding: 0.5rem 0.6rem;
        }

        .dropdown-user-name {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .dropdown-user-email {
            font-size: 0.625rem;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .dropdown-divider {
            height: 1px;
            background: var(--seam-border-subtle);
            margin: 0.25rem 0;
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.45rem 0.6rem;
            border-radius: var(--radius-sm);
            font-size: 0.6875rem;
            color: var(--text-surface);
            cursor: pointer;
            transition: all 0.12s ease;
        }

        .dropdown-item:hover {
            background: var(--surface-container-low);
            color: var(--text-primary);
        }

        .dropdown-item.text-danger {
            color: #ef4444;
        }

        .dropdown-item.text-danger:hover {
            background: rgba(239, 68, 68, 0.1);
            color: #f87171;
        }

        .badge-pro-pill {
            font-size: 0.5625rem;
            font-weight: 800;
            background: rgba(6, 182, 212, 0.15);
            color: var(--primary);
            padding: 1px 5px;
            border-radius: 3px;
        }

        /* =========================================================================
           PRODUCTION MASTER PORTAL FOOTER
           ========================================================================= */

        .portal-master-footer {
            background: linear-gradient(180deg, var(--surface) 0%, rgba(7, 9, 14, 0.98) 100%);
            border-top: 1px solid var(--seam-border);
            padding: 3rem 2.5rem 7.5rem; /* Generous bottom buffer so floating mini-player never blocks footer text */
            display: flex;
            flex-direction: column;
            gap: 2.25rem;
            margin-top: auto !important;
            box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
        }

        .footer-columns-grid {
            display: grid;
            grid-template-columns: 1.6fr 1fr 1fr 1fr;
            gap: 2.5rem;
        }

        .footer-col-brand {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .footer-brand-header {
            display: flex;
            align-items: center;
            gap: 0.65rem;
        }

        .footer-brand-title {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: var(--text-primary);
        }

        .footer-brand-title span {
            color: var(--primary);
        }

        .footer-brand-desc {
            font-size: 0.71875rem;
            color: var(--text-muted);
            line-height: 1.55;
            max-width: 360px;
        }

        .footer-badges-row {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            flex-wrap: wrap;
            margin-top: 0.25rem;
        }

        .footer-badge {
            font-size: 0.5625rem;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 3px;
            background: var(--surface-container);
            color: var(--text-surface);
            border: 1px solid var(--seam-border-subtle);
            letter-spacing: 0.04em;
        }

        .footer-col {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .footer-col-title {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .footer-links-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }

        .footer-links-list li a, .footer-links-list li span {
            font-size: 0.71875rem;
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.15s ease, transform 0.15s ease;
            display: inline-block;
        }

        .footer-links-list li a:hover {
            color: var(--primary);
            transform: translateX(2px);
        }

        .btn-footer-feedback {
            background: rgba(6, 182, 212, 0.1);
            border: 1px solid rgba(6, 182, 212, 0.35);
            color: var(--primary);
            font-size: 0.71875rem;
            font-weight: 600;
            padding: 0.35rem 0.65rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
            text-align: left;
            width: fit-content;
        }

        .btn-footer-feedback:hover {
            background: var(--primary-container);
            color: var(--canvas);
            box-shadow: 0 0 10px var(--glow-cyan);
        }

        .footer-status-live {
            color: var(--secondary) !important;
            font-weight: 600;
        }

        .footer-bottom-bar {
            border-top: 1px solid var(--seam-border-subtle);
            padding-top: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 1rem;
            font-size: 0.6875rem;
            color: var(--text-dim);
            font-family: 'JetBrains Mono', monospace;
        }

        .footer-telemetry-status {
            color: var(--text-muted);
        }

        /* =========================================================================
           MODAL SYSTEM: OVERLAYS, WINDOWS, FORMS
           ========================================================================= */

        .episteme-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(5, 7, 12, 0.85);
            backdrop-filter: blur(14px);
            z-index: 2500;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .episteme-modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .episteme-modal-window {
            background: rgba(14, 18, 27, 0.96);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-lg);
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.12);
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
            transform: scale(0.96);
            transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
            color: var(--text-primary);
        }

        .episteme-modal-overlay.active .episteme-modal-window {
            transform: scale(1);
        }

        .modal-close-btn {
            position: absolute;
            top: 1.25rem;
            right: 1.25rem;
            background: var(--surface-container);
            border: 1px solid var(--seam-border);
            color: var(--text-muted);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.15s ease;
            z-index: 10;
        }

        .modal-close-btn:hover {
            background: var(--surface-container-high);
            color: var(--text-primary);
            border-color: var(--primary);
            transform: rotate(90deg);
        }

        .modal-brand-header {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.45rem;
            margin-bottom: 1.5rem;
        }

        .modal-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0;
            letter-spacing: -0.015em;
        }

        .modal-subtitle {
            font-size: 0.75rem;
            color: var(--text-muted);
            max-width: 480px;
            line-height: 1.45;
            margin: 0;
        }

        /* Form Common Elements */
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            margin-bottom: 0.95rem;
            text-align: left;
        }

        .form-label {
            font-size: 0.6875rem;
            font-weight: 600;
            color: var(--text-surface);
        }

        .form-input, .form-textarea {
            background: var(--surface-container-lowest);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 0.6rem 0.85rem;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.8125rem;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
            width: 100%;
            box-sizing: border-box;
        }

        .form-input:focus, .form-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
        }

        .form-textarea {
            resize: vertical;
            min-height: 90px;
            line-height: 1.45;
        }

        .btn-primary-auth {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            border: none;
            color: var(--canvas);
            font-weight: 700;
            font-size: 0.8125rem;
            padding: 0.7rem 1.25rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            width: 100%;
            margin-top: 0.5rem;
            font-family: inherit;
        }

        .btn-primary-auth:hover {
            box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
            transform: translateY(-1px);
        }

        .btn-primary-auth:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* 1. AUTH MODAL SPECIFICS */
        .auth-modal-window {
            width: 420px;
            max-width: 95vw;
            padding: 2.25rem 2rem;
        }

        .btn-google-auth {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.65rem;
            width: 100%;
            background: #ffffff;
            color: #1f2937;
            font-weight: 600;
            font-size: 0.8125rem;
            padding: 0.65rem 1rem;
            border-radius: var(--radius-sm);
            border: 1px solid #e5e7eb;
            cursor: pointer;
            transition: background 0.15s ease, box-shadow 0.15s ease;
            font-family: inherit;
            margin-bottom: 1.1rem;
        }

        .btn-google-auth:hover {
            background: #f3f4f6;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .auth-divider {
            display: flex;
            align-items: center;
            text-align: center;
            color: var(--text-dim);
            font-size: 0.625rem;
            font-family: 'JetBrains Mono', monospace;
            margin-bottom: 1.1rem;
        }

        .auth-divider::before, .auth-divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--seam-border-subtle);
        }

        .auth-divider span {
            padding: 0 0.75rem;
        }

        .auth-error-msg {
            background: rgba(239, 68, 68, 0.12);
            border: 1px solid rgba(239, 68, 68, 0.35);
            color: #f87171;
            font-size: 0.6875rem;
            padding: 0.5rem 0.75rem;
            border-radius: var(--radius-sm);
            margin-bottom: 0.75rem;
            text-align: left;
        }

        .auth-demo-divider {
            margin-top: 1.25rem;
            padding-top: 1rem;
            border-top: 1px solid var(--seam-border-subtle);
            text-align: center;
        }

        .btn-demo-auth {
            background: rgba(245, 158, 11, 0.1);
            border: 1px solid rgba(245, 158, 11, 0.35);
            color: var(--tertiary);
            font-size: 0.6875rem;
            font-weight: 700;
            padding: 0.5rem 1rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            width: 100%;
            font-family: inherit;
        }

        .btn-demo-auth:hover {
            background: rgba(245, 158, 11, 0.2);
            border-color: var(--tertiary);
            box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
        }

        /* 2. PRICING MODAL SPECIFICS */
        .pricing-modal-window {
            width: 1040px;
            max-width: 95vw;
            padding: 2.25rem 2.25rem 2.5rem;
        }

        .pricing-pill-badge {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            color: var(--primary);
            background: rgba(6, 182, 212, 0.1);
            border: 1px solid rgba(6, 182, 212, 0.3);
            padding: 2px 8px;
            border-radius: 9999px;
            margin-bottom: 0.35rem;
        }

        .pricing-billing-toggle {
            display: inline-flex;
            align-items: center;
            background: var(--surface-container-lowest);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 3px;
            margin-top: 1rem;
            gap: 2px;
        }

        .billing-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 0.71875rem;
            font-weight: 600;
            padding: 0.4rem 0.95rem;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
        }

        .billing-btn.active {
            background: var(--primary-container);
            color: var(--canvas);
            font-weight: 700;
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
        }

        .annual-discount-pill {
            font-size: 0.5625rem;
            background: #10b981;
            color: #07090e;
            padding: 1px 4px;
            border-radius: 2px;
            font-weight: 800;
        }

        .pricing-cards-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.25rem;
            margin-top: 1.25rem;
            align-items: stretch;
        }

        .pricing-card {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-md);
            padding: 1.65rem 1.45rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 1.25rem;
            position: relative;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .pricing-card:hover {
            border-color: var(--seam-border-subtle);
            transform: translateY(-2px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
        }

        .pricing-card.featured-pro-card {
            border: 2px solid var(--primary);
            background: linear-gradient(180deg, rgba(13, 22, 38, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
            box-shadow: 0 0 32px rgba(6, 182, 212, 0.15);
            transform: scale(1.02);
        }

        .pricing-card.featured-pro-card:hover {
            box-shadow: 0 0 40px rgba(6, 182, 212, 0.25);
            transform: scale(1.02) translateY(-2px);
        }

        .featured-badge {
            position: absolute;
            top: -11px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: var(--canvas);
            font-size: 0.5625rem;
            font-weight: 800;
            padding: 2px 10px;
            border-radius: 9999px;
            letter-spacing: 0.06em;
            box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
            white-space: nowrap;
        }

        .pricing-card-header {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }

        .tier-name {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .tier-pro-title {
            color: var(--primary);
        }

        .tier-price-row {
            display: flex;
            align-items: baseline;
            gap: 0.45rem;
            margin: 0.35rem 0;
            flex-wrap: nowrap;
        }

        .price-val {
            font-size: 1.75rem;
            font-weight: 800;
            color: var(--text-primary);
            font-family: 'JetBrains Mono', monospace;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .price-period {
            font-size: 0.6875rem;
            color: var(--text-muted);
            white-space: nowrap;
        }

        .tier-desc {
            font-size: 0.6875rem;
            color: var(--text-muted);
            line-height: 1.45;
            margin: 0;
            min-height: 32px;
        }

        .pricing-features {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            flex: 1;
        }

        .pricing-features li {
            font-size: 0.6875rem;
            color: var(--text-surface);
            line-height: 1.4;
            display: flex;
            align-items: flex-start;
            gap: 0.45rem;
        }

        .feat-check {
            color: var(--secondary);
            font-weight: 800;
            font-size: 0.75rem;
            line-height: 1.2;
            flex-shrink: 0;
        }

        .feat-pro-check {
            color: var(--primary);
        }

        .pricing-cta-btn {
            border-radius: var(--radius-sm);
            padding: 0.65rem 1rem;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
            width: 100%;
            text-align: center;
        }

        .btn-secondary-plan {
            background: var(--surface-container);
            border: 1px solid var(--seam-border);
            color: var(--text-primary);
        }

        .btn-secondary-plan:hover {
            background: var(--surface-container-high);
            border-color: var(--primary);
        }

        .btn-featured-plan {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            border: none;
            color: var(--canvas);
            box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
        }

        .btn-featured-plan:hover {
            box-shadow: 0 0 24px rgba(6, 182, 212, 0.55);
            transform: translateY(-1px);
        }

        /* 3. FEEDBACK MODAL SPECIFICS */
        .feedback-modal-window {
            width: 520px;
            max-width: 95vw;
            padding: 2.25rem 2rem;
        }

        .feedback-type-tabs {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.45rem;
            margin-bottom: 1.15rem;
        }

        .feedback-type-btn {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            color: var(--text-surface);
            font-size: 0.6875rem;
            font-weight: 600;
            padding: 0.5rem 0.65rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.12s ease;
            font-family: inherit;
            text-align: left;
        }

        .feedback-type-btn.active {
            background: rgba(6, 182, 212, 0.15);
            border-color: var(--primary);
            color: var(--primary);
            font-weight: 700;
        }

        .rating-group {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.1rem;
            background: var(--surface-container-low);
            padding: 0.55rem 0.85rem;
            border-radius: var(--radius-sm);
            border: 1px solid var(--seam-border-subtle);
        }

        .star-rating-row {
            display: flex;
            gap: 0.2rem;
        }

        .star-rating-btn {
            background: transparent;
            border: none;
            font-size: 1.15rem;
            color: var(--text-dim);
            cursor: pointer;
            padding: 0 2px;
            transition: color 0.1s ease, transform 0.1s ease;
        }

        .star-rating-btn.active {
            color: #f59e0b;
        }

        .star-rating-btn:hover {
            transform: scale(1.15);
        }

        .feedback-status-box {
            padding: 0.65rem 0.85rem;
            border-radius: var(--radius-sm);
            font-size: 0.71875rem;
            margin-bottom: 0.85rem;
            line-height: 1.4;
            text-align: left;
        }

        .feedback-status-box.status-success {
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.35);
            color: #34d399;
        }

        .feedback-status-box.status-error {
            background: rgba(239, 68, 68, 0.12);
            border: 1px solid rgba(239, 68, 68, 0.35);
            color: #f87171;
        }

        /* 4. TOAST NOTIFICATIONS */
        .episteme-toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid var(--primary);
            color: var(--text-primary);
            padding: 0.75rem 1.25rem;
            border-radius: var(--radius-md);
            font-size: 0.75rem;
            font-weight: 600;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(6, 182, 212, 0.3);
            backdrop-filter: blur(12px);
            z-index: 3000;
            opacity: 0;
            transform: translateY(16px);
            pointer-events: none;
            transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
            max-width: 380px;
        }

        .episteme-toast.visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        /* Responsive Modal & Footer Adaptations */
        @media (max-width: 1024px) {
            .pricing-cards-grid {
                grid-template-columns: 1fr;
            }
            .pricing-card.featured-pro-card {
                transform: none;
            }
            .footer-columns-grid {
                grid-template-columns: 1fr 1fr;
                gap: 2rem;
            }
        }

        @media (max-width: 640px) {
            .footer-columns-grid {
                grid-template-columns: 1fr;
            }
            .feedback-type-tabs {
                grid-template-columns: 1fr;
            }
        }

        /* =========================================================================
           ADMIN CONSOLE & CMS DARK GLASS STYLES (OBSIDIAN / LINEAR DESIGN)
           ========================================================================= */

        .admin-modal-window {
            max-width: 1120px;
            width: 95vw;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: rgba(13, 17, 23, 0.96);
            border: 1px solid rgba(6, 182, 212, 0.3);
            border-radius: var(--radius-lg);
            box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 32px rgba(6, 182, 212, 0.15);
            backdrop-filter: blur(24px);
            padding: 1.75rem 2rem;
            color: var(--text-primary);
        }

        .admin-login-overlay {
            padding: 2.5rem 1.5rem;
            max-width: 440px;
            margin: auto;
            text-align: center;
        }

        .admin-top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--seam-border-subtle);
            padding-bottom: 1rem;
            margin-bottom: 1.25rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .admin-status-badge {
            font-size: 0.6875rem;
            font-family: var(--font-mono);
            color: #06b6d4;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            font-weight: 700;
        }

        .admin-modal-heading {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            margin-top: 0.2rem;
        }

        .admin-actions-bar {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .btn-admin-action {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-subtle);
            color: var(--text-primary);
            padding: 0.4rem 0.85rem;
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            font-family: var(--font-mono);
            cursor: pointer;
            transition: all 0.18s ease;
        }

        .btn-admin-action:hover {
            background: rgba(6, 182, 212, 0.15);
            border-color: #06b6d4;
            color: #06b6d4;
        }

        .btn-danger-action:hover {
            background: rgba(239, 68, 68, 0.15) !important;
            border-color: #ef4444 !important;
            color: #ef4444 !important;
        }

        .admin-nav-tabs {
            display: flex;
            gap: 0.4rem;
            border-bottom: 1px solid var(--seam-border-subtle);
            padding-bottom: 0.75rem;
            margin-bottom: 1.25rem;
            overflow-x: auto;
        }

        .admin-tab-btn {
            background: transparent;
            border: 1px solid transparent;
            color: var(--text-muted);
            padding: 0.45rem 0.9rem;
            border-radius: var(--radius-sm);
            font-size: 0.8125rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.18s ease;
            white-space: nowrap;
        }

        .admin-tab-btn:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.04);
        }

        .admin-tab-btn.active {
            color: #06b6d4;
            background: rgba(6, 182, 212, 0.12);
            border-color: rgba(6, 182, 212, 0.35);
        }

        .admin-dashboard-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-height: 480px;
        }

        .admin-tab-content {
            flex: 1;
            overflow-y: auto;
            padding-right: 0.5rem;
        }

        /* KPI Cards Grid */
        .admin-kpi-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
            gap: 1.25rem;
            padding: 0.5rem 0;
        }

        .kpi-card {
            background: rgba(17, 24, 39, 0.6);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-md);
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            transition: transform 0.2s ease, border-color 0.2s ease;
        }

        .kpi-card:hover {
            transform: translateY(-2px);
            border-color: rgba(6, 182, 212, 0.4);
        }

        .kpi-label {
            font-size: 0.75rem;
            font-family: var(--font-mono);
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .kpi-value {
            font-size: 2rem;
            font-weight: 800;
            font-family: var(--font-mono);
            color: var(--text-primary);
            line-height: 1.2;
        }

        .highlight-pro {
            color: #06b6d4;
        }

        .highlight-lab {
            color: #a855f7;
        }

        .kpi-sub {
            font-size: 0.6875rem;
            color: var(--text-muted);
        }

        /* Tables & Filters */
        .admin-filter-bar {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .admin-search-input {
            flex: 1;
            min-width: 240px;
        }

        .admin-track-select {
            max-width: 220px;
        }

        .admin-table-wrapper {
            background: rgba(17, 24, 39, 0.4);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-md);
            overflow: auto;
            max-height: 480px;
        }

        .admin-data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.8125rem;
            text-align: left;
        }

        .admin-data-table th {
            background: rgba(15, 23, 42, 0.8);
            color: var(--text-muted);
            font-family: var(--font-mono);
            font-size: 0.6875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid var(--seam-border-subtle);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .admin-data-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            color: var(--text-primary);
            vertical-align: middle;
        }

        .admin-data-table tr:hover td {
            background: rgba(255, 255, 255, 0.02);
        }

        .btn-table-action {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid var(--border-subtle);
            color: var(--text-primary);
            padding: 0.25rem 0.55rem;
            border-radius: var(--radius-sm);
            font-size: 0.6875rem;
            font-family: var(--font-mono);
            cursor: pointer;
            margin-right: 0.35rem;
            transition: all 0.15s ease;
        }

        .btn-table-action:hover {
            border-color: #06b6d4;
            color: #06b6d4;
            background: rgba(6, 182, 212, 0.1);
        }

        .btn-table-danger:hover {
            border-color: #ef4444;
            color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
        }

        .admin-pagination-bar {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.5rem;
            margin-top: 1rem;
            font-family: var(--font-mono);
            font-size: 0.75rem;
        }

        /* Sponsors Slot Cards */
        .sponsors-cards-list {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .sponsor-slot-card {
            background: rgba(17, 24, 39, 0.5);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-md);
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .sponsor-slot-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .sponsor-slot-key {
            font-family: var(--font-mono);
            font-size: 0.8125rem;
            color: #06b6d4;
            font-weight: 700;
        }

        .switch-toggle-label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            font-size: 0.75rem;
            font-family: var(--font-mono);
        }

        .form-row-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }

        @media (max-width: 640px) {
            .form-row-2 {
                grid-template-columns: 1fr;
            }
        }

        .paper-edit-modal-window, .grant-tier-modal-window {
            max-width: 640px;
            width: 95vw;
            max-height: 90vh;
            overflow-y: auto;
            background: rgba(13, 17, 23, 0.96);
            border: 1px solid rgba(6, 182, 212, 0.3);
            border-radius: var(--radius-lg);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(24px);
            padding: 2rem;
        }

        .modal-footer-actions {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            margin-top: 1.5rem;
        }

        .btn-modal-cancel {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-muted);
            padding: 0.6rem 1.25rem;
            border-radius: var(--radius-md);
            font-size: 0.875rem;
            cursor: pointer;
        }

        .btn-modal-cancel:hover {
            color: var(--text-primary);
            border-color: rgba(255, 255, 255, 0.2);
        }

        /* =========================================================================
           THE EPISTEME DODECAD (v6.0): 2-COLUMN LINEAR MATRIX REGISTRY
           High-density Bloomberg Terminal aesthetic with strictly zero horizontal overflow
           ========================================================================= */
        .dodecad-registry-section {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            overflow-x: hidden;
        }

        .dodecad-registry-matrix {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            overflow-x: hidden;
        }

        @media (max-width: 1100px) {
            .dodecad-registry-matrix {
                grid-template-columns: 1fr;
            }
        }

        .dodecad-column {
            background: rgba(15, 17, 23, 0.75);
            border: 1px solid var(--seam-border, rgba(255, 255, 255, 0.1));
            border-radius: var(--radius-md, 8px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-width: 0;
            box-sizing: border-box;
        }

        .dodecad-col-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.65rem 0.85rem;
            background: rgba(22, 27, 34, 0.85);
            border-bottom: 1px solid var(--seam-border, rgba(255, 255, 255, 0.1));
            font-size: 0.6875rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: var(--text-muted, #94a3b8);
            user-select: none;
            box-sizing: border-box;
        }

        .dodecad-col-count {
            font-size: 0.625rem;
            padding: 0.15rem 0.45rem;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 4px;
            color: var(--text-muted, #94a3b8);
            font-family: var(--font-mono, monospace);
        }

        .dodecad-col-body {
            display: flex;
            flex-direction: column;
            gap: 1px;
            background: var(--seam-border-subtle, rgba(255, 255, 255, 0.05));
            min-width: 0;
            box-sizing: border-box;
        }

        .btn-header-bookmarks {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            height: 32px;
            padding: 0 0.75rem;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: var(--radius-sm, 6px);
            color: var(--text-muted, #94a3b8);
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
            white-space: nowrap;
        }

        .btn-header-bookmarks:hover {
            background: rgba(6, 182, 212, 0.1);
            border-color: rgba(6, 182, 212, 0.35);
            color: var(--primary, #06b6d4);
        }

        .btn-header-bookmarks.active {
            background: rgba(6, 182, 212, 0.18);
            border-color: var(--primary, #06b6d4);
            color: var(--primary, #06b6d4);
            box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
        }

        .bookmarks-count-pill {
            font-size: 0.625rem;
            font-weight: 700;
            font-family: var(--font-mono, monospace);
            padding: 0.1rem 0.45rem;
            background: rgba(6, 182, 212, 0.2);
            color: var(--primary, #06b6d4);
            border-radius: 10px;
        }

        .dodecad-row-item {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            padding: 0.65rem 0.85rem;
            background: var(--surface, #111319);
            min-height: 84px;
            box-sizing: border-box;
            transition: background 0.15s ease, border-color 0.15s ease;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            min-width: 0;
            overflow: hidden;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        }

        .dodecad-row-item:hover {
            background: rgba(30, 41, 59, 0.65);
        }

        .dodecad-row-top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            width: 100%;
            min-width: 0;
        }

        .dodecad-top-meta {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            min-width: 0;
            overflow: hidden;
            flex-shrink: 1;
        }

        .dodecad-top-actions {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            flex-shrink: 0;
        }

        .dodecad-row-track-badge {
            font-size: 0.625rem;
            font-weight: 700;
            padding: 0.18rem 0.45rem;
            border-radius: 4px;
            text-transform: uppercase;
            flex-shrink: 0;
            white-space: nowrap;
            font-family: var(--font-mono, monospace);
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            max-width: 190px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .btn-dodecad-play {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            height: 24px;
            padding: 0 0.5rem;
            font-size: 0.6875rem;
            font-weight: 600;
            font-family: var(--font-mono, monospace);
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid rgba(6, 182, 212, 0.35);
            color: var(--primary, #06b6d4);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s ease;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .btn-dodecad-play:hover {
            background: rgba(6, 182, 212, 0.25);
            color: #fff;
            border-color: var(--primary, #06b6d4);
        }

        .btn-dodecad-play.playing {
            background: var(--primary, #06b6d4);
            color: #0b0f19;
            border-color: var(--primary, #06b6d4);
        }

        .dodecad-row-content {
            min-width: 0;
            width: 100%;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 0.2rem;
        }

        .dodecad-row-title {
            font-size: 0.8125rem;
            font-weight: 600;
            color: var(--text-normal, #e2e8f0);
            line-height: 1.35;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            word-break: break-word;
        }

        .dodecad-row-snippet {
            font-size: 0.6875rem;
            color: var(--text-muted, #94a3b8);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.25;
        }

        .badge-dodecad-surprise {
            font-family: var(--font-mono, monospace);
            font-size: 0.625rem;
            font-weight: 700;
            padding: 0.18rem 0.45rem;
            border-radius: 4px;
            flex-shrink: 0;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
        }

        .badge-dodecad-surprise.surprise-noise {
            background: rgba(148, 163, 184, 0.12);
            color: #94a3b8;
            border: 1px solid rgba(148, 163, 184, 0.25);
        }

        .badge-dodecad-surprise.surprise-opt {
            background: rgba(59, 130, 246, 0.12);
            color: #60a5fa;
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        .badge-dodecad-surprise.surprise-novel {
            background: rgba(16, 185, 129, 0.12);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.35);
        }

        .badge-dodecad-surprise.surprise-anomaly {
            background: rgba(245, 158, 11, 0.15);
            color: #fbbf24;
            border: 1px solid rgba(245, 158, 11, 0.4);
            box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
        }

        .btn-dodecad-dossier {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 24px;
            padding: 0 0.5rem;
            font-size: 0.6875rem;
            color: var(--text-muted, #94a3b8);
            background: transparent;
            border: 1px solid var(--seam-border, rgba(255, 255, 255, 0.1));
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s ease;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .btn-dodecad-dossier:hover {
            color: var(--primary, #06b6d4);
            border-color: var(--primary, #06b6d4);
            background: rgba(6, 182, 212, 0.08);
        }

        /* =========================================================================
           v4.8: PRO DEVELOPER API & MCP, AUDIO CHAPTERS, TRANSCRIPT & MINI-PLAYER
           ========================================================================= */

        .btn-api-mcp-header {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            background: rgba(168, 85, 247, 0.14);
            border: 1px solid rgba(168, 85, 247, 0.45);
            color: #e9d5ff;
            font-size: 0.6875rem;
            font-weight: 700;
            font-family: 'JetBrains Mono', monospace;
            padding: 0.35rem 0.7rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.18s ease;
            white-space: nowrap;
        }

        .btn-api-mcp-header:hover {
            background: rgba(168, 85, 247, 0.28);
            border-color: #c084fc;
            box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
            transform: translateY(-1px);
        }

        [data-theme="light"] .btn-api-mcp-header {
            background: rgba(126, 34, 206, 0.1);
            border-color: rgba(126, 34, 206, 0.45);
            color: #581c87;
        }

        /* Audio Chapters Bar */
        .audio-chapters-bar {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            flex-wrap: wrap;
            padding: 0.45rem 0.65rem;
            margin-top: 0.5rem;
            background: rgba(15, 23, 42, 0.55);
            border: 1px solid var(--seam-border-subtle);
            border-radius: var(--radius-sm);
        }

        [data-theme="light"] .audio-chapters-bar {
            background: #f8fafc;
            border-color: #cbd5e1;
        }

        .audio-chapters-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            font-weight: 800;
            color: var(--tertiary);
            letter-spacing: 0.06em;
            white-space: nowrap;
        }

        .audio-chapters-list {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-wrap: wrap;
            flex: 1;
        }

        .audio-chapter-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.22rem 0.55rem;
            background: var(--surface-container);
            border: 1px solid var(--seam-border);
            border-radius: 999px;
            color: var(--on-surface);
            font-size: calc(0.6875rem * var(--font-scale, 1));
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
        }

        .audio-chapter-chip:hover {
            border-color: var(--primary);
            background: rgba(6, 182, 212, 0.14);
        }

        .audio-chapter-chip.active {
            background: rgba(6, 182, 212, 0.22);
            border-color: var(--primary);
            color: var(--primary);
            font-weight: 700;
            box-shadow: 0 0 8px rgba(6, 182, 212, 0.25);
        }

        [data-theme="light"] .audio-chapter-chip {
            background: #ffffff;
            border-color: #cbd5e1;
            color: #000000;
        }

        [data-theme="light"] .audio-chapter-chip.active {
            background: rgba(2, 132, 199, 0.14);
            border-color: #0284c7;
            color: #000000;
        }

        .chapter-chip-time {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            font-weight: 700;
            color: var(--primary);
        }

        .btn-transcript-toggle {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            color: var(--on-surface);
            font-size: 0.6875rem;
            font-weight: 600;
            padding: 0.25rem 0.6rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: inherit;
        }

        .btn-transcript-toggle:hover, .btn-transcript-toggle.active {
            border-color: var(--primary);
            color: var(--primary);
            background: rgba(6, 182, 212, 0.12);
        }

        /* Audio Transcript Panel */
        .audio-transcript-panel {
            margin-top: 0.55rem;
            padding: 0.85rem 1rem;
            background: rgba(11, 15, 25, 0.78);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-md);
            max-height: 260px;
            overflow-y: auto;
        }

        [data-theme="light"] .audio-transcript-panel {
            background: #ffffff;
            border-color: #cbd5e1;
            color: #000000;
        }

        .audio-transcript-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.55rem;
            padding-bottom: 0.4rem;
            border-bottom: 1px solid var(--seam-border-subtle);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 700;
            color: var(--primary);
        }

        .btn-copy-transcript {
            background: var(--surface-container);
            border: 1px solid var(--seam-border);
            color: var(--on-surface);
            font-size: 0.65rem;
            padding: 0.2rem 0.55rem;
            border-radius: 4px;
            cursor: pointer;
        }

        .btn-copy-transcript:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .audio-transcript-body {
            font-size: calc(0.8125rem * var(--font-scale, 1));
            line-height: 1.6;
            color: var(--on-surface);
        }

        [data-theme="light"] .audio-transcript-body,
        [data-theme="light"] .transcript-para {
            color: #000000 !important;
        }

        .transcript-para {
            margin: 0 0 0.55rem 0;
        }

        /* Per-Card Quick Export / Deep-Link Tools */
        .card-quick-tool-btn {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            color: var(--on-surface);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            font-weight: 600;
            padding: 0.22rem 0.48rem;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .card-quick-tool-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: rgba(6, 182, 212, 0.12);
        }

        [data-theme="light"] .card-quick-tool-btn {
            background: #f8fafc;
            border-color: #cbd5e1;
            color: #000000;
        }

        /* Sticky Floating Mini-Player */
        .sticky-mini-player {
            position: fixed;
            bottom: 16px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2100;
            width: min(840px, 94vw);
            box-sizing: border-box;
            background: rgba(11, 15, 25, 0.94);
            backdrop-filter: blur(16px);
            border: 1px solid var(--primary);
            border-radius: 999px;
            padding: 0.45rem 1rem;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(6, 182, 212, 0.2);
        }

        [data-theme="light"] .sticky-mini-player {
            background: rgba(255, 255, 255, 0.96);
            border-color: #0284c7;
            color: #000000;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
        }

        .mini-player-inner {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        .btn-mini-play {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--primary);
            color: #07090e;
            border: none;
            font-weight: 800;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .mini-player-info,
        .mini-player-meta {
            display: flex;
            flex-direction: column;
            min-width: 0;
            flex: 0 1 290px;
            max-width: 320px;
            overflow: hidden;
        }

        .mini-player-title {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--on-surface);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        .mini-player-chapter {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            color: var(--primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        .mini-player-progress-wrap {
            flex: 1 1 120px;
            min-width: 60px;
            height: 6px;
            background: var(--surface-container-high);
            border-radius: 999px;
            cursor: pointer;
            overflow: hidden;
            position: relative;
        }

        .mini-player-progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            border-radius: 999px;
        }

        .mini-player-controls {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-shrink: 0;
        }

        .mini-player-time {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--on-surface-muted);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .btn-mini-speed, .btn-mini-top, .btn-mini-scroll-top, .btn-mini-action, .btn-mini-close {
            flex-shrink: 0;
            background: var(--surface-container);
            border: 1px solid var(--seam-border);
            color: var(--on-surface);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 4px;
            cursor: pointer;
            white-space: nowrap;
        }

        /* PRO Developer API & MCP Modal */
        #apiMcpModal.active {
            opacity: 1;
            pointer-events: auto;
        }

        #apiMcpModal .api-mcp-modal-window {
            width: 820px;
            max-width: 95vw;
            padding: 2rem 2.25rem;
            transform: scale(1);
        }

        [data-theme="light"] #apiMcpModal .api-mcp-modal-window {
            background: #ffffff;
            border-color: #94a3b8;
            color: #000000;
        }

        .api-mcp-key-section, .api-key-generator-box {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-md);
            padding: 1rem 1.25rem;
            margin-bottom: 1.25rem;
        }

        [data-theme="light"] .api-mcp-key-section,
        [data-theme="light"] .api-key-generator-box {
            background: #f8fafc;
            border-color: #cbd5e1;
        }

        .api-mcp-key-header, .api-key-gen-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .api-key-box-title {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.2rem;
        }

        .api-key-box-desc {
            font-size: 0.72rem;
            color: var(--text-muted);
        }

        .api-mcp-key-controls, .api-key-gen-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .api-key-input, .api-key-label-input {
            background: var(--surface-container-lowest);
            border: 1px solid var(--seam-border);
            color: var(--on-surface);
            padding: 0.45rem 0.75rem;
            border-radius: var(--radius-sm);
            font-size: 0.75rem;
            width: 220px;
        }

        .btn-generate-api-key {
            background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
            border: none;
            color: #ffffff;
            font-weight: 700;
            font-size: 0.75rem;
            padding: 0.48rem 0.9rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            white-space: nowrap;
        }

        .newly-created-key-banner, .new-api-key-banner {
            margin-top: 0.85rem;
            padding: 0.75rem 1rem;
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.45);
            border-radius: var(--radius-sm);
        }

        .newly-created-key-label, .new-key-label {
            font-size: 0.72rem;
            color: var(--secondary);
            font-weight: 700;
            margin-bottom: 0.35rem;
        }

        .newly-created-key-box, .new-key-value-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            background: rgba(0, 0, 0, 0.35);
            padding: 0.45rem 0.75rem;
            border-radius: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: #34d399;
        }

        [data-theme="light"] .newly-created-key-box,
        [data-theme="light"] .new-key-value-row {
            background: #ffffff;
            border: 1px solid #10b981;
            color: #000000;
        }

        .btn-copy-key, .btn-copy-inline {
            background: rgba(6, 182, 212, 0.16);
            color: var(--primary);
            border: 1px solid rgba(6, 182, 212, 0.4);
            font-weight: 700;
            font-size: 0.68rem;
            padding: 0.28rem 0.65rem;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-copy-key:hover, .btn-copy-inline:hover {
            background: var(--primary);
            color: #07090e;
        }

        .api-keys-list, .active-api-keys-list {
            margin-top: 0.75rem;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
            max-height: 165px;
            overflow-y: auto;
        }

        .api-key-row-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.4rem 0.65rem;
            background: var(--surface-container);
            border: 1px solid var(--seam-border-subtle);
            border-radius: 4px;
            font-size: 0.75rem;
        }

        .api-key-row-meta, .api-key-row-usage {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .api-key-prefix-code {
            font-family: 'JetBrains Mono', monospace;
            color: var(--primary);
            font-weight: 700;
        }

        .api-key-tier-pill {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.625rem;
            padding: 1px 6px;
            border-radius: 3px;
            background: rgba(168, 85, 247, 0.18);
            color: #c084fc;
            font-weight: 700;
        }

        .btn-revoke-key {
            background: rgba(239, 68, 68, 0.14);
            border: 1px solid rgba(239, 68, 68, 0.35);
            color: #f87171;
            font-size: 0.65rem;
            padding: 2px 7px;
            border-radius: 3px;
            cursor: pointer;
        }

        .api-mcp-tabs-bar, .api-mcp-tabs-nav {
            display: flex;
            gap: 0.4rem;
            border-bottom: 1px solid var(--seam-border);
            margin-bottom: 1rem;
        }

        .api-mcp-tab, .api-mcp-tab-btn {
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--on-surface-muted);
            font-size: 0.76rem;
            font-weight: 700;
            padding: 0.55rem 0.9rem;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .api-mcp-tab:hover, .api-mcp-tab-btn:hover {
            color: var(--text-primary);
        }

        .api-mcp-tab.active, .api-mcp-tab-btn.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .code-snippet-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.45rem;
            font-size: 0.74rem;
            color: var(--on-surface-muted);
        }

        .dev-code-block {
            margin: 0;
            background: #090d16;
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 0.85rem 1rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.74rem;
            line-height: 1.5;
            color: #e2e8f0;
            overflow-x: auto;
        }

        [data-theme="light"] .dev-code-block {
            background: #f8fafc;
            border-color: #94a3b8;
            color: #000000;
        }

        .mcp-tools-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.55rem;
        }

        .mcp-tool-card {
            background: var(--surface-container-low);
            border: 1px solid var(--seam-border);
            border-radius: var(--radius-sm);
            padding: 0.55rem 0.75rem;
        }

        .mcp-tool-name {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 0.2rem;
        }

        .mcp-tool-desc {
            font-size: 0.68rem;
            color: var(--on-surface-muted);
            line-height: 1.35;
        }

        /* Toast Notification */
        .episteme-toast {
            position: fixed;
            bottom: 76px;
            right: 24px;
            z-index: 3200;
            background: rgba(14, 18, 28, 0.96);
            border: 1px solid var(--primary);
            color: #ffffff;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 0.6rem 1.1rem;
            border-radius: var(--radius-sm);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
            opacity: 0;
            transform: translateY(10px);
            pointer-events: none;
            transition: all 0.2s ease;
        }

        .episteme-toast.show {
            opacity: 1;
            transform: translateY(0);
        }

        /* =========================================================================
           EDITION LIFECYCLE BADGE & DAYPARTING STATUS (Schedule v5.1)
           ========================================================================= */

        .edition-lifecycle-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.28rem 0.75rem;
            border-radius: var(--radius-sm);
            font-size: 0.6875rem;
            font-weight: 600;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            transition: all 0.25s ease;
            cursor: default;
            user-select: none;
        }

        .edition-lifecycle-pill .lifecycle-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            display: inline-block;
            flex-shrink: 0;
            position: relative;
        }

        /* State 1: Previous Active (Daytime buffer before 20:00 MSK) */
        .edition-lifecycle-pill.status-previous {
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid rgba(6, 182, 212, 0.35);
            color: var(--primary);
        }
        .edition-lifecycle-pill.status-previous .lifecycle-dot {
            background-color: var(--primary);
            box-shadow: 0 0 8px var(--primary);
            animation: livePulse 2s infinite ease-in-out;
        }

        /* State 2: Fresh Today (Evening release after 20:00 MSK) */
        .edition-lifecycle-pill.status-today {
            background: rgba(16, 185, 129, 0.14);
            border: 1px solid rgba(16, 185, 129, 0.45);
            color: #34d399;
        }
        .edition-lifecycle-pill.status-today .lifecycle-dot {
            background-color: #10b981;
            box-shadow: 0 0 10px #10b981;
            animation: livePulse 1.5s infinite ease-in-out;
        }

        /* State 3: Weekly Retrospective (Saturday super-brief / Sunday silence) */
        .edition-lifecycle-pill.status-weekly {
            background: rgba(245, 158, 11, 0.14);
            border: 1px solid rgba(245, 158, 11, 0.45);
            color: #fbbf24;
        }
        .edition-lifecycle-pill.status-weekly .lifecycle-dot {
            background-color: #f59e0b;
            box-shadow: 0 0 10px #f59e0b;
            animation: livePulse 2.2s infinite ease-in-out;
        }

        /* Light Theme Overrides */
        [data-theme="light"] .edition-lifecycle-pill.status-previous {
            background: rgba(3, 105, 161, 0.08);
            border-color: rgba(3, 105, 161, 0.4);
            color: #0369a1;
        }
        [data-theme="light"] .edition-lifecycle-pill.status-today {
            background: rgba(4, 120, 87, 0.08);
            border-color: rgba(4, 120, 87, 0.4);
            color: #047857;
        }
        [data-theme="light"] .edition-lifecycle-pill.status-weekly {
            background: rgba(180, 83, 9, 0.08);
            border-color: rgba(180, 83, 9, 0.4);
            color: #b45309;
        }

        @keyframes livePulse {
            0% {
                transform: scale(0.95);
                opacity: 0.65;
            }
            50% {
                transform: scale(1.25);
                opacity: 1;
            }
            100% {
                transform: scale(0.95);
                opacity: 0.65;
            }
        }

        /* =========================================================================
           11. PWA SMART INSTALL & WEB PUSH NOTIFICATION STYLES (v6.0)
           ========================================================================= */

        /* Header PWA Install Button */
        .btn-pwa-install-header {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            background: rgba(6, 182, 212, 0.12);
            border: 1px solid rgba(6, 182, 212, 0.38);
            color: var(--primary);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            font-weight: 600;
            padding: 0.35rem 0.65rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-pwa-install-header:hover {
            background: rgba(6, 182, 212, 0.22);
            border-color: var(--primary);
            box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
            transform: translateY(-1px);
        }

        /* Push Status Badge in User Dropdown */
        .push-status-badge {
            margin-left: auto;
            font-size: 0.625rem;
            font-weight: 700;
            padding: 0.15rem 0.45rem;
            border-radius: var(--radius-sm);
            background: rgba(148, 163, 184, 0.15);
            color: var(--on-surface-muted);
            border: 1px solid rgba(148, 163, 184, 0.25);
            transition: all 0.2s ease;
        }

        .push-status-badge.active {
            background: rgba(16, 185, 129, 0.18);
            color: #34d399;
            border-color: rgba(16, 185, 129, 0.45);
        }

        /* Floating Smart Install Banner */
        .pwa-install-banner {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 3100;
            width: 360px;
            max-width: calc(100vw - 32px);
            background: rgba(14, 18, 28, 0.96);
            border: 1px solid rgba(6, 182, 212, 0.35);
            border-radius: var(--radius-md);
            padding: 1rem 1.15rem;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(6, 182, 212, 0.15);
            backdrop-filter: blur(16px);
            display: flex;
            align-items: center;
            gap: 0.85rem;
            transform: translateY(120%);
            opacity: 0;
            pointer-events: none;
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
        }

        .pwa-install-banner.show {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .pwa-banner-icon {
            flex-shrink: 0;
            width: 44px;
            height: 44px;
            border-radius: var(--radius-sm);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #07090e;
            border: 1px solid rgba(6, 182, 212, 0.25);
        }

        .pwa-banner-content {
            flex: 1;
            min-width: 0;
        }

        .pwa-banner-title {
            font-size: 0.8125rem;
            font-weight: 700;
            color: var(--on-surface);
            margin-bottom: 0.2rem;
            letter-spacing: -0.01em;
        }

        .pwa-banner-desc {
            font-size: 0.6875rem;
            color: var(--on-surface-muted);
            line-height: 1.35;
        }

        .pwa-banner-actions {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-shrink: 0;
        }

        .btn-pwa-install {
            background: var(--primary);
            color: #07090e;
            border: none;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6875rem;
            font-weight: 700;
            padding: 0.45rem 0.75rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-pwa-install:hover {
            background: #22d3ee;
            box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
        }

        .btn-pwa-dismiss {
            background: transparent;
            border: none;
            color: var(--on-surface-muted);
            font-size: 0.85rem;
            padding: 0.35rem 0.5rem;
            cursor: pointer;
            border-radius: var(--radius-sm);
            transition: color 0.2s ease, background 0.2s ease;
        }

        .btn-pwa-dismiss:hover {
            color: var(--on-surface);
            background: rgba(255, 255, 255, 0.08);
        }

        /* iOS Safari Onboarding Modal */
        .ios-install-modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 99997;
            background: rgba(4, 7, 14, 0.82);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .ios-install-modal-overlay.show {
            display: flex;
            opacity: 1;
            pointer-events: auto;
        }

        .ios-install-modal-card {
            background: #111319;
            border: 1px solid rgba(6, 182, 212, 0.35);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 420px;
            padding: 1.5rem;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .ios-modal-header {
            display: flex;
            align-items: center;
            gap: 0.65rem;
        }

        .ios-modal-icon {
            font-size: 1.4rem;
        }

        .ios-modal-title {
            font-size: 1rem;
            font-weight: 700;
            color: var(--on-surface);
            flex: 1;
        }

        .btn-close-ios-modal {
            background: transparent;
            border: none;
            color: var(--on-surface-muted);
            font-size: 1.1rem;
            cursor: pointer;
            padding: 0.25rem 0.5rem;
            border-radius: var(--radius-sm);
            transition: color 0.2s;
        }

        .btn-close-ios-modal:hover {
            color: var(--on-surface);
        }

        .ios-modal-body {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .ios-modal-intro {
            font-size: 0.75rem;
            color: var(--on-surface-muted);
            line-height: 1.4;
        }

        .ios-step-row {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: var(--radius-sm);
            padding: 0.65rem 0.85rem;
        }

        .ios-step-num {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(6, 182, 212, 0.2);
            color: var(--primary);
            font-size: 0.75rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .ios-step-text {
            font-size: 0.75rem;
            color: var(--on-surface);
            line-height: 1.35;
        }

        .ios-glyph {
            display: inline-block;
            background: rgba(6, 182, 212, 0.15);
            padding: 0.1rem 0.35rem;
            border-radius: 4px;
            font-size: 0.85rem;
            color: var(--primary);
        }

        .btn-ios-modal-done {
            width: 100%;
            background: var(--primary);
            color: #07090e;
            border: none;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8125rem;
            font-weight: 700;
            padding: 0.7rem;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-ios-modal-done:hover {
            background: #22d3ee;
        }

        /* Light Theme Overrides for PWA */
        [data-theme="light"] .btn-pwa-install-header {
            background: rgba(3, 105, 161, 0.08);
            border-color: rgba(3, 105, 161, 0.35);
            color: #0369a1;
        }
        [data-theme="light"] .pwa-install-banner {
            background: #ffffff;
            border-color: rgba(3, 105, 161, 0.3);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
        }
        [data-theme="light"] .pwa-banner-icon {
            background: #f8fafc;
            border-color: rgba(3, 105, 161, 0.2);
        }
        [data-theme="light"] .btn-pwa-install {
            background: #0369a1;
            color: #ffffff;
        }
        [data-theme="light"] .ios-install-modal-card {
            background: #ffffff;
            border-color: rgba(3, 105, 161, 0.3);
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
        }
        [data-theme="light"] .ios-step-row {
            background: #f8fafc;
            border-color: rgba(0, 0, 0, 0.06);
        }
        [data-theme="light"] .btn-ios-modal-done {
            background: #0369a1;
            color: #ffffff;
        }

        /* Double-Opt-In Push Modal */
        .push-optin-modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 99998;
            background: rgba(4, 7, 14, 0.78);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
            opacity: 0;
            transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .push-optin-modal-overlay.show {
            display: flex;
            opacity: 1;
        }

        .push-optin-modal-card {
            background: #0d121d;
            border: 1px solid rgba(56, 189, 248, 0.28);
            border-radius: 18px;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(56, 189, 248, 0.08);
            max-width: 440px;
            width: 100%;
            padding: 1.5rem;
            animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .push-optin-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .push-optin-icon {
            font-size: 1.75rem;
            line-height: 1;
        }

        .push-optin-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--text-bright, #f8fafc);
            flex: 1;
        }

        .btn-close-push-modal {
            background: transparent;
            border: none;
            color: var(--text-muted, #94a3b8);
            font-size: 1.2rem;
            cursor: pointer;
            padding: 0.25rem;
            transition: color 0.15s ease;
        }

        .btn-close-push-modal:hover {
            color: #fff;
        }

        .push-optin-desc {
            font-size: 0.9rem;
            color: var(--text-secondary, #cbd5e1);
            line-height: 1.5;
            margin-bottom: 1.15rem;
        }

        .push-optin-perks {
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            margin-bottom: 1.5rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            padding: 0.85rem 1rem;
        }

        .push-perk-item {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            font-size: 0.85rem;
            color: var(--text-secondary, #e2e8f0);
        }

        .push-perk-bullet {
            font-size: 1rem;
            flex-shrink: 0;
        }

        .push-optin-footer {
            display: flex;
            gap: 0.75rem;
        }

        .btn-push-confirm {
            flex: 1;
            background: linear-gradient(135deg, #0284c7, #0369a1);
            color: #fff;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 0.92rem;
            padding: 0.7rem 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-push-confirm:hover {
            background: linear-gradient(135deg, #0369a1, #075985);
            box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
        }

        .btn-push-cancel {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-muted, #94a3b8);
            border-radius: 10px;
            font-size: 0.9rem;
            padding: 0.7rem 1rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-push-cancel:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        /* Offline Floating Toast */
        .offline-status-toast {
            position: fixed;
            bottom: 5.5rem;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            z-index: 99990;
            background: rgba(30, 41, 59, 0.95);
            border: 1px solid rgba(234, 179, 8, 0.4);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(234, 179, 8, 0.15);
            border-radius: 9999px;
            padding: 0.6rem 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-size: 0.88rem;
            color: #fef08a;
            pointer-events: none;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .offline-status-toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
            pointer-events: auto;
        }

        /* Light Theme Overrides */
        [data-theme="light"] .push-optin-modal-card {
            background: #ffffff;
            border-color: rgba(3, 105, 161, 0.3);
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
        }
        [data-theme="light"] .push-optin-title {
            color: #0f172a;
        }
        [data-theme="light"] .push-optin-desc {
            color: #334155;
        }
        [data-theme="light"] .push-optin-perks {
            background: #f8fafc;
            border-color: rgba(0, 0, 0, 0.08);
        }
        [data-theme="light"] .push-perk-item {
            color: #1e293b;
        }
        [data-theme="light"] .btn-push-cancel {
            background: #f1f5f9;
            border-color: #cbd5e1;
            color: #475569;
        }
        [data-theme="light"] .offline-status-toast {
            background: #fffbeb;
            border-color: #fde047;
            color: #854d0e;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

/* =========================================================================
   13. FLOATING COOKIE CONSENT CAPSULE (152-FZ / GDPR COMPLIANCE)
   ========================================================================= */
.cookie-consent-capsule {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 20px);
    z-index: 9999;
    max-width: 540px;
    width: calc(100% - 32px);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--seam-border, rgba(255, 255, 255, 0.12));
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.cookie-consent-capsule.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.cookie-consent-text {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--on-surface-muted, #94a3b8);
    flex: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cookie-policy-link {
    color: var(--primary, #38bdf8);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.cookie-policy-link:hover {
    color: var(--primary-container, #7dd3fc);
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-cookie-essential {
    background: transparent;
    border: 1px solid var(--seam-border, rgba(255, 255, 255, 0.16));
    color: var(--on-surface, #e2e8f0);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-cookie-essential:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
}

.btn-cookie-accept {
    background: var(--primary, #0284c7);
    border: 1px solid transparent;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-cookie-accept:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5);
}

@media (max-width: 640px) {
    .cookie-consent-capsule {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        bottom: 14px;
        padding: 14px 16px;
    }
    .cookie-consent-actions {
        justify-content: flex-end;
    }
}

/* Light / Editorial theme adjustments */
[data-theme="light"] .cookie-consent-capsule,
[data-theme="editorial-light"] .cookie-consent-capsule {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cookie-consent-text,
[data-theme="editorial-light"] .cookie-consent-text {
    color: #475569;
}

[data-theme="light"] .btn-cookie-essential,
[data-theme="editorial-light"] .btn-cookie-essential {
    border-color: rgba(0, 0, 0, 0.15);
    color: #334155;
}

[data-theme="light"] .btn-cookie-essential:hover,
[data-theme="editorial-light"] .btn-cookie-essential:hover {
    background: #f1f5f9;
}

/* =========================================================================
   EPISTEME v5.2: AUTONOMOUS SEMANTIC SEARCH BADGE & MATCH SCORE PILLS
   ========================================================================= */

.semantic-search-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    border: 1px solid var(--seam-border);
    background: var(--surface-container-low, rgba(15, 23, 42, 0.6));
    color: var(--text-muted);
    letter-spacing: 0.03em;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    cursor: default;
}

.semantic-search-badge.status-loading {
    border-color: rgba(245, 158, 11, 0.35);
    color: #f59e0b;
    animation: searchBadgePulse 1.8s infinite ease-in-out;
}

.semantic-search-badge.status-webgpu {
    border-color: rgba(16, 185, 129, 0.6);
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.semantic-search-badge.status-wasm {
    border-color: rgba(6, 182, 212, 0.6);
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.22);
}

.semantic-search-badge.status-server {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

@keyframes searchBadgePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.search-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 182, 212, 0.18) 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #34d399;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
    letter-spacing: 0.02em;
    animation: matchBadgeFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes matchBadgeFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

[data-theme="light"] .search-match-badge,
[data-theme="editorial-light"] .search-match-badge {
    background: #ecfdf5;
    border-color: #059669;
    color: #065f46;
}

.archive-edition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: var(--text-muted, #94a3b8);
    letter-spacing: 0.02em;
}

.offline-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    letter-spacing: 0.02em;
}

.offline-skeleton-card {
    border-style: dashed !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}




