        .merged-duplicate {
            opacity: 1 !important;
        }

        /* --- WS-DISCONNECTED BANNER ---
           Hidden by default; shown only after a short reconnect grace period. */
        .ws-disconnected-banner {
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            z-index: 2200;
            display: none;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            min-height: 30px;
            padding: 0.2rem 0.75rem;
            background: #b42318;
            color: #ffffff;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: none;
            box-shadow: 0 2px 10px rgba(180, 35, 24, 0.35);
        }
        body.ws-disconnected .ws-disconnected-banner {
            display: flex;
            animation: wsDisconnectedPulse 1.6s ease-in-out infinite;
            background: #b91c1c;
        }
        body.ws-reconnecting .ws-disconnected-banner {
            display: flex;
            background: #b7791f;
            box-shadow: 0 2px 10px rgba(183, 121, 31, 0.35);
        }
        body.ws-disconnected #market-shell {
            box-shadow: 0 8px 20px rgba(180, 35, 24, 0.25), inset 0 2px 0 #b42318;
        }
        .ws-disconnected-banner-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
            animation: wsDisconnectedDot 0.9s ease-in-out infinite;
        }
        @keyframes wsDisconnectedPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.82; }
        }
        @keyframes wsDisconnectedDot {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.35); }
        }

        .connection-toast {
            position: fixed;
            top: 58px;
            right: 16px;
            z-index: 3000;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 800;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
            background: #0f5132;
            color: #ffffff;
            max-width: min(92vw, 420px);
        }

        .connection-toast.is-success {
            background: #0f5132;
            color: #ffffff;
        }

        /* --- CONSOLIDATED HEADER --- */
        #market-shell {
            position: sticky;
            top: 0;
            z-index: 1200;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
            border-bottom: 1px solid rgba(226, 232, 240, 0.92);
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
            backdrop-filter: blur(10px);
        }

        #market-header {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            padding: 0.45rem 0.75rem;
            gap: 0.55rem 0.75rem;
            min-height: 50px;
            background: transparent;
            overflow: visible;
        }

        @media (max-width: 1200px) {
            #market-header {
                gap: 0.5rem;
                padding: 0.25rem 0.5rem;
            }

            #search-bar-wrapper {
                flex: 1 1 auto;
                /* Allow search to shrink more */
                min-width: 80px;
            }

            .filter-chips {
                flex: 0 1 auto;
                /* Allow chips to shrink and scroll */
                overflow-x: auto;
            }
        }

        @media (max-width: 800px) {
            .brand-lockup-text {
                display: none;
            }

            .user-email span {
                display: none;
                /* Hide email text on very small screens */
            }

            .ws-status span:last-child {
                display: none;
                /* Hide "Live" text */
            }
        }

        .brand-voice {
            flex-shrink: 0;
            padding-right: 0.35rem;
            width: auto;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 0.6rem;
        }

        .brand-lockup {
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            text-decoration: none;
            min-width: 0;
        }

        .brand-lockup-mark {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            flex-shrink: 0;
            box-shadow: 0 10px 24px rgba(11, 16, 32, 0.14);
        }

        .brand-lockup-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1;
        }

        .brand-lockup-name {
            font-size: 0.82rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: #0f172a;
        }

        .brand-lockup-sub {
            font-size: 0.58rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #b67a26;
        }

        #market-clock {
            font-size: 0.8rem;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
            font-weight: 700;
            color: #1e293b;
            white-space: nowrap;
            padding: 0.2rem 0.55rem;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            width: auto;
            text-align: left;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.01em;
            border: 1px solid rgba(59, 130, 246, 0.22);
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.9));
            border-radius: 999px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 1px 2px rgba(15, 23, 42, 0.04);
        }

        #market-clock .clock-label {
            font-size: 0.62rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #084c38;
        }

        #market-clock .clock-time {
            font-size: 0.86rem;
            font-weight: 800;
            color: #0f172a;
        }

        .ws-status {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.68rem;
            font-weight: 700;
            color: var(--text-muted);
            white-space: nowrap;
            flex-shrink: 0;
            padding: 0.18rem 0.5rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.76);
            border: 1px solid rgba(226, 232, 240, 0.9);
        }

        .user-nav {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            margin-left: auto;
            padding-left: 0.55rem;
            flex-shrink: 0;
            min-height: 34px;
            padding-right: 0.2rem;
        }

        .user-email {
            font-size: 0.75rem;
            font-weight: 500;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .user-email i {
            font-size: 0.7rem;
            color: var(--accent);
        }

        /* --- UI POLISH: SEARCH HIGHLIGHTING --- */
        .ac-result-title b {
            color: var(--accent);
            font-weight: 700;
        }

        /* --- UI POLISH: REACTION CHIPS --- */
        .market-reaction-chip {
            font-size: 0.62rem;
            font-weight: 800;
            padding: 3px 6px;
            border-radius: 4px;
            display: inline-flex;
            align-items: flex-start;
            justify-content: flex-start;
            flex-wrap: wrap;
            gap: 2px;
            text-transform: uppercase;
            min-height: 20px;
            max-width: min(100%, 320px);
            line-height: 1.15;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .reaction-up {
            background: rgba(34, 197, 94, 0.1);
            color: var(--success);
        }

        .reaction-down {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }

        /* --- UI POLISH: ACTIONABILITY --- */
        .action-score-badge {
            background: #0f172a;
            color: #fff;
            font-size: 0.6rem;
            font-weight: 700;
            padding: 0 6px;
            border-radius: 4px;
            letter-spacing: 0.05em;
            display: inline-flex;
            align-items: center;
            height: 20px;
        }

        .chip-session {
            background: #eef2ff;
            border: 1px solid #c7d2fe;
            color: #1e3a8a;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }


        .user-tier-badge {
            font-size: 0.62rem;
            font-weight: 800;
            text-transform: uppercase;
            padding: 0 8px;
            border-radius: 999px;
            letter-spacing: 0.06em;
            display: inline-flex;
            align-items: center;
            height: 22px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
            border: 1px solid transparent;
        }

        .tier-guest {
            background: linear-gradient(180deg, #f8fafc, #eef2f7);
            color: #64748b;
            border-color: rgba(100, 116, 139, 0.18);
        }

        .tier-signal {
            background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(37, 99, 235, 0.1));
            color: #084c38;
            border-color: rgba(37, 99, 235, 0.22);
        }

        .tier-institutional {
            background: linear-gradient(135deg, #111827, #1e293b);
            color: #f8fafc;
            border-color: rgba(255, 255, 255, 0.12);
        }

        .nav-link-slim {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--accent);
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .nav-link-slim:hover {
            background: rgba(13, 110, 253, 0.05);
            color: #084c38;
        }

        .radar-section {
            padding: 0;
        }

        .radar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
            padding: 0 0.5rem;
        }

        .radar-assets-grid {
            display: grid;
            grid-template-columns: 1fr;
            /* Single column for narrow rail */
            gap: 0.35rem;
        }

        .guest-upgrade-banner {
            display: grid;
            grid-template-columns: minmax(0, 1.4fr) auto;
            gap: 0.9rem;
            align-items: center;
            padding: 0.78rem 0.95rem;
            margin: 0.65rem 0 0.7rem;
            border-radius: 14px;
            border: 1px solid rgba(180, 83, 9, 0.18);
            background:
                radial-gradient(circle at top left, rgba(251, 191, 36, 0.14), transparent 24%),
                linear-gradient(135deg, rgba(255, 249, 240, 0.96), rgba(255, 251, 235, 0.98));
            box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
        }

        .guest-upgrade-copy h2 {
            margin: 0.12rem 0 0.24rem;
            font-size: 1rem;
            font-weight: 800;
            color: #111827;
        }

        .guest-upgrade-copy p {
            margin: 0;
            font-size: 0.82rem;
            line-height: 1.45;
            color: #4b5563;
            max-width: 720px;
        }

        .guest-upgrade-eyebrow {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 0 10px;
            border-radius: 999px;
            background: rgba(180, 83, 9, 0.12);
            color: #9a3412;
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .guest-upgrade-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.65rem;
            flex-wrap: wrap;
        }

        .guest-upgrade-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 800;
            text-decoration: none;
            transition: transform 0.18s ease, box-shadow 0.18s ease;
        }

        .guest-upgrade-btn:hover {
            transform: translateY(-1px);
        }

        .guest-upgrade-btn.primary {
            background: #111827;
            color: #fff;
        }

        .guest-upgrade-btn.secondary {
            background: #b45309;
            color: #fff;
        }

        .guest-upgrade-btn.ghost {
            border: 1px solid rgba(15, 23, 42, 0.12);
            color: #1f2937;
            background: rgba(255, 255, 255, 0.78);
        }

        .radar-tile {
            display: flex;
            flex-direction: column;
            min-width: fit-content;
            cursor: grab;
            padding: 0.1rem 0.5rem 0.1rem 1.2rem;
            border-radius: 6px;
            position: relative;
            transition: all 0.2s;
        }

        .radar-tile.radar-tick-fresh {
            background: rgba(14, 165, 233, 0.08);
            box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.18);
        }

        .radar-tile:active {
            cursor: grabbing;
        }

        /* SortableJS Classes */
        .sortable-ghost {
            opacity: 0.4;
            background: #f1f5f9;
            border: 1px dashed #cbd5e1;
        }

        .sortable-drag {
            background: #ffffff;
            opacity: 1;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            transform: scale(1.02);
            z-index: 9999;
        }

        .radar-tile-handle {
            position: absolute;
            left: 0.35rem;
            /* Tighter align */
            top: 50%;
            transform: translateY(-50%);
            color: #cbd5e1;
            opacity: 0;
            transition: opacity 0.2s;
            font-size: 0.8rem;
            /* Smaller handle */
        }

        .radar-tile:hover .radar-tile-handle {
            opacity: 1;
            color: #94a3b8;
        }

        .radar-tile-symbol {
            font-size: 0.65rem;
            /* Smaller symbol */
            font-weight: 700;
            color: #64748b;
            margin-bottom: 0.1rem;
            letter-spacing: 0.02em;
        }

        .radar-tile-row {
            display: flex;
            align-items: baseline;
            gap: 0.3rem;
            /* Tighter gap */
        }

        .radar-tile-price {
            font-size: 0.85rem;
            /* Slightly smaller price */
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            color: #0f172a;
        }

        .radar-tile-pct {
            font-size: 0.65rem;
            /* Much smaller % */
            font-weight: 600;
            font-variant-numeric: tabular-nums;
            opacity: 0.9;
        }

        .regime-risk-on {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
            border: 1px solid rgba(16, 185, 129, 0.4);
        }

        .regime-risk-off {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.4);
        }

        .regime-stable {
            background: rgba(100, 116, 139, 0.18);
            color: #475569;
            border: 1px solid rgba(100, 116, 139, 0.35);
        }

        .radar-tile-change {
            font-size: 0.7rem;
            font-weight: 700;
        }

        @media (max-width: 920px) {
            .guest-upgrade-banner {
                grid-template-columns: 1fr;
            }

            .guest-upgrade-actions {
                justify-content: flex-start;
            }
        }

        .move-up {
            color: #10b981;
        }

        .move-down {
            color: #ef4444;
        }

        /* Loading pulse for T+15m */
        .p15-loading {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--warning);
            opacity: 0.5;
            animation: p15-pulse 1.5s infinite;
        }

        @keyframes p15-pulse {

            0%,
            100% {
                transform: scale(0.8);
                opacity: 0.3;
            }

            50% {
                transform: scale(1.1);
                opacity: 0.8;
            }
        }

        * {
            box-sizing: border-box;
        }

        [hidden] {
            display: none !important;
        }

        body {
            margin: 0;
            font-family: var(--font-family);
            background: var(--bg-darker);
            color: #0f172a;
            min-height: 100vh;
        }

        a {
            color: var(--accent);
            text-decoration: none;
        }

        #market-shell {
            position: sticky;
            top: 0;
            z-index: 1200;
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
            border-bottom: 1px solid var(--border-color);
            backdrop-filter: blur(6px);
        }

        /* Removed redundant #market-header block */

        .brand-voice {
            flex-shrink: 0;
        }

        .ws-status {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #e11d48;
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }

        .status-dot.live {
            background: #10b981;
            /* Professional Emerald */
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
        }

        .status-dot.reconnecting {
            background: #b7791f;
            box-shadow: 0 0 8px rgba(183, 121, 31, 0.35);
        }

        .status-dot.disconnected {
            background: #c23631;
            box-shadow: 0 0 8px rgba(194, 54, 49, 0.35);
        }

        .status-dot.stale {
            background: #b7791f;
            box-shadow: 0 0 8px rgba(183, 121, 31, 0.35);
        }

        .status-dot.static {
            background: #64748b;
            box-shadow: none;
        }

        .text-up {
            color: var(--success);
        }

        .text-down {
            color: var(--danger);
        }

        /* .search-panel removed - merged into header */

        #search-bar-wrapper {
            position: relative;
            flex: 0 1 260px;
            min-width: 170px;
        }

        #search-bar {
            width: 100%;
            border-radius: 10px;
            border: 1px solid rgba(203, 213, 225, 0.9);
            background: rgba(248, 250, 252, 0.94);
            padding: 0.42rem 1rem 0.42rem 2.2rem;
            color: #0f172a;
            font-size: 0.78rem;
            font-weight: 600;
            transition: all 0.2s;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
        }

        #search-bar:focus {
            background: #fff;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
        }

        #search-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 0.9rem;
            /* The icon sits over the input; never let it swallow taps meant for the
               input itself (mobile: tapping near the placeholder failed to focus). */
            pointer-events: none;
        }

        .filter-chips {
            display: flex;
            flex-wrap: nowrap;
            gap: 0.35rem;
            flex: 0 1 auto;
            min-width: 0;
            overflow-x: auto;
            scrollbar-width: none;
            padding: 0 0.15rem;
            -webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
            scroll-padding-inline: 0.15rem;
        }

        .filter-chips button {
            flex: 0 0 auto; /* don't compress/clip pills — scroll instead (mobile audit) */
            background: rgba(255, 255, 255, 0.84);
            color: #64748b;
            border: 1px solid rgba(226, 232, 240, 0.92);
            padding: 0.22rem 0.68rem;
            border-radius: 999px;
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .filter-chips button:hover {
            background: #f1f5f9;
            color: #0f172a;
        }

        .filter-chips button.active {
            background: linear-gradient(135deg, #084c38, #084c38);
            color: #fff;
            border-color: transparent;
            box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
        }

        .filter-chips .secondary-chip {
            display: none;
        }

        .filter-chips.show-secondary .secondary-chip {
            display: inline-flex;
        }

        .topbar-utility-btn {
            border: 1px solid rgba(148, 163, 184, 0.4);
            background: #fff;
            color: #334155;
            border-radius: 999px;
            padding: 0.22rem 0.66rem;
            font-size: 0.66rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .topbar-utility-btn.is-active {
            background: #0f172a;
            border-color: #0f172a;
            color: #fff;
        }

        .density-switch {
            display: inline-flex;
            align-items: center;
            gap: 0.34rem;
            border: 1px solid rgba(148, 163, 184, 0.4);
            border-radius: 999px;
            padding: 0.16rem 0.5rem;
            background: #fff;
            flex-shrink: 0;
        }

        .density-label {
            font-size: 0.62rem;
            font-weight: 800;
            color: #64748b;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .density-select {
            border: 0;
            outline: none;
            background: transparent;
            color: #0f172a;
            font-size: 0.7rem;
            font-weight: 700;
        }

        .impact-legend-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.2rem 0.55rem;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: rgba(248, 250, 252, 0.9);
            white-space: nowrap;
        }

        .impact-legend-chip span {
            font-size: 0.64rem;
            font-weight: 700;
            color: #475569;
            letter-spacing: 0.01em;
        }

        .filter-chips.is-disabled {
            opacity: 0.58;
        }

        .filter-chips.is-disabled button,
        .filter-chips button:disabled {
            cursor: not-allowed;
            color: #94a3b8;
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            border: 1px solid rgba(203, 213, 225, 0.9);
            box-shadow: none;
        }

        .filter-chips.is-disabled button:hover,
        .filter-chips button:disabled:hover {
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            color: #94a3b8;
            box-shadow: none;
        }

        .mode-tabs {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            background: rgba(241, 245, 249, 0.88);
            border: 1px solid rgba(226, 232, 240, 0.92);
            border-radius: 10px;
            padding: 3px;
            flex-shrink: 0;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        }

        .mode-tabs .tab-btn {
            border: 1px solid transparent;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.38rem;
            padding: 4px 10px;
            font-size: 0.72rem;
            font-weight: 700;
            border-radius: 8px;
            cursor: pointer;
            background: transparent;
            color: #64748b;
            line-height: 1;
            white-space: nowrap;
            min-height: 30px;
            transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
        }

        .mode-tabs .tab-btn.active {
            background: #ffffff;
            color: #0f172a;
            border-color: rgba(148, 163, 184, 0.22);
            box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
        }

        .tab-count-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 999px;
            background: #084c38;
            color: #ffffff;
            font-size: 0.62rem;
            font-weight: 800;
            line-height: 1;
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
        }

        /* Date Filter Styling */
        .date-filter-wrapper {
            display: inline-flex;
            align-items: center;
            gap: 0.38rem;
            height: 34px;
            padding: 0 0.5rem;
            border-radius: 12px;
            border: 1px solid rgba(30, 64, 175, 0.24);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98));
            box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
            position: relative;
            flex-shrink: 0;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
        }

        .date-filter-wrapper:hover {
            border-color: rgba(37, 99, 235, 0.45);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
        }

        .date-filter-wrapper:focus-within {
            border-color: rgba(37, 99, 235, 0.65);
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14), 0 6px 14px rgba(37, 99, 235, 0.16);
            transform: translateY(-0.5px);
        }

        #date-filter {
            background: transparent;
            border: none;
            color: #0f172a;
            font-size: 0.72rem;
            font-weight: 800;
            width: 84px;
            outline: none;
            cursor: pointer;
            letter-spacing: 0.02em;
            font-variant-numeric: tabular-nums;
        }

        .date-icon {
            color: #084c38;
            font-size: 0.78rem;
            filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
        }

        .clear-date-btn {
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border: 1px solid transparent;
            border-radius: 999px;
            background: transparent;
            color: #dc2626;
            font-size: 0.64rem;
            cursor: pointer;
            padding: 0;
            display: none;
            /* Shown via JS */
            opacity: 0.86;
            transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
        }

        .clear-date-btn:hover {
            opacity: 1;
            background: rgba(220, 38, 38, 0.08);
            border-color: rgba(220, 38, 38, 0.2);
            color: #b91c1c;
        }

        #ui-datepicker-div.tape-datepicker {
            z-index: 2400 !important;
            width: min(296px, calc(100vw - 20px));
            padding: 0.58rem;
            border-radius: 14px;
            border: 1px solid rgba(30, 64, 175, 0.22);
            background: linear-gradient(180deg, #ffffff, #f8fbff);
            box-shadow: 0 16px 38px rgba(15, 23, 42, 0.22);
            font-size: 0.8rem;
            overflow: hidden;
        }

        #ui-datepicker-div.tape-datepicker .ui-datepicker-header {
            border: none;
            border-radius: 10px;
            background: linear-gradient(135deg, #084c38, #084c38);
            color: #fff;
            padding: 0.42rem 0.34rem;
            margin-bottom: 0.42rem;
        }

        #ui-datepicker-div.tape-datepicker .ui-datepicker-title {
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        #ui-datepicker-div.tape-datepicker .ui-datepicker-prev,
        #ui-datepicker-div.tape-datepicker .ui-datepicker-next {
            border: none;
            border-radius: 8px;
            width: 1.7em;
            height: 1.7em;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0.95;
            cursor: pointer;
        }

        #ui-datepicker-div.tape-datepicker .ui-datepicker-prev:hover,
        #ui-datepicker-div.tape-datepicker .ui-datepicker-next:hover {
            background: rgba(255, 255, 255, 0.18);
        }

        #ui-datepicker-div.tape-datepicker table {
            margin: 0;
        }

        #ui-datepicker-div.tape-datepicker th {
            color: #334155;
            font-size: 0.66rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            padding: 0.23rem 0;
        }

        #ui-datepicker-div.tape-datepicker td {
            padding: 1px;
        }

        #ui-datepicker-div.tape-datepicker td a,
        #ui-datepicker-div.tape-datepicker td span {
            border: none;
            border-radius: 8px;
            text-align: center;
            padding: 0.4rem 0;
            font-weight: 700;
            color: #0f172a;
            background: transparent;
        }

        #ui-datepicker-div.tape-datepicker td a:hover {
            background: rgba(59, 130, 246, 0.13);
            color: #1e3a8a;
        }

        #ui-datepicker-div.tape-datepicker td .ui-state-active {
            background: linear-gradient(135deg, #084c38, #084c38);
            color: #fff;
            box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
        }

        #ui-datepicker-div.tape-datepicker td .ui-state-highlight {
            background: rgba(250, 204, 21, 0.28);
            color: #854d0e;
        }

        #ui-datepicker-div.tape-datepicker .ui-state-disabled span {
            opacity: 0.42;
        }

        @media (max-width: 640px) {
            #ui-datepicker-div.tape-datepicker {
                width: min(312px, calc(100vw - 16px));
                padding: 0.5rem;
                border-radius: 12px;
            }

            #date-filter {
                width: 94px;
                font-size: 0.75rem;
            }
        }

        .date-mode-notice {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.75rem;
            padding: 0.5rem 0.75rem;
            border-top: 1px solid rgba(15, 23, 42, 0.08);
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
            background: #eef6ff;
            color: #0f172a;
            font-size: 0.78rem;
            font-weight: 600;
        }

        .date-mode-notice[hidden] {
            display: none !important;
        }

        .date-mode-text {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
            flex-wrap: wrap;
        }

        .date-mode-pill {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border-radius: 999px;
            background: #e2e8f0;
            color: #334155;
            border: 1px solid #cbd5e1;
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        #dateModeClearBtn {
            border: 1px solid #cbd5e1;
            border-radius: 999px;
            background: #fff;
            color: #334155;
            padding: 4px 10px;
            font-size: 0.72rem;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
        }

        #dateModeClearBtn:hover {
            background: #f1f5f9;
            border-color: #94a3b8;
        }

        .tape-state-bar {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-shrink: 0;
            padding: 0 0.25rem;
            border-left: 1px solid rgba(148, 163, 184, 0.3);
            margin-left: 0.25rem;
        }

        .tape-state-text {
            font-size: 0.68rem;
            font-weight: 700;
            color: #334155;
            letter-spacing: 0.02em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .tape-state-reset {
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: #fff;
            color: #334155;
            border-radius: 999px;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 0.12rem 0.5rem;
        }

        /* Dropdown container — hidden by default, shown via .open class added by JS */
        .search-suggestions {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            border: 1px solid rgba(15, 23, 42, 0.12) !important;
            border-radius: 14px !important;
            background: #fff !important;
            padding: 0.35rem 0 !important;
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
            font-size: 0.86rem !important;
            color: #0f172a !important;
            z-index: 9999 !important;
            margin-top: 6px !important;
            max-height: 58vh !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            /* Wide enough for 4-column grid on 15" laptop, collapses to viewport on mobile */
            min-width: 320px !important;
            max-width: calc(100vw - 16px) !important;
            width: clamp(320px, 700px, calc(100vw - 16px)) !important;
            font-family: var(--font-family) !important;
        }

        .search-suggestions.open {
            display: block !important;
        }

        .search-suggestions .ui-menu-item-wrapper {
            padding: 0 !important;
            border-bottom: 1px solid rgba(15, 23, 42, 0.04) !important;
        }

        .search-suggestions .ac-controls-item .ui-menu-item-wrapper,
        .search-suggestions .ac-empty .ui-menu-item-wrapper {
            border-bottom: none !important;
        }

        .ac-controls-item {
            position: sticky;
            top: 0;
            z-index: 2;
            background: #ffffff;
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        }

        .ac-controls-bar {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 9px 12px;
            overflow-x: auto;
            scrollbar-width: thin;
            white-space: nowrap;
        }

        .ac-mode-pill {
            margin-left: auto;
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            color: #475569;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .ac-mode-pill.emergency {
            border-color: rgba(217, 48, 37, 0.45);
            background: rgba(217, 48, 37, 0.1);
            color: #b91c1c;
        }

        .ac-filter-btn {
            border: 1px solid #d1d9e6;
            background: #f8fafc;
            color: #334155;
            border-radius: 999px;
            padding: 4px 10px;
            font-size: 0.66rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            cursor: pointer;
            user-select: none;
        }

        .ac-filter-btn.active {
            background: #084c38;
            border-color: #084c38;
            color: #ffffff;
        }

        .ac-inline-status {
            padding: 6px 12px 4px;
            color: #64748b;
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .ac-group-label {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 7px 12px 5px;
            font-size: 0.66rem;
            font-weight: 900;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .ac-result-row {
            padding: 10px 14px;
            display: grid;
            /* auto = timestamp sizes to its own text (~90px)
               1fr  = headline takes ALL remaining space
               auto = category tag(s) size to content
               auto = signal pill sizes to content
               This avoids fixed-px overflow: old 136+240+124=500px > 480px dropdown → 1fr=0 (invisible headline) */
            grid-template-columns: auto minmax(0, 1fr) auto auto;
            column-gap: 10px;
            align-items: center;
            cursor: pointer;
            transition: background-color 0.15s ease;
            font-family: var(--font-family);
            min-height: 48px;
        }

        /* Mobile: stack headline below timestamp, hide signal pill to save space */
        @media (max-width: 540px) {
            .ac-result-row {
                grid-template-columns: auto 1fr;
                grid-template-rows: auto auto;
                row-gap: 4px;
            }
            .ac-result-meta    { grid-column: 1; grid-row: 1; }
            .ac-result-title   { grid-column: 2; grid-row: 1; }
            .ac-result-context { grid-column: 1 / -1; grid-row: 2; padding-left: 2px; }
            .ac-result-signal  { display: none; }
        }

        .ac-result-row.ac-critical {
            background: rgba(220, 38, 38, 0.04);
            border-left: 3px solid rgba(220, 38, 38, 0.62);
        }

        .ac-result-meta {
            font-size: 0.72rem;
            color: #64748b;
            font-weight: 700;
            white-space: nowrap;
            font-variant-numeric: tabular-nums;
            min-width: 90px;
            text-align: right;
        }

        .ac-result-title {
            font-size: 0.9rem;
            color: #0f172a;
            font-weight: 600;
            white-space: normal;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            max-width: 100%;
            line-height: 1.34;
            word-break: break-word;
        }

        .ac-result-title mark {
            background: rgba(37, 99, 235, 0.18);
            color: #0f172a;
            padding: 0 2px;
            border-radius: 3px;
            font-weight: 800;
        }

        .ac-result-context {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.3rem;
            flex-wrap: wrap;
        }

        .ac-tag {
            border: 1px solid #dbe3ef;
            background: #f8fafc;
            color: #334155;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 0.66rem;
            font-weight: 800;
            line-height: 1.25;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .ac-tag-critical {
            color: #b91c1c;
            border-color: rgba(185, 28, 28, 0.32);
            background: rgba(239, 68, 68, 0.08);
        }

        .ac-result-signal {
            justify-self: end;
            min-width: 108px;
            border-radius: 999px;
            padding: 3px 9px;
            font-size: 0.68rem;
            font-weight: 900;
            text-align: right;
            letter-spacing: 0.02em;
            color: #475569;
            border: 1px solid #dbe3ef;
            background: #f8fafc;
            white-space: nowrap;
        }

        .ac-result-signal.sig-up {
            color: #166534;
            border-color: rgba(22, 163, 74, 0.4);
            background: rgba(22, 163, 74, 0.12);
        }

        .ac-result-signal.sig-down {
            color: #b91c1c;
            border-color: rgba(220, 38, 38, 0.36);
            background: rgba(220, 38, 38, 0.1);
        }

        .ac-result-signal.sig-flat {
            color: #475569;
            border-color: #cbd5e1;
            background: #f8fafc;
        }

        .ac-result-signal.sig-none {
            color: #94a3b8;
            border-style: dashed;
            background: #f8fafc;
        }

        .ac-result-signal.sig-empty {
            border: none;
            background: transparent;
            color: transparent;
            padding: 0;
            min-width: 0;
        }

        .ac-reaction {
            font-size: 0.68rem;
            font-weight: 600;
            color: #64748b;
        }

        .ac-reaction.up {
            color: #16a34a;
        }

        .ac-reaction.down {
            color: #dc2626;
        }

        .app-toast-stack {
            position: fixed;
            right: 14px;
            bottom: 16px;
            z-index: 1600;
            display: grid;
            gap: 8px;
            width: min(360px, calc(100vw - 22px));
            pointer-events: none;
        }

        .app-toast {
            pointer-events: auto;
            border-radius: 10px;
            border: 1px solid rgba(15, 23, 42, 0.1);
            background: #ffffff;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
            padding: 9px 11px;
            font-size: 0.8rem;
            font-weight: 700;
            color: #0f172a;
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 0.16s ease, transform 0.16s ease;
        }

        .app-toast.show {
            opacity: 1;
            transform: translateY(0);
        }

        .app-toast.toast-success {
            border-color: rgba(22, 163, 74, 0.34);
            background: rgba(22, 163, 74, 0.08);
            color: #166534;
        }

        .app-toast.toast-error {
            border-color: rgba(220, 38, 38, 0.34);
            background: rgba(220, 38, 38, 0.08);
            color: #991b1b;
        }

        /* FIXED: Subtle hover that matches site theme */
        .search-suggestions .ui-state-active {
            background: rgba(13, 110, 253, 0.06) !important;
            /* Very subtle cool tint from theme */
            border: none !important;
            margin: 0 !important;
        }

        .search-suggestions .ui-state-active .ac-result-title {
            color: #0f172a;
            /* Keep same dark color, no aggressive change */
        }

        .search-suggestions li:last-child .ui-menu-item-wrapper {
            border-bottom: none !important;
        }

        /* Tablet / small laptop: fill viewport width, keep same 4-column auto grid */
        @media (max-width: 800px) {
            .search-suggestions {
                width: calc(100vw - 16px) !important;
                max-height: 50vh !important;
            }
            .ac-result-row {
                padding: 9px 11px;
            }
        }

        @media (max-width: 640px) {
            .app-toast-stack {
                left: 10px;
                right: 10px;
                width: auto;
                bottom: 10px;
            }
        }

        main.layout-grid {
            display: grid;
            grid-template-columns: minmax(0, 4.1fr) minmax(340px, 1.08fr);
            gap: 1.25rem;
            align-items: start;
            padding: 1rem 1.25rem 3rem;
        }

        .market-stream {
            grid-column: 1;
            min-width: 0;
        }

        .side-container {
            grid-column: 2;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            min-width: 0;
            width: 100%;
            max-width: 100%;
            overflow: hidden;
        }

        @media (min-width: 1201px) {
            .side-container {
                position: sticky;
                top: var(--mc-shell-height);
                max-height: calc(100vh - var(--mc-shell-height) - 12px);
                overflow: visible;
            }

            .side-container .eco-drawer-shell {
                height: calc(100vh - var(--mc-shell-height) - 12px);
                min-height: min(420px, calc(100vh - var(--mc-shell-height) - 12px));
            }
        }

        body.side-collapsed main.layout-grid {
            grid-template-columns: minmax(0, 1fr);
        }

        body.side-collapsed .side-container {
            display: none;
        }

        /* =====================================================================
           ECO CALENDAR FLOATING TOGGLE — for viewports ≤1200px where the sidebar
           collapses below all headlines. A fixed pill button opens the eco panel
           as a full-height slide-in drawer from the right.
           ===================================================================== */
        .eco-float-btn {
            display: none;
        }
        .eco-drawer-overlay {
            display: none;
        }

        @media (max-width: 1200px) {
            .eco-float-btn {
                display: flex;
                align-items: center;
                gap: 5px;
                position: fixed;
                bottom: 72px;
                right: 16px;
                z-index: 1400;
                background: linear-gradient(135deg, #084c38, #084c38);
                color: #ffffff;
                border: none;
                border-radius: 999px;
                padding: 9px 15px 9px 12px;
                font-size: 0.72rem;
                font-weight: 800;
                letter-spacing: 0.06em;
                text-transform: uppercase;
                box-shadow: 0 4px 16px rgba(29, 78, 216, 0.45), 0 2px 6px rgba(0,0,0,0.15);
                cursor: pointer;
                transition: transform 0.15s ease, box-shadow 0.15s ease;
            }
            .eco-float-btn:hover {
                transform: translateY(-2px);
                box-shadow: 0 6px 20px rgba(29, 78, 216, 0.55), 0 3px 8px rgba(0,0,0,0.18);
            }
            .eco-float-btn:active { transform: translateY(0); }

            /* Reserve space so the LAST feed cards can scroll clear of the fixed
               ECO + back-to-top FAB stack (was overlapping lower-card metadata).
               Plus honor the iOS safe-area inset. */
            #accordionHeadlines {
                padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
            }

            .eco-drawer-overlay {
                display: none;
                position: fixed;
                inset: 0;
                z-index: 1350;
                background: rgba(15, 23, 42, 0.45);
                backdrop-filter: blur(2px);
            }
            body.eco-drawer-open .eco-drawer-overlay {
                display: block;
            }

            /* When drawer is open, pull the side-container into a fixed right panel */
            body.eco-drawer-open .side-container {
                position: fixed !important;
                top: 0;
                right: 0;
                bottom: 0;
                width: min(420px, 94vw);
                z-index: 1360;
                background: #ffffff;
                box-shadow: -4px 0 30px rgba(15, 23, 42, 0.18);
                overflow-y: auto;
                padding: 0;
                display: flex !important;
                flex-direction: column;
                animation: ecoDrawerSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
                max-height: 100vh;
                order: unset;
            }
            body.eco-drawer-open .eco-drawer-shell {
                height: 100% !important;
                min-height: 0;
            }
            @keyframes ecoDrawerSlideIn {
                from { transform: translateX(100%); opacity: 0.7; }
                to   { transform: translateX(0);    opacity: 1; }
            }

            /* Button turns into a close (×) button when drawer is open */
            body.eco-drawer-open .eco-float-btn {
                background: linear-gradient(135deg, #dc2626, #ef4444);
                box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
            }
        }

        .side-pillars {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 1rem;
            align-items: start;
            min-width: 0;
            width: 100%;
        }

        .eco-panel {
            width: 100%;
            max-width: 540px;
            min-width: 0;
            display: flex;
            flex-direction: column;
        }

        @media (max-width: 1600px) {
            main.layout-grid {
                grid-template-columns: minmax(0, 3.95fr) minmax(330px, 1fr);
            }

            .eco-panel {
                max-width: 400px;
            }
        }

        @media (max-width: 1360px) {
            main.layout-grid {
                grid-template-columns: minmax(0, 3.55fr) minmax(300px, 0.98fr);
            }

            .eco-panel {
                max-width: 360px;
            }
        }

        @media (max-width: 1480px) {
            .eco-panel-header {
                padding: 10px 12px 8px;
            }

            .eco-title {
                font-size: 0.86rem;
                gap: 6px;
            }

            .eco-live-pill {
                font-size: 9px;
                padding: 2px 6px;
            }

            .eco-mini-btn {
                font-size: 10px;
                padding: 3px 7px;
            }

            .eco-subtitle {
                font-size: 11px;
                gap: 4px;
            }

            .eco-filter-btn {
                font-size: 9px;
                padding: 3px 7px;
            }

            .eco-table {
                font-size: 0.74rem;
            }

            .eco-table thead th {
                font-size: 0.6rem;
                padding: 0.42rem 0.4rem;
            }

            .eco-table td {
                padding: 0.44rem 0.4rem;
            }

            .cell-time {
                width: 40px;
                font-size: 0.64rem;
            }

            .cell-cur {
                width: 52px;
            }

            .cell-imp {
                width: 14px;
            }

            .cell-act,
            .cell-est,
            .cell-prev {
                width: 42px;
                font-size: 0.68rem;
            }

            .cell-act {
                width: 46px;
            }

            .eco-ccy {
                min-width: 30px;
                padding: 1px 4px;
                font-size: 9px;
            }

            .eco-event-title {
                font-size: 0.69rem;
                line-height: 1.18;
            }
        }

        .radar-column {
            position: sticky;
            top: 54px;
            background: #ffffff;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            padding: 1rem 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            z-index: 100;
        }

        @media (max-width: 1200px) {
            main.layout-grid {
                grid-template-columns: 1fr;
            }

            .market-stream {
                grid-column: 1;
                width: 100%;
                min-width: 0;
                order: 1;
            }

            .side-container {
                grid-column: 1;
                width: 100%;
                max-width: 100%;
                min-width: 0;
                order: 2;
                overflow: visible;
            }

            .side-pillars {
                width: 100%;
                min-width: 0;
            }

            .eco-panel {
                max-width: 100%;
                min-width: 0;
            }

            .eco-drawer-shell {
                position: static;
                height: auto;
                min-height: 0;
            }

            .eco-panel-header {
                padding: 12px 13px 9px;
            }

            .eco-subtitle {
                font-size: 11px;
                gap: 6px;
                padding: 5px 7px;
            }
        }

        @media (max-width: 1024px) {
            .eco-title-row {
                flex-wrap: wrap;
                gap: 8px;
            }

            .eco-actions {
                width: 100%;
                justify-content: flex-start;
                gap: 5px;
            }

            .eco-mini-btn {
                padding: 3px 7px;
                font-size: 10px;
            }

            .eco-table {
                font-size: 0.76rem;
            }

            .eco-table thead th {
                font-size: 0.62rem;
                padding: 0.45rem 0.45rem;
            }

            .eco-table td {
                padding: 0.45rem 0.45rem;
            }

            .cell-time {
                width: 42px;
                font-size: 0.66rem;
            }

            .cell-cur {
                width: 56px;
            }

            .cell-imp {
                width: 16px;
            }

            .cell-act,
            .cell-est,
            .cell-prev {
                width: 48px;
                font-size: 0.7rem;
            }

            .cell-act {
                width: 52px;
            }

            .eco-ccy {
                min-width: 32px;
                padding: 1px 5px;
                font-size: 10px;
            }

            .eco-event-title {
                font-size: 0.72rem;
            }

            .eco-drawer-shell {
                height: auto;
                min-height: 0;
                max-height: 72vh;
            }

            .eco-table-container {
                max-height: min(68vh, 720px);
            }
        }

        /* Economic Calendar (Sticky Right Pane) */
        .eco-drawer-shell {
            background: #ffffff;
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 18px;
            box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
            container-type: inline-size;
            container-name: eco-panel;
            top: auto;
            height: calc(100vh - 140px);
            min-height: 420px;
            width: 100%;
            max-width: 100%;
            min-width: 0;
        }

        .eco-drawer-shell.collapsed {
            max-height: none;
            cursor: default;
        }

        .eco-panel-header {
            padding: 14px 16px 10px;
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #ffffff);
        }

        .eco-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .eco-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            font-weight: 700;
            color: #0f172a;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .eco-title-dot {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: #084c38;
            box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
        }

        .eco-live-pill {
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            color: #0f172a;
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .eco-actions {
            display: flex;
            gap: 6px;
        }

        .eco-toggle-btn {
            margin-left: auto;
            white-space: nowrap;
        }

        .eco-mobile-summary {
            display: none;
            margin-top: 8px;
            font-size: 11px;
            font-weight: 700;
            color: #475569;
        }

        .eco-mini-btn {
            border: 1px solid rgba(15, 23, 42, 0.15);
            background: #ffffff;
            color: #0f172a;
            font-size: 11px;
            font-weight: 600;
            padding: 4px 8px;
            border-radius: 999px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .eco-mini-btn:hover {
            border-color: #cfe0ff;
            color: #084c38;
            background: #f6faff;
        }

        .eco-subtitle {
            margin-top: 6px;
            font-size: 12px;
            color: #334155;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            min-width: 0;
            padding: 6px 8px;
            border-radius: 10px;
            background: linear-gradient(90deg, rgba(226, 232, 240, 0.75), rgba(241, 245, 249, 0.95));
            border: 1px solid rgba(148, 163, 184, 0.28);
        }

        #ecoDayText {
            font-weight: 700;
            color: #334155;
        }

        #ecoNextText {
            font-weight: 800;
            color: #475569;
            background: rgba(37, 99, 235, 0.12);
            border: 1px solid rgba(37, 99, 235, 0.28);
            border-radius: 999px;
            padding: 2px 8px;
            line-height: 1.25;
            min-width: 0;
            max-width: 100%;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

/* =============================================================
   RTL / ARABIC LAYOUT OVERRIDES
   Applied when html[dir="rtl"] (locale=ar).
   Strategy: use [dir="rtl"] prefix to override LTR defaults
   without touching existing rules. Logical properties preferred
   where browser support allows; explicit left/right used as
   fallback for broader compatibility.
   ============================================================= */

[dir="rtl"] body {
    font-family: var(--font-family-ar);
    line-height: var(--line-height-ar);
}

/* Arabic text rendering improvements */
[dir="rtl"] .headline-secondary-text,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
    font-family: var(--font-family-ar);
    line-height: var(--line-tight-ar);
    text-align: right;
}

/* ── BILINGUAL TAPE: English-primary layout in Arabic UI ──────────────────
   The headline-title-wrap stays LTR so h3 (English) is left-anchored and
   the ترجمة action button appears immediately to its right — not far-left.
   The h3 itself carries dir="ltr" so text is always left-aligned LTR.
   The Arabic expansion panel has its own dir="rtl" and is unaffected.
   ──────────────────────────────────────────────────────────────────────── */
[dir="rtl"] .headline-title-wrap {
    direction: ltr;
    text-align: left;
}
[dir="rtl"] .headline-title,
[dir="rtl"] .headline-title[dir="ltr"] {
    font-family: var(--font-family-base, inherit);
    line-height: 1.25;
    text-align: left !important;
    direction: ltr !important;
    unicode-bidi: plaintext;
}

/* --- HEADER / TOPBAR --- */
/* .header-main-row and .header-secondary-row are the actual rows inside #market-header */
[dir="rtl"] .header-main-row,
[dir="rtl"] .header-secondary-row {
    flex-direction: row-reverse;
}

[dir="rtl"] #market-clock {
    /* Clock stays LTR — numbers are always read left-to-right */
    direction: ltr;
    unicode-bidi: embed;
}

/* .mode-tabs is the actual tab container class */
[dir="rtl"] .mode-tabs {
    flex-direction: row-reverse;
}

[dir="rtl"] .locale-switcher,
[dir="rtl"] .user-nav {
    flex-direction: row-reverse;
}

/* --- HEADLINE CARDS --- */
/* Actual DOM: .headline-card > .headline-main-row > .card-meta + .headline-category-slot + .headline-title-wrap */
[dir="rtl"] .headline-card {
    text-align: right;
}

[dir="rtl"] .headline-main-row {
    flex-direction: row-reverse;
}

/* .card-meta wraps .time-block which wraps .headline-formatted-timestamp */
[dir="rtl"] .card-meta {
    align-items: flex-end;
}

/* Timestamps: keep LTR (digits read L→R universally) */
[dir="rtl"] .time-block,
[dir="rtl"] .headline-formatted-timestamp {
    direction: ltr;
    unicode-bidi: embed;
    text-align: left;
}

/* Category / classification chip column */
[dir="rtl"] .headline-category-slot {
    align-items: flex-end;
}

/* Quick filter bar chips */
[dir="rtl"] .filter-chips {
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* JS-rendered card tag rows */
[dir="rtl"] .headline-tags {
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Card left accent border → right side in RTL.
   Actual class set on article.headline-card is ".is-critical" (not ".is-important") per _headline_card.html. */
[dir="rtl"] .headline-card.is-critical {
    border-left: none;
    border-right: 3px solid var(--danger);
}

/* --- CHIPS / TAGS / BADGES --- */
[dir="rtl"] .tag,
[dir="rtl"] .chip-category,
[dir="rtl"] .chip-impact,
[dir="rtl"] .chip-source,
[dir="rtl"] .classification-chip {
    font-family: var(--font-family-ar);
}

/* Tickers and exchange codes always stay LTR */
[dir="rtl"] .headline-mr-inline-symbol,
[dir="rtl"] .mr-ticker,
[dir="rtl"] .primary-listing-display {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

/* --- MARKET REACTION INLINE BLOCK --- */
[dir="rtl"] .headline-mr-inline-line {
    flex-direction: row-reverse;
    text-align: right;
}

/* Price numbers and percentages: keep LTR */
[dir="rtl"] .headline-mr-inline-metric,
[dir="rtl"] .headline-mr-inline-state,
[dir="rtl"] .mr-move-pct,
[dir="rtl"] .mr-price-level {
    direction: ltr;
    unicode-bidi: embed;
}

/* --- SEARCH --- */
/* Actual DOM: #search-bar-wrapper > form > #search-bar (input) + #search-icon (i) */
[dir="rtl"] #search-bar-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] #search-bar {
    text-align: right;
    /* Icon sits on the RIGHT in RTL, so reserve the icon space on the right
       (was reversed -> typed text ran under the magnifier). */
    padding-right: 36px;
    padding-left: 12px;
}

[dir="rtl"] #search-icon {
    left: auto;
    right: 0.75rem;
}

[dir="rtl"] .search-results-header,
[dir="rtl"] .search-filter-bar {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-results-count {
    text-align: right;
}

/* --- GUEST BANNER --- */
[dir="rtl"] .guest-banner-compact {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .guest-banner-actions {
    flex-direction: row-reverse;
}

/* --- MARKET RADAR --- */
[dir="rtl"] .market-radar-title,
[dir="rtl"] .radar-asset-label {
    text-align: right;
    font-family: var(--font-family-ar);
}

[dir="rtl"] .radar-row {
    flex-direction: row-reverse;
}

/* Radar price values: always LTR */
[dir="rtl"] .radar-price,
[dir="rtl"] .radar-change {
    direction: ltr;
    unicode-bidi: embed;
}

/* --- ECO CALENDAR ---
   Actual DOM from _eco_calendar.html:
   .eco-drawer-shell > .eco-panel-header + .eco-table-container > .eco-table
   Table columns: th.cell-time, th.cell-cur, th.cell-imp, th.cell-event,
                  th.cell-act, th.cell-est, th.cell-prev
*/
[dir="rtl"] .eco-panel-header,
[dir="rtl"] .eco-title-row,
[dir="rtl"] .eco-subtitle {
    text-align: right;
    font-family: var(--font-family-ar);
}

[dir="rtl"] .eco-title-row {
    flex-direction: row-reverse;
}

/* Table column direction: time/act/est/prev stay LTR (numbers); event label aligns right */
[dir="rtl"] .eco-table th,
[dir="rtl"] .eco-table td {
    text-align: right;
}

[dir="rtl"] .eco-table .cell-time,
[dir="rtl"] .eco-table .cell-act,
[dir="rtl"] .eco-table .cell-est,
[dir="rtl"] .eco-table .cell-prev,
[dir="rtl"] .eco-table .cell-cur {
    direction: ltr;
    unicode-bidi: embed;
    text-align: left;
}

[dir="rtl"] .eco-table .cell-event {
    text-align: right;
    font-family: var(--font-family-ar);
}

/* --- PANELS / DRAWERS / MODALS --- */
/* Use broad selectors — panel internals vary; scope by [dir="rtl"] is safe */
[dir="rtl"] .details-panel,
[dir="rtl"] .earnings-release-panel,
[dir="rtl"] .recurring-indicator-panel,
[dir="rtl"] .move-explained-panel {
    text-align: right;
}

[dir="rtl"] .details-panel summary,
[dir="rtl"] .earnings-release-panel summary {
    flex-direction: row-reverse;
}

/* --- NARRATIVE ARC / STORYLINES --- */
[dir="rtl"] .arc-title,
[dir="rtl"] .narrative-label {
    text-align: right;
    font-family: var(--font-family-ar);
}

[dir="rtl"] .arc-meta {
    flex-direction: row-reverse;
}

/* --- WS STATUS BANNER --- */
[dir="rtl"] .ws-disconnected-banner {
    flex-direction: row-reverse;
}

/* --- MOBILE RESPONSIVE RTL --- */
@media (max-width: 768px) {
    [dir="rtl"] .header-main-row,
    [dir="rtl"] .header-secondary-row {
        flex-direction: column;
        align-items: flex-end;
    }

    [dir="rtl"] .headline-main-row {
        flex-direction: column;
        align-items: flex-end;
    }

    [dir="rtl"] .card-meta {
        align-self: flex-end;
    }

    [dir="rtl"] .headline-tags,
    [dir="rtl"] .filter-chips {
        justify-content: flex-end;
    }
}

/* Mixed-content bidi isolation:
   Tickers, exchange codes, numbers, and percentages embedded inside
   Arabic prose must render left-to-right. Apply .bidi-isolate to
   any inline span wrapping a Latin token inside Arabic text. */
.bidi-isolate {
    unicode-bidi: isolate;
    direction: ltr;
    display: inline-block;
}

        .eco-density-toggle {
            margin-left: auto;
            border: 1px solid rgba(15, 23, 42, 0.18);
            background: #ffffff;
            color: #0f172a;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            border-radius: 999px;
            padding: 3px 9px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .eco-density-toggle:hover {
            border-color: rgba(13, 110, 253, 0.45);
            color: var(--accent);
            background: rgba(13, 110, 253, 0.06);
        }

        .eco-density-toggle.active {
            background: var(--accent);
            color: #ffffff;
            border-color: var(--accent);
            box-shadow: 0 6px 14px rgba(13, 110, 253, 0.25);
        }

        .eco-subtitle-dot {
            color: #64748b;
            font-size: 13px;
            font-weight: 700;
        }

        .eco-filters {
            margin-top: 10px;
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .eco-filter-btn {
            border: 1px solid rgba(15, 23, 42, 0.15);
            background: #ffffff;
            color: #0f172a;
            font-size: 10px;
            font-weight: 700;
            padding: 4px 8px;
            border-radius: 999px;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            transition: all 0.15s ease;
        }

        .eco-filter-btn.active {
            background: #084c38;
            border-color: #084c38;
            color: #ffffff;
            box-shadow: 0 6px 14px rgba(29, 78, 216, 0.25);
        }

        .eco-table-container {
            padding: 0;
            transition: opacity 0.2s;
            overflow-y: auto;
            overflow-x: auto;
            flex: 1;
            min-width: 0;
        }

        .eco-table-container::-webkit-scrollbar {
            width: 9px;
            height: 9px;
        }

        .eco-table-container::-webkit-scrollbar-thumb {
            background: rgba(100, 116, 139, 0.45);
            border-radius: 999px;
        }

        .eco-table-container::-webkit-scrollbar-track {
            background: rgba(148, 163, 184, 0.12);
        }

        .eco-drawer-shell.mobile-collapsed {
            height: auto;
            min-height: 0;
        }

        .eco-drawer-shell.mobile-collapsed .eco-subtitle,
        .eco-drawer-shell.mobile-collapsed .eco-filters,
        .eco-drawer-shell.mobile-collapsed .eco-table-container {
            display: none;
        }

        .eco-drawer-shell.mobile-collapsed .eco-mobile-summary {
            display: block;
        }

        .eco-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.82rem;
            table-layout: auto;
            min-width: 100%;
            max-width: 100%;
        }

        .eco-table thead th {
            position: sticky;
            top: 0;
            z-index: 5;
            text-align: left;
            text-transform: uppercase;
            font-size: 0.68rem;
            color: var(--text-muted);
            padding: 0.6rem 0.7rem;
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
            font-weight: 700;
            background: #f8fafc;
            letter-spacing: 0.06em;
        }

        .eco-table thead th.cell-act,
        .eco-table thead th.cell-est,
        .eco-table thead th.cell-prev {
            text-align: right;
        }

        .eco-table td {
            padding: 0.6rem 0.7rem;
            border-bottom: 1px solid rgba(15, 23, 42, 0.05);
            vertical-align: middle;
            color: #0f172a;
        }

        .eco-table td.cell-event {
            overflow: visible;
        }

        .eco-table tbody tr:hover {
            background: rgba(148, 163, 184, 0.08);
        }

        .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker):nth-child(odd) {
            background: rgba(241, 245, 249, 0.45);
        }

        .eco-row-new {
            animation: flash-row 1.5s ease-out;
            background-color: rgba(13, 110, 253, 0.08);
        }

        @keyframes flash-row {
            0% {
                background-color: rgba(13, 110, 253, 0.22);
            }

            100% {
                background-color: transparent;
            }
        }

        .cell-time {
            width: 56px;
            color: var(--text-muted);
            font-size: 0.7rem;
            white-space: nowrap;
        }

        .cell-cur {
            width: 58px;
            text-align: center;
            white-space: nowrap;
        }

        .cell-imp {
            width: 20px;
            text-align: center;
            white-space: nowrap;
        }

        .cell-event {
            font-weight: 600;
            min-width: 150px;
            width: auto;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .cell-act,
        .cell-est,
        .cell-prev {
            width: 64px;
            font-feature-settings: "tnum";
            text-align: right;
            font-size: 0.74rem;
            font-weight: 700;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            white-space: nowrap;
        }

        .cell-act {
            width: 64px;
        }

        .cell-act.surprise-up-1 {
            background: rgba(34, 197, 94, 0.08);
        }

        .cell-act.surprise-up-2 {
            background: rgba(34, 197, 94, 0.14);
        }

        .cell-act.surprise-up-3 {
            background: rgba(34, 197, 94, 0.2);
        }

        .cell-act.surprise-down-1 {
            background: rgba(239, 68, 68, 0.08);
        }

        .cell-act.surprise-down-2 {
            background: rgba(239, 68, 68, 0.14);
        }

        .cell-act.surprise-down-3 {
            background: rgba(239, 68, 68, 0.2);
        }

        .eco-drawer-shell.eco-compact-mode .eco-panel-header {
            padding: 10px 12px 8px;
        }

        .eco-drawer-shell.eco-compact-mode .eco-title {
            font-size: 0.85rem;
        }

        .eco-drawer-shell.eco-compact-mode .eco-subtitle {
            margin-top: 4px;
            font-size: 11px;
            gap: 4px;
            padding: 4px 6px;
        }

        .eco-drawer-shell.eco-compact-mode .eco-table {
            font-size: 0.75rem;
            table-layout: fixed;
        }

        .eco-drawer-shell.eco-compact-mode .eco-table thead th {
            font-size: 0.62rem;
            padding: 0.38rem 0.36rem;
        }

        .eco-drawer-shell.eco-compact-mode .eco-table td {
            padding: 0.34rem 0.36rem;
        }

        .eco-drawer-shell.eco-compact-mode .cell-time {
            width: 42px;
            font-size: 0.66rem;
        }

        .eco-drawer-shell.eco-compact-mode .cell-cur {
            width: 38px;
        }

        .eco-drawer-shell.eco-compact-mode .cell-imp {
            width: 12px;
        }

        .eco-drawer-shell.eco-compact-mode .cell-act,
        .eco-drawer-shell.eco-compact-mode .cell-est,
        .eco-drawer-shell.eco-compact-mode .cell-prev {
            width: 52px;
            font-size: 0.7rem;
        }

        .eco-drawer-shell.eco-compact-mode .cell-event {
            min-width: 0;
        }

        .eco-drawer-shell.eco-compact-mode .eco-ccy {
            min-width: 28px;
            padding: 1px 3px;
            font-size: 9px;
        }

        .eco-drawer-shell.eco-compact-mode .eco-event-title {
            font-size: 0.72rem;
            -webkit-line-clamp: 2;
            line-clamp: 2;
        }

        .eco-ccy {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            padding: 2px 6px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            background: #eef2ff;
            color: #1e3a8a;
            border: 1px solid #dbe3ff;
        }

        .imp-badge {
            display: inline-block;
            width: 9px;
            height: 9px;
            border-radius: 2px;
        }

        .imp-high {
            background: #ef4444;
        }

        .imp-med {
            background: #d97706;
        }

        .imp-low {
            background: #64748b;
        }

        .imp-none {
            background: #cbd5e1;
        }

        .data-beat {
            color: var(--success);
            font-weight: 700;
        }

        .data-miss {
            color: var(--danger);
            font-weight: 700;
        }

        .eco-event-line {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: baseline;
            line-height: 1.35;
        }

        .eco-event-title {
            font-size: 0.78rem;
            font-weight: 700;
            color: #0f172a;
            display: block;
            line-height: 1.25;
            overflow-wrap: break-word;
            word-break: break-word;
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
        }

        .eco-event-stack {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }

        .eco-state-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 0.59rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            border: 1px solid rgba(15, 23, 42, 0.12);
            background: #f8fafc;
            color: #475569;
        }

        .eco-state-badge.eco-state-scheduled {
            background: #f8fafc;
            color: #475569;
            border-color: #cbd5e1;
        }

        .eco-state-badge.eco-state-released,
        .eco-state-badge.eco-state-complete,
        .eco-state-badge.eco-state-actual {
            background: #e2e8f0;
            color: #084c38;
            border-color: #cbd5e1;
        }

        .eco-date-header td {
            background: var(--bg-card);
            font-size: 0.70rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 2px solid var(--border-light);
            border-top: 1px solid var(--border-light);
            padding: 0.4rem 0.5rem;
        }

        .eco-date-header.today td {
            color: var(--accent);
            border-bottom-color: rgba(13, 110, 253, 0.45);
        }

        .eco-time-marker td {
            background: linear-gradient(90deg, rgba(37, 99, 235, 0.09), rgba(59, 130, 246, 0.16), rgba(37, 99, 235, 0.09));
            text-align: center;
            padding: 0.45rem 0.5rem;
            border-top: 2px solid rgba(37, 99, 235, 0.52);
            border-bottom: 2px solid rgba(37, 99, 235, 0.52);
        }

        .eco-time-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            min-width: 0;
        }

        .eco-time-line {
            display: inline-block;
            flex: 1 1 auto;
            max-width: 110px;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.45), transparent);
        }

        .eco-time-icon {
            width: 18px;
            height: 18px;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(37, 99, 235, 0.16);
            border: 1px solid rgba(37, 99, 235, 0.45);
            color: #084c38;
            font-size: 0.64rem;
        }

        .eco-time-label {
            display: inline-flex;
            align-items: center;
            font-size: 0.66rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #084c38;
            background: rgba(255, 255, 255, 0.8);
            border: 1px solid rgba(37, 99, 235, 0.3);
            border-radius: 999px;
            padding: 0.12rem 0.5rem;
            line-height: 1.2;
        }

        .eco-event-meta {
            display: none;
            /* Removed in favor of tabular columns */
        }

        .eco-metric {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-weight: 600;
        }

        .eco-status-pill {
            font-size: 9px;
            font-weight: 800;
            text-transform: uppercase;
            padding: 2px 6px;
            border-radius: 999px;
            border: 1px solid rgba(15, 23, 42, 0.12);
            background: #f8fafc;
            color: #475569;
        }

        .eco-status-pill.actual {
            background: rgba(16, 185, 129, 0.12);
            color: #0f766e;
            border-color: rgba(16, 185, 129, 0.3);
        }

        .eco-status-pill.upcoming {
            background: rgba(100, 116, 139, 0.1);
            color: #475569;
            border-color: rgba(100, 116, 139, 0.3);
        }

        .eco-status-pill.delayed {
            background: rgba(239, 68, 68, 0.1);
            color: #b91c1c;
            border-color: rgba(239, 68, 68, 0.3);
        }

        .eco-row-soon {
            background: rgba(100, 116, 139, 0.06);
        }

        .eco-row-delayed {
            background: rgba(239, 68, 68, 0.05);
        }

        .eco-row-scheduled {
            background: rgba(248, 250, 252, 0.95);
        }

        .eco-row-released,
        .eco-row-complete,
        .eco-row-actual {
            background: rgba(220, 252, 231, 0.22);
        }

        .eco-row-past {
            opacity: 0.8;
        }

        .eco-row-next-impact {
            background: rgba(245, 158, 11, 0.13);
        }

        .eco-panel {
            background: #ffffff;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            padding: 0;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        }

        .eco-outlook-card {
            background: linear-gradient(135deg, #0f172a, #1e293b);
            color: #fff;
            padding: 1.25rem;
            margin: 0.75rem;
            border-radius: 12px;
            box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.25);
            display: none;
            /* Shown via JS when data exists */
        }

        .outlook-label {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
            margin-bottom: 0.5rem;
        }

        .outlook-event {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
            line-height: 1.2;
        }

        .outlook-meta {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-top: 0.75rem;
        }

        .outlook-time {
            font-size: 0.85rem;
            font-weight: 600;
            color: #cbd5e1;
        }

        .outlook-countdown {
            font-size: 0.85rem;
            font-weight: 700;
            color: #fbbf24;
            padding: 2px 8px;
            background: rgba(251, 191, 36, 0.1);
            border-radius: 6px;
        }

        /* Economic Calendar (Inverted Theme) */
        .eco-panel--inverted {
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .eco-drawer-shell.inverted {
            background: linear-gradient(180deg, rgba(10, 16, 30, 0.98), rgba(8, 13, 24, 0.96));
            border: 1px solid rgba(13, 110, 253, 0.18);
            box-shadow: 0 20px 44px rgba(2, 6, 23, 0.55), 0 10px 24px rgba(13, 110, 253, 0.12);
        }

        .eco-drawer-shell.inverted .eco-panel-header {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 24, 0.98));
            border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        }

        .eco-drawer-shell.inverted .eco-title {
            color: #e2e8f0;
        }

        .eco-drawer-shell.inverted .eco-title-dot {
            background: var(--accent);
            box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
        }

        .eco-drawer-shell.inverted .eco-live-pill {
            color: #ecfeff;
            background: rgba(16, 185, 129, 0.18);
            border-color: rgba(16, 185, 129, 0.45);
        }

        .eco-drawer-shell.inverted .eco-mini-btn {
            background: rgba(15, 23, 42, 0.6);
            color: #e2e8f0;
            border-color: rgba(148, 163, 184, 0.3);
        }

        .eco-drawer-shell.inverted .eco-mini-btn:hover {
            background: rgba(30, 41, 59, 0.9);
            color: #ffffff;
            border-color: var(--accent);
        }

        .eco-drawer-shell.inverted .eco-subtitle {
            color: #cbd5e1;
            background: linear-gradient(90deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.72));
            border-color: rgba(100, 116, 139, 0.55);
        }

        .eco-drawer-shell.inverted .eco-subtitle-dot {
            color: #94a3b8;
        }

        .eco-drawer-shell.inverted #ecoDayText {
            color: #cbd5e1;
        }

        .eco-drawer-shell.inverted #ecoNextText {
            color: #e2e8f0;
            background: rgba(37, 99, 235, 0.26);
            border-color: rgba(96, 165, 250, 0.5);
        }

        .eco-drawer-shell.inverted .eco-filter-btn {
            background: rgba(15, 23, 42, 0.6);
            color: #cbd5e1;
            border-color: rgba(148, 163, 184, 0.25);
        }

        .eco-drawer-shell.inverted .eco-filter-btn.active {
            background: var(--accent);
            border-color: var(--accent);
            color: #ffffff;
            box-shadow: 0 8px 18px rgba(13, 110, 253, 0.35);
        }

        .eco-drawer-shell.inverted .eco-table thead th {
            background: rgba(15, 23, 42, 0.9);
            color: #94a3b8;
            border-bottom: 1px solid rgba(148, 163, 184, 0.2);
        }

        .eco-drawer-shell.inverted .eco-table td {
            color: #e2e8f0;
            border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        }

        .eco-drawer-shell.inverted .eco-table tbody tr:hover {
            background: rgba(148, 163, 184, 0.08);
        }

        .eco-drawer-shell.inverted .cell-time {
            color: #94a3b8;
        }

        .eco-drawer-shell.inverted .eco-event-title {
            color: #e2e8f0;
        }

        .eco-drawer-shell.inverted .eco-ccy {
            background: rgba(13, 110, 253, 0.22);
            color: #e2e8f0;
            border-color: rgba(13, 110, 253, 0.4);
        }

        .eco-drawer-shell.inverted .eco-status-pill {
            background: rgba(15, 23, 42, 0.7);
            color: #94a3b8;
            border-color: rgba(148, 163, 184, 0.25);
        }

        .eco-drawer-shell.inverted .eco-status-pill.actual {
            background: rgba(19, 138, 67, 0.25);
            color: #86efac;
            border-color: rgba(19, 138, 67, 0.5);
        }

        .eco-drawer-shell.inverted .eco-status-pill.upcoming {
            background: rgba(13, 110, 253, 0.18);
            color: #cbd5e1;
            border-color: rgba(13, 110, 253, 0.4);
        }

        .eco-drawer-shell.inverted .eco-status-pill.delayed {
            background: rgba(217, 48, 37, 0.2);
            color: #fecaca;
            border-color: rgba(217, 48, 37, 0.4);
        }

        .eco-drawer-shell.inverted .eco-row-soon {
            background: rgba(100, 116, 139, 0.08);
        }

        .eco-drawer-shell.inverted .eco-row-delayed {
            background: rgba(239, 68, 68, 0.1);
        }

        .eco-drawer-shell.inverted .eco-row-actual {
            background: rgba(16, 185, 129, 0.08);
        }

        .eco-drawer-shell.inverted .eco-row-new {
            background-color: rgba(13, 110, 253, 0.2);
        }

        .eco-drawer-shell.inverted .eco-time-marker td {
            background: linear-gradient(90deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.24), rgba(37, 99, 235, 0.16));
            border-top-color: rgba(96, 165, 250, 0.55);
            border-bottom-color: rgba(96, 165, 250, 0.55);
        }

        .eco-drawer-shell.inverted .eco-time-line {
            background: linear-gradient(90deg, transparent, rgba(147, 197, 253, 0.62), transparent);
        }

        .eco-drawer-shell.inverted .eco-time-icon {
            background: rgba(30, 64, 175, 0.45);
            border-color: rgba(147, 197, 253, 0.6);
            color: #e2e8f0;
        }

        .eco-drawer-shell.inverted .eco-time-label {
            color: #e2e8f0;
            background: rgba(15, 23, 42, 0.65);
            border-color: rgba(147, 197, 253, 0.5);
        }

        .eco-drawer-shell.inverted .macro-ribbon-empty {
            color: #94a3b8;
        }

        .eco-flash-strip .tag {
            font-size: 0.95rem !important;
            padding: 4px 10px !important;
            border-width: 2px !important;
            min-width: 60px;
            justify-content: center;
        }

        .stream-heading {
            display: flex;
            justify-content: flex-start;
            gap: 1.5rem;
            align-items: center;
            margin-bottom: 1rem;
            position: sticky;
            top: 44px;
            /* Matches new header height */
            z-index: 90;
            background: var(--bg-darker);
            padding: 0.5rem 0;
        }

        .stream-heading h2 {
            font-size: 1.25rem;
            margin: 0;
            letter-spacing: -0.01em;
        }

        .legend-pills {
            display: flex;
            gap: 0.5rem;
        }

        .legend-pills span {
            font-size: 0.7rem;
            text-transform: uppercase;
            padding: 0.2rem 0.75rem;
            background: #fff;
            border: 1px solid rgba(15, 23, 42, 0.15);
            border-radius: 999px;
            color: var(--text-muted);
        }

        .headline-stack {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .stream-tabs {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .stream-tabs .tab {
            background: #fff;
            border: 1px solid #cbd5e1;
            color: #475569;
            padding: 5px 14px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
        }

        .stream-tabs .tab.active {
            background: #0f172a;
            border-color: #0f172a;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
        }

        .research-card .headline-summary {
            color: #b9c0c7;
            font-size: 13px;
            margin-top: 6px;
        }

        .headline-card {
            background: #ffffff;
            border-radius: 10px;
            padding: 0.18rem 0.42rem;
            border-left: 4px solid #94a3b8;
            border: 1px solid #e5e7eb;
            box-sizing: border-box;
            box-shadow: none;
            transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
            position: relative;
            overflow: hidden;
            min-height: 44px;
        }

        .headline-card:nth-of-type(odd) {
            background: #ffffff;
        }

        .headline-card:hover {
            background: #fbfdff;
            border-color: #d1d5db;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
        }



        .headline-card.is-critical {
            border-left-color: #dc2626;
            border-color: #d7dde5;
            background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
            box-shadow: 0 2px 10px rgba(185, 28, 28, 0.14);
        }

        .headline-card[data-impact="high"]:not(.is-critical) {
            border-left-color: #d97706;
            border-color: #fde3b0;
            background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
            box-shadow: 0 1px 6px rgba(180, 83, 9, 0.10);
        }

        .headline-card.compact-truth-card {
            padding: 0.34rem 0.42rem;
            border-left-width: 4px;
            background: #ffffff;
        }

        .headline-card.compact-truth-card .headline-main-row {
            row-gap: 2px;
            column-gap: 8px;
            align-items: start;
        }

        .headline-card.compact-truth-card .card-meta {
            width: 148px;
        }

        .headline-card.compact-truth-card .headline-title {
            font-size: 0.89rem;
            line-height: 1.22;
            margin-top: 0;
            margin-bottom: 0;
        }

        .headline-card.compact-truth-card .insight-grid,
        .headline-card.compact-truth-card .headline-details {
            display: none !important;
        }

        .headline-card.is-new {
            background: #ffffff;
            box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.24), 0 2px 8px rgba(37, 99, 235, 0.12);
            animation: card-arrival 0.35s ease-out;
        }

        .headline-card.search-match {
            outline: 2px solid rgba(37, 99, 235, 0.45);
            outline-offset: 0;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18) inset;
            transition: outline-color 0.2s ease, box-shadow 0.2s ease;
        }

        .headline-card.is-new::after {
            content: "";
            position: absolute;
            top: 0;
            left: -40%;
            width: 40%;
            height: 3px;
            background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.55), transparent);
            animation: new-sheen 1.6s ease-in-out 1;
        }

        .new-pill {
            border: 1px solid rgba(100, 116, 139, 0.35);
            color: #475569;
            background: rgba(100, 116, 139, 0.1);
            border-radius: 999px;
            padding: 0.2rem 0.85rem;
            font-size: 0.8rem;
            text-transform: uppercase;
            font-weight: 700;
        }

        .headline-card:not(.is-new) .new-pill {
            display: none;
        }

        .recurring-indicator-panel {
            margin: 0.3rem 0 0.2rem;
            border: 1px solid #e2e8f0;
            border-radius: 9px;
            background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
        }

        .recurring-indicator-summary {
            list-style: none;
            cursor: pointer;
            padding: 0.52rem 0.7rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 0.8rem;
        }

        .recurring-indicator-summary::-webkit-details-marker {
            display: none;
        }

        .recurring-indicator-summary-main,
        .recurring-indicator-summary-values,
        .recurring-indicator-stats,
        .recurring-indicator-secondary,
        .recurring-indicator-history-item {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .recurring-indicator-kicker,
        .recurring-indicator-cadence {
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #475569;
        }

        .recurring-indicator-label,
        .recurring-indicator-current,
        .recurring-indicator-history-value,
        .recurring-indicator-stat-value {
            font-weight: 700;
            color: #0f172a;
        }

        .recurring-indicator-trend,
        .recurring-indicator-copy,
        .recurring-indicator-history-note,
        .recurring-indicator-history-timestamp,
        .recurring-indicator-secondary,
        .recurring-indicator-history-period,
        .recurring-indicator-stat-label,
        .recurring-indicator-history-title {
            color: #475569;
        }

        .recurring-indicator-body {
            padding: 0 0.7rem 0.7rem;
        }

        .recurring-indicator-copy {
            margin: 0 0 0.45rem;
            font-size: 0.78rem;
            line-height: 1.35;
        }

        .recurring-indicator-stat {
            display: inline-flex;
            align-items: baseline;
            gap: 5px;
            padding: 0.16rem 0.48rem;
            border-radius: 999px;
            background: #e2e8f0;
            font-size: 0.72rem;
        }

        .recurring-indicator-secondary,
        .recurring-indicator-history-title {
            margin-top: 0.45rem;
            font-size: 0.73rem;
        }

        .recurring-indicator-history-list {
            list-style: none;
            padding: 0;
            margin: 0.35rem 0 0;
            display: grid;
            gap: 6px;
        }

        .recurring-indicator-history-item {
            font-size: 0.75rem;
            padding-top: 0.1rem;
        }

        .recurring-indicator-history-timestamp {
            font-size: 0.7rem;
            font-variant-numeric: tabular-nums;
        }

        .earnings-release-panel {
            margin: 0.3rem 0 0.2rem;
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 8px;
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, #ffffff 100%);
            overflow: hidden;
        }

        .earnings-release-summary {
            list-style: none;
            cursor: pointer;
            padding: 0.56rem 0.72rem;
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
            align-items: center;
            gap: 0.65rem;
        }

        .earnings-release-summary::-webkit-details-marker {
            display: none;
        }

        .earnings-release-summary-main,
        .earnings-release-summary-values,
        .earnings-release-current-meta,
        .earnings-release-facts,
        .earnings-release-rationale-list,
        .earnings-release-history-row,
        .earnings-release-timeline-row,
        .earnings-release-timeline-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .earnings-release-summary-main {
            min-width: 0;
            overflow: hidden;
        }

        .earnings-release-summary-values {
            min-width: 0;
            max-width: min(380px, 42vw);
            justify-content: flex-end;
        }

        .earnings-release-kicker {
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
            color: #0f766e;
        }

        .earnings-release-label,
        .earnings-release-placeholder,
        .earnings-release-empty,
        .earnings-release-timeline-ts,
        .earnings-release-history-timestamp,
        .earnings-release-history-line {
            color: #475569;
        }

        .earnings-release-label {
            font-size: 0.78rem;
            font-weight: 600;
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .earnings-release-current-move,
        .earnings-release-reaction-value,
        .earnings-release-section-title,
        .earnings-release-current-line,
        .earnings-release-history-move,
        .earnings-release-timeline-source,
        .earnings-release-timeline-status {
            color: #0f172a;
            font-weight: 700;
        }

        .earnings-release-body {
            padding: 0.5rem 0.72rem 0.74rem;
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .earnings-release-reaction-chip {
            display: inline-grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.18rem 0.44rem;
            padding: 0.28rem 0.5rem;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #f8fafc;
            color: #0f172a;
            font-size: 0.72rem;
            line-height: 1.1;
            max-width: 100%;
            min-width: 0;
        }

        .earnings-release-reaction-label {
            color: #64748b;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0;
            text-transform: uppercase;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .earnings-release-reaction-value {
            font-size: 0.82rem;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        .earnings-release-reaction-chip.is-up .earnings-release-reaction-value,
        .earnings-release-fact.is-up {
            color: #047857;
        }

        .earnings-release-reaction-chip.is-down .earnings-release-reaction-value,
        .earnings-release-fact.is-down {
            color: #b42318;
        }

        .earnings-release-reaction-section,
        .earnings-release-now-row {
            padding: 0.56rem 0.62rem;
            border: 1px solid rgba(148, 163, 184, 0.22);
            border-radius: 8px;
            background: #f8fafc;
        }

        .earnings-release-reaction-facts .earnings-release-fact {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            font-weight: 700;
            max-width: min(100%, 340px);
        }

        /* Beat/miss colored chips inside the Now row.
           The text already greens/reds via .is-up/.is-down on the parent fact;
           this adds a faint background tint so beats/misses pop at a glance. */
        .earnings-release-reaction-facts .earnings-release-fact.is-up {
            background: rgba(4, 120, 87, 0.08);
            border-color: rgba(4, 120, 87, 0.28);
        }
        .earnings-release-reaction-facts .earnings-release-fact.is-down {
            background: rgba(180, 35, 24, 0.08);
            border-color: rgba(180, 35, 24, 0.28);
        }
        .earnings-release-fact-asset {
            font-weight: 800 !important;
            letter-spacing: 0.02em;
            max-width: min(100%, 260px) !important;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .earnings-release-fact-session {
            color: #64748b !important;
            font-weight: 600 !important;
            text-transform: uppercase;
            font-size: 0.65rem;
        }

        /* History move pills (recent + prior quarters) inherit the beat/miss colours
           but get a slightly stronger weight so the eye can scan the column. */
        .earnings-release-history-move.is-up { color: #047857; }
        .earnings-release-history-move.is-down { color: #b42318; }

        .earnings-release-placeholder,
        .earnings-release-empty {
            font-size: 0.75rem;
            line-height: 1.35;
        }

        .earnings-release-section {
            display: grid;
            gap: 0.34rem;
        }

        .earnings-release-section-title {
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0;
        }

        .earnings-release-current-line {
            font-size: 0.82rem;
            line-height: 1.38;
        }

        .earnings-release-facts {
            gap: 6px;
            min-width: 0;
        }

        .earnings-release-fact {
            display: inline-flex;
            align-items: baseline;
            gap: 5px;
            flex: 0 1 auto;
            min-width: 0;
            max-width: 100%;
            padding: 0.18rem 0.5rem;
            border-radius: 999px;
            background: #e2e8f0;
            font-size: 0.72rem;
        }

        .earnings-release-fact-label {
            flex: 0 0 auto;
        }

        .earnings-release-fact-value {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        @media (max-width: 900px) {
            .earnings-release-summary {
                grid-template-columns: 1fr;
                align-items: start;
            }

            .earnings-release-summary-values {
                justify-content: flex-start;
                max-width: 100%;
            }

            .earnings-release-label {
                white-space: normal;
                overflow-wrap: anywhere;
            }

            .earnings-release-reaction-chip {
                width: 100%;
            }
        }

        @media (max-width: 560px) {
            .earnings-release-fact {
                width: 100%;
            }

            .earnings-release-fact-value {
                white-space: normal;
                overflow-wrap: anywhere;
            }
        }

        .earnings-release-fact-label,
        .earnings-release-current-meta,
        .earnings-release-history-period,
        .earnings-release-timeline-summary {
            color: #334155;
        }

        .earnings-release-rationale-list,
        .earnings-release-timeline-list,
        .earnings-release-history-list {
            display: grid;
            gap: 6px;
            margin: 0;
            padding: 0;
        }

        .earnings-release-rationale-list {
            list-style: disc;
            padding-left: 1.1rem;
        }

        .earnings-release-rationale-list li {
            font-size: 0.77rem;
            line-height: 1.35;
            color: #0f172a;
        }

        .earnings-release-history-list,
        .earnings-release-timeline-list {
            list-style: none;
        }

        .earnings-release-history-row,
        .earnings-release-timeline-row {
            font-size: 0.74rem;
            align-items: flex-start;
            padding-top: 0.12rem;
        }

        .earnings-release-history-period {
            min-width: 72px;
            font-weight: 700;
        }

        .earnings-release-history-line {
            width: 100%;
            font-size: 0.72rem;
            line-height: 1.3;
        }

        .earnings-release-history-timestamp {
            width: 100%;
            font-size: 0.69rem;
            font-variant-numeric: tabular-nums;
        }

        .earnings-release-timeline-status {
            text-transform: uppercase;
            letter-spacing: 0.04em;
            font-size: 0.66rem;
        }

        .earnings-release-timeline-status.is-accepted {
            color: #0f766e;
        }

        .earnings-release-timeline-status.is-rejected {
            color: #b91c1c;
        }

        .earnings-release-timeline-ts {
            font-variant-numeric: tabular-nums;
            font-size: 0.7rem;
        }

        /* ── ERC: Bloomberg-style 3-panel grid ─────────────────────────────── */
        .erc-grid {
            display: grid;
            grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.4fr) minmax(140px, 0.8fr);
            gap: 0;
            border: 1px solid rgba(148,163,184,0.22);
            border-radius: 6px;
            overflow: hidden;
            background: #fff;
            font-size: 0.78rem;
        }

        .erc-panel {
            padding: 0.62rem 0.78rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            min-width: 0;
        }

        .erc-panel + .erc-panel {
            border-inline-start: 1px solid rgba(148,163,184,0.22);
        }

        .erc-panel-hdr {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #64748b;
            padding-bottom: 0.32rem;
            border-bottom: 1px solid rgba(148,163,184,0.18);
            margin-bottom: 0.1rem;
        }

        /* ── Performance table ──────────────────────────────────────────────── */
        .erc-metrics-tbl {
            width: 100%;
            border-collapse: collapse;
            font-variant-numeric: tabular-nums;
        }

        .erc-metrics-tbl thead th {
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            padding: 0 4px 5px;
            text-align: right;
            white-space: nowrap;
        }

        .erc-metrics-tbl thead th:first-child { text-align: left; padding-left: 0; }

        .erc-metrics-tbl tbody tr {
            border-top: 1px solid rgba(148,163,184,0.12);
        }

        .erc-metrics-tbl tbody tr:first-child { border-top: none; }

        .erc-metrics-tbl td {
            padding: 5px 4px;
            vertical-align: middle;
            white-space: nowrap;
        }

        .erc-metric-lbl {
            font-size: 0.72rem;
            font-weight: 700;
            color: #334155;
            padding-left: 0 !important;
        }

        .erc-metric-actual {
            text-align: right;
            font-weight: 700;
            color: #0f172a;
            font-size: 0.84rem;
        }

        .erc-metric-est {
            text-align: right;
            color: #64748b;
            font-size: 0.75rem;
        }

        .erc-metric-surp {
            text-align: right;
            font-weight: 700;
            font-size: 0.75rem;
            padding-right: 0 !important;
            white-space: nowrap;
        }

        .erc-outcome-icon {
            margin-right: 1px;
            font-size: 0.7rem;
        }

        .erc-beat .erc-metric-actual,
        .erc-beat .erc-metric-surp,
        .erc-beat .erc-outcome-icon { color: #047857; }

        .erc-miss .erc-metric-actual,
        .erc-miss .erc-metric-surp,
        .erc-miss .erc-outcome-icon { color: #b42318; }

        .erc-inline .erc-metric-surp { color: #64748b; }

        /* ── Guidance table ─────────────────────────────────────────────────── */
        .erc-guidance-tbl {
            width: 100%;
            border-collapse: collapse;
            font-variant-numeric: tabular-nums;
        }

        .erc-guidance-tbl tr {
            border-top: 1px solid rgba(148,163,184,0.12);
        }

        .erc-guidance-tbl tr:first-child { border-top: none; }

        .erc-guidance-tbl td {
            padding: 5px 4px;
            vertical-align: middle;
        }

        .erc-g-metric {
            padding-left: 0 !important;
            min-width: 0;
        }

        .erc-g-horizon {
            display: inline-block;
            font-size: 0.62rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #475569;
            background: #f1f5f9;
            border: 1px solid rgba(148,163,184,0.3);
            border-radius: 3px;
            padding: 0 4px;
            margin-right: 5px;
            white-space: nowrap;
        }

        .erc-g-name {
            font-weight: 600;
            color: #334155;
            font-size: 0.73rem;
        }

        .erc-g-range {
            font-weight: 700;
            color: #0f172a;
            text-align: right;
            white-space: nowrap;
            font-size: 0.78rem;
            padding-right: 6px !important;
        }

        .erc-g-est {
            color: #64748b;
            font-size: 0.7rem;
            white-space: nowrap;
            padding-right: 6px !important;
        }

        .erc-g-dir {
            font-weight: 700;
            font-size: 0.72rem;
            white-space: nowrap;
            padding-right: 0 !important;
        }

        .erc-g-icon {
            margin-right: 2px;
            font-size: 0.75rem;
        }

        .erc-g-dir.is-up { color: #047857; }
        .erc-g-dir.is-down { color: #b42318; }
        .erc-g-dir.is-flat { color: #64748b; }

        /* ── Reaction + Updates sidebar ─────────────────────────────────────── */
        .erc-panel-side {
            background: #f8fafc;
            gap: 0.6rem;
        }

        .erc-side-section {
            display: flex;
            flex-direction: column;
            gap: 0.32rem;
        }

        .erc-mr-grid {
            display: flex;
            flex-direction: column;
            gap: 0.24rem;
        }

        .erc-mr-asset {
            font-weight: 800;
            font-size: 0.82rem;
            color: #0f172a;
            letter-spacing: 0.02em;
        }

        .erc-mr-val {
            display: flex;
            align-items: baseline;
            gap: 6px;
            font-variant-numeric: tabular-nums;
        }

        .erc-mr-period {
            font-size: 0.62rem;
            font-weight: 800;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            width: 24px;
        }

        .erc-mr-num {
            font-size: 0.84rem;
            font-weight: 700;
        }

        .erc-mr-val.is-up .erc-mr-num { color: #047857; }
        .erc-mr-val.is-down .erc-mr-num { color: #b42318; }
        .erc-mr-val.is-flat .erc-mr-num { color: #64748b; }

        .erc-mr-session {
            font-size: 0.62rem;
            color: #94a3b8;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.04em;
            margin-top: 2px;
        }

        .erc-mr-unavailable {
            font-size: 0.7rem;
            color: #94a3b8;
            font-style: italic;
        }

        .erc-upd-list {
            display: flex;
            flex-direction: column;
            gap: 0.36rem;
        }

        .erc-upd-item {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 6px;
            align-items: baseline;
        }

        .erc-upd-ts {
            font-size: 0.62rem;
            color: #94a3b8;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
            font-weight: 600;
        }

        .erc-upd-text {
            font-size: 0.72rem;
            color: #334155;
            line-height: 1.35;
        }

        /* ── Prior quarters strip (full width below grid) ───────────────────── */
        .erc-history-row {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            padding: 0.46rem 0.72rem;
            border: 1px solid rgba(148,163,184,0.18);
            border-radius: 6px;
            background: #f8fafc;
            flex-wrap: wrap;
            margin-top: 0.42rem;
        }

        .erc-history-hdr {
            font-size: 0.62rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #94a3b8;
            white-space: nowrap;
            flex: 0 0 auto;
        }

        .erc-history-list {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            align-items: center;
        }

        .erc-history-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .erc-history-period {
            font-size: 0.62rem;
            color: #64748b;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .erc-history-move {
            font-size: 0.75rem;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

        .erc-history-move.is-up { color: #047857; }
        .erc-history-move.is-down { color: #b42318; }
        .erc-history-move.is-flat { color: #64748b; }

        /* ── Responsive collapse ─────────────────────────────────────────────── */
        @media (max-width: 860px) {
            .erc-grid {
                grid-template-columns: 1fr 1fr;
            }
            .erc-panel-side {
                grid-column: 1 / -1;
                border-inline-start: none;
                border-top: 1px solid rgba(148,163,184,0.22);
                flex-direction: row;
                gap: 1.5rem;
                flex-wrap: wrap;
            }
        }

        @media (max-width: 560px) {
            .erc-grid {
                grid-template-columns: 1fr;
            }
            .erc-panel + .erc-panel {
                border-inline-start: none;
                border-top: 1px solid rgba(148,163,184,0.22);
            }
            .erc-panel-side { flex-direction: column; }
        }
        /* ─────────────────────────────────────────────────────────────────────── */

        .benzinga-structured-panel {
            margin: 0.42rem 0 0.14rem;
            margin-inline-start: var(--headline-content-offset);
            width: calc(100% - var(--headline-content-offset));
            display: grid;
            gap: 0.3rem;
        }

        .benzinga-structured-panel.benzinga-shape-guidance {
            display: none !important;
        }

        .broker-scope-header {
            margin: 0 0 0.55rem;
            padding: 0.72rem 0.9rem 0.74rem;
            border: 1px solid rgba(37, 99, 235, 0.16);
            border-radius: 12px;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
            box-shadow: 0 8px 18px rgba(37, 99, 235, 0.06);
        }

        .broker-scope-title {
            font-size: 0.94rem;
            font-weight: 800;
            letter-spacing: -0.01em;
            color: #0f172a;
        }

        .broker-scope-subtitle {
            margin-top: 0.18rem;
            font-size: 0.76rem;
            color: #475569;
            font-variant-numeric: tabular-nums;
        }

        .broker-focus-card {
            border-left-color: #084c38 !important;
            box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.14), 0 10px 24px rgba(37, 99, 235, 0.08);
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        }

        .broker-focus-chip {
            background: #e2e8f0;
            border-color: #cbd5e1;
            color: #084c38;
            font-weight: 800;
        }

        .benzinga-structured-summary,
        .benzinga-structured-facts {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .benzinga-structured-kicker,
        .benzinga-structured-tier {
            font-size: 0.66rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .benzinga-structured-kicker {
            color: #084c38;
        }

        .benzinga-structured-tier {
            color: #475569;
        }

        .benzinga-shape-broker_action .benzinga-structured-summary {
            display: none;
        }

        .benzinga-structured-fact {
            display: inline-flex;
            align-items: baseline;
            gap: 5px;
            padding: 0.14rem 0.46rem;
            border-radius: 999px;
            background: #f8fafc;
            border: 1px solid #dbe4ee;
            font-size: 0.68rem;
        }

        .benzinga-structured-fact-label {
            color: #475569;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .benzinga-structured-fact-value {
            color: #0f172a;
            font-weight: 700;
        }

        .benzinga-shape-broker_action .benzinga-structured-kicker {
            color: #475569;
        }

        .benzinga-shape-broker_action .benzinga-structured-facts {
            gap: 7px;
            margin-top: -0.02rem;
        }

        .benzinga-shape-broker_action .benzinga-structured-fact {
            background: #f8fbff;
            border-color: #cbd5e1;
        }

        .benzinga-shape-broker_action .benzinga-structured-fact:not(.benzinga-structured-fact-primary) {
            display: none;
        }

        .benzinga-shape-broker_action .benzinga-structured-fact-primary {
            background: #ecf5ff;
            border-color: #cbd5e1;
            box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.10);
        }

        .benzinga-shape-broker_action .benzinga-structured-fact-primary .benzinga-structured-fact-label {
            color: #084c38;
        }

        .benzinga-shape-broker_action .benzinga-structured-fact-primary .benzinga-structured-fact-value {
            color: #0f172a;
        }

        .benzinga-structured-detail-list {
            display: grid;
            gap: 0.58rem;
            padding: 0.74rem 0.84rem 0.8rem;
            background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
        }

        .benzinga-structured-detail-list-compact {
            border: 1px solid #d9e2ef;
            border-radius: 8px;
            background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
            padding: 0.68rem 0.76rem 0.74rem;
            gap: 0.48rem;
        }

        .benzinga-structured-details {
            min-width: 0;
        }

        .benzinga-shape-broker_burst .benzinga-structured-details {
            margin-left: 0;
            font-family: inherit;
            font-size: 0.84rem;
            line-height: 1.25;
        }

        .benzinga-structured-details-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            min-height: 1.85rem;
            padding: 0.28rem 0.58rem;
            border: 1px solid #d9e2ef;
            border-radius: 8px;
            background: #f8fbff;
            color: #334155;
            font-size: 0.78rem;
            line-height: 1.25;
            cursor: pointer;
            list-style: none;
            user-select: none;
        }

        .benzinga-structured-details-summary::-webkit-details-marker {
            display: none;
        }

        .benzinga-structured-details-summary-main {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
        }

        .benzinga-structured-details-count {
            color: #475569;
            font-size: 0.74rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .benzinga-structured-details-firm {
            color: #475569;
            font-size: 0.78rem;
            font-weight: 700;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .benzinga-structured-details-mix {
            color: #0f766e;
            font-size: 0.72rem;
            font-weight: 800;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .benzinga-structured-details-chevron {
            color: #64748b;
            font-size: 0.66rem;
            transform: rotate(-90deg);
            transition: transform 120ms ease;
        }

        .benzinga-structured-details[open] .benzinga-structured-details-chevron {
            transform: rotate(0deg);
        }

        .benzinga-structured-details[open] .benzinga-structured-details-summary {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }

        .benzinga-structured-details[open] .benzinga-structured-detail-list-compact {
            border-top: 0;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }

        .benzinga-structured-detail-row {
            display: block;
            padding: 0.82rem 0.92rem;
            border: 1px solid #e5ebf3;
            border-left: 3px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
            box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
            transition: border-color 120ms ease, background 120ms ease;
        }

        .benzinga-structured-detail-row:hover {
            border-color: #cdd8e6;
            border-left-color: #cbd5e1;
            background: #fafdff;
        }

        .benzinga-structured-detail-row-compact {
            display: grid;
            /* Auto-fit so cells wrap to fit the panel width instead of clipping the
               right-most "PT raise to $X from $Y" cell. Adapts to 619px feed cards
               AND wider broker-moves panels without a fixed 6-col min (~915px). */
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
            align-items: center;
            column-gap: 0.9rem;
            row-gap: 0.4rem;
            padding: 0.6rem 0.76rem;
            font-size: 0.84rem;
            line-height: 1.28;
        }

        .benzinga-structured-detail-head {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            flex-wrap: wrap;
            margin-bottom: 0.52rem;
        }

        .benzinga-structured-detail-rail {
            display: flex;
            align-items: center;
            gap: 0.42rem;
            min-width: 0;
            flex: 1 1 auto;
        }

        .benzinga-structured-detail-inline {
            display: contents;
            min-width: 0;
        }

        .benzinga-structured-detail-identity {
            display: inline-flex;
            align-items: center;
            gap: 0.42rem;
            min-width: 0;
            max-width: 100%;
        }

        .benzinga-structured-detail-company {
            color: #334155;
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1.2;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .benzinga-structured-detail-time {
            color: #64748b;
            font-size: 0.76rem;
            font-weight: 700;
            letter-spacing: 0;
            font-variant-numeric: tabular-nums;
            line-height: 1.25;
            white-space: nowrap;
            text-align: left;
            justify-self: start;
        }

        .benzinga-structured-detail-ticker {
            color: #0f172a;
            font-size: 0.8rem;
            font-weight: 800;
            letter-spacing: 0.02em;
            white-space: nowrap;
            line-height: 1.1;
            text-transform: uppercase;
            padding: 0.18rem 0.5rem;
            border-radius: 999px;
            background: #f1f5f9;
            border: 1px solid #cfe0ff;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
        }

        .benzinga-structured-detail-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.2rem 0.5rem;
            border-radius: 999px;
            border: 1px solid #d7e1ee;
            background: #f8fafc;
            color: #334155;
            font-size: 0.66rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            line-height: 1.1;
        }

        .benzinga-structured-detail-badge-positive {
            background: #f0fdf4;
            border-color: #bbf7d0;
            color: #166534;
        }

        .benzinga-structured-detail-badge-negative {
            background: #fff7ed;
            border-color: #fed7aa;
            color: #9a3412;
        }

        .benzinga-structured-detail-main {
            min-width: 0;
            display: flex;
            flex-direction: row;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.72rem;
        }

        .benzinga-structured-detail-cell {
            color: #0f172a;
            font-size: 0.84rem;
            font-weight: 700;
            line-height: 1.34;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .benzinga-structured-detail-primary,
        .benzinga-structured-detail-meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            min-width: 0;
        }

        .benzinga-structured-detail-primary {
            flex: 0 0 auto;
            min-width: 0;
        }

        .benzinga-structured-detail-meta {
            flex: 0 1 auto;
        }

        .benzinga-structured-detail-sep {
            color: #94a3b8;
            font-size: 0.7rem;
            font-weight: 700;
            line-height: 1;
        }

        .benzinga-structured-detail-pt {
            color: #111827;
            font-weight: 700;
            font-size: 0.87rem;
            letter-spacing: 0;
            min-width: 0;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        /* Let every move-row cell shrink/wrap so nothing clips at the panel edge. */
        .benzinga-structured-detail-row-compact > *,
        .benzinga-structured-detail-inline > * {
            min-width: 0;
        }

        .benzinga-structured-detail-rating {
            color: #334155;
            font-weight: 700;
        }

        .benzinga-structured-detail-pt-vs-close {
            color: #075985;
            font-size: 0.78rem;
            font-weight: 800;
        }

        .benzinga-structured-detail-firm {
            color: #475569;
            font-weight: 700;
        }

        .benzinga-structured-detail-asset-context {
            color: #526173;
            font-size: 0.76rem;
            font-weight: 700;
        }

        .benzinga-structured-detail-mr {
            color: #1e3a8a;
            font-weight: 800;
            font-size: 0.78rem;
        }

        .headline-category-priority {
            /* margin-left removed — flex gap on .headline-category-slot already
               provides column spacing; the extra 0.35rem was pushing the CRITICAL
               pill past the column width and causing it to wrap below the category chip */
            vertical-align: middle;
        }

        @media (max-width: 860px) {
            .benzinga-structured-detail-row {
                padding: 0.76rem 0.8rem;
            }

            .benzinga-structured-detail-row-compact {
                align-items: flex-start;
                grid-template-columns: 1fr;
                gap: 0.42rem;
            }

            .benzinga-shape-broker_burst .benzinga-structured-details {
                margin-left: 0;
            }

            .benzinga-structured-detail-inline {
                display: flex;
                align-items: center;
                flex-wrap: wrap;
                gap: 0.5rem 0.72rem;
                width: 100%;
            }

            .benzinga-structured-detail-head {
                align-items: flex-start;
            }

            .benzinga-structured-detail-rail {
                gap: 0.42rem;
            }

            .benzinga-structured-detail-main {
                gap: 0.3rem;
                align-items: flex-start;
            }

            .benzinga-structured-detail-time {
                text-align: left;
                justify-self: start;
            }

            .benzinga-structured-detail-pt {
                font-size: 0.82rem;
            }
        }

        body.tape-density-compact .headline-card {
            padding-top: 8px;
            padding-bottom: 8px;
        }

        body.tape-density-compact .headline-title {
            font-size: 0.81rem;
            line-height: 1.15;
        }

        body.tape-density-compact .headline-formatted-timestamp {
            font-size: 0.67rem;
        }

        body.tape-density-compact .headline-tags {
            gap: 0.2rem;
            margin-top: 4px;
        }

        body.tape-density-compact .tag {
            font-size: 0.58rem;
            min-height: 16px;
            padding: 0.05rem 0.34rem;
        }

        .benzinga-burst-badge {
            display: inline-flex;
            align-items: center;
            padding: 0.12rem 0.42rem;
            border-radius: 999px;
            background: #eef2ff;
            border: 1px solid #c7d2fe;
            color: #4338ca;
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        /* Source Icons */
        .source-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 10px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            width: 35px;
            /* Standardize source icon width */
            justify-content: center;
        }

        .source-icon {
            width: 14px;
            height: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 2px;
            font-size: 8px;
            color: #fff;
        }

        .src-bloomberg {
            background: #2b3b4c;
        }

        .src-benzinga {
            background: #ff9800;
        }

        .src-financialjuice {
            background: #2196f3;
        }

        .src-cnbc {
            background: #004d40;
        }

        .src-ft {
            background: #ffcdd2;
            color: #b71c1c;
        }

        .src-newsquawk {
            background: #262626;
            color: #ffa500;
            font-weight: 800;
        }

        .src-truth_social {
            background: #9a5f12;
        }

        .src-news {
            background: var(--border-color);
            color: var(--text-muted);
        }

        .theme-chip {
            background: rgba(16, 185, 129, 0.12);
            color: #047857;
            border-radius: 999px;
            padding: 0.2rem 0.85rem;
            font-size: 0.8rem;
        }


        :root {
            --headline-meta-col: 96px;
            --headline-category-col: 132px;
            --headline-content-offset: calc(var(--headline-meta-col) + var(--headline-category-col) + 16px);
            --arc-history-leading-offset: 40px;
            --eco-inline-title-col: 340px;
        }

        .headline-main-row {
            display: grid;
            grid-template-columns: var(--headline-meta-col) var(--headline-category-col) minmax(0, 1fr);
            grid-template-areas: "meta category title";
            align-items: flex-start;
            column-gap: 8px;
            row-gap: 2px;
            width: 100%;
            min-height: 20px;
            grid-auto-rows: minmax(0, auto);
        }

        .headline-main-row.has-side-mr {
            grid-template-columns: 184px 140px minmax(0, 1fr) minmax(280px, 360px);
            grid-template-areas: "meta category title reaction";
        }

        .card-meta {
            grid-area: meta;
            display: flex;
            align-items: flex-start;
            justify-self: start;
            width: 100%;
            min-width: var(--headline-meta-col);
            max-width: var(--headline-meta-col);
            align-self: flex-start;
            min-height: 17px;
        }

        .time-block {
            width: 100%;
            display: flex;
            align-items: flex-start;
        }

        .headline-formatted-timestamp {
            font-size: 0.72rem;
            font-weight: 700;
            color: #475569;
            margin-right: 0;
            letter-spacing: 0;
            font-variant-numeric: tabular-nums;
            display: inline-flex;
            flex-direction: row;
            align-items: flex-start;
            gap: 4px;
            line-height: 1.1;
            min-height: 16px;
            white-space: nowrap;
        }

        .headline-formatted-timestamp .ts-time {
            display: inline;
            white-space: nowrap;
        }
        /* Hide the date portion on the live feed — traders know it's today.
           The full date is still accessible via the element's title tooltip. */
        .headline-formatted-timestamp .ts-date {
            display: none;
        }

        .headline-left-strip {
            display: none;
        }

        .headline-category-slot {
            grid-area: category;
            justify-self: start;
            width: 100%;
            min-width: var(--headline-category-col);
            max-width: var(--headline-category-col);
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            align-content: flex-start;
            align-self: flex-start;
            gap: 3px 4px;
            min-height: 18px;
            margin-top: 0;
            padding-top: 0;
        }

        .headline-title-wrap {
            grid-area: title;
            display: flex;
            align-items: flex-start;
            align-self: flex-start;
            justify-self: stretch;
            /* wrap: allows arabic expansion to break onto its own full-width row
               without squishing the title to letter-width (was nowrap — caused the bug) */
            flex-wrap: wrap;
            gap: 0.34rem;
            width: 100%;
            min-width: 0;
            min-height: 18px;
            margin-top: 0;
            padding-top: 0;
        }

        /* Arabic expansion: always takes a full row inside .headline-title-wrap */
        .headline-arabic-expansion,
        .headline-arabic-panel {
            flex: 0 0 100%;
            width: 100%;
            min-width: 0;
            order: 10; /* always renders after title, show-full, translation button */
        }

        .headline-title-wrap.has-inline-mr {
            flex-wrap: wrap;
            row-gap: 4px;
        }

        /* Reader-first contract: title keeps its own full line, MR summary sits beneath. */
        .headline-title-wrap.has-inline-mr .headline-title {
            flex: 1 1 100%;
            max-width: 100%;
        }

        /* Hard kill-switch: actionability text line is disabled by product decision. */
        .headline-actionability-line {
            display: none !important;
        }

        .headline-mr-inline-line {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 5px;
            max-width: 100%;
            margin-top: 1px;
            color: #334155;
            font-size: 0.66rem;
            line-height: 1.25;
        }

        .headline-title-wrap.has-inline-mr .headline-mr-inline-line {
            flex: 1 1 100%;
            min-width: 0;
        }

        .headline-mr-inline-label,
        .headline-mr-inline-symbol {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 16px;
            padding: 0.08rem 0.42rem;
            border-radius: 999px;
            border: 1px solid #dbe3ee;
            background: #ffffff;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0;
            text-transform: uppercase;
            color: #0f172a;
            white-space: nowrap;
        }

        .headline-mr-inline-label {
            border-color: rgba(37, 99, 235, 0.22);
            background: rgba(37, 99, 235, 0.08);
            color: #084c38;
        }

        .headline-mr-inline-state,
        .headline-mr-inline-tag,
        .headline-mr-inline-metric {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 16px;
            padding: 0.08rem 0.42rem;
            border-radius: 999px;
            border: 1px solid #dbe3ee;
            font-size: 0.52rem;
            font-weight: 900;
            line-height: 1.1;
            letter-spacing: 0;
            text-transform: uppercase;
            white-space: nowrap;
            background: #e2e8f0;
            color: #334155;
        }

        .headline-mr-inline-state.is-up {
            color: #166534;
            border-color: rgba(34, 197, 94, 0.24);
            background: rgba(34, 197, 94, 0.14);
        }

        .headline-mr-inline-state.is-down {
            color: #b91c1c;
            border-color: rgba(239, 68, 68, 0.24);
            background: rgba(239, 68, 68, 0.12);
        }

        .headline-mr-inline-metric {
            background: #ffffff;
            color: #334155;
            font-variant-numeric: tabular-nums;
            text-transform: none;
        }

        .headline-mr-inline-metric.is-up {
            color: #166534;
            border-color: rgba(34, 197, 94, 0.24);
            background: rgba(34, 197, 94, 0.1);
        }

        .headline-mr-inline-metric.is-down {
            color: #b91c1c;
            border-color: rgba(239, 68, 68, 0.24);
            background: rgba(239, 68, 68, 0.1);
        }

        .headline-mr-inline-metric.is-flat {
            color: #475569;
            background: #f8fafc;
        }

        .headline-mr-inline-metric.is-path {
            color: #0f172a;
            font-weight: 800;
            /* Price path base→p1→p15 is a core differentiator — keep it visible
               inline (was display:none, which silently dropped the data point). */
            display: inline-flex;
            font-variant-numeric: tabular-nums;
        }

        .headline-mr-inline-metric.is-volume {
            color: #475569;
            max-width: 320px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            background: #ffffff;
        }

        .headline-mr-inline-metric.is-session {
            border: 1px solid rgba(37, 99, 235, 0.2);
            background: rgba(37, 99, 235, 0.08);
            border-radius: 999px;
            padding: 0.03rem 0.35rem;
            font-size: 0.56rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #475569;
        }

        .headline-mr-inline-tag {
            background: #f1f5f9;
            color: #475569;
        }

        .headline-mr-inline-tag.is-p15-pending {
            border-color: rgba(37, 99, 235, 0.28);
            background: rgba(37, 99, 235, 0.1);
            color: #084c38;
        }

        .headline-title-footer {
            grid-column: 3;
            width: 100%;
            min-width: 0;
            margin-top: 6px;
        }
        /* Don't waste space when the footer has no visible tags */
        .headline-title-footer:empty,
        .headline-title-footer:has(.headline-tags:empty) {
            margin-top: 0;
        }

        .headline-main-row.has-inline-mr .headline-title-footer {
            grid-column: 3;
        }

        /* =================================================================
           LONG-FORM POST TRUNCATION (Truth Social / long social posts)
           Caps at 4 visible lines with a "Show more" toggle so these posts
           don't flood the entire feed. The .post-expanded class is toggled
           by JS when the user clicks the expand button.
           ================================================================= */
        .headline-card[data-display-mode="long_form_post"] .headline-title {
            display: -webkit-box;
            -webkit-line-clamp: 4;
            line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .headline-card[data-display-mode="long_form_post"].post-expanded .headline-title {
            display: block;
            -webkit-line-clamp: unset;
            line-clamp: unset;
            -webkit-box-orient: initial;
            overflow: visible;
        }
        .post-expand-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-top: 4px;
            font-size: 0.69rem;
            font-weight: 700;
            color: #084c38;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            letter-spacing: 0.01em;
        }
        .post-expand-btn:hover { text-decoration: underline; }

        .headline-inline-priority {
            flex: 0 0 auto;
            align-self: center;
            margin-top: 0;
            border-radius: 3px;
            padding: 0.08rem 0.3rem;
            min-height: 15px;
            font-size: 0.54rem;
            line-height: 1;
            letter-spacing: 0.06em;
        }

        .headline-inline-priority.impact-critical {
            background: #b91c1c;
            border-color: #991b1b;
            color: #ffffff;
            box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
        }

        .headline-primary-listing {
            flex: 0 0 auto;
            align-self: center;
            padding: 0.06rem 0.34rem;
            border-radius: 999px;
            border: 1px solid #d7deea;
            background: #f8fbff;
            color: #355070;
            font-size: 0.6rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .headline-primary-listing-with-cap {
            display: inline-flex;
            align-items: center;
            gap: 0.28rem;
            max-width: 12rem;
        }

        .headline-primary-listing-cap {
            color: #667085;
            font-weight: 800;
        }

        .headline-primary-listing-symbol,
        .headline-primary-listing-cap {
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .headline-tags .headline-primary-listing {
            align-self: flex-start;
            order: 5;
        }

        .headline-title-wrap.has-inline-eco .headline-title {
            flex: 0 1 auto;
        }

        .headline-mr-summary {
            width: auto;
            max-width: 100%;
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 4px 8px;
            margin-top: 1px;
            padding: 4px 8px;
            border-radius: 999px;
            border: 1px solid rgba(203, 213, 225, 0.92);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
            box-shadow: none;
            position: relative;
            overflow: hidden;
            flex: 0 1 auto;
        }

        .headline-mr-summary::before {
            content: "";
            position: absolute;
            inset: 0 auto 0 0;
            width: 3px;
            background: #cbd5e1;
        }

        .headline-mr-summary.is-meaningful {
            border-color: rgba(251, 146, 60, 0.24);
            background: linear-gradient(180deg, rgba(255, 251, 235, 0.76), rgba(255, 255, 255, 0.98));
        }

        .headline-mr-summary.is-meaningful::before {
            background: linear-gradient(180deg, #ea580c, #f59e0b);
        }

        .headline-mr-summary.is-muted {
            border-color: rgba(203, 213, 225, 0.9);
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
        }

        .headline-mr-summary.is-unavailable {
            border-style: dashed;
            background: linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(245, 248, 252, 0.94));
            padding: 8px 10px;
            gap: 6px;
            box-shadow: none;
        }

        .headline-mr-summary.is-unavailable::before {
            background: #94a3b8;
        }

        .headline-mr-summary.is-unavailable .headline-mr-summary-state {
            color: #475569;
            background: #e2e8f0;
        }

        .headline-mr-summary-top,
        .headline-mr-summary-flags {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            min-width: 0;
        }

        .headline-mr-summary-top {
            justify-content: flex-start;
        }

        .headline-mr-summary-symbol {
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #0f172a;
        }

        .headline-mr-summary-state {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            padding: 0.12rem 0.42rem;
            font-size: 0.52rem;
            font-weight: 900;
            color: #334155;
            background: #e2e8f0;
            white-space: nowrap;
            line-height: 1.1;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .headline-mr-summary-state.is-up {
            color: #166534;
            background: rgba(34, 197, 94, 0.14);
        }

        .headline-mr-summary-state.is-down {
            color: #b91c1c;
            background: rgba(239, 68, 68, 0.12);
        }

        .headline-mr-summary-copy {
            display: none;
        }

        .headline-mr-summary-metrics {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 4px;
            align-items: center;
        }

        .headline-mr-summary-metric {
            display: inline-flex;
            align-items: baseline;
            gap: 4px;
            min-height: 18px;
            padding: 2px 6px;
            border-radius: 999px;
            border: 1px solid rgba(226, 232, 240, 0.96);
            background: rgba(255, 255, 255, 0.86);
            color: #1e293b;
            font-size: 0.6rem;
            font-weight: 800;
            line-height: 1.1;
        }

        .headline-mr-summary.is-unavailable .headline-mr-summary-metric,
        .headline-mr-summary.is-muted .headline-mr-summary-metric {
            min-height: 24px;
            padding: 4px 8px;
            font-size: 0.64rem;
            background: rgba(255, 255, 255, 0.74);
        }

        .headline-mr-summary-metric.is-path {
            border-radius: 999px;
            max-width: 100%;
            white-space: nowrap;
            align-items: baseline;
        }

        .headline-mr-summary-metric-label {
            color: #64748b;
            font-size: 0.5rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .headline-mr-summary-metric-value {
            color: #0f172a;
            font-variant-numeric: tabular-nums;
            font-weight: 900;
        }

        .headline-mr-summary-flags {
            gap: 6px;
        }

        .headline-mr-summary-flags .tag {
            min-height: 14px;
            padding: 0.1rem 0.32rem;
            font-size: 0.48rem;
        }

        .headline-inline-mr {
            display: none;
        }

        .headline-inline-mr-note {
            font-size: 0.62rem;
            line-height: 1.3;
            color: #64748b;
        }

        .headline-inline-mr-flags .tag {
            min-height: 15px;
            padding: 0.1rem 0.34rem;
            font-size: 0.56rem;
        }

        .headline-mr-panel {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 9px 10px;
            border-radius: 10px;
            border: 1px solid rgba(226, 232, 240, 0.96);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
        }

        .headline-mr-panel.is-meaningful {
            border-color: rgba(248, 113, 113, 0.28);
            background: linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(255, 250, 250, 0.96));
        }

        .headline-mr-panel.is-muted {
            border-color: rgba(226, 232, 240, 0.98);
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
        }

        .headline-mr-panel.is-unavailable {
            border-style: dashed;
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.94));
        }

        .headline-mr-panel.is-compact {
            gap: 4px;
            padding: 7px 9px;
        }

        .headline-mr-top,
        .headline-mr-moves,
        .headline-mr-path,
        .headline-mr-flags {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            min-width: 0;
        }

        .headline-mr-top {
            align-items: baseline;
        }

        .headline-mr-symbol {
            font-size: 0.76rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #0f172a;
            min-width: 0;
        }

        .headline-mr-state {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            padding: 0.22rem 0.56rem;
            font-size: 0.64rem;
            font-weight: 900;
            letter-spacing: 0.015em;
            color: #475569;
            background: #e2e8f0;
            white-space: nowrap;
            line-height: 1.15;
        }

        .headline-mr-state.is-up {
            color: #166534;
            background: rgba(34, 197, 94, 0.14);
        }

        .headline-mr-state.is-down {
            color: #b91c1c;
            background: rgba(239, 68, 68, 0.12);
        }

        .headline-mr-moves {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px;
        }

        .headline-mr-move-item {
            display: flex;
            flex-direction: column;
            gap: 1px;
            padding: 6px 7px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.82);
            border: 1px solid rgba(226, 232, 240, 0.88);
            min-width: 0;
        }

        .headline-mr-move-label {
            font-size: 0.61rem;
            font-weight: 800;
            letter-spacing: 0.01em;
            color: #64748b;
        }

        .headline-mr-move-value {
            font-size: 0.78rem;
            font-weight: 900;
            color: #0f172a;
            font-variant-numeric: tabular-nums;
        }

        .headline-mr-path {
            align-items: flex-start;
            justify-content: flex-start;
            flex-wrap: wrap;
            font-size: 0.68rem;
            color: #475569;
        }

        .headline-mr-path-label {
            font-weight: 800;
            color: #334155;
            letter-spacing: 0.01em;
        }

        .headline-mr-path-values {
            font-variant-numeric: tabular-nums;
            color: #0f172a;
            font-weight: 700;
        }

        .headline-mr-note {
            font-size: 0.66rem;
            line-height: 1.35;
            color: #64748b;
        }

        .headline-mr-panel.is-compact .headline-mr-note {
            font-size: 0.62rem;
            margin-top: -1px;
        }

        .headline-mr-compact-line {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 5px;
            font-size: 0.64rem;
            color: #334155;
            line-height: 1.25;
        }

        .headline-mr-compact-move,
        .headline-mr-compact-path {
            font-weight: 700;
            color: #0f172a;
            font-variant-numeric: tabular-nums;
        }

        .headline-mr-compact-sep {
            color: #94a3b8;
            font-weight: 700;
        }

        .headline-mr-flags {
            justify-content: flex-start;
            flex-wrap: wrap;
        }

        .headline-mr-panel.is-compact .headline-mr-flags {
            gap: 5px;
        }

        .headline-mr-panel.is-compact .headline-mr-flags .tag {
            min-height: 15px;
            padding: 0.1rem 0.34rem;
            font-size: 0.56rem;
        }

        .headline-tags {
            display: flex;
            gap: 0.28rem;
            flex-wrap: wrap;
            align-items: flex-start;
            align-self: flex-start;
            justify-content: flex-start;
            margin-left: 0;
            width: 100%;
            min-width: 0;
            overflow: visible;
            white-space: normal;
        }

        .headline-tags>* {
            order: 50;
        }

        .tag,
        .impact-pill,
        .classification-chip {
            border-radius: 4px;
            /* More clinical square-ish corners */
            padding: 0.14rem 0.4rem;
            font-size: 0.6rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            line-height: 1.1;
            min-height: 17px;
            max-width: 190px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            vertical-align: middle;
        }

        .tag {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
        }

        .classification-chip {
            background: #f1f5f9;
            color: #334155;
            border: 1px solid #dbe1ea;
            text-transform: none;
            letter-spacing: 0.01em;
            max-width: 110px;
            align-self: flex-start;
        }

        /* Keep category chip inside its fixed grid column. Flex-shrink: 0 ensures it
           never gets squeezed by the impact pill — the pill wraps to next line instead. */
        .headline-category-slot .classification-chip {
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 0 0 auto;
        }

        .impact-pill {
            background: #f8fafc;
            color: #64748b;
            border: 1px solid #e2e8f0;
        }

        .impact-critical {
            background: #b91c1c;
            color: #ffffff;
            border-color: #991b1b;
            font-size: 0.64rem;
            min-height: 18px;
            font-weight: 800;
            letter-spacing: 0.03em;
            box-shadow: none;
            flex: 0 0 auto;
            max-width: none;
            overflow: visible;
            text-overflow: clip;
        }

        .impact-high {
            background: #d97706;
            color: #ffffff;
            border-color: #b45309;
            font-size: 0.64rem;
            min-height: 18px;
            font-weight: 800;
            letter-spacing: 0.03em;
            box-shadow: none;
            flex: 0 0 auto;
            max-width: none;
            overflow: visible;
            text-overflow: clip;
        }

        .chip-impact-reason {
            background: #f8fafc;
            color: #64748b;
            border: 1px solid #e2e8f0;
            text-transform: none;
            letter-spacing: 0.01em;
            font-weight: 600;
            font-size: 0.56rem;
            min-height: 16px;
        }

        .source-link-chip {
            margin-left: auto;
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            color: #334155;
            border-radius: 6px;
            width: 20px;
            height: 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.62rem;
            text-decoration: none;
        }

        .source-link-chip:hover {
            background: #eef2f7;
            color: #1e293b;
            border-color: #94a3b8;
        }

        .headline-title {
            margin: 0;
            font-size: 0.87rem;
            line-height: 1.2;
            width: auto;
            flex: 1 1 420px;
            min-width: 0;
            font-weight: 700;
            color: #111827;
            align-self: start;
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            word-break: break-word;
            overflow-wrap: anywhere;
            text-indent: 0;
            padding-top: 0;
        }

        .headline-card.title-soft-clamp .headline-title {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .headline-card[data-source="truth-social"].title-soft-clamp .headline-title,
        .headline-card[data-source="truth_social"].title-soft-clamp .headline-title,
        .headline-card[data-source="truth social"].title-soft-clamp .headline-title {
            display: block;
            -webkit-line-clamp: unset;
            line-clamp: unset;
            -webkit-box-orient: initial;
            overflow: visible;
            text-overflow: clip;
        }

        .headline-inline-eco {
            display: none;
            align-items: center;
            align-self: flex-start;
            flex-wrap: nowrap;
            gap: 0.28rem;
            min-width: 0;
            white-space: nowrap;
        }

        .headline-inline-eco:not(:empty) {
            display: inline-flex;
        }

        /* Earnings readability contract: never clamp in earnings-only mode. */
        #accordionHeadlines.earnings-unclamped .headline-title {
            display: block;
            -webkit-line-clamp: unset;
            line-clamp: unset;
            -webkit-box-orient: initial;
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .insight-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 0.55rem;
            margin-top: 0.32rem;
            margin-inline-start: var(--headline-content-offset);
        }

        .insight-block {
            background: rgba(15, 23, 42, 0.02);
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 12px;
            padding: 0.65rem 0.8rem;
        }

        .insight-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            color: var(--text-muted);
        }

        .insight-block p {
            margin: 0.4rem 0 0;
            font-size: 0.95rem;
        }

        .infinite-loader {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 1rem 0 2rem;
            color: var(--text-muted);
        }

        .infinite-loader.hidden {
            opacity: 0;
        }

        .infinite-loader.ended .loader-dot {
            display: none;
        }

        .loader-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-secondary);
            animation: loaderPulse 1s infinite;
        }

        @keyframes loaderPulse {

            0%,
            100% {
                opacity: 0.2;
                transform: scale(0.8);
            }

            50% {
                opacity: 1;
                transform: scale(1);
            }
        }

        .tape-status-bar {
            position: sticky;
            top: 60px;
            z-index: 35;
            display: flex;
            gap: 0.45rem;
            align-items: center;
            background: rgba(248, 250, 252, 0.96);
            border: 1px solid #dbe1ea;
            border-radius: 10px;
            padding: 0.3rem 0.45rem;
            margin-bottom: 0.45rem;
            backdrop-filter: blur(4px);
        }

        .tape-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            border: 1px solid #dbe1ea;
            border-radius: 999px;
            padding: 0.12rem 0.45rem;
            font-size: 0.66rem;
            font-weight: 700;
            color: #334155;
            background: #ffffff;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .tape-status-pill.is-critical {
            border-color: rgba(185, 28, 28, 0.38);
            background: rgba(254, 242, 242, 0.9);
            color: #991b1b;
        }

        .tape-status-pill.is-critical .val {
            color: #7f1d1d;
        }

        .tape-status-pill .val {
            color: #0f172a;
            font-variant-numeric: tabular-nums;
        }

        #backToTop {
            position: fixed;
            bottom: 2.5rem;
            right: 2.5rem;
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: var(--accent-secondary);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 25px rgba(111, 66, 193, 0.35);
            cursor: pointer;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }

        #backToTop.visible {
            opacity: 1;
            pointer-events: auto;
        }

        .empty-state {
            padding: 2rem;
            text-align: center;
            color: var(--text-muted);
            border: 1px dotted rgba(15, 23, 42, 0.2);
            border-radius: 16px;
            background: #fff;
        }

        .locked-workflow-state {
            display: grid;
            justify-items: center;
            gap: 0.75rem;
            padding: 2rem 1.25rem;
            border-style: solid;
            border-color: rgba(201, 150, 58, 0.32);
            background: #fff8e8;
            color: #7c2d12;
        }

        .locked-workflow-title {
            color: #111827;
            font-size: 1rem;
            font-weight: 900;
        }

        .locked-workflow-copy {
            max-width: 560px;
            color: #92400e;
            font-size: 0.92rem;
            line-height: 1.45;
        }

        .locked-workflow-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.6rem;
        }

        .search-results-bar {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
            padding: 1.15rem 1.25rem;
            margin-bottom: 1rem;
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 18px;
            background: linear-gradient(135deg, #fff 0%, #f8fafc 55%, #eef2ff 100%);
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
        }

        .search-results-copy {
            min-width: 0;
        }

        .search-results-kicker {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            margin-bottom: 0.4rem;
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #475569;
        }

        .search-results-copy h1 {
            margin: 0;
            font-size: 1.3rem;
            line-height: 1.15;
            color: #0f172a;
        }

        .search-results-copy p {
            margin: 0.45rem 0 0;
            color: #475569;
            font-size: 0.92rem;
        }

        .search-results-divider {
            margin: 0 0.45rem;
            color: #94a3b8;
        }

        .search-results-clear {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            padding: 0.7rem 0.95rem;
            border-radius: 999px;
            border: 1px solid rgba(15, 23, 42, 0.1);
            background: rgba(255, 255, 255, 0.88);
            color: #0f172a;
            font-size: 0.82rem;
            font-weight: 700;
            text-decoration: none;
        }

        .search-results-clear:hover {
            color: #0f172a;
            background: #ffffff;
        }

        body.search-mode .layout-grid {
            grid-template-columns: minmax(0, 1fr);
        }

        body.search-mode .guest-upgrade-banner {
            display: none;
        }

        @media (max-width: 900px) {
            .search-results-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .search-results-copy h1 {
                font-size: 1.1rem;
            }
        }

        .headline-card {
            border-left-width: 4px;
        }

        .headline-card[data-classification*="eco-flash"] {
            background: #ffffff;
        }

        .headline-card.eco-flash-headline .headline-main-row {
            /* Now unified with base grid columns */
            align-items: start;
        }

        .headline-card.eco-flash-headline .card-meta {
            grid-area: meta;
            align-self: flex-start;
        }

        .headline-card.eco-flash-headline .headline-category-slot {
            grid-area: category;
            align-self: flex-start;
        }

        .headline-card.eco-flash-headline .headline-title {
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            min-width: 0;
            align-self: flex-start;
        }

        .headline-card.eco-flash-headline .headline-title-wrap.has-inline-eco {
            display: grid;
            grid-template-columns: minmax(260px, var(--eco-inline-title-col)) max-content;
            justify-content: start;
            align-items: start;
            column-gap: 10px;
            row-gap: 4px;
        }

        .headline-card.eco-flash-headline .headline-title-wrap.has-inline-eco .headline-title {
            grid-column: 1;
            grid-row: 1;
        }

        .headline-card.eco-flash-headline .headline-title-wrap.has-inline-eco .headline-inline-eco {
            grid-column: 2;
            grid-row: 1;
            justify-self: start;
            align-self: start;
            width: max-content;
            min-width: max-content;
            max-width: none;
            margin-left: 0;
            margin-top: 0.02rem;
        }

        .headline-card.title-soft-clamp.eco-flash-headline .headline-title {
            display: -webkit-box;
            -webkit-line-clamp: 4;
            line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .headline-card.eco-flash-headline .headline-tags {
            justify-content: flex-start;
            align-self: start;
            flex-wrap: wrap;
            /* Allow facts to wrap if title is long */
            white-space: normal;
        }

        .headline-card.eco-flash-headline .headline-tags>.tag,
        .headline-card.eco-flash-headline .headline-tags>.impact-pill,
        .headline-card.eco-flash-headline .headline-tags>.classification-chip,
        .headline-card.eco-flash-headline .headline-tags>.market-reaction-chip {
            flex: 0 0 auto;
        }

        .headline-card.eco-flash-headline .headline-tags::-webkit-scrollbar {
            display: none;
        }

        .headline-card.eco-flash-headline.eco-high-impact {
            border-left-color: #dc2626;
            border-color: #fecaca;
            background: linear-gradient(180deg, #fff9f9, #ffffff);
            box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12), 0 2px 8px rgba(220, 38, 38, 0.08);
        }

        .headline-card.eco-flash-headline.eco-high-impact .classification-chip {
            background: #fee2e2;
            border-color: #fca5a5;
            color: #991b1b;
            font-weight: 800;
        }

        .headline-card.eco-flash-headline.eco-high-impact .headline-title {
            color: #7f1d1d;
        }

        .chip-impact {
            order: 1;
        }

        .chip-impact-reason {
            order: 2;
        }

        .chip-eco {
            order: 2;
        }

        .chip-eco {
            background: #f8fafc;
            color: #475569;
            border: 1px solid #e2e8f0;
            font-weight: 600;
            font-size: 0.63rem;
            padding: 0.16rem 0.46rem;
            letter-spacing: 0.02em;
            font-variant-numeric: tabular-nums;
        }

        .chip-eco-act {
            font-weight: 700;
        }

        .chip-eco-act.chip-eco-up {
            background: rgba(22, 163, 74, 0.2);
            color: #166534;
            border-color: rgba(22, 163, 74, 0.42);
        }

        .chip-eco-act.chip-eco-down {
            background: rgba(220, 38, 38, 0.2);
            color: #991b1b;
            border-color: rgba(220, 38, 38, 0.42);
        }

        .chip-eco-prev {
            color: #94a3b8;
        }

        .chip-category {
            order: 3;
        }

        .chip-score {
            order: 4;
        }

        .chip-reaction {
            order: 5;
        }

        .chip-quality {
            order: 6;
        }

        .chip-overflow {
            order: 99;
        }

        .tag-overflow {
            background: #e2e8f0;
            color: #334155;
            border: 1px solid #cbd5e1;
        }

        .arc-assign-btn {
            cursor: pointer;
            background: #eef2ff;
            color: #3730a3;
            border: 1px solid #c7d2fe;
            letter-spacing: 0.02em;
        }

        .arc-assign-btn:hover {
            background: #e0e7ff;
            border-color: #a5b4fc;
        }

        .arc-assign-popover {
            position: absolute;
            z-index: 1400;
            width: min(420px, 92vw);
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
            padding: 8px;
        }

        .arc-assign-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 6px;
        }

        .arc-assign-title {
            font-size: 11px;
            font-weight: 700;
            color: #334155;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .arc-assign-close {
            border: none;
            background: transparent;
            color: #64748b;
            font-size: 14px;
            cursor: pointer;
            line-height: 1;
            padding: 0 2px;
        }

        .arc-assign-search {
            width: 100%;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 6px 8px;
            font-size: 12px;
            color: #0f172a;
            margin-bottom: 6px;
            outline: none;
        }

        .arc-assign-list {
            display: grid;
            gap: 4px;
            max-height: 240px;
            overflow-y: auto;
        }

        .arc-assign-item {
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            background: #f8fafc;
            color: #0f172a;
            text-align: left;
            padding: 6px 7px;
            cursor: pointer;
        }

        .arc-assign-item:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
        }

        .arc-assign-item-title {
            font-size: 12px;
            font-weight: 700;
            line-height: 1.2;
        }

        .arc-assign-item-sub {
            font-size: 11px;
            color: #64748b;
            margin-top: 2px;
            line-height: 1.2;
        }

        .arc-assign-empty {
            font-size: 11px;
            color: #64748b;
            padding: 6px 4px;
        }

        .arc-timeline-pane {
            display: none;
            margin: 4px 0 6px 0;
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 12px;
            background: #fff;
            padding: 10px 0;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
        }

        .headline-card-placeholder {
            border-left: 2px solid rgba(15, 23, 42, 0.08);
            border-radius: 10px;
            margin: 6px 0;
            background: linear-gradient(90deg, rgba(241, 245, 249, 0.5), rgba(248, 250, 252, 0.9));
        }

        .headline-card.is-virtualized {
            padding: 0.5rem 0.72rem;
            border-left-color: rgba(51, 65, 85, 0.16);
        }

        .headline-card-placeholder-shell {
            display: grid;
            grid-template-columns: 132px minmax(0, 1fr);
            gap: 8px 14px;
            align-items: center;
            width: 100%;
            min-height: 58px;
        }

        .headline-card-placeholder-time,
        .headline-card-placeholder-line {
            display: block;
            border-radius: 999px;
            background: linear-gradient(90deg, rgba(226, 232, 240, 0.58) 20%, rgba(203, 213, 225, 0.9) 38%, rgba(226, 232, 240, 0.58) 60%);
            background-size: 220% 100%;
            animation: arc-skeleton-shimmer 1.2s ease-in-out infinite;
        }

        .headline-card-placeholder-time {
            width: 116px;
            height: 12px;
            justify-self: start;
        }

        .headline-card-placeholder-line {
            height: 11px;
            width: 86%;
        }

        .headline-card-placeholder-line.l2 {
            width: 64%;
        }

        .arc-drawer-head {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 8px;
            /* Head title aligns with the headline column (270) — the gutter to its
               left is the timestamp column, kept empty here like a feed header. */
            padding: 2px 0 8px var(--headline-content-offset, 244px);
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
            position: sticky;
            top: 0;
            z-index: 2;
            background: #fff;
        }

        .arc-history-trigger {
            width: calc(100% - var(--headline-content-offset));
            margin: 2px 0 0 0;
            margin-inline-start: var(--headline-content-offset);
            box-sizing: border-box;
            border: 1px solid rgba(148, 163, 184, 0.24);
            border-radius: 10px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
            color: #0f172a;
            padding: 5px 9px 5px 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
        }

        .arc-history-trigger:hover {
            background: #f8fbff;
            border-color: rgba(59, 130, 246, 0.26);
            box-shadow: 0 3px 9px rgba(59, 130, 246, 0.08);
        }

        .arc-history-icon {
            flex: 0 0 auto;
            width: 22px;
            height: 22px;
            border-radius: 999px;
            border: 1px solid rgba(148, 163, 184, 0.26);
            color: #475569;
            background: rgba(241, 245, 249, 0.9);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
        }

        .arc-history-left {
            display: flex;
            flex-direction: row;
            align-items: baseline;
            gap: 7px;
            min-width: 0;
        }

        .arc-history-title {
            font-size: 11px;
            font-weight: 700;
            color: #0f172a;
            line-height: 1.2;
            white-space: nowrap;
            display: inline-flex;
            align-items: baseline;
            gap: 5px;
            min-width: 0;
            max-width: 100%;
        }

        .arc-history-label {
            flex: 0 0 auto;
        }

        .arc-history-sep {
            color: #94a3b8;
            flex: 0 0 auto;
        }

        .arc-history-name {
            color: #0f766e;
            font-weight: 600;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: min(38vw, 420px);
        }

        .arc-history-sub {
            font-size: 11px;
            color: #64748b;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .arc-history-cta {
            font-size: 10px;
            font-weight: 700;
            color: #0f766e;
            border: 1px solid rgba(15, 118, 110, 0.24);
            border-radius: 999px;
            padding: 2px 7px;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            margin-left: auto;
        }

        .arc-history-chevron {
            font-size: 12px;
            color: #64748b;
            font-weight: 700;
        }

        .arc-history-trigger.is-open .arc-history-chevron {
            color: #0f766e;
        }

        .arc-history-trigger.is-secondary-hidden {
            display: none !important;
        }

        .arc-run-repeat-note {
            margin: 6px 0 0 0;
            border: 1px dashed rgba(14, 116, 144, 0.32);
            border-radius: 9px;
            background: rgba(236, 254, 255, 0.7);
            padding: 6px 9px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .arc-run-repeat-text {
            font-size: 11px;
            color: #0f172a;
            line-height: 1.2;
            font-weight: 500;
        }

        .arc-run-repeat-open {
            border: 1px solid rgba(15, 118, 110, 0.26);
            border-radius: 999px;
            background: #ffffff;
            color: #0f766e;
            font-size: 10px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            padding: 2px 7px;
            cursor: pointer;
        }

        .arc-run-repeat-open:hover {
            background: #f0fdfa;
        }

        .arc-drawer-title {
            font-size: 12px;
            font-weight: 700;
            color: #0f172a;
            margin-right: 4px;
        }

        .arc-drawer-summary {
            flex: 1 1 100%;
            font-size: 11px;
            color: #64748b;
            line-height: 1.2;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .arc-drawer-summary-item {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .arc-metric-chip {
            border-radius: 999px;
            border: 1px solid #cbd5e1;
            background: #fff;
            color: #475569;
            padding: 2px 7px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            line-height: 1.2;
            font-variant-numeric: tabular-nums;
        }

        .arc-timeline-list {
            display: grid;
            gap: 0;
            max-height: min(58vh, 520px);
            overflow-y: auto;
            overscroll-behavior: contain;
            border-radius: 8px;
            border: 1px solid rgba(15, 23, 42, 0.08);
        }

        .arc-node-row {
            border-bottom: 1px solid rgba(15, 23, 42, 0.08);
            padding: 9px 10px 9px 0;
            background: #ffffff;
        }

        .arc-node-row:nth-child(even) {
            background: rgba(248, 250, 252, 0.9);
        }

        .arc-node-row:last-child {
            border-bottom: none;
            padding-bottom: 2px;
        }

        .arc-node-main {
            display: grid;
            /* Gutter column == card content offset, so the timestamp sits under the
               parent card timestamp and the headline (col 2) lands on the 270 title line. */
            grid-template-columns: var(--headline-content-offset, 244px) minmax(0, 1fr) auto;
            align-items: start;
            column-gap: 0;
            row-gap: 5px;
            width: 100%;
        }

        .arc-node-stamp {
            font-size: 0.72rem;
            font-weight: 700;
            color: #64748b;
            letter-spacing: 0.01em;
            font-variant-numeric: tabular-nums;
            line-height: 1.25;
            white-space: nowrap;
            min-height: 18px;
            padding-right: 12px;
            display: inline-flex;
            align-items: flex-start;
        }

        .arc-node-line {
            font-size: 0.9rem;
            line-height: 1.36;
            color: #0f172a;
            font-weight: 600;
            margin: 0;
            grid-column: 2;
            display: block;
            overflow: visible;
            word-break: normal;
            overflow-wrap: anywhere;
        }

        .arc-node-line.is-expanded {
            display: block;
            -webkit-line-clamp: unset;
            overflow: visible;
        }

        .arc-node-reaction-slot {
            grid-column: 3;
            min-height: 18px;
            padding-left: 10px;
            display: inline-flex;
            align-items: flex-start;
            justify-content: flex-end;
        }

        .arc-node-reaction {
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .arc-node-line-toggle {
            border: none;
            background: transparent;
            color: #0f766e;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.02em;
            padding: 1px 0 0 0;
            margin-left: var(--headline-content-offset, 244px);
            cursor: pointer;
        }

        .arc-node-more-row {
            margin-top: 8px;
            display: flex;
            justify-content: center;
        }

        .arc-show-more-btn {
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            color: #334155;
            border-radius: 999px;
            padding: 5px 12px;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 0.02em;
        }

        .arc-show-more-btn:hover {
            background: #eef2f7;
            border-color: #94a3b8;
        }

        .arc-skeleton {
            display: grid;
            gap: 8px;
            padding-top: 2px;
        }

        .arc-skeleton-row {
            height: 38px;
            border-radius: 8px;
            background: linear-gradient(90deg, #f1f5f9 20%, #e2e8f0 38%, #f1f5f9 60%);
            background-size: 220% 100%;
            animation: arc-skeleton-shimmer 1.15s linear infinite;
        }

        @keyframes arc-skeleton-shimmer {
            0% {
                background-position: 100% 0;
            }

            100% {
                background-position: -100% 0;
            }
        }

        @media (max-width: 980px) {
            .arc-history-trigger {
                width: 100%;
                margin: 5px 0 0 0;
                padding: 8px 10px 8px 9px;
                gap: 8px;
            }

            .arc-history-left {
                gap: 6px;
            }

            .arc-history-title {
                max-width: 42vw;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .arc-history-name {
                max-width: 30vw;
            }

            .arc-history-sub {
                max-width: 52vw;
            }

            .arc-history-cta {
                display: none;
            }

            .arc-timeline-pane {
                margin: 8px 0;
                padding: 8px;
                border-radius: 10px;
                box-shadow: none;
            }

            .arc-timeline-list {
                max-height: min(64vh, 460px);
            }

            .arc-node-main {
                grid-template-columns: minmax(0, 1fr);
                column-gap: 8px;
                row-gap: 5px;
            }

            .arc-node-stamp {
                grid-column: 1;
            }

            .arc-node-line {
                grid-column: 1;
            }

            .arc-node-reaction-slot {
                grid-column: 1;
                justify-content: flex-start;
            }

            .arc-node-line-toggle {
                margin-left: 0;
            }

            /* Mobile collapses the card gutter, so the drawer head returns to the
               left edge (no 244px offset) to match the stacked rows. */
            .arc-drawer-head {
                padding-inline-start: 2px;
            }
        }

        /* ── Headline age badge ───────────────────────────────── */
        .headline-age {
            display: inline-flex;
            align-items: center;
            font-size: 0.60rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            font-variant-numeric: tabular-nums;
            padding: 0.05rem 0.3rem;
            border-radius: 4px;
            white-space: nowrap;
            transition: background 0.4s, color 0.4s;
            margin-left: 3px;
            vertical-align: middle;
        }
        .headline-age.age-hot   { background: #dcfce7; color: #15803d; border: 1px solid #86efac; } /* <30s */
        .headline-age.age-fresh { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; } /* <2m  */
        .headline-age.age-warm  { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; } /* <10m */
        .headline-age.age-old   { color: #94a3b8; background: transparent; border: none; }           /* older */

        /* ── Critical card: stronger signal for active traders ─ */
        .headline-card.is-critical {
            border-left: 4px solid #dc2626 !important;
            background: linear-gradient(to right, rgba(254,226,226,0.35) 0%, #fff 60%);
            box-shadow: 0 1px 4px rgba(220,38,38,0.10);
        }

        .headline-card.is-critical .headline-title {
            color: #111827;
            font-weight: 700;
        }

        .headline-card.is-critical .headline-formatted-timestamp {
            color: #1f2937;
            font-weight: 800;
        }

        /* ── Keyboard-focused card outline ─────────────────── */
        .headline-card.kb-focused {
            outline: 2px solid #0e6b4f;
            outline-offset: -2px;
            background: #f8faff;
        }

        /* ── No-results filter empty state ─────────────────── */
        .filter-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 1.5rem;
            color: #64748b;
            font-size: 0.85rem;
            text-align: center;
            gap: 0.5rem;
        }
        .filter-empty-state strong {
            font-size: 1rem;
            color: #334155;
            font-weight: 700;
        }
        .filter-empty-state .empty-icon {
            font-size: 2rem;
            opacity: 0.4;
        }


        /* ── Keyboard shortcut help panel ─────────────────────── */
        .kb-help-toast {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            background: #1e293b;
            color: #e2e8f0;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            font-size: 0.72rem;
            box-shadow: 0 8px 32px rgba(0,0,0,0.35);
            z-index: 9999;
            display: none;
            flex-direction: column;
            gap: 0.35rem;
            min-width: 200px;
            border: 1px solid rgba(100,116,139,0.4);
        }
        .kb-help-toast.visible { display: flex; }
        .kb-help-toast-title {
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #94a3b8;
            margin-bottom: 0.2rem;
        }
        .kb-help-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .kb-key {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #334155;
            border: 1px solid #475569;
            border-radius: 4px;
            padding: 0.1rem 0.4rem;
            font-family: monospace;
            font-size: 0.68rem;
            font-weight: 700;
            color: #f1f5f9;
            min-width: 1.6rem;
        }
        .kb-desc { color: #94a3b8; }

        /* ── Market reaction chip quality improvements ─────────── */
        .mr-confidence-dot {
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            margin-right: 3px;
            vertical-align: middle;
        }
        .mr-conf-high   { background: #22c55e; }
        .mr-conf-medium { background: #f59e0b; }
        .mr-conf-low    { background: #ef4444; }

        /* ── Signal freshness pulse on new card arrival ─────────── */
        .headline-card.updated {
            animation: card-highlight 1.8s ease-out;
            will-change: background-color;
        }
        @keyframes card-highlight {
            0%   { background-color: #fffbeb; }
            40%  { background-color: #fef9c3; }
            100% { background-color: #ffffff; }
        }

        /* ── Headline card focus ring for keyboard nav ──────────── */
        .headline-card:focus-visible {
            outline: 2px solid #0e6b4f;
            outline-offset: -2px;
        }

        @keyframes new-sheen {
            0% {
                left: -40%;
                opacity: 0;
            }

            20% {
                opacity: 1;
            }

            100% {
                left: 120%;
                opacity: 0;
            }
        }

        @keyframes card-arrival {
            0% {
                transform: translateY(-12px);
                opacity: 0.6;
            }

            100% {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .alert-flash {
            animation: alert-flash-anim 1s ease-in-out infinite;
            border-left-color: #d93025 !important;
            border-left-width: 4px !important;
        }

        @keyframes alert-flash-anim {

            0%,
            100% {
                background-color: var(--card-bg);
            }

            50% {
                background-color: rgba(217, 48, 37, 0.15);
            }
        }

        .alert-screen-flash {
            position: fixed;
            inset: 0;
            background: rgba(217, 48, 37, 0.3);
            z-index: 9999;
            pointer-events: none;
            animation: screen-flash 0.5s ease-out 3;
        }

        @keyframes screen-flash {
            0% {
                opacity: 0;
            }

            50% {
                opacity: 1;
            }

            100% {
                opacity: 0;
            }
        }

        @media (max-width: 1024px) {
            .market-stream {
                max-width: 100%;
            }
        }

        @media (max-width: 1360px) {
            .eco-toggle-btn {
                display: inline-flex;
            }

            .eco-actions {
                flex-wrap: wrap;
            }

            .eco-toggle-btn {
                margin-left: 0;
            }

            .eco-drawer-shell.mobile-collapsed .eco-mini-btn:not(.eco-toggle-btn) {
                display: none;
            }
        }

        @media (min-width: 1361px) {

            .eco-toggle-btn,
            .eco-mobile-summary {
                display: none !important;
            }
        }

        @media (max-width: 1200px) {
            :root {
                --headline-meta-col: 88px;
                --headline-category-col: 120px;
            }

            .headline-main-row {
                gap: 8px;
                grid-template-columns: var(--headline-meta-col) var(--headline-category-col) minmax(0, 1fr);
            }

            .headline-main-row.has-side-mr {
                grid-template-columns: var(--headline-meta-col) var(--headline-category-col) minmax(0, 1fr) minmax(240px, 300px);
            }

            .card-meta {
                width: var(--headline-meta-col);
                min-width: var(--headline-meta-col);
                max-width: var(--headline-meta-col);
            }

            .headline-category-slot {
                width: var(--headline-category-col);
                min-width: var(--headline-category-col);
                max-width: var(--headline-category-col);
            }

            .headline-tags {
                max-width: none;
            }

            .headline-reaction-slot {
                min-width: 220px;
            }

            .insight-grid,
            .headline-details,
            .benzinga-structured-panel,
            .arc-history-trigger,
            .arc-timeline-pane {
                margin-inline-start: 0;
                width: 100%;
            }

            .headline-title {
                max-width: none;
            }

            .headline-title-wrap {
                width: 100%;
                min-width: 0;
                flex-wrap: wrap;
                align-items: flex-start;
            }

            .headline-card.eco-flash-headline .headline-main-row {
                grid-template-columns: 132px 132px minmax(230px, 360px) minmax(190px, 210px);
                grid-template-areas: "meta category title facts";
                column-gap: 8px;
                max-width: 860px;
            }
        }

        @media (max-width: 860px) {
            /* Bloomberg-phone density: keep timestamp + headline on the SAME row and
               demote chips to a tight wrapped row beneath, instead of stacking every
               part vertically (which made each card 5+ lines tall). */
            .headline-card:not(.eco-flash-headline) .headline-main-row {
                display: grid !important;
                grid-template-columns: auto minmax(0, 1fr) !important;
                grid-template-areas:
                    'meta title'
                    'chips chips'
                    'foot foot' !important;
                align-items: start !important;
                flex-direction: row !important;
                column-gap: 8px !important;
                row-gap: 2px !important;
            }

            .card-meta {
                grid-area: meta;
                width: auto;
                min-width: 0;
            }

            .headline-title-wrap {
                grid-area: title;
            }

            .headline-title-footer {
                grid-area: foot;
            }

            .headline-tags {
                margin-left: 0;
                flex: 0 0 auto;
                max-width: 100%;
                justify-content: flex-start;
            }

            .headline-reaction-slot {
                width: 100%;
            }

            .headline-mr-top,
            .headline-mr-moves,
            .headline-mr-path {
                justify-content: flex-start;
            }

            .headline-mr-moves {
                grid-template-columns: minmax(0, 1fr);
                width: 100%;
            }

            .headline-category-slot {
                grid-area: chips;
                width: auto;
                min-width: 0;
                flex-wrap: wrap;
            }

            /* Market-reaction chips were rendering ~8px on phones — bump to legible size
               and let the row wrap. These numbers are the product; they must be readable. */
            .headline-mr-inline-line {
                gap: 5px 6px !important;
            }
            .headline-mr-inline-metric {
                font-size: 0.72rem !important;
                padding: 0.12rem 0.5rem !important;
            }
            .headline-mr-inline-label,
            .headline-mr-inline-symbol,
            .headline-mr-inline-state {
                font-size: 0.66rem !important;
            }

            .headline-title {
                max-width: 100%;
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
                display: block;
                overflow-wrap: anywhere;
                word-break: break-word;
            }

            .headline-title-wrap {
                width: 100%;
                min-width: 0;
            }

            .headline-title-footer {
                width: 100%;
                margin-top: 1px;
            }

            .headline-card.title-soft-clamp .headline-title {
                display: -webkit-box;
                -webkit-line-clamp: 3;
                line-clamp: 3;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .headline-card[data-source="truth-social"].title-soft-clamp .headline-title,
            .headline-card[data-source="truth_social"].title-soft-clamp .headline-title,
            .headline-card[data-source="truth social"].title-soft-clamp .headline-title {
                display: block;
                -webkit-line-clamp: unset;
                line-clamp: unset;
                -webkit-box-orient: initial;
                overflow: visible;
                text-overflow: clip;
            }

            #accordionHeadlines.earnings-unclamped .headline-title {
                max-width: 100%;
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
                display: block;
                -webkit-line-clamp: unset;
                line-clamp: unset;
                -webkit-box-orient: initial;
                overflow-wrap: anywhere;
                word-break: break-word;
            }

            .headline-card.eco-flash-headline .headline-main-row {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
            }

            .headline-card.eco-flash-headline .headline-title-wrap {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
            }

            .eco-drawer-shell {
                border-radius: 14px;
                max-height: none;
            }

            .eco-panel-header {
                padding: 11px 12px 8px;
            }

            .eco-title {
                font-size: 0.84rem;
                gap: 7px;
            }

            .eco-subtitle {
                margin-top: 5px;
                font-size: 10.5px;
                line-height: 1.3;
            }

            .eco-table-container {
                max-height: min(60vh, 560px);
            }

            .headline-card.eco-flash-headline .headline-title {
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
                width: 100%;
                display: block;
                overflow-wrap: anywhere;
                word-break: break-word;
            }

            .headline-card.title-soft-clamp.eco-flash-headline .headline-title {
                display: -webkit-box;
                -webkit-line-clamp: 4;
                line-clamp: 4;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            #accordionHeadlines.earnings-unclamped .headline-card.eco-flash-headline .headline-title {
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
                width: 100%;
                display: block;
                -webkit-line-clamp: unset;
                line-clamp: unset;
                -webkit-box-orient: initial;
                overflow-wrap: anywhere;
                word-break: break-word;
            }

            .headline-card.eco-flash-headline .headline-tags {
                width: 100%;
                max-width: 100%;
                overflow-x: auto;
                white-space: nowrap;
            }

            .headline-card.eco-flash-headline .headline-inline-eco {
                width: 100%;
                min-width: 0;
                margin-left: 0;
                margin-top: 0;
                overflow-x: auto;
            }
        }

        @media (max-width: 720px) {
            .eco-table thead th {
                padding: 0.42rem 0.4rem;
                font-size: 0.58rem;
            }

            .eco-table td {
                padding: 0.42rem 0.4rem;
            }

            .cell-time {
                width: 44px;
                font-size: 0.64rem;
            }

            .cell-cur {
                width: 48px;
            }

            .cell-act {
                width: 52px;
                font-size: 0.68rem;
            }
        }

        @media (max-width: 720px) {
            .eco-panel-header {
                padding: 10px 11px 8px;
            }

            .eco-title-row {
                align-items: flex-start;
            }

            .eco-title {
                flex-wrap: wrap;
                font-size: 0.8rem;
            }

            .eco-live-pill {
                font-size: 9px;
                padding: 2px 7px;
            }

            .eco-subtitle {
                display: block;
                padding: 6px 8px;
            }

            .eco-subtitle-dot {
                display: none;
            }

            #ecoDayText,
            #ecoNextText {
                display: block;
            }

            #ecoNextText {
                margin-top: 4px;
                width: 100%;
                max-width: 100%;
            }

            .eco-table thead {
                display: none;
            }

            .eco-table,
            .eco-table tbody {
                display: block;
                width: 100%;
                max-width: 100%;
            }

            .eco-table tbody tr {
                box-sizing: border-box;
                width: 100%;
                max-width: 100%;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) {
                display: grid;
                grid-template-columns: 42px 42px 14px minmax(0, 1fr);
                grid-template-areas:
                    "time cur imp event"
                    ". act act act"
                    ". est est est"
                    ". prev prev prev";
                gap: 6px 8px;
                padding: 8px 10px;
                align-items: start;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) td {
                display: block;
                width: auto;
                min-width: 0;
                border-bottom: none;
                padding: 0;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-time {
                grid-area: time;
                width: auto;
                padding-top: 1px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-cur {
                grid-area: cur;
                width: auto;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-imp {
                grid-area: imp;
                width: auto;
                padding-top: 5px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-event {
                grid-area: event;
                min-width: 0;
                overflow: hidden;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act {
                grid-area: act;
                justify-self: stretch;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: flex-start;
                gap: 8px;
                min-height: 22px;
                padding: 2px 8px;
                border-radius: 999px;
                font-size: 0.69rem;
                border: 1px solid rgba(148, 163, 184, 0.24);
                background: rgba(248, 250, 252, 0.95);
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev {
                justify-self: stretch;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: flex-start;
                gap: 8px;
                min-height: 22px;
                padding: 2px 8px;
                border-radius: 999px;
                font-size: 0.69rem;
                border: 1px solid rgba(148, 163, 184, 0.24);
                background: rgba(248, 250, 252, 0.95);
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est {
                grid-area: est;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev {
                grid-area: prev;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act::before,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est::before,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev::before {
                font-size: 0.56rem;
                font-weight: 800;
                letter-spacing: 0.06em;
                color: #64748b;
                flex: 0 0 32px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act::before {
                content: "ACT";
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est::before {
                content: "EST";
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev::before {
                content: "PREV";
            }

            .eco-event-title {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                line-clamp: 2;
                overflow: hidden;
                text-overflow: ellipsis;
                font-size: 0.74rem;
                line-height: 1.18;
                max-width: 100%;
            }

            .eco-date-header td {
                padding: 0.36rem 0.55rem;
                font-size: 0.64rem;
            }

            .eco-time-marker td {
                padding: 0.4rem 0.45rem;
            }

            .eco-time-chip {
                gap: 6px;
            }

            .eco-time-line {
                max-width: none;
                min-width: 0;
            }

            .eco-time-label {
                font-size: 0.59rem;
                letter-spacing: 0.08em;
                padding: 0.1rem 0.42rem;
            }
        }

        @media (max-width: 560px) {
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) {
                gap: 5px 7px;
                padding: 8px 9px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev {
                padding: 2px 7px;
                font-size: 0.67rem;
            }
        }

        /* Only switch to stacked mobile cards when the panel is truly too narrow for one-row releases. */
        @container eco-panel (max-width: 320px) {
            .eco-panel-header {
                padding: 10px 11px 8px;
            }

            .eco-title-row {
                align-items: flex-start;
            }

            .eco-title {
                flex-wrap: wrap;
                font-size: 0.8rem;
            }

            .eco-live-pill {
                font-size: 9px;
                padding: 2px 7px;
            }

            .eco-subtitle {
                display: block;
                padding: 6px 8px;
            }

            .eco-subtitle-dot {
                display: none;
            }

            #ecoDayText,
            #ecoNextText {
                display: block;
            }

            #ecoNextText {
                margin-top: 4px;
                width: 100%;
                max-width: 100%;
            }

            .eco-table thead {
                display: none;
            }

            .eco-table,
            .eco-table tbody {
                display: block;
                width: 100%;
                max-width: 100%;
            }

            .eco-table tbody tr {
                box-sizing: border-box;
                width: 100%;
                max-width: 100%;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) {
                display: grid;
                grid-template-columns: 42px 42px 14px minmax(0, 1fr);
                grid-template-areas:
                    "time cur imp event"
                    ". act act act"
                    ". est est est"
                    ". prev prev prev";
                gap: 6px 8px;
                padding: 8px 10px;
                align-items: start;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) td {
                display: block;
                width: auto;
                min-width: 0;
                border-bottom: none;
                padding: 0;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-time {
                grid-area: time;
                width: auto;
                padding-top: 1px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-cur {
                grid-area: cur;
                width: auto;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-imp {
                grid-area: imp;
                width: auto;
                padding-top: 5px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-event {
                grid-area: event;
                min-width: 0;
                overflow: hidden;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act {
                grid-area: act;
                justify-self: stretch;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: flex-start;
                gap: 8px;
                min-height: 22px;
                padding: 2px 8px;
                border-radius: 999px;
                font-size: 0.69rem;
                border: 1px solid rgba(148, 163, 184, 0.24);
                background: rgba(248, 250, 252, 0.95);
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev {
                justify-self: stretch;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: flex-start;
                gap: 8px;
                min-height: 22px;
                padding: 2px 8px;
                border-radius: 999px;
                font-size: 0.69rem;
                border: 1px solid rgba(148, 163, 184, 0.24);
                background: rgba(248, 250, 252, 0.95);
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est {
                grid-area: est;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev {
                grid-area: prev;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act::before,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est::before,
            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev::before {
                font-size: 0.56rem;
                font-weight: 800;
                letter-spacing: 0.06em;
                color: #64748b;
                flex: 0 0 32px;
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-act::before {
                content: "ACT";
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-est::before {
                content: "EST";
            }

            .eco-table tbody tr:not(.eco-date-header):not(.eco-time-marker) .cell-prev::before {
                content: "PREV";
            }

            .eco-event-title {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                line-clamp: 2;
                overflow: hidden;
                text-overflow: ellipsis;
                font-size: 0.74rem;
                line-height: 1.18;
                max-width: 100%;
            }
        }

        @media (max-width: 640px) {
            #market-header {
                flex-direction: column;
                gap: 1rem;
            }

            #backToTop {
                bottom: 1.5rem;
                right: 1.5rem;
            }
        }

        /* Lock and Tease Styles */
        .is-locked {
            position: relative;
            transition: all 0.3s ease;
        }

        .is-locked .headline-title {
            opacity: 0.9;
        }

        .is-locked .headline-details {
            display: none;
        }

        .is-locked .insight-grid {
            display: none !important;
        }

        .insight-lock-link {
            text-decoration: none;
            color: inherit;
            display: block;
            position: relative;
            cursor: pointer;
        }

        .insight-lock-link:hover .insight-grid {
            opacity: 0.8;
            filter: blur(6px);
        }

        .lock-overlay-link {
            text-decoration: none;
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 30;
            transition: transform 0.2s ease, opacity 0.2s ease;
            opacity: 0;
        }

        .lock-overlay-link:hover {
            transform: scale(1.03);
            opacity: 0.95;
        }

        .headline-card:hover .lock-overlay-link,
        .headline-card:focus-within .lock-overlay-link {
            opacity: 0.9;
        }

        .lock-overlay {
            background: rgba(255, 255, 255, 0.94);
            color: #084c38;
            border: 1px solid rgba(37, 99, 235, 0.18);
            padding: 3px 9px;
            border-radius: 999px;
            font-size: 0.66rem;
            font-weight: 800;
            box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .lock-overlay i {
            font-size: 0.7rem;
        }

        /* Market Reaction Table */
        .table-responsive-wrapper {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin-top: 0;
            border-radius: 0;
            border: 0;
            background: #f8fafc;
        }

        .market-reaction-table {
            width: 100%;
            min-width: 750px;
            /* Prevent squashing on mobile */
            border-collapse: separate;
            border-spacing: 0;
            font-size: 0.85rem;
        }

        .market-reaction-table th {
            background: #f1f5f9;
            color: var(--text-muted);
            font-weight: 600;
            text-align: center;
            padding: 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }

        .market-reaction-table td {
            padding: 0.65rem 0.5rem;
            text-align: center;
            border-bottom: 1px solid var(--border-color);
        }

        .market-reaction-table tr:last-child td {
            border-bottom: none;
        }

        .price-val {
            font-family: 'Inter', monospace;
            font-weight: 500;
        }

        .move-val {
            font-weight: 700;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
        }

        .move-up {
            background: rgba(34, 197, 94, 0.1);
            color: var(--success);
        }

        .move-down {
            background: rgba(239, 68, 68, 0.1);
            color: var(--danger);
        }

        .mr-symbol {
            font-weight: 700;
            color: #1e293b;
        }

        .mr-sparkline-cell {
            padding: 3px 8px;
            vertical-align: middle;
            text-align: center;
            white-space: nowrap;
            width: 96px;
        }

        .mr-sparkline {
            display: block;
            overflow: visible;
        }

        .mr-detail-disclosure {
            margin-top: 0.5rem;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: #f8fafc;
            overflow: hidden;
        }

        .mr-detail-summary {
            cursor: pointer;
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
            padding: 0.62rem 0.78rem;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
            border-bottom: 1px solid transparent;
            user-select: none;
        }

        .mr-detail-summary::-webkit-details-marker {
            display: none;
        }

        .mr-detail-disclosure[open] .mr-detail-summary {
            border-bottom-color: var(--border-color);
        }

        .mr-detail-summary-main {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1 1 auto;
            flex-wrap: wrap;
        }

        .mr-detail-summary-title {
            color: #1e3a8a;
            font-size: 0.68rem;
            font-weight: 800;
            line-height: 1.2;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .mr-detail-summary-hint {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            padding: 0;
            border-radius: 0;
            border: 0;
            background: transparent;
            color: #1e3a8a;
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            line-height: 1.1;
            text-align: center;
        }

        .mr-detail-summary-hint::before {
            content: "";
            width: 0.45rem;
            height: 0.45rem;
            border-right: 2px solid currentColor;
            border-bottom: 2px solid currentColor;
            transform: rotate(45deg) translateY(-1px);
            display: inline-block;
        }

        .mr-detail-disclosure[open] .mr-detail-summary-hint::before {
            transform: rotate(225deg) translateY(-1px);
        }

        .mr-quick-summary {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 8px;
        }

        .mr-summary-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            font-weight: 700;
            color: #334155;
            background: #eef2ff;
            border: 1px solid #e2e8f0;
            border-radius: 999px;
            padding: 3px 9px;
        }

        .mr-summary-pill .mr-num {
            font-variant-numeric: tabular-nums;
            color: #0f172a;
        }

        .mr-plain-summary {
            margin-top: 8px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
            color: #0f172a;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.45;
            padding: 8px 10px;
        }

        .mr-top-movers {
            margin-top: 0;
            display: inline-flex;
            flex-wrap: wrap;
            gap: 6px;
            flex: 1 1 auto;
        }

        .mr-mover-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 999px;
            border: 1px solid var(--border-color);
            background: #ffffff;
            color: #1e293b;
        }

        .mr-mover-pill.up {
            border-color: rgba(34, 197, 94, 0.35);
            background: rgba(34, 197, 94, 0.1);
            color: #166534;
        }

        .mr-mover-pill.down {
            border-color: rgba(239, 68, 68, 0.35);
            background: rgba(239, 68, 68, 0.1);
            color: #991b1b;
        }

        .mr-low-toggle {
            margin-top: 8px;
            margin-left: 0.6rem;
            margin-bottom: 0.82rem;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
            color: #334155;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 8px;
            cursor: pointer;
        }

        .mr-low-hidden {
            display: none;
        }

        .market-reaction-table td.mr-quality-cell,
        .market-reaction-table td.mr-session-cell {
            font-size: 11px;
            font-weight: 600;
            color: #475569;
            white-space: nowrap;
        }

        .mr-quality-good {
            color: #166534 !important;
        }

        .mr-quality-partial {
            color: #92400e !important;
        }

        .mr-quality-time {
            color: #92400e !important;
        }

        .mr-quality-missing {
            color: #b91c1c !important;
        }

        /* ── Source tier chips ────────────────────────────────────────── */
        .chip-source-tier {
            font-size: 0.6rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            border-radius: 4px;
            padding: 1px 5px;
            line-height: 16px;
        }
        .chip-tier-wire {
            background: #f1f5f9;
            color: #084c38;
            border: 1px solid #cbd5e1;
        }
        .chip-tier-analysis {
            background: #f5f3ff;
            color: #6d28d9;
            border: 1px solid #ddd6fe;
        }
        .chip-tier-social {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }
        .chip-tier-data {
            background: #ecfdf5;
            color: #065f46;
            border: 1px solid #a7f3d0;
        }
        .chip-tier-editorial {
            background: #f8fafc;
            color: #475569;
            border: 1px solid #e2e8f0;
        }

        /* ── CRITICAL card flash animation ───────────────────────────── */
        @keyframes critical-flash-in {
            0%   { background-color: #fef2f2; box-shadow: 0 0 0 3px rgba(220,38,38,0.30); }
            60%  { background-color: #fff5f5; box-shadow: 0 0 0 1px rgba(220,38,38,0.12); }
            100% { background-color: transparent; box-shadow: none; }
        }
        .headline-card.is-critical {
            border-left: 3px solid #dc2626;
            animation: critical-flash-in 1.6s ease-out forwards;
        }
        .headline-card.is-critical .headline-title {
            color: #111827;
            font-weight: 800;
        }
        .headline-card.is-critical .ts-relative {
            color: #b91c1c;
        }

        /* ── Compact guest banner ────────────────────────────────────── */
        .guest-banner-compact {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 14px;
            background: #fffbeb;
            border-bottom: 1px solid #fde68a;
            font-size: 0.75rem;
            color: #78350f;
            flex-wrap: wrap;
        }
        .guest-banner-compact .guest-banner-text { flex: 1 1 200px; font-weight: 500; }
        .guest-banner-compact .guest-banner-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
        .guest-banner-compact .guest-dismiss {
            background: none; border: none; cursor: pointer;
            color: #92400e; font-size: 1rem; padding: 0 4px; line-height: 1;
        }
        .guest-banner-full { display: block; }
        .guest-banner-hidden { display: none !important; }

        .mr-quality-unknown {
            color: #64748b !important;
        }

        .mr-single-panel {
            margin-top: 4px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: #f8fafc;
            padding: 6px 8px;
        }

        .mr-single-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
        }

        @media (max-width: 860px) {
            .mr-detail-summary {
                align-items: flex-start;
                flex-direction: column;
            }

            .mr-detail-summary-main {
                width: 100%;
            }
        }

        .mr-single-primary {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 0.01em;
            color: #0f172a;
        }

        .mr-single-primary.up {
            color: #166534;
        }

        .mr-single-primary.down {
            color: #991b1b;
        }

        .mr-single-sub {
            font-size: 11px;
            color: #475569;
            margin-top: 2px;
        }

        .mr-single-path {
            margin-top: 6px;
            display: grid;
            grid-template-columns: repeat(4, minmax(64px, 1fr));
            gap: 4px;
        }

        .mr-point {
            border: 1px solid rgba(148, 163, 184, 0.25);
            border-radius: 6px;
            background: #ffffff;
            padding: 4px 6px;
            text-align: center;
        }

        .mr-point .label {
            display: block;
            font-size: 9px;
            color: #64748b;
            margin-bottom: 1px;
            font-weight: 700;
        }

        .mr-point .value {
            display: block;
            font-size: 12px;
            color: #0f172a;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

        .mr-single-chips {
            margin-top: 6px;
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
        }

        .mr-single-chip {
            font-size: 10px;
            font-weight: 700;
            color: #334155;
            background: #eef2ff;
            border: 1px solid #e2e8f0;
            border-radius: 999px;
            padding: 2px 7px;
        }

        .headline-details {
            margin-top: 0.24rem;
            margin-inline-start: var(--headline-content-offset);
            font-size: 0.9rem;
            color: #334155;
            line-height: 1.42;
        }

        .headline-details p {
            margin: 0 0 0.5rem 0;
        }

        .headline-details p:last-child {
            margin-bottom: 0;
        }

        .headline-details strong {
            color: #1e293b;
            font-weight: 600;
        }

        .broker-digest-details {
            border: 1px solid #dbe4f0;
            border-radius: 10px;
            background: #f8fbff;
            padding: 8px 10px;
        }

        .broker-digest-details summary {
            cursor: pointer;
            font-weight: 700;
            color: #0f172a;
            outline: none;
        }

        .broker-digest-content {
            margin-top: 8px;
            font-size: 12px;
            color: #334155;
        }

        .broker-digest-content ul {
            margin: 6px 0 10px 18px;
            padding: 0;
        }

        /* Media query moved and combined into 1200px block above */
        /* Research Premium Layout */
        /* Research Premium Layout - Enhanced */
        .research-card-premium {
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
            padding: 1rem 1.1rem;
            background: #ffffff;
            border-radius: 12px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
            border: 1px solid rgba(15, 23, 42, 0.06);
            margin-bottom: 0.6rem;
            transition: transform 0.2s, box-shadow 0.2s;
            position: relative;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .research-card-premium::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, #0e6b4f, #9a5f12);
            /* Brighter gradient */
        }

        .research-card-premium:hover {
            transform: translateY(-3px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
        }

        .rc-header {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            gap: 0.45rem;
            border-bottom: 1px solid #f1f5f9;
            padding-bottom: 1.25rem;
            margin-bottom: 0.5rem;
        }

        .rc-provider-group {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }

        .rc-provider-badge {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #64748b;
            font-weight: 600;
            background: #f8fafc;
            padding: 4px 8px;
            border-radius: 4px;
            border: 1px solid #e2e8f0;
        }

        .rc-firm-badge {
            font-size: 0.85rem;
            color: #ffffff;
            font-weight: 700;
            background: #0f172a;
            padding: 4px 10px;
            border-radius: 4px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .rc-timestamp {
            font-size: 0.78rem;
            color: #0f172a;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.01em;
            background: #e2e8f0;
            border: 1px solid #cbd5e1;
            border-radius: 999px;
            padding: 3px 9px;
            line-height: 1.2;
        }

        .rc-title {
            font-size: 1.04rem;
            font-weight: 750;
            color: #1e293b;
            line-height: 1.3;
            margin: 0;
            letter-spacing: -0.02em;
            /* Tight tracking for headers */
        }

        .rc-body {
            font-size: 0.92rem;
            color: #334155;
            line-height: 1.45;
            font-family: 'Georgia', serif;
            /* Serif for body text feels more "researchy" */
            max-width: 70ch;
        }

        .rc-body p {
            margin-bottom: 0.8em;
        }

        .rc-body p:last-child {
            margin-bottom: 0;
        }

        .rc-body .rc-paragraph {
            margin: 0 0 0.72rem 0;
            white-space: normal;
            word-break: normal;
            overflow-wrap: anywhere;
        }

        .rc-body .rc-paragraph:last-child {
            margin-bottom: 0;
        }

        .rc-body-meta {
            font-size: 0.76rem;
            font-weight: 700;
            color: #64748b;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            margin: 0 0 0.5rem 0;
        }

        .rc-body-rest {
            margin-top: 0.15rem;
        }

        .rc-expand-toggle {
            margin-top: 0.5rem;
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            color: #0f172a;
            border-radius: 8px;
            font-size: 0.78rem;
            font-weight: 700;
            padding: 4px 10px;
            cursor: pointer;
        }

        .rc-expand-toggle:hover {
            background: #eef2ff;
            border-color: #a5b4fc;
        }

        .rc-images {
            margin-top: 0.9rem;
            display: grid;
            gap: 10px;
        }

        .rc-images-multi {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .rc-image-hero {
            grid-column: 1 / -1;
        }

        .rc-images img {
            width: auto;
            max-width: 100%;
            height: auto;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            display: block;
        }

        .rc-perf-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
            margin-top: 0.5rem;
            padding: 0.6rem 0.8rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            font-size: 0.85rem;
            color: #334155;
        }

        .rc-perf-label {
            font-weight: 600;
            color: #0f172a;
        }

        .rc-perf-chip {
            font-variant-numeric: tabular-nums;
            padding: 2px 8px;
            border-radius: 999px;
            font-weight: 600;
            background: #e2e8f0;
            color: #1e293b;
        }

        .rc-perf-pos {
            background: rgba(34, 197, 94, 0.12);
            color: #166534;
        }

        .rc-perf-neg {
            background: rgba(239, 68, 68, 0.12);
            color: #991b1b;
        }

        .rc-perf-muted {
            background: #f1f5f9;
            color: #64748b;
            font-weight: 600;
        }

        .rc-firm-score {
            margin-top: 0.4rem;
            font-size: 0.8rem;
            color: #475569;
            font-weight: 600;
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
        }

        .rc-footer {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px dashed rgba(15, 23, 42, 0.1);
        }

        .rc-footer .tag {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #cbd5e1;
            border-radius: 999px;
            padding: 4px 12px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        /* Research Firm Filter */
        .research-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .mode-filter-slot {
            position: relative;
            width: 460px;
            min-width: 460px;
            height: 42px;
            flex: 0 0 460px;
        }

        .mode-filter-slot.is-collapsed {
            width: 0;
            min-width: 0;
            height: 0;
            flex-basis: 0;
            overflow: hidden;
        }

        .research-select-wrapper {
            position: absolute;
            inset: 0;
            margin-left: 0;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 10px;
            border: 1px solid rgba(37, 99, 235, 0.2);
            border-radius: 999px;
            background: linear-gradient(180deg, #ffffff, #f8fbff);
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.18s ease;
            flex-shrink: 0;
        }

        .research-select-wrapper.is-visible {
            visibility: visible;
            opacity: 1;
            pointer-events: auto;
        }

        .research-select-label {
            font-size: 0.68rem;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #1e3a8a;
            font-weight: 800;
            white-space: nowrap;
        }

        .research-select-shell {
            position: relative;
            display: flex;
            align-items: center;
        }

        .broker-filter-row {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            width: 100%;
        }

        .research-select-icon {
            position: absolute;
            left: 10px;
            color: #5eead4;
            font-size: 0.72rem;
            pointer-events: none;
        }

        .research-select-pill {
            appearance: none;
            -webkit-appearance: none;
            background: #0f172a;
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 999px;
            padding: 6px 34px 6px 28px;
            min-width: 220px;
            font-size: 0.76rem;
            font-weight: 700;
            color: #f8fafc;
            cursor: pointer;
            outline: none;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
            transition: all 0.2s;
            height: 32px;
            width: 100%;
        }

        .research-select-pill:hover,
        .research-select-pill:focus {
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.22);
        }

        .research-select-arrow {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.65rem;
            color: #cbd5e1;
            pointer-events: none;
        }

        .broker-search-shell {
            position: relative;
            display: flex;
            align-items: center;
            flex: 1 1 180px;
            min-width: 0;
        }

        .broker-search-icon {
            position: absolute;
            left: 11px;
            color: #64748b;
            font-size: 0.72rem;
            pointer-events: none;
        }

        .broker-search-input {
            width: 100%;
            height: 32px;
            border: 1px solid rgba(15, 23, 42, 0.15);
            border-radius: 999px;
            background: #fff;
            padding: 6px 12px 6px 30px;
            font-size: 0.76rem;
            font-weight: 600;
            color: #1e293b;
            outline: none;
            box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .broker-search-input::placeholder {
            color: #94a3b8;
            font-weight: 500;
        }

        .broker-search-input:hover,
        .broker-search-input:focus {
            border-color: #cbd5e1;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
        }

        /* Unified cross-section design pass */
        .stream-heading {
            border-radius: var(--radius-md);
        }

        .tab-btn {
            min-height: 30px;
            line-height: 1;
            font-family: var(--font-family);
        }

        .market-stream-content {
            margin-top: 0.35rem;
        }

        .headline-card {
            border-radius: var(--radius-lg);
            box-shadow: none;
            padding-top: 0.42rem;
            padding-bottom: 0.42rem;
            min-height: 64px;
        }

        .headline-main-row {
            align-items: flex-start;
        }

        .headline-category-slot,
        .headline-title {
            padding-top: 0;
        }

        .headline-title {
            line-height: 1.22;
        }

        .research-card-premium {
            gap: 0.8rem;
            padding: 0.95rem 1rem 0.9rem;
            border-radius: var(--radius-lg);
            margin-bottom: 0.85rem;
            box-shadow: none;
            border: 1px solid var(--border-color);
            background: var(--surface-1);
            transition: border-color 0.16s ease, background-color 0.16s ease;
            font-family: var(--font-family);
        }

        .research-card-premium::before {
            height: 3px;
            background: linear-gradient(90deg, #084c38, #084c38);
        }

        .research-card-premium:hover {
            transform: none;
            box-shadow: none;
            border-color: rgba(37, 99, 235, 0.35);
            background: #fcfdff;
        }

        .rc-header {
            padding-bottom: 0.55rem;
            margin-bottom: 0;
            border-bottom: 1px solid rgba(15, 23, 42, 0.06);
            gap: 0.42rem;
            align-items: flex-start;
        }

        .rc-title {
            font-size: 1.02rem;
            font-weight: 760;
            letter-spacing: -0.01em;
            line-height: 1.34;
            margin: 0;
            color: #0f172a;
        }

        .rc-body {
            font-size: 0.95rem;
            line-height: 1.5;
            color: #1f2937;
            max-width: 92ch;
            font-family: var(--font-family);
        }

        .rc-provider-badge {
            font-size: 0.64rem;
            border-radius: 999px;
            padding: 3px 8px;
            color: #334155;
            background: var(--surface-2);
            border-color: #dbe2ea;
        }

        .rc-firm-badge {
            font-size: 0.68rem;
            border-radius: 999px;
            padding: 3px 8px;
            background: #1e293b;
            color: #fff;
            font-weight: 700;
        }

        .rc-timestamp {
            font-size: 0.78rem;
            color: #0f172a;
            font-weight: 700;
            border-radius: 999px;
            background: #e2e8f0;
            border: 1px solid #cbd5e1;
            padding: 3px 9px;
            line-height: 1.2;
            letter-spacing: 0.01em;
        }

        .rc-perf-row {
            margin-top: 0.1rem;
            border-radius: 8px;
            font-size: 0.8rem;
            background: var(--surface-2);
        }

        .rc-firm-score {
            margin-top: 0;
        }

        .rc-footer {
            margin-top: 0.2rem;
            padding-top: 0.45rem;
        }

        .rc-footer .tag {
            font-size: 0.67rem;
            letter-spacing: 0.02em;
            text-transform: none;
            background: #f1f5f9;
            color: #334155;
            border-color: #d7dee6;
            padding: 3px 9px;
        }

        .research-select-wrapper {
            border-radius: 10px;
            padding: 4px 8px;
            box-shadow: none;
            background: #f8fbff;
        }

        .research-select-pill {
            min-width: 200px;
        }

        .radar-inline-shell {
            margin-top: 0.45rem;
            margin-bottom: 0.4rem;
            background: var(--surface-1);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 0.55rem 0.65rem;
            box-shadow: var(--shadow-soft);
        }

        .radar-inline-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.4rem;
            padding: 0 2px;
        }

        .radar-inline-title {
            font-size: 0.64rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #084c38;
        }

        .radar-inline-sub {
            font-size: 0.66rem;
            color: #64748b;
            font-weight: 600;
        }

        .radar-inline-shell .radar-assets-grid {
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 0.38rem;
        }

        .radar-inline-shell .radar-tile {
            background: var(--surface-2);
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            min-height: 52px;
            padding: 0.35rem 0.5rem 0.3rem 0.95rem;
        }

        .radar-inline-shell .radar-tile.radar-dir-up,
        .radar-inline-shell .radar-tile.radar-dir-down,
        .radar-inline-shell .radar-tile.radar-dir-flat {
            background: var(--surface-2);
            border-color: #e2e8f0;
        }

        .radar-inline-shell .radar-tile-symbol {
            font-size: 0.62rem;
            color: #475569;
            margin-bottom: 0.08rem;
        }

        .radar-inline-shell .radar-tile-price {
            font-size: 0.8rem;
        }

        .radar-inline-shell .radar-tile-pct {
            font-size: 0.62rem;
            font-weight: 700;
            color: #64748b;
        }

        .radar-inline-shell .radar-tile.radar-dir-up .radar-tile-price,
        .radar-inline-shell .radar-tile.radar-dir-up .radar-tile-pct {
            color: #15803d;
        }

        .radar-inline-shell .radar-tile.radar-dir-down .radar-tile-price,
        .radar-inline-shell .radar-tile.radar-dir-down .radar-tile-pct {
            color: #b91c1c;
        }

        .radar-inline-shell .radar-tile.radar-dir-flat .radar-tile-price,
        .radar-inline-shell .radar-tile.radar-dir-flat .radar-tile-pct {
            color: #475569;
        }

        .radar-inline-shell .radar-tile-row {
            align-items: center;
            gap: 0.24rem;
        }

        .radar-inline-shell .radar-mini-chart-host {
            display: flex;
            flex: 1 1 88px;
            min-width: 58px;
            max-width: 120px;
            align-items: center;
            margin-left: auto;
        }

        .radar-inline-shell .radar-mini-chart {
            flex: 1 1 auto;
            min-width: 0;
            width: 100%;
            max-width: 120px;
            height: 16px;
            display: block;
            overflow: visible;
        }

        .radar-inline-shell .radar-mini-baseline {
            stroke: #94a3b8;
            stroke-width: 0.9;
            opacity: 0.7;
        }

        .radar-inline-shell .radar-mini-area {
            stroke: none;
            pointer-events: none;
        }

        .radar-inline-shell .radar-mini-area-up {
            fill: rgba(22, 163, 74, 0.18);
        }

        .radar-inline-shell .radar-mini-area-down {
            fill: rgba(220, 38, 38, 0.16);
        }

        .radar-inline-shell .radar-mini-line {
            stroke-width: 1.1;
            vector-effect: non-scaling-stroke;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
            pointer-events: none;
        }

        .radar-inline-shell .radar-mini-line-up {
            stroke: #16a34a;
        }

        .radar-inline-shell .radar-mini-line-down {
            stroke: #dc2626;
        }

        .radar-inline-shell .radar-mini-last-dot {
            stroke: #ffffff;
            stroke-width: 0.8;
        }

        .radar-inline-shell .radar-mini-last-dot.up {
            fill: #16a34a;
        }

        .radar-inline-shell .radar-mini-last-dot.down {
            fill: #dc2626;
        }

        .radar-inline-shell .radar-mini-last-dot.flat {
            fill: #64748b;
        }

        .radar-inline-shell .radar-mini-line-flat {
            stroke: #94a3b8;
            opacity: 0.8;
        }

        .radar-inline-shell .radar-mini-last-dot {
            fill: #64748b;
            stroke: rgba(255, 255, 255, 0.95);
            stroke-width: 0.7;
        }

        .radar-inline-shell .radar-mini-last-dot.up {
            fill: #16a34a;
        }

        .radar-inline-shell .radar-mini-last-dot.down {
            fill: #dc2626;
        }

        .radar-inline-shell .radar-mini-last-dot.flat {
            fill: #94a3b8;
        }

        .radar-column {
            display: none;
        }

        .side-pillars {
            grid-template-columns: 1fr;
        }

        @media (max-width: 1280px) {
            .value-strip {
                grid-template-columns: 1fr;
            }

            .value-strip-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .radar-inline-shell .radar-assets-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

        @media (max-width: 900px) {
            .value-strip {
                margin: 10px 12px 10px;
                padding: 12px;
            }

            .value-strip-grid {
                grid-template-columns: 1fr;
            }

            .value-strip-title {
                font-size: 0.98rem;
            }

            .radar-inline-shell .radar-assets-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .research-select-wrapper {
                width: 100%;
                margin-left: 0;
                justify-content: space-between;
            }

            .mode-filter-slot {
                width: 100%;
                min-width: 0;
                flex: 1 1 100%;
            }

            .research-select-pill {
                min-width: 145px;
            }

            .broker-filter-row {
                width: 100%;
                flex-wrap: wrap;
            }

            .broker-search-shell {
                flex-basis: 100%;
            }
        }

        .headline-secondary {
            display: flex;
            align-items: baseline;
            gap: 0.45rem;
            margin-top: 0.35rem;
            color: #64748b;
            font-size: 0.78rem;
            line-height: 1.35;
        }

        .headline-secondary-label {
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .headline-secondary-text {
            unicode-bidi: isolate;
        }

        .locale-switcher {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            margin-right: 0.25rem;
            padding-right: 0.15rem;
        }

        .locale-switch-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 3.5rem;
            padding: 0.25rem 0.55rem;
            border: 1px solid rgba(148, 163, 184, 0.35);
            border-radius: 999px;
            color: #64748b;
            font-size: 0.72rem;
            font-weight: 700;
            text-decoration: none;
            background: rgba(15, 23, 42, 0.02);
        }

        .locale-switch-link.is-active {
            color: #0f172a;
            border-color: rgba(15, 23, 42, 0.22);
            background: rgba(15, 23, 42, 0.08);
        }

        .rc-body-secondary {
            margin-top: 0.8rem;
        }

        html[dir="rtl"] body {
            font-family: "Noto Sans Arabic", "IBM Plex Sans Arabic", "Noto Sans", sans-serif;
        }

        html[dir="rtl"] #market-header,
        html[dir="rtl"] .layout-grid,
        html[dir="rtl"] .headline-main-row,
        html[dir="rtl"] .guest-upgrade-banner,
        html[dir="rtl"] .mode-tabs,
        html[dir="rtl"] .filter-chips {
            direction: rtl;
        }

        html[dir="rtl"] .card-meta,
        html[dir="rtl"] .headline-formatted-timestamp,
        html[dir="rtl"] .market-reaction-chip,
        html[dir="rtl"] .eco-table,
        html[dir="rtl"] .eco-table th,
        html[dir="rtl"] .eco-table td,
        html[dir="rtl"] .headline-secondary,
        html[dir="rtl"] .broker-search-input,
        html[dir="rtl"] .rc-timestamp,
        html[dir="rtl"] .rc-perf-chip,
        html[dir="rtl"] .price-tile,
        html[dir="rtl"] .sparkline-shell,
        html[dir="rtl"] .radar-assets-grid,
        html[dir="rtl"] .headline-arabic-expansion,
        html[dir="rtl"] .headline-arabic-panel {
            direction: ltr;
            unicode-bidi: isolate;
        }
        /* Arabic expansion panels need RTL content direction */
        html[dir="rtl"] .headline-arabic-expansion,
        html[dir="rtl"] .headline-arabic-panel {
            direction: rtl !important;
        }

        html[dir="rtl"] #search-bar,
        html[dir="rtl"] .headline-title,
        html[dir="rtl"] .date-mode-text,
        html[dir="rtl"] .guest-upgrade-copy,
        html[dir="rtl"] .research-select-label,
        html[dir="rtl"] .radar-inline-header,
        html[dir="rtl"] .eco-title,
        html[dir="rtl"] .eco-subtitle,
        html[dir="rtl"] .eco-mobile-summary,
        html[dir="rtl"] .locale-switcher {
            text-align: right;
        }

/* Market Cap Category Chips */
.mcap-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12rem 0.44rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.1;
    border: 1px solid transparent;
    margin-left: 0.35rem;
    vertical-align: middle;
}

/* Market cap tiers — one color (obsidian), varying strength = size hierarchy.
   Mega = strongest, Nano = barely there. No hue changes, no semantic conflict. */
.mcap-mega  { background: rgba(100,116,139,0.13); color: #111111; border-color: rgba(100,116,139,0.22); }
.mcap-large { background: rgba(100,116,139,0.09); color: #111111; border-color: rgba(100,116,139,0.16); }
.mcap-mid   { background: rgba(100,116,139,0.06); color: #334b66; border-color: rgba(100,116,139,0.11); }
.mcap-small { background: rgba(100,116,139,0.04); color: #475569; border-color: rgba(100,116,139,0.08); }
.mcap-micro { background: rgba(100,116,139,0.03); color: #64748b; border-color: rgba(100,116,139,0.06); }
.mcap-nano  { background: rgba(100,116,139,0.02); color: #94a3b8; border-color: rgba(100,116,139,0.05); }

/* Inline market-cap label appended to the headline title.
   Frees the category column from a third chip and keeps the tier signal next to the ticker text. */
.headline-mcap-inline {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.72em;
    font-weight: 700;
    margin-left: 0.4em;
    padding: 0.05em 0.4em;
    border-radius: 4px;
    vertical-align: 0.1em;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: default;
}
/* "Mkt cap" / "القيمة السوقية" prefix — slightly lighter than the value */
.headline-mcap-inline .mcap-prefix {
    opacity: 0.75;
    font-weight: 600;
    font-size: 0.95em;
}

.headline-mcap-mega  { color: #111111; background: rgba(100,116,139,0.12); }
.headline-mcap-large { color: #111111; background: rgba(100,116,139,0.09); }
.headline-mcap-mid   { color: #334b66; background: rgba(100,116,139,0.06); }
.headline-mcap-small { color: #475569; background: rgba(100,116,139,0.04); }
.headline-mcap-micro { color: #64748b; background: rgba(100,116,139,0.03); }
.headline-mcap-nano  { color: #94a3b8; background: rgba(100,116,139,0.02); }

.move-explained-panel {
    margin-top: 0.45rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #c3d0e4;
    border-left: 3px solid #111111;   /* obsidian — primary terminal identity */
    border-radius: 6px;
    background: #f8fbff;
    color: #1f2937;
}

.move-explained-summary,
.move-explained-evidence {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    line-height: 1.25;
}

.move-explained-summary {
    font-weight: 800;
}

.move-explained-kicker,
.chip-risk-upgraded {
    color: #9a5f12;                   /* copper — premium structured intelligence */
    border-color: #f0d8a8;
    background: #fff7e6;
    font-weight: 900;
}

.move-explained-evidence {
    margin-top: 0.35rem;
    color: #475569;
}

.move-explained-evidence span::before {
    content: "•";
    margin-right: 0.3rem;
    color: #475569;                   /* neutral gray — not neutral */
}

/* ============================================================
   RESPONSIVE IMPROVEMENTS — appended 2026
   ============================================================ */

/* ── Filter chips: horizontally scrollable on all screens ──── */
.filter-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.35rem;
    padding-bottom: 2px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { scroll-snap-align: start; flex-shrink: 0; }

/* ── Market radar: 2-col grid on medium, 1-col on narrow ───── */
@media (min-width: 900px) and (max-width: 1200px) {
    .radar-assets-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
    }
}
@media (max-width: 900px) {
    .radar-inline-shell {
        padding: 0.55rem 0.65rem;
    }
    .radar-assets-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.45rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .radar-assets-grid::-webkit-scrollbar { display: none; }
    .radar-tile {
        flex: 0 0 auto;
        min-width: 100px;
    }
}

/* ── Header: stack gracefully at narrow widths ──────────────── */
@media (max-width: 640px) {
    #market-header {
        flex-wrap: wrap;
        gap: 0.4rem 0.5rem;
        padding: 0.35rem 0.65rem;
    }
    #search-bar-wrapper {
        flex: 1 1 100%;
        order: 3;
        min-width: 0;
    }
    .mode-tabs {
        order: 4;
        flex: 1 1 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mode-tabs::-webkit-scrollbar { display: none; }
    .filter-chips {
        order: 5;
        flex: 1 1 100%;
    }
    .ws-status {
        order: 2;
        margin-left: auto;
    }
}

/* ── Main layout padding: tighter on small screens ──────────── */
@media (max-width: 768px) {
    main.layout-grid {
        padding: 0.65rem 0.65rem 3rem;
        gap: 0.75rem;
    }
}
@media (max-width: 480px) {
    main.layout-grid {
        padding: 0.5rem 0.5rem 3rem;
        gap: 0.6rem;
    }
}

/* ============================================================
   LAPTOP-FIRST STICKY RADAR + CALENDAR ALIGNMENT (May 2026)
   ============================================================ */
/* Radar is now INSIDE #market-shell. Shell = header + filter-row + radar strip.
   Measured shell height ≈ 85px header + 46px radar = ~135px.
   With disconnected banner (+30px) = ~165px.                                    */
:root {
    --mc-shell-height: 90px;           /* actual 2-row header height (no radar in shell) */
    --mc-connection-strip-height: 30px;
    --mc-sticky-radar-top: var(--mc-shell-height); /* kept for legacy references */
}

body.ws-disconnected {
    --mc-shell-height: 120px;
    --mc-sticky-radar-top: var(--mc-shell-height);
}

/* scroll-padding-top so anchor links don't hide behind sticky shell */
html {
    scroll-padding-top: var(--mc-shell-height);
}

.ws-disconnected-banner {
    position: sticky;
    top: 0;
    z-index: 2200;
    min-height: 30px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
}

body.ws-disconnected #market-shell {
    box-shadow: 0 8px 20px rgba(180, 35, 24, 0.16), inset 0 1px 0 #b42318;
}

/* keep feed-first geometry on laptop widths */
@media (min-width: 1201px) {
    main.layout-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 12px;
        padding-top: 0; /* eco calendar starts flush under shell, no shared top gap */
    }

    /* Feed column: minimal top gap so prices appear tight under the filter bar */
    .market-stream {
        padding-top: 0.25rem;
    }

    .side-container {
        top: var(--mc-shell-height);
        max-height: calc(100vh - var(--mc-shell-height) - 12px);
    }

    .side-container .eco-drawer-shell {
        height: calc(100vh - var(--mc-shell-height) - 12px);
        min-height: min(420px, calc(100vh - var(--mc-shell-height) - 12px));
    }
}

/* sticky one-row market radar strip */
/* ── Radar is now inside #market-shell (sticky). No own sticky needed. ── */
.radar-inline-shell {
    position: relative;
    z-index: auto;
    margin: 0;
    padding: 4px 10px 5px;
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    background: #f8fafc;
}

.radar-inline-header {
    display: none;
}

/* Hide the "Market Radar" title row — saves ~18px */
.radar-inline-meta {
    display: none;
}

.radar-inline-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.radar-symbol-help {
    position: relative;
}

.radar-symbol-help > summary {
    list-style: none;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.radar-symbol-help > summary::-webkit-details-marker {
    display: none;
}

.radar-symbol-help-popover {
    position: absolute;
    top: 24px;
    right: 0;
    z-index: 1150;
    width: min(420px, 86vw);
    padding: 8px 10px;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    font-size: 11px;
    line-height: 1.4;
    color: #1f2937;
}

.radar-symbol-help-grid {
    display: grid;
    gap: 4px;
}

html[dir="rtl"] .connection-toast {
    /* Keep the toast on the RIGHT even in RTL — avoids overlap with calendar */
    right: 16px;
    left: auto;
    text-align: right;
}

html[dir="rtl"] .radar-symbol-help-popover {
    right: auto;
    left: 0;
    text-align: right;
}

.radar-inline-shell .radar-assets-grid {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    min-height: 52px;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.radar-inline-shell .radar-assets-grid::-webkit-scrollbar {
    display: none;
}

.radar-inline-shell .radar-tile {
    flex: 0 0 148px;
    min-width: 148px;
    max-width: 148px;
    min-height: 36px;
    height: 36px;
    padding: 3px 6px 3px 12px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.radar-inline-shell .radar-tile-symbol {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #64748b;
}

.radar-inline-shell .radar-tile-price {
    font-size: 12.5px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.radar-inline-shell .radar-tile-pct {
    font-size: 10.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #64748b;
}

.radar-inline-shell .radar-tile.radar-dir-up .radar-tile-price,
.radar-inline-shell .radar-tile.radar-dir-up .radar-tile-pct {
    color: #168246;
}

.radar-inline-shell .radar-tile.radar-dir-down .radar-tile-price,
.radar-inline-shell .radar-tile.radar-dir-down .radar-tile-pct {
    color: #c23631;
}

.radar-inline-shell .radar-mini-chart-host {
    flex: 0 0 54px;
    min-width: 54px;
    max-width: 54px;
}

.radar-inline-shell .radar-mini-chart {
    width: 54px;
    height: 22px;
    max-width: 54px;
}

/* do not collapse to 2-col radar on laptop */
@media (min-width: 900px) and (max-width: 1200px) {
    .radar-inline-shell .radar-assets-grid {
        display: flex;
        grid-template-columns: none;
    }
}

/* ── Headline card: better mobile density ───────────────────── */
@media (max-width: 640px) {
    .headline-card {
        border-radius: 8px;
        padding: 0.18rem 0.35rem;
    }
}

/* ── Guest banner: compact on mobile ───────────────────────── */
@media (max-width: 640px) {
    .guest-banner-compact {
        flex-direction: column;
        gap: 0.45rem;
        align-items: flex-start;
        padding: 0.65rem 0.85rem;
    }
    .guest-banner-actions {
        display: flex;
        gap: 0.45rem;
        flex-wrap: wrap;
    }
}

/* ── Radar inline shell: nicer card feel ───────────────────── */
.radar-inline-shell {
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.75rem;
}

.radar-inline-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.radar-inline-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #0f172a;
}

.radar-inline-sub {
    font-size: 0.62rem;
    font-weight: 500;
    color: #94a3b8;
}

/* ── Price tiles: improved layout ──────────────────────────── */
.radar-tile {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: #ffffff;
    padding: 0.45rem 0.65rem 0.45rem 0.65rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.radar-tile:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.radar-tile-symbol {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 1px;
}
.radar-tile-price {
    font-size: 0.88rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.radar-tile-change {
    font-size: 0.64rem;
    font-weight: 700;
    margin-top: 1px;
}

/* ── Side container: consistent shadow ─────────────────────── */
.side-container {
    height: fit-content;
}

/* ── Mode tabs (Live Tape / Broker / Research): better wrap ── */
.mode-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.3rem;
}
.mode-tabs::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; }

/* ── Back-to-top button: better placement ───────────────────── */
#backToTop {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s, transform 0.22s;
    z-index: 1100;
}
#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#backToTop:hover {
    background: #1e293b;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

@media (max-width: 480px) {
    #backToTop {
        bottom: 1rem;
        right: 1rem;
        width: 34px;
        height: 34px;
    }
}

/* ============================================================
   Responsive hardening (2026-05): prevent horizontal overflow
   across phone/tablet/header control bands.
   ============================================================ */

html,
body {
    max-width: 100%;
    overflow-x: clip;
}

main.layout-grid,
.layout-grid,
#market-shell,
#market-header,
.header-main-row,
.header-secondary-row,
.topbar,
.topbar-inner,
.mode-tabs,
.filter-chips,
.search-panel,
#search-bar-wrapper,
.research-select-wrapper,
.broker-filter-row,
.broker-search-shell,
.radar-inline-shell,
.radar-assets-grid,
.headline-main-row,
.side-container {
    min-width: 0;
}

/* Phone: force controls to wrap cleanly and never exceed viewport width. */
@media (max-width: 640px) {
    #market-header {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.4rem 0.5rem;
        width: 100%;
    }

    .brand-voice,
    #search-bar-wrapper,
    .mode-tabs,
    .filter-chips,
    .research-select-wrapper,
    .broker-filter-row {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    .mode-tabs,
    .filter-chips {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mode-tabs::-webkit-scrollbar,
    .filter-chips::-webkit-scrollbar {
        display: none;
    }

    .mode-tabs .tab-btn,
    .filter-chips button {
        flex: 0 0 auto;
    }

    .research-select-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
    }

    .research-select-shell,
    .research-select-pill,
    .broker-search-shell,
    .broker-search-input {
        max-width: 100% !important;
    }

    .user-nav {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        padding-left: 0;
    }
}

/* Tablet portrait: avoid right-edge overflow from research/broker controls and radar tiles. */
@media (min-width: 641px) and (max-width: 900px) {
    .research-select-wrapper,
    .broker-filter-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .research-select-shell,
    .research-select-pill,
    .broker-search-shell,
    .broker-search-input {
        max-width: 100%;
    }

    .radar-assets-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .radar-assets-grid::-webkit-scrollbar {
        display: none;
    }
}

/* ============================================================
   Strict zero-overflow mode
   - No horizontal spill from chip rails or radar strips.
   ============================================================ */

/* Clamp right-edge control spill (research/broker rows). */
.research-select-wrapper,
.broker-filter-row,
.broker-search-shell {
    max-width: 100%;
    overflow: clip;
}

.mode-filter-slot {
    min-width: 0;
    max-width: 100%;
    overflow: clip;
    width: min(460px, 100%) !important;
    flex: 1 1 320px !important;
}

/* Phones: wrap chips/tabs instead of horizontal rails. */
@media (max-width: 480px) {
    .mode-tabs,
    .filter-chips {
        display: flex !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
        gap: 0.28rem !important;
    }

    .mode-tabs .tab-btn,
    .filter-chips button {
        flex: 0 1 auto !important;
        max-width: 100%;
    }

    .headline-inline-eco {
        flex-wrap: wrap !important;
        white-space: normal !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .radar-mini-chart-host,
    .radar-inline-shell .radar-mini-chart-host {
        min-width: 56px !important;
        max-width: 56px !important;
        flex: 0 0 56px !important;
        overflow: hidden !important;
    }

    .radar-mini-chart,
    .radar-inline-shell .radar-mini-chart {
        overflow: hidden !important;
    }
}

@media (max-width: 1200px) {
    .mode-filter-slot {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* Tablet + phone: force radar tiles into bounded grid, no horizontal rail overflow. */
@media (max-width: 900px) {
    .radar-assets-grid,
    .radar-inline-shell .radar-assets-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        overflow: visible !important;
        gap: 0.4rem !important;
        min-height: calc((52px * 3) + (0.4rem * 2)) !important;
        padding-bottom: 0 !important;
    }

    .radar-tile,
    .radar-inline-shell .radar-tile {
        min-width: 0 !important;
        width: 100% !important;
        padding: 0.4rem 0.5rem !important;
    }

    .radar-tile-row,
    .radar-inline-shell .radar-tile-row {
        min-width: 0;
    }

    .radar-mini-chart-host,
    .radar-inline-shell .radar-mini-chart-host {
        min-width: 48px !important;
        max-width: 72px !important;
        flex: 0 0 72px !important;
    }
}

/* Ultra-small phones: prioritize containment over dense inline adornments. */
@media (max-width: 390px) {
    .radar-assets-grid,
    .radar-inline-shell .radar-assets-grid {
        grid-template-columns: 1fr !important;
        min-height: calc((52px * 6) + (0.4rem * 5)) !important;
    }

    .headline-inline-eco {
        display: none !important;
    }
}

/* ============================================================
   Desktop header density
   Keep laptop-sized screens to two purposeful rows: identity/search/tabs,
   then fast filters plus session controls.
   ============================================================ */
#market-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.34rem;
    padding: 0.38rem 0.7rem;
}

.header-main-row,
.header-secondary-row,
.header-filter-group,
.header-session-group,
.header-global-meta,
.header-secondary-meta {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-main-row {
    gap: 0.75rem;
    width: 100%;
    flex: 1 0 100%;
}

.header-secondary-row {
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    flex: 1 0 100%;
}

.header-filter-group {
    flex: 1 1 auto;
    gap: 0.5rem;
    overflow: hidden;
}

.header-global-meta {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 0.55rem;
}

.header-secondary-meta {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 0.55rem;
}

.header-main-row .brand-voice {
    flex: 0 0 auto;
    padding-right: 0;
}

.header-main-row #search-bar-wrapper {
    flex: 1 1 420px !important;
    max-width: 560px;
    min-width: 240px;
    height: auto !important;
    max-height: 36px;
}

#market-header > #search-bar-wrapper {
    height: auto !important;
    max-height: 36px;
}

.header-main-row .mode-tabs {
    flex: 0 0 auto;
    margin-left: 0;
}

.header-main-row .header-global-meta {
    margin-left: auto;
}

.header-filter-group .filter-chips {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.header-filter-group .mode-filter-slot.is-collapsed {
    display: none;
}

.header-global-meta .ws-status,
.header-global-meta .user-nav,
.header-secondary-meta .date-filter-wrapper {
    flex: 0 0 auto;
}

.header-global-meta .ws-status {
    justify-content: flex-start;
    min-width: 8.75rem;
}

#wsStatus {
    display: inline-block;
    min-width: 6.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-global-meta .user-nav {
    margin-left: 0;
    padding-left: 0;
    min-height: 28px;
}

@media (min-width: 1101px) {
    .header-global-meta {
        min-width: 15rem;
    }
}

@media (min-width: 1201px) {
    .header-filter-group .mode-filter-slot {
        flex: 0 1 420px !important;
        width: min(420px, 34vw) !important;
        min-width: 260px;
    }
}

@media (max-width: 1500px) {
    .header-main-row {
        gap: 0.55rem;
    }

    .brand-lockup {
        gap: 0.42rem;
    }

    #market-clock {
        padding: 0.18rem 0.46rem;
    }

    .mode-tabs .tab-btn {
        padding-left: 8px;
        padding-right: 8px;
    }

    .filter-chips button {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .locale-switch-link {
        min-width: 3rem;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }
}

@media (max-width: 1100px) {
    .header-main-row,
    .header-secondary-row {
        flex-wrap: wrap;
    }

    .header-main-row #search-bar-wrapper,
    .header-main-row .mode-tabs,
    .header-filter-group,
    .header-global-meta,
    .header-secondary-meta {
        flex: 1 1 100% !important;
        max-width: 100%;
    }

    .header-global-meta,
    .header-secondary-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   TERMINAL DENSITY POLISH — May 2026
   Target: clean professional market tape, not a news website.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Legal disclaimer: thin 24px strip, dismissible ── */
.terminal-legal-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 10px;
    line-height: 1.2;
    color: #94a3b8;
    background: transparent;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    min-height: 24px;
    max-height: 28px;
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease;
}
.terminal-legal-strip.dismissed {
    max-height: 0;
    padding: 0;
    border: none;
    opacity: 0;
    pointer-events: none;
}
.terminal-legal-strip a {
    color: #64748b;
    text-decoration: underline;
    white-space: nowrap;
}
.terminal-legal-strip .legal-dismiss-btn {
    margin-left: auto;
    padding: 0 2px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}
.terminal-legal-strip .legal-dismiss-btn:hover { color: #475569; }
[dir="rtl"] .terminal-legal-strip .legal-dismiss-btn { margin-left: 0; margin-right: auto; }

/* ── Headline feed: tighter rows (42-50px normal) ── */
.headline-card {
    min-height: 42px !important;
}
.headline-card .headline-main-row {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}
.headline-title {
    font-size: 13.5px !important;
    line-height: 1.28 !important;
}
.headline-formatted-timestamp {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

/* ── Right calendar: fixed 340px ── */
@media (min-width: 1201px) {
    main.layout-grid {
        grid-template-columns: minmax(0, 1fr) 340px !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   SEARCH RESULTS PAGE — mc-search-* component styles
   Used in headline.html when search_context.active == True
   ───────────────────────────────────────────────────────────── */

.mc-search-panel {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.97);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.55rem 0.85rem 0.45rem;
    margin-bottom: 0.5rem;
}

.mc-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.mc-search-summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 0;
    font-size: 0.85rem;
    color: #475569;
}

.mc-search-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.mc-search-query {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.mc-search-dot {
    color: #cbd5e1;
    font-weight: 400;
}

.mc-search-meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.mc-search-scope {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.mc-search-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.mc-search-clear:hover {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
    text-decoration: none;
}

.mc-search-filterbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mc-search-filterbar::-webkit-scrollbar {
    display: none;
}

.mc-search-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.14s ease;
    flex-shrink: 0;
}

.mc-search-chip:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
}

.mc-search-chip.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.mc-search-count {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* In search mode, cards should be compact — not stretch to viewport height */
body.search-mode .headline-card {
    min-height: unset !important;
    height: auto !important;
}

body.search-mode .headline-stack {
    display: flex;
    flex-direction: column;
}

/* Institutional Research decision workflow */
#researchNotes {
    gap: 0.72rem;
}

#researchNotes .research-card-premium {
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 3px solid #0b5f49;
    padding: 0.86rem 1rem 0.9rem;
    background: #fff;
}

#researchNotes .research-card-premium::before {
    display: none;
}

#researchNotes .rc-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

#researchNotes .rc-title {
    font-size: 1rem;
    line-height: 1.28;
    margin-top: 0.1rem;
}

#researchNotes .rc-decision-brief {
    display: grid;
    gap: 0.55rem;
    padding: 0.68rem 0.72rem;
    border: 1px solid rgba(13, 95, 73, 0.18);
    background: linear-gradient(180deg, #f8fbfa 0%, #ffffff 100%);
    border-radius: 8px;
}

#researchNotes .rc-brief-bottom-line {
    display: grid;
    gap: 0.22rem;
}

#researchNotes .rc-brief-bottom-line strong {
    color: #0f172a;
    font-size: 0.94rem;
    line-height: 1.34;
    font-weight: 750;
}

#researchNotes .rc-brief-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.48rem;
}

#researchNotes .rc-brief-item {
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 7px;
    background: #fff;
}

#researchNotes .rc-brief-label {
    display: block;
    margin-bottom: 0.16rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#researchNotes .rc-brief-value {
    display: block;
    color: #102033;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#researchNotes .rc-brief-catalysts {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

#researchNotes .rc-brief-catalyst-list {
    margin: 0.22rem 0 0;
    padding-left: 1.05rem;
    list-style: none;
}

#researchNotes .rc-brief-catalyst-list li {
    position: relative;
    margin: 0.2rem 0;
    color: #102033;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#researchNotes .rc-brief-catalyst-list li::before {
    content: '▸';
    position: absolute;
    left: -1.0rem;
    color: #0f766e;
    font-weight: 700;
}

#researchNotes .rc-body {
    max-width: 76ch;
    color: #111827;
    font-size: 0.93rem;
    line-height: 1.48;
}

#researchNotes .rc-body-meta {
    color: #52647c;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

#researchNotes .rc-actions-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

#researchNotes .rc-expand-toggle,
#researchNotes .rc-open-note {
    min-height: 30px;
    border-radius: 7px;
    border-color: rgba(13, 95, 73, 0.28);
    background: #f7fbfa;
    color: #073f32;
    font-size: 0.76rem;
}

#researchNotes .rc-expand-toggle:hover,
#researchNotes .rc-open-note:hover {
    background: #e9f5f1;
    border-color: rgba(13, 95, 73, 0.48);
}

#researchNotes .rc-images {
    position: relative;
    max-width: min(620px, 100%);
    margin-top: 0.6rem;
    padding: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #f8fafc;
}

#researchNotes .rc-images::before {
    content: "Chart preview";
    display: block;
    margin-bottom: 0.36rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#researchNotes .rc-images img {
    max-height: 230px;
    width: 100%;
    object-fit: contain;
    border-radius: 6px;
    cursor: zoom-in;
    background: #fff;
}

#researchNotes .rc-perf-row {
    padding: 0.48rem 0.62rem;
    border-radius: 7px;
    background: #f8fafc;
    font-size: 0.78rem;
}

#researchNotes .rc-footer {
    gap: 0.35rem;
    padding-top: 0.42rem;
}

#researchNotes .rc-footer .tag {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.66rem;
}

.research-context-panel {
    display: none;
    margin-bottom: 0.75rem;
    padding: 0.82rem 0.88rem;
    border-radius: 8px;
    border: 1px solid rgba(13, 95, 73, 0.2);
    background: #ffffff;
}

.research-context-panel.is-visible {
    display: block;
}

.research-context-kicker {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.research-context-title {
    margin-top: 0.28rem;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.28;
}

.research-context-firm {
    margin-top: 0.28rem;
    color: #0b5f49;
    font-size: 0.78rem;
    font-weight: 800;
}

.research-context-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.5rem;
    margin-top: 0.58rem;
    font-size: 0.76rem;
}

.research-context-row span {
    color: #64748b;
    font-weight: 750;
}

.research-context-row strong {
    color: #0f172a;
    font-weight: 760;
    line-height: 1.25;
}

.research-context-panel p {
    margin: 0.7rem 0 0;
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.35;
}

.research-drawer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    overscroll-behavior: none;
}

.research-drawer.is-open {
    display: flex;
}

.research-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
}

.research-drawer-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1160px, calc(100vw - 40px));
    height: min(900px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

@supports (height: 100dvh) {
    .research-drawer-panel {
        height: min(900px, calc(100dvh - 32px));
        max-height: calc(100dvh - 32px);
    }
}

.research-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.research-drawer-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding: 1.65rem 2rem 2.3rem;
}

.research-drawer-meta {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 760;
}

.research-drawer-head h2 {
    margin: 0.35rem 4rem 1rem 0;
    color: #0f172a;
    font-size: 1.48rem;
    line-height: 1.2;
}

.research-drawer-brief,
.research-drawer-perf {
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(13, 95, 73, 0.18);
    border-radius: 8px;
    background: #f8fbfa;
}

.research-drawer-brief h3 {
    margin: 0 0 0.45rem;
    color: #0f172a;
    font-size: 0.84rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-drawer-bottom-line {
    margin: 0 0 0.75rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 760;
    line-height: 1.38;
}

.research-drawer-brief-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.research-drawer-brief-grid div {
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 7px;
    background: #fff;
}

.research-drawer-brief-grid span {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-drawer-brief-grid strong {
    display: block;
    margin-top: 0.18rem;
    color: #0f172a;
    font-size: 0.86rem;
    line-height: 1.25;
}

.research-drawer-analysis {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.72rem;
    border-top: 1px solid rgba(13, 95, 73, 0.16);
    color: #172033;
    font-size: 0.88rem;
    line-height: 1.42;
}

.research-drawer-analysis p {
    margin: 0;
}

.research-drawer-analysis-label {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.research-drawer-analysis ul {
    margin: 0;
    padding-left: 1rem;
}

.research-drawer-analysis li + li {
    margin-top: 0.25rem;
}

.research-drawer-images {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.research-drawer-images figure {
    margin: 0;
    padding: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #f8fafc;
}

.research-drawer-images img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #fff;
}

.research-drawer-images figcaption {
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 760;
}

.research-drawer-body {
    max-width: 86ch;
    color: #111827;
    font-size: 1rem;
    line-height: 1.62;
}

.research-drawer-body p {
    margin: 0 0 0.92rem;
}

.research-drawer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 1rem;
}

.research-drawer-tags span {
    padding: 3px 9px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #334155;
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 750;
}

.rc-brief-attribution,
.research-drawer-attribution {
    margin: 0.55rem 0 0;
    color: #94a3b8;
    font-size: 0.68rem;
    font-style: italic;
    line-height: 1.35;
}

html.research-drawer-open,
body.research-drawer-open {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
}

.radar-inline-shell:empty {
    display: none;
}

/* 15-inch / laptop drawer readability: a comfortable panel width and a clean
   single-column "label -> value" brief, instead of a cramped 2-column grid of
   bordered boxes on smaller laptop screens. */
@media (min-width: 761px) and (max-width: 1500px) {
    .research-drawer-panel {
        width: min(1080px, calc(100vw - 32px));
        height: min(840px, calc(100vh - 28px));
        max-height: calc(100vh - 28px);
    }
    @supports (height: 100dvh) {
        .research-drawer-panel {
            height: min(840px, calc(100dvh - 28px));
            max-height: calc(100dvh - 28px);
        }
    }
    .research-drawer-brief-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    .research-drawer-brief-grid div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    .research-drawer-brief-grid span {
        font-size: 0.66rem;
        white-space: nowrap;
    }
    .research-drawer-brief-grid strong {
        margin-top: 0;
        text-align: right;
        font-size: 0.85rem;
    }
    .research-drawer-content {
        padding: 1.35rem 1.5rem 1.9rem;
    }
    .research-drawer-head h2 {
        font-size: 1.34rem;
    }
}

@media (max-width: 1280px) {
    #researchNotes .rc-brief-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .research-context-panel {
        display: none !important;
    }
}

@media (max-width: 760px) {
    .research-drawer {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }

    body.research-tab-active #radarInlineShell,
    body.research-tab-active #live-prices-grid,
    body.research-tab-active #ecoDrawerShell,
    body.research-tab-active #ecoDrawerOverlay,
    body.research-tab-active #ecoFloatBtn {
        display: none !important;
    }

    .connection-toast {
        top: auto;
        right: 14px;
        bottom: 76px;
        max-width: calc(100vw - 92px);
        font-size: 0.7rem;
        line-height: 1.15;
        padding: 7px 10px;
    }

    .connection-toast.is-success {
        display: none;
    }

    .header-secondary-row,
    .header-filter-group {
        align-items: stretch;
        overflow: visible;
    }

    .header-filter-group .mode-filter-slot,
    .mode-filter-slot {
        min-height: 50px;
        height: auto;
    }

    #researchFilterWrapper.research-select-wrapper.is-visible {
        min-height: 50px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 3px;
        padding: 5px 8px;
        border-radius: 8px;
    }

    #researchFilterWrapper .research-select-shell {
        width: 100%;
    }

    #researchFilterWrapper .research-select-pill {
        width: 100%;
        min-width: 0;
        height: 28px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    #researchNotes .research-card-premium {
        padding: 0.78rem 0.8rem;
        margin-bottom: 0.68rem;
    }
    #researchNotes .rc-header {
        align-items: flex-start;
    }
    #researchNotes .rc-title {
        font-size: 0.98rem;
        line-height: 1.3;
    }
    #researchNotes .rc-decision-brief {
        padding: 0.62rem;
    }
    #researchNotes .rc-brief-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #researchNotes .rc-brief-item:first-child,
    #researchNotes .rc-brief-item:nth-child(4),
    #researchNotes .rc-brief-item:nth-child(5) {
        grid-column: 1 / -1;
    }
    .research-drawer-brief-grid {
        grid-template-columns: 1fr;
    }
    #researchNotes .rc-body {
        max-width: none;
        font-size: 0.9rem;
        line-height: 1.44;
    }
    #researchNotes .rc-body .rc-paragraph {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    #researchNotes .rc-actions-row {
        margin-top: 0.55rem;
    }
    #researchNotes .rc-open-note {
        display: inline-flex;
        align-items: center;
        width: 100%;
        min-height: 34px;
        justify-content: center;
        font-size: 0.78rem;
        font-weight: 800;
    }
    #researchNotes .rc-images {
        display: block;
        max-width: 100%;
        margin-top: 0.55rem;
        padding: 0.42rem;
    }
    #researchNotes .rc-images img {
        max-height: 145px;
        object-fit: contain;
    }
    #researchNotes .rc-images img:not(:first-child) {
        display: none;
    }
    .research-drawer-panel {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
    @supports (height: 100dvh) {
        .research-drawer-panel {
            height: 100dvh;
        }
    }
    .research-drawer-close {
        width: 42px;
        height: 42px;
        top: 10px;
        right: 10px;
        font-size: 1.35rem;
    }
    .research-drawer-content {
        padding: 0.95rem 0.9rem 1.45rem;
    }
    .research-drawer-meta {
        padding-right: 3.1rem;
        font-size: 0.72rem;
        line-height: 1.25;
    }
    .research-drawer-head h2 {
        font-size: 1.12rem;
        margin-right: 3.2rem;
    }
    .research-drawer-bottom-line {
        font-size: 0.94rem;
    }
    .research-drawer-body {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    #ecoFloatBtn {
        bottom: 14px;
        right: 14px;
    }
}

@media (max-width: 640px) {
    .mc-search-panel {
        padding: 0.45rem 0.6rem 0.35rem;
    }
    .mc-search-query {
        font-size: 0.9rem;
    }
    .mc-search-chip {
        font-size: 0.68rem;
        padding: 0.18rem 0.5rem;
    }
}

/* ── Mobile frictionless: tap targets + single-line scrolling chip/tab rails ── */
@media (max-width: 640px) {
    .filter-chips button {
        min-height: 40px;
        padding: 0.4rem 0.8rem;
        display: inline-flex;
        align-items: center;
    }
    .mode-tabs .tab-btn {
        min-height: 40px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    /* Keep the primary mode tabs + filter chips on ONE horizontally-scrolling line
       (Bloomberg-phone style) instead of wrapping and pushing the feed down. */
    .mode-tabs,
    .filter-chips {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.28rem !important;
    }
    .mode-tabs::-webkit-scrollbar,
    .filter-chips::-webkit-scrollbar {
        display: none;
    }
    .mode-tabs .tab-btn,
    .filter-chips button {
        flex: 0 0 auto !important;
        max-width: none;
    }
}



/* GUI QA fixes (responsive + a11y) */
@media (max-width: 768px) {
    [dir="rtl"] .header-main-row {
        flex-direction: row-reverse !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    [dir="rtl"] .header-main-row #search-bar-wrapper {
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        align-self: stretch !important;
    }

    [dir="rtl"] .header-main-row .mode-tabs {
        flex-direction: row-reverse !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    [dir="rtl"] .filter-chips {
        justify-content: flex-start !important;
        scroll-padding-inline: 8px;
    }

    #search-bar-wrapper .search-suggestions {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        left: 0 !important;
        right: auto !important;
    }

    [dir="rtl"] #search-bar-wrapper .search-suggestions {
        direction: rtl;
        text-align: right;
    }
}

@media (max-width: 900px) {
    .table-responsive-wrapper {
        overflow: visible;
        max-width: 100%;
    }

    .market-reaction-table {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        white-space: normal;
    }

    .market-reaction-table thead {
        display: none;
    }

    .market-reaction-table tbody {
        display: grid;
        gap: 6px;
    }

    .market-reaction-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        padding: 7px;
        border: 1px solid rgba(148, 163, 184, 0.26);
        border-radius: 8px;
        background: #fff;
    }

    .market-reaction-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        min-width: 0;
        padding: 5px 6px;
        border: 0;
        border-radius: 6px;
        background: #f8fafc;
        text-align: end;
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .market-reaction-table td::before {
        content: attr(data-label);
        min-width: 0;
        color: #64748b;
        font-size: 0.58rem;
        font-weight: 800;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        text-align: start;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .market-reaction-table .mr-symbol,
    .market-reaction-table .price-val,
    .market-reaction-table .move-val {
        direction: ltr;
        unicode-bidi: isolate;
        font-variant-numeric: tabular-nums;
    }

    .market-reaction-table .mr-symbol,
    .market-reaction-table .mr-sparkline-cell,
    .market-reaction-table .mr-vol-td {
        grid-column: 1 / -1;
    }

    .market-reaction-table .mr-symbol {
        justify-content: center;
        color: #0f172a;
        background: #eef2ff;
    }

    .market-reaction-table .mr-sparkline-cell {
        min-height: 46px;
        justify-content: center;
        background: #ffffff;
        border: 1px dashed rgba(148, 163, 184, 0.35);
    }

    .market-reaction-table .mr-sparkline-cell::before {
        align-self: flex-start;
        margin-inline-end: auto;
    }

    [dir="rtl"] .market-reaction-table td {
        text-align: start;
    }
}

@media (max-width: 560px) {
    .market-reaction-table {
        font-size: 0.7rem;
    }
    #clearDateBtn, #backToTop, #newUpdatesPill, #dateModeClearBtn,
    #ecoFloatBtn, #tapeStateResetBtn, .clear-date-btn {
        min-width: 36px;
        min-height: 36px;
    }
}
