h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- AI Research Desk dashboard — "Terminal" theme (Option A) ---- */
:root {
    --bg: #0b0e14;
    --bg-elev: #0e1219;
    --bg-card: #0e1219;
    --bg-inset: #090c12;
    --border: #1c2230;
    --border-soft: #161b27;
    --text: #cdd3dc;
    --text-dim: #8a919c;
    --text-faint: #6e7785;
    --accent: #f5a623;
    --accent-2: #c4831a;
    --up: #22c55e;
    --down: #ef4444;
    --moat: #22c55e;
    --risk: #f5a623;
    --radius-sm: 2px;
    --radius: 3px;
    --radius-lg: 4px;
    --shadow: 0 8px 24px rgba(0, 0, 0, .55);
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, .4);
    --mono: "SF Mono", "Cascadia Mono", "Consolas", "Roboto Mono", ui-monospace, monospace;
    --ui-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html, body {
    font-family: var(--mono);
    margin: 0;
    background: #0b0e14;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 1;
}

/* Global keyboard focus ring for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Utility classes */
.text-faint { color: var(--text-faint); font-size: .8em; }

/* ──── Homepage ──── */
.home {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(245, 166, 35, .08) 0%, rgba(30, 58, 95, .15) 50%, rgba(11, 14, 20, .6) 100%);
    border: 1px solid rgba(245, 166, 35, .15);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .4);
}

.hero-h1 {
    font-family: var(--ui-sans);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: #f8fafc;
    margin: 0 0 .75rem;
}

.hero-sub {
    font-size: .95rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 0 0 1.5rem;
    max-width: 44ch;
}

.hero-ctas {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: .7rem 1.4rem;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--ui-sans);
    text-decoration: none;
    transition: transform .12s, box-shadow .12s;
    cursor: pointer;
}

.hero-btn:hover {
    transform: translateY(-1px);
}

.hero-btn-primary {
    background: var(--accent);
    color: #0b0e14;
    box-shadow: 0 4px 14px rgba(245, 166, 35, .3);
}

.hero-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(245, 166, 35, .45);
}

.hero-btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(245, 166, 35, .4);
}

.hero-btn-secondary:hover {
    background: rgba(245, 166, 35, .08);
}

/* Sample brief card in hero */
.sample-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.sample-card-clickable {
    width: 100%;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: border-color .12s, transform .12s, box-shadow .12s;
}

.sample-card-clickable:hover {
    border-color: rgba(245, 166, 35, .55);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(245, 166, 35, .12);
}

.sample-cta {
    margin-top: .75rem;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sample-card-skeleton {
    min-height: 180px;
}

.sample-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}

.sample-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255, 255, 255, .06);
}

.sample-id {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sample-name {
    font-weight: 700;
    color: #f8fafc;
    font-size: .85rem;
}

.sample-sym {
    font-size: .7rem;
    color: var(--accent);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sample-change {
    font-size: .8rem;
    font-weight: 600;
}

.sample-change.up { color: var(--up); }
.sample-change.down { color: var(--down); }

.sample-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: .8rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--border);
}

.sample-metric {
    display: flex;
    flex-direction: column;
    font-size: .75rem;
}

.sample-metric label {
    color: var(--text-dim);
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}

.sample-metric span {
    color: var(--text);
    font-weight: 600;
}

.sample-insights {
    margin: 0;
    padding: 0 0 0 1.1rem;
    list-style: disc;
    font-size: .78rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.sample-picks {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .7rem;
}

.sample-pick {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: .68rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .12s, background-color .12s;
}

.sample-pick:hover {
    border-color: rgba(245, 166, 35, .45);
    background: rgba(245, 166, 35, .08);
}

.sample-pick.active {
    border-color: rgba(245, 166, 35, .65);
    background: rgba(245, 166, 35, .12);
}

/* Skeleton placeholders */
.skel {
    background: rgba(255, 255, 255, .06);
    border-radius: 4px;
    animation: shimmer 1.5s infinite;
}

.skel-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.skel-line {
    height: 12px;
    margin-bottom: .5rem;
}

@keyframes shimmer {
    0%, 100% { opacity: .6; }
    50% { opacity: .3; }
}

/* Skeleton list and card (reusable loading pattern) */
.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    margin-top: 1rem;
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
}

.skeleton-card .skel-line {
    height: 14px;
    margin-bottom: .7rem;
    border-radius: 4px;
}

.skeleton-card .skel-line:last-child {
    margin-bottom: 0;
}

/* Core capabilities 2×2 grid */
.core-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
}

.core-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.4rem;
    cursor: pointer;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

.core-panel:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, .1);
}

.core-title {
    font-size: .9rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 .4rem;
}

.core-desc {
    font-size: .78rem;
    color: var(--text-dim);
    margin: 0 0 .8rem;
    line-height: 1.5;
}

.core-items {
    margin-bottom: .8rem;
}

.core-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.core-item:last-child {
    border-bottom: 0;
}

.core-item-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    background: rgba(255, 255, 255, .06);
    flex-shrink: 0;
}

.core-item-sym {
    font-weight: 700;
    color: var(--accent);
    font-size: .8rem;
    letter-spacing: .03em;
}

.core-item-meta {
    font-size: .72rem;
    color: var(--text-dim);
    margin-left: auto;
}

.core-placeholder {
    font-size: .78rem;
    color: var(--text-faint);
    font-style: italic;
}

.core-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.core-chip {
    display: inline-block;
    padding: .25rem .6rem;
    background: rgba(245, 166, 35, .1);
    border: 1px solid rgba(245, 166, 35, .25);
    border-radius: 4px;
    font-size: .75rem;
    color: var(--accent);
    font-weight: 600;
}

.core-chip-muted {
    background: rgba(255, 255, 255, .03);
    border-color: var(--border);
    color: var(--text-dim);
}

.core-action {
    font-size: .78rem;
    color: var(--accent);
    font-weight: 600;
}

/* Distinct panel accent themes */
.core-panel-briefs {
    border-color: rgba(245, 166, 35, .2);
    background: linear-gradient(135deg, rgba(245, 166, 35, .04) 0%, var(--bg-card) 40%);
}
.core-panel-briefs:hover { border-color: rgba(245, 166, 35, .5); }
.core-panel-briefs .core-title { color: #f5a623; }
.core-panel-briefs .core-action { color: #f5a623; }

.core-panel-earnings {
    border-color: rgba(34, 197, 94, .2);
    background: linear-gradient(135deg, rgba(34, 197, 94, .04) 0%, var(--bg-card) 40%);
}
.core-panel-earnings:hover { border-color: rgba(34, 197, 94, .5); }
.core-panel-earnings .core-title { color: #4ade80; }
.core-panel-earnings .core-action { color: #4ade80; }
.core-panel-earnings .core-item-sym { color: #4ade80; }

.core-panel-deepdive {
    border-color: rgba(99, 102, 241, .2);
    background: linear-gradient(135deg, rgba(99, 102, 241, .04) 0%, var(--bg-card) 40%);
}
.core-panel-deepdive:hover { border-color: rgba(99, 102, 241, .5); }
.core-panel-deepdive .core-title { color: #a5b4fc; }
.core-panel-deepdive .core-action { color: #a5b4fc; }

.core-panel-signals {
    border-color: rgba(239, 68, 68, .2);
    background: linear-gradient(135deg, rgba(239, 68, 68, .04) 0%, var(--bg-card) 40%);
}
.core-panel-signals:hover { border-color: rgba(239, 68, 68, .5); }
.core-panel-signals .core-title { color: #f87171; }
.core-panel-signals .core-action { color: #f87171; }
.core-panel-signals .core-chip {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .25);
    color: #f87171;
}

/* Popular + Community Activity two-column section */
.home-activity {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.home-activity h2 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    margin: 0 0 .3rem;
}

.ha-feed-desc {
    font-size: .78rem;
    color: var(--text-dim);
    margin: 0 0 .8rem;
}

.ha-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.ha-stock {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    color: var(--text);
    transition: border-color .12s, transform .12s;
}

.ha-stock:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.ha-logo {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    object-fit: contain;
    background: rgba(255, 255, 255, .06);
    flex-shrink: 0;
}

.ha-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ha-name {
    font-weight: 700;
    font-size: .8rem;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ha-sym {
    font-size: .65rem;
    color: var(--accent);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ha-meta {
    font-size: .68rem;
    color: var(--text-dim);
}

.ha-change {
    font-size: .78rem;
    font-weight: 600;
    flex-shrink: 0;
}

.ha-change.up { color: var(--up); }
.ha-change.down { color: var(--down); }

.ha-badge {
    font-size: .7rem;
    flex-shrink: 0;
}

.ha-empty {
    font-size: .8rem;
    color: var(--text-faint);
    padding: 1rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 6px;
}

/* Newsletter capture module (home + earnings) */
.newsletter-signup {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 1rem 1.25rem;
    align-items: center;
    margin: 0 0 2rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 166, 35, .34);
    background: linear-gradient(120deg, rgba(245, 166, 35, .11) 0%, rgba(29, 41, 67, .45) 52%, rgba(13, 17, 26, .92) 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.newsletter-copy h2 {
    margin: 0 0 .2rem;
    font-size: .95rem;
    letter-spacing: .02em;
    color: #fff7ed;
}

.newsletter-copy p {
    margin: 0;
    font-size: .78rem;
    line-height: 1.5;
    color: #d5dbe6;
    max-width: 60ch;
}

.newsletter-form {
    width: 100%;
}

.newsletter-input-row {
    display: flex;
    gap: .55rem;
}

.newsletter-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(8, 11, 18, .82);
    color: var(--text);
    padding: .58rem .72rem;
    font-size: .82rem;
    font-family: var(--ui-sans);
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(245, 166, 35, .8);
    box-shadow: 0 0 0 2px rgba(245, 166, 35, .25);
}

.newsletter-btn {
    border: 1px solid rgba(245, 166, 35, .85);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffc857, #f5a623);
    color: #101521;
    font-weight: 800;
    font-size: .75rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .57rem .9rem;
    cursor: pointer;
    white-space: nowrap;
}

.newsletter-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.newsletter-note {
    margin: .4rem 0 0;
    color: #9ca8bb;
    font-size: .68rem;
}

.newsletter-status {
    margin: .45rem 0 0;
    font-size: .72rem;
    border-radius: 7px;
    border: 1px solid transparent;
    padding: .34rem .5rem;
}

.newsletter-status.ok {
    color: #bbf7d0;
    background: rgba(34, 197, 94, .13);
    border-color: rgba(34, 197, 94, .4);
}

.newsletter-status.warn {
    color: #fecaca;
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .42);
}

.newsletter-toast {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9100;
    padding: .7rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, .5);
    background: rgba(15, 23, 19, .96);
    color: #bbf7d0;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .45);
    animation: toast-in .25s ease;
}

.newsletter-toast.success {
    border-color: rgba(34, 197, 94, .5);
}

.research-newsletter {
    margin-top: .75rem;
}

.research-newsletter .newsletter-signup {
    margin-bottom: 1.25rem;
    border-color: rgba(245, 166, 35, .24);
    background: linear-gradient(120deg, rgba(245, 166, 35, .08) 0%, rgba(18, 26, 44, .42) 50%, rgba(13, 17, 26, .9) 100%);
}

/* Homepage responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .hero-h1 {
        font-size: 1.6rem;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .hero-btn {
        text-align: center;
        justify-content: center;
    }

    .core-grid {
        grid-template-columns: 1fr;
    }

    .home-activity {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .newsletter-signup {
        grid-template-columns: 1fr;
        gap: .75rem;
        margin-bottom: 1.4rem;
    }

    .newsletter-input-row {
        flex-direction: column;
    }

    .newsletter-btn {
        width: 100%;
        text-align: center;
    }
}

.desk {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 4rem;
    overflow-x: hidden;
}

.desk-header {
    margin-bottom: 1.5rem;
}

.desk-header-main {
    flex: 1 1 100%;
    min-width: 0;
}

.desk-header-search {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
}

/* When a report is on screen, put the title on top and the full-width search below it. */
.desk-header:has(.desk-header-search) {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: .9rem 1.25rem;
    flex-wrap: wrap;
}

.desk-header-search .ticker-search-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

.desk-header-search .ticker-search {
    min-height: 2.9rem;
}

.desk-header-search .ts-input {
    font-size: 1rem;
    padding: .7rem .55rem;
}

@media (max-width: 640px) {
    .desk-header-search {
        flex-basis: 100%;
        max-width: none;
    }
}

.desk-header h1 {
    margin: 0 0 .2rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #f8fafc;
}

.subtitle {
    margin: .15rem 0 0;
    color: var(--text-dim);
    line-height: 1.5;
    font-size: .9rem;
    max-width: 82ch;
}


.ask textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    padding: .8rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.4;
    font-family: var(--mono);
}

.ask textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.ask-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
}

button.primary {
    padding: .6rem 1.4rem;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #0b0e14;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-family: var(--mono);
    cursor: pointer;
}

button.primary:disabled {
    background: #475569;
    color: #cdd3dc;
    cursor: not-allowed;
}

button.secondary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-inset);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    font-family: var(--mono);
    cursor: pointer;
    transition: border-color .12s, background-color .12s;
}

button.secondary:hover {
    border-color: #2a3a56;
    background: #172134;
}

button.secondary:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.test-email-status {
    margin: 0 0 1rem;
    padding: .65rem .85rem;
    border-radius: 8px;
    font-size: .85rem;
    line-height: 1.45;
    border: 1px solid transparent;
}

.test-email-status.ok {
    background: rgba(34, 197, 94, .1);
    border-color: rgba(34, 197, 94, .4);
    color: #86efac;
}

.test-email-status.warn {
    background: rgba(245, 158, 11, .1);
    border-color: rgba(245, 158, 11, .4);
    color: #fcd34d;
}

.spinner {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #2b3340;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.status {
    margin-top: 1.5rem;
    color: var(--text-dim);
}

.error {
    margin-top: 1.5rem;
    padding: .8rem 1rem;
    border-radius: var(--radius);
    background: rgba(245, 166, 35, .08);
    border: 1px solid rgba(245, 166, 35, .25);
    color: #fde68a;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .85rem;
}

.retry-btn {
    padding: .45rem 1rem;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    background: rgba(255,255,255,.1);
    color: #fee2e2;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.retry-btn:hover { background: rgba(255,255,255,.2); }

.brief {
    margin-top: 2rem;
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    line-height: 1.6;
}

.brief h1, .brief h2, .brief h3 {
    color: var(--accent);
    margin-top: 1.4rem;
}

.brief h1:first-child {
    margin-top: 0;
}

.brief code {
    background: var(--bg);
    padding: .1rem .35rem;
    border-radius: 2px;
}

.brief hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.brief a {
    color: var(--accent);
}

/* ---- Top navigation ---- */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: .45rem 1rem;
    background: rgba(14, 18, 25, .92);
    border-bottom: 2px solid var(--accent);
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.topnav .brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    flex-shrink: 0;
}

.topnav .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
}

.topnav .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 2px;
    background: var(--accent);
    color: #0b0e14;
    font-size: .95rem;
    font-weight: 900;
    box-shadow: none;
}

/* Header logo image + wordmark lockup */
.topnav .brand-logo {
    display: block;
    height: 72px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
}

.footer-brand .brand-logo-sm {
    height: 22px;
    width: auto;
    object-fit: contain;
    border-radius: 5px;
    vertical-align: middle;
}

.topnav .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.topnav .brand-name {
    font-family: var(--ui-sans);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: .01em;
    white-space: nowrap;
    color: #f8fafc;
}

.topnav .brand-tag {
    font-family: var(--ui-sans);
    font-size: .62rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--accent);
    font-weight: 600;
}

/* Schwab reconnect admin page */
.schwab-admin {
    max-width: 560px;
}

.sa-status {
    padding: .8rem 1rem;
    border-radius: 10px;
    font-size: .95rem;
    line-height: 1.45;
    border: 1px solid var(--border);
    margin-bottom: 1.1rem;
}

.sa-ok {
    background: rgba(34, 197, 94, .08);
    border-color: rgba(34, 197, 94, .4);
}

.sa-warn {
    background: rgba(245, 166, 35, .08);
    border-color: rgba(245, 166, 35, .4);
}

.sa-bad {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .5);
}

.sa-btn {
    display: inline-block;
    color: #0b0e14;
    background: linear-gradient(180deg, #ffcf5a, #f5a623);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.05rem;
    padding: .85rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(245, 166, 35, .35);
}

.sa-btn:active {
    transform: translateY(1px);
}

.sa-steps {
    margin-top: 1.3rem;
    color: var(--text-dim);
    font-size: .9rem;
    line-height: 1.7;
    padding-left: 1.1rem;
}

.sa-steps strong {
    color: var(--text);
}

.topnav-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.topnav-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .5rem;
}

.authbox {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.auth-chip {
    color: var(--text-dim);
    font-size: .72rem;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    padding: .28rem .45rem;
    border-radius: 2px;
    white-space: nowrap;
}

.auth-link {
    color: var(--accent);
    text-decoration: none;
    font-size: .75rem;
    letter-spacing: .02em;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    padding: .28rem .5rem;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

.auth-link:hover {
    background: #161b27;
}

/* Professional centered tab bar */
.tabbar {
    display: inline-flex;
    align-items: stretch;
    gap: .4rem;
    background: rgba(15, 22, 36, .6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.topnav .tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--ui-sans);
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: .82rem;
    letter-spacing: .02em;
    line-height: 1;
    padding: .55rem .9rem;
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: color .14s, background-color .14s, border-color .14s;
}

.topnav .tab:active {
    transform: translateY(1px);
}

.topnav .tab .tab-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    font-size: .9rem;
    line-height: 1;
    transition: transform .14s;
}

.topnav .tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, .04);
}

.topnav .tab:hover .tab-ico {
    transform: scale(1.1);
}

.topnav .tab.active {
    color: var(--accent);
    background: rgba(245, 166, 35, .08);
    border-color: rgba(245, 166, 35, .2);
    font-weight: 600;
}

.topnav .tab.active .tab-ico {
    transform: scale(1.1);
}

.tab-badge-new {
    display: inline-block;
    font-size: .5rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: .08rem .35rem;
    border-radius: 3px;
    margin-left: .25rem;
    vertical-align: middle;
    line-height: 1.2;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

/* Global market (country) toggle in the nav */
.market-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0;
}

.market-toggle-wrap {
    position: relative;
    display: inline-flex;
}

/* One-time "detected your market" hint pointing at the toggle */
.market-hint {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    width: max-content;
    max-width: min(280px, 80vw);
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .6rem .7rem;
    background: linear-gradient(180deg, #14203a, #0f1726);
    border: 1px solid #f5a623;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
    font-size: .78rem;
    line-height: 1.4;
    color: var(--text);
    animation: fadeIn .25s ease-out;
}

.market-hint::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 10px;
    height: 10px;
    background: #14203a;
    border-left: 1px solid #f5a623;
    border-top: 1px solid #f5a623;
    transform: rotate(45deg);
}

.market-hint strong {
    color: var(--accent);
    white-space: nowrap;
}

.market-hint-x {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
    padding: .1rem .2rem;
}

.market-tab {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--border);
    cursor: pointer;
    color: #94a3b8;
    font-weight: 600;
    font-size: .82rem;
    padding: .4rem .75rem;
    border-radius: 0;
    white-space: nowrap;
    transition: color .15s, background-color .15s, border-color .15s;
}

.market-tab:last-child {
    border-right: 0;
}

.market-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, .02);
}

.market-tab.active {
    background: rgba(245, 166, 35, .1);
    color: var(--accent);
    border-right-color: var(--accent);
}

/* ---- Mobile hamburger + slide-in menu ---- */
.mobile-bottom-bar { display: none; }

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 10px;
    background: var(--accent);
    border: none;
    border-radius: 11px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(99,102,241,.45);
    transition: transform .15s ease, box-shadow .15s ease;
}

.nav-burger:active { transform: scale(.92); }

.nav-burger span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(330px, 88vw);
    z-index: 40;
    background: linear-gradient(180deg, #101827, #0b0f18);
    border-left: 1px solid #24354d;
    box-shadow: -24px 0 48px rgba(0, 0, 0, .55);
    padding: 4.4rem 1rem 1.4rem;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.16, 1, .3, 1);
    overflow-y: auto;
    flex-direction: column;
    gap: .35rem;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(3, 6, 12, .55);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
}

.mobile-menu-scrim.open {
    opacity: 1;
    pointer-events: auto;
}

.mm-link {
    display: grid;
    grid-template-columns: 2.6rem 1fr;
    align-items: center;
    column-gap: .7rem;
    padding: .7rem .75rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    transition: background-color .12s, border-color .12s;
}

.mm-link:active {
    background: #172134;
}

.mm-ico {
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 10px;
    background: rgba(148, 163, 184, .12);
    font-size: 1.35rem;
}

.mm-text {
    font-weight: 700;
    font-size: 1rem;
    color: inherit;
}

.mm-desc {
    grid-column: 2;
    font-size: .72rem;
    color: var(--text-dim);
}

.mm-link.active {
    background: linear-gradient(180deg, #ffcf5a, #f5a623);
    border-color: #f5a623;
    color: #0b0e14;
}

.mm-link.active .mm-ico {
    background: rgba(11, 14, 20, .18);
}

.mm-link.active .mm-desc {
    color: rgba(11, 14, 20, .7);
}

.mm-link-sub {
    grid-template-columns: 2.6rem 1fr;
}

.mm-link-sub .mm-text {
    font-weight: 600;
    font-size: .92rem;
}

.mm-divider {
    height: 1px;
    background: var(--border);
    margin: .7rem .3rem;
}

.mm-user {
    font-size: .74rem;
    color: var(--text-dim);
    padding: .2rem .8rem .55rem;
}

.mm-user strong {
    color: var(--text);
}

@media (max-width: 1040px) {
    .topnav {
        flex-wrap: wrap;
        gap: .6rem;
    }

    .topnav .brand-tag {
        display: none;
    }

    .topnav-center {
        order: 3;
        flex-basis: 100%;
        /* Let the tab bar scroll sideways instead of being clipped/centered off-screen. */
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .topnav-center::-webkit-scrollbar {
        display: none;
    }

    .tabbar {
        flex-shrink: 0;
        width: max-content;
    }

    .topnav .tab {
        padding: .5rem .75rem;
        font-size: .78rem;
    }

    .topnav .tab .tab-ico {
        font-size: .85rem;
    }
}

/* Phones: swap the tab bar for a hamburger + slide-in menu. */
@media (max-width: 820px) {
    .topnav {
        flex-wrap: nowrap;
        gap: .5rem;
        padding: .5rem .8rem;
    }

    /* Hide the desktop tab bar and inline auth; those move into the slide-in menu. */
    .topnav-center,
    .authbox-desktop {
        display: none !important;
    }

    .topnav-right {
        gap: .4rem;
        margin-left: auto;
    }

    .nav-burger {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .mobile-menu-scrim {
        display: block;
    }

    /* Stop background scroll while the menu is open. */
    body.menu-open {
        overflow: hidden;
    }

    .topnav .brand-mark {
        width: 1.5rem;
        height: 1.5rem;
        font-size: .85rem;
    }

    .topnav .brand-icon {
        width: 30px;
        height: 30px;
    }

    .topnav .brand-logo {
        height: 50px;
    }

    .topnav .brand-name {
        font-size: .9rem;
    }

    .topnav .brand-tag {
        display: none;
    }

    /* Compact the country toggle so the top bar breathes. */
    .market-tab {
        padding: .35rem .55rem;
        font-size: .78rem;
    }

    /* ---- Mobile bottom tab bar ---- */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 900;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        padding: .4rem 0 env(safe-area-inset-bottom, .4rem);
        justify-content: space-around;
        align-items: center;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .mbb-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: .35rem .6rem;
        border: none;
        background: none;
        color: var(--text-muted);
        text-decoration: none;
        font-size: .65rem;
        font-weight: 500;
        letter-spacing: .02em;
        cursor: pointer;
        border-radius: 8px;
        transition: color .15s, background .15s;
    }

    .mbb-tab.active {
        color: var(--accent);
    }

    .mbb-tab:hover, .mbb-tab:active {
        background: rgba(99,102,241,.1);
        color: var(--accent);
    }

    .mbb-ico {
        font-size: 1.3rem;
        line-height: 1;
    }

    .mbb-label {
        white-space: nowrap;
    }

    /* Give page content padding so it doesn't sit behind the bottom bar */
    .board, main {
        padding-bottom: 5rem !important;
    }
}

/* ---- Market board ---- */
.board {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.board-header h1 {
    margin: 0 0 .25rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent);
}

.board-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.country-toggle {
    display: inline-flex;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: .15rem;
    gap: .15rem;
}

.country-tab {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: .9rem;
    font-weight: 600;
    padding: .35rem .8rem;
    border-radius: .45rem;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.country-tab:hover {
    color: #e2e8f0;
}

.country-tab.active {
    background: var(--accent);
    color: #0b0e14;
}

.updated {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #94a3b8;
    font-size: .9rem;
}

.movers {
    margin: 1.5rem 0 .5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.movers h2 {
    margin: 0 0 .5rem;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

.movers-how {
    margin: 0 0 .35rem;
    font-size: .76rem;
    line-height: 1.5;
    color: #8295ad;
    max-width: 70ch;
}

.movers .muted {
    margin: .5rem 0 0;
    color: #94a3b8;
}

.tc-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .6rem;
}

/* Trend-changes categories grid */
.tc-cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    align-items: start;
    gap: 1rem;
    margin-top: 1.25rem;
}

.tc-cat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem 1rem 1rem;
}

.tc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.tc-cat-head h2 {
    margin: 0;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text);
}

.tc-cat-count {
    flex: 0 0 auto;
    min-width: 1.5rem;
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(245, 166, 35, .12);
    border: 1px solid rgba(245, 166, 35, .35);
    border-radius: 2px;
    padding: .1rem .5rem;
}

.tc-cat-how {
    margin: .35rem 0 0;
    font-size: .74rem;
    line-height: 1.45;
    color: #8295ad;
}

.tc-cat .tc-list {
    margin-top: .7rem;
}

.tc-row {
    display: grid;
    grid-template-columns: 4.5rem 4rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .4rem .6rem;
    padding: .35rem .6rem;
    border-radius: var(--radius);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-left-width: 3px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.tc-row:hover, .tc-row:focus-visible {
    background: #131825;
    outline: none;
}

.tc-row.bull { border-left-color: #16a34a; }
.tc-row.bear { border-left-color: #dc2626; }
.tc-row.neutral { border-left-color: #475569; }

.tc-detail {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
}

.tc-meta,
.signal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.tc-date,
.tc-level {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .1rem .4rem;
    border-radius: 2px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-dim);
    white-space: nowrap;
}

.tc-date {
    color: #cbd5e1;
}

.tc-target {
    border-color: rgba(34, 197, 94, .5);
    color: #86efac;
}

.tc-stop {
    border-color: rgba(239, 68, 68, .5);
    color: #fca5a5;
}

.tc-row .tc-sym {
    font-size: .68rem;
    letter-spacing: .04em;
    color: #7f8ea3;
    text-transform: uppercase;
}

.tc-row .change {
    font-size: .82rem;
    text-align: right;
    white-space: nowrap;
}

.tc-row .tc-reason {
    font-size: .82rem;
    color: #94a3b8;
}

.tc-reason-compact {
    font-size: .72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.tc-inline-levels {
    display: flex;
    gap: .25rem;
    align-items: center;
    flex-shrink: 0;
}

.tc-meta-compact {
    margin-top: .1rem;
}

.tc-row-more {
    margin-top: .2rem;
}

.tc-row-more > summary {
    cursor: pointer;
    list-style: none;
    font-size: .64rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent);
    user-select: none;
}

.tc-row-more > summary::-webkit-details-marker {
    display: none;
}

.tc-row-more > summary::before {
    content: "▸";
    margin-right: .25rem;
    color: #94a3b8;
}

.tc-row-more[open] > summary::before {
    content: "▾";
}

.valuation-alt {
    margin: .55rem 0 0;
    font-size: .78rem;
    color: #cbd5e1;
}

.valuation-alt a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
}

.tc-more {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .25rem;
}

.tc-chip {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .08rem .35rem;
    border-radius: 2px;
    border: 1px solid var(--border);
    color: #cbd5e1;
    background: var(--bg-inset);
    white-space: nowrap;
}

.tc-chip.bull {
    border-color: rgba(34, 197, 94, .5);
    color: #86efac;
}

.tc-chip.bear {
    border-color: rgba(239, 68, 68, .5);
    color: #fca5a5;
}

.tc-chip.neutral {
    border-color: #334155;
    color: #94a3b8;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .5rem;
    margin-top: 1rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .7rem .8rem;
    cursor: pointer;
    box-shadow: none;
    transition: border-color .12s, background-color .12s;
}

.card:hover, .card:focus-visible {
    border-color: var(--accent);
    background: #131825;
    transform: none;
    box-shadow: inset 2px 0 0 var(--accent);
    outline: none;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
}

.ticker {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.ticker .ticker-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Small company logo on the board / trend-changes cards. */
.sym-logo {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    object-fit: contain;
    background: #ffffff;
    padding: 3px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.sym-logo.sym-logo-sm {
    width: 22px;
    height: 22px;
    border-radius: 2px;
    padding: 2px;
}

/* Hidden when every logo source fails (handled by window.appLogo.fail). */
.sym-logo.rm-logo-missing {
    display: none;
}

.ticker .symbol {
    font-size: .64rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #7f8ea3;
}

.ticker .name {
    font-size: .9rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .18rem .45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-bull { background: #064e3b; color: #6ee7b7; }
.badge-bear { background: #7f1d1d; color: #fca5a5; }
.badge-hot { background: #78350f; color: #fcd34d; }
.badge-cold { background: #1e3a8a; color: #93c5fd; }
.badge-neutral { background: #334155; color: #cbd5e1; }
.badge-change { background: #4c1d95; color: #ddd6fe; }
.badge-trending { background: #7c2d12; color: #fdba74; }

.badges {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Short / Medium / Long-term trend bars */
.trend-bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .2rem;
    margin: .3rem 0 .1rem;
}

.trend-bar {
    height: .9rem;
    border-radius: .25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .15rem;
}

.trend-bar .t-label {
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.trend-bar .t-arrow {
    font-size: .56rem;
    font-weight: 700;
    line-height: 1;
}

.trend-bar.bull { background: #16a34a; color: #052e16; }
.trend-bar.bear { background: #dc2626; color: #450a0a; }
.trend-bar.neutral { background: #475569; color: #cbd5e1; }

/* Trend chips on the Research KPI panel */
.trend-chips {
    display: flex;
    gap: .3rem;
}

.trend-chips .chip {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: .4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
}

.trend-chips .chip.bull { background: #16a34a; color: #052e16; }
.trend-chips .chip.bear { background: #dc2626; color: #450a0a; }
.trend-chips .chip.neutral { background: #475569; color: #cbd5e1; }

.trend-note {
    margin-top: 1rem;
    padding: .65rem 1rem;
    border-radius: .6rem;
    background: #2e1065;
    color: #ddd6fe;
    border: 1px solid #4c1d95;
}

.signals {
    margin-top: 1.1rem;
}

.signals-h {
    margin: 0 0 .55rem;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

.signals-h .signals-sub {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: #64748b;
    margin-left: .35rem;
}

.signal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.signal-row {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: .65rem;
    align-items: baseline;
    padding: .45rem .65rem;
    border-radius: var(--radius);
    background: var(--bg-inset);
    border-left: 3px solid var(--border);
}

.signal-row.bull {
    border-left-color: #22c55e;
}

.signal-row.bear {
    border-left-color: #ef4444;
}

.signal-row.neutral {
    border-left-color: #64748b;
}

.signal-label {
    font-weight: 700;
    font-size: .8rem;
    color: #e2e8f0;
}

.signal-detail {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
}

.signal-reason {
    font-size: .8rem;
    color: #94a3b8;
}

.price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: .3rem 0 .2rem;
}

.price {
    font-size: .85rem;
    font-weight: 600;
    color: #f1f5f9;
}

.change {
    font-size: .7rem;
    font-weight: 600;
}

.change.up, .up { color: #34d399; }
.change.down, .down { color: #f87171; }

.spark {
    width: 100%;
    height: 20px;
    display: block;
    margin: .1rem 0 .2rem;
}

.spark-empty {
    background: var(--bg-inset);
    border-radius: 2px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .3rem;
    margin-top: .3rem;
    border-top: 1px solid var(--border);
    padding-top: .35rem;
}

.stats > div {
    display: flex;
    flex-direction: column;
}

.stats label {
    font-size: .5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}

.stats span {
    font-size: .7rem;
    color: #e2e8f0;
}

.card-error {
    opacity: .6;
}

.card-err {
    margin-top: .5rem;
    font-size: .85rem;
    color: #94a3b8;
}

/* ---- Research page KPIs ---- */
.symbol-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.symbol-input {
    flex: 0 0 auto;
    width: 12rem;
    box-sizing: border-box;
    padding: .65rem .9rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.symbol-input:focus {
    outline: none;
    border-color: var(--accent);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
    margin-top: 1.75rem;
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .75rem .9rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.kpi label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-faint);
}

.kpi .kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #ffffff;
}

.kpi .change {
    font-size: .85rem;
}

.kpi .badge {
    align-self: flex-start;
    font-size: .8rem;
}

.price-chart {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.price-chart h2 {
    margin: 0 0 .5rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

/* ---- Research: engagement while waiting ---- */
.while-you-wait {
    margin-top: 1.5rem;
    padding: 1.1rem 1.35rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.while-you-wait h2 {
    margin: 0 0 .25rem;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

.while-you-wait .muted {
    margin: 0 0 .85rem;
    color: #94a3b8;
    font-size: .85rem;
}

.trend-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.trend-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .8rem;
    border-radius: 2px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: .85rem;
    transition: border-color .15s, transform .15s;
}

.trend-pill:hover:not(:disabled) {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.trend-pill:disabled {
    cursor: default;
    opacity: .8;
}

.trend-pill .tp-sym {
    font-size: .62rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #7f8ea3;
}

.trend-pill .tp-price {
    color: #cbd5e1;
}

/* ---- Research: 24h cache note ---- */
.cache-note {
    margin-top: 1.5rem;
    padding: .6rem 1rem;
    border-radius: .6rem;
    background: #0c4a6e;
    color: #bae6fd;
    border: 1px solid #155e75;
    font-size: .88rem;
}

/* ---- Research: recently researched by others ---- */
.others {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.others h2 {
    margin: 0 0 .25rem;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

.others .muted {
    margin: 0 0 .85rem;
    color: #94a3b8;
    font-size: .85rem;
}

.others-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .6rem;
}

.other-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .85rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-inset) 100%);
    border: 1px solid var(--border);
    color: #cbd5e1;
    cursor: pointer;
    font-size: .82rem;
    transition: border-color .15s, transform .15s, box-shadow .15s;
    text-align: left;
}

.other-item:hover:not(:disabled) {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 166, 35, .12);
}

.other-item:disabled {
    cursor: default;
    opacity: .7;
}

.other-item .oi-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255,255,255,.06);
    flex-shrink: 0;
}

.other-item .oi-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.other-item .oi-top {
    display: flex;
    align-items: baseline;
    gap: .4rem;
}

.other-item .oi-name {
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.other-item .oi-sym {
    font-size: .6rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}

.other-item .oi-meta {
    font-size: .65rem;
    color: #64748b;
    margin-top: .1rem;
}

.others-empty {
    margin: 0;
    padding: 1.5rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, .02);
    border: 1px dashed var(--border);
    color: var(--text-dim);
    text-align: center;
    font-size: .85rem;
}

@media (max-width: 640px) {
    .others-list {
        grid-template-columns: 1fr 1fr;
        gap: .4rem;
    }
    .other-item {
        padding: .45rem .6rem;
        gap: .45rem;
    }
    .other-item .oi-logo { width: 22px; height: 22px; }
    .other-item .oi-name { font-size: .75rem; }
}

/* ---- Research: one-page report sheet ---- */
.report {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem 1.75rem;
    box-shadow: none;
}

.report-masthead {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: .85rem;
    border-bottom: 2px solid var(--accent);
}

.report-masthead .rm-id {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}

.rm-share {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    color: #94a3b8;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.share-btn:hover {
    background: rgba(255,255,255,.12);
    color: #e2e8f0;
    border-color: rgba(255,255,255,.3);
}
.share-whatsapp:hover {
    background: rgba(37,211,102,.15);
    color: #25d366;
    border-color: rgba(37,211,102,.4);
}
.share-copy:hover {
    background: rgba(96,165,250,.15);
    color: #60a5fa;
    border-color: rgba(96,165,250,.4);
}

.report-masthead .rm-name-main {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.1;
    color: #ffffff;
}

.report-masthead .rm-ticker {
    margin-top: .2rem;
    font-size: .68rem;
    letter-spacing: .08em;
    color: #7f8ea3;
    text-transform: uppercase;
}

.report-masthead .rm-quote {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    line-height: 1.2;
}

.report-masthead .rm-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
}

.report-masthead .rm-signal {
    font-size: .8rem;
    padding: .35rem .7rem;
}

.rm-kpis {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-items: stretch;
}

.rm-kpi-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-top: none;
}

.rm-kpi-row:first-child {
    border-top: 1px solid var(--border);
}

.rm-kpi-row .rm-kpi {
    flex: 1;
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding: .5rem .65rem;
}

.rm-kpi-row .rm-kpi:last-child {
    border-right: none;
}

.rm-kpi-returns {
    display: none;
}

.rm-sparkline {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem 0;
}

.sparkline-svg {
    width: 200px;
    height: 40px;
}

.sparkline-svg polyline {
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sparkline-svg.up polyline {
    stroke: #34d399;
}

.sparkline-svg.down polyline {
    stroke: #f87171;
}

.sparkline-label {
    font-size: .65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rm-kpi {
    padding: .42rem .55rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #0d1320;
}

.rm-kpis label {
    display: block;
    font-size: .58rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #92a0b4;
}

.rm-kpis span {
    font-size: .94rem;
    font-weight: 700;
    color: #dbeafe;
}

.rm-kpi-live,
.rm-kpi-cap {
    background: linear-gradient(180deg, #111d32, #0f1a2b);
    border-color: #223756;
}

.rm-kpi-live label,
.rm-kpi-cap label {
    color: #9bb8df;
}

.rm-kpi-live span,
.rm-kpi-cap span {
    font-size: 1.24rem;
    color: #f8fafc;
}

.rm-kpi-return {
    border-color: #203146;
}

.rm-kpi-verdict {
    border-color: #2d3a4f;
    background: #111824;
}

.rm-kpi-verdict span {
    color: #e2e8f0;
}

.rm-kpi-verdict.valuation-good {
    border-color: rgba(34, 197, 94, .45);
    background: rgba(34, 197, 94, .12);
}

.rm-kpi-verdict.valuation-good span {
    color: #86efac;
}

.rm-kpi-verdict.valuation-fair {
    border-color: rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .12);
}

.rm-kpi-verdict.valuation-fair span {
    color: #fcd34d;
}

.rm-kpi-verdict.valuation-warn {
    border-color: rgba(239, 68, 68, .45);
    background: rgba(239, 68, 68, .12);
}

.rm-kpi-verdict.valuation-warn span {
    color: #fca5a5;
}

/* AI Verdict KPI colors */
.rm-kpi-verdict.ai-verdict-buy {
    border-color: rgba(34, 197, 94, .45);
    background: rgba(34, 197, 94, .12);
}
.rm-kpi-verdict.ai-verdict-buy span { color: #86efac; }

.rm-kpi-verdict.ai-verdict-hold,
.rm-kpi-verdict.ai-verdict-neutral {
    border-color: rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .12);
}
.rm-kpi-verdict.ai-verdict-hold span,
.rm-kpi-verdict.ai-verdict-neutral span { color: #fcd34d; }

.rm-kpi-verdict.ai-verdict-avoid {
    border-color: rgba(239, 68, 68, .45);
    background: rgba(239, 68, 68, .12);
}
.rm-kpi-verdict.ai-verdict-avoid span { color: #fca5a5; }

.rm-kpi-earnings {
    border-color: #3c2d12;
    background: linear-gradient(180deg, #241b0d, #1c160d);
}

.rm-kpi-earnings label {
    color: #d7b16a;
}

.rm-kpi-earnings span {
    color: #fde68a;
}

.rm-kpi-return .up {
    color: #22c55e;
}

.rm-kpi-return .down {
    color: #ef4444;
}

@media (max-width: 900px) {
    .rm-kpis {
        grid-template-columns: repeat(2, minmax(120px, auto));
        justify-items: start;
    }

    .rm-kpi-returns {
        grid-template-columns: repeat(3, minmax(70px, 1fr));
    }

    .report-masthead .rm-quote {
        width: 100%;
    }
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem 1rem;
    margin: .85rem 0 .25rem;
    font-size: .76rem;
    color: #64748b;
}

.report-meta .rm-stamp {
    color: var(--accent);
    font-weight: 600;
}

.report-meta .rm-disclaimer {
    font-style: italic;
}

.report-section {
    margin-top: 1.5rem;
}

.report-overview-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 980px) {
    .report-overview-grid {
        grid-template-columns: 1fr;
    }
}

.report-h {
    margin: 0 0 .85rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    padding-left: .55rem;
    border-left: 3px solid var(--accent);
}

/* "About the company" 100-word business summary */
.company-about-text {
    margin: 0;
    font-size: .92rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.company-about-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.about-toggle {
    margin-top: .45rem;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--accent);
    font-size: .72rem;
    padding: .22rem .5rem;
    border-radius: 2px;
    cursor: pointer;
}

.about-toggle:hover {
    background: #161b27;
}

/* Redesigned "About the company" card — wider, colourful, with an emphasized lead + info chips. */
.company-about-card {
    background: linear-gradient(135deg, rgba(245, 166, 35, .08), rgba(59, 130, 246, .06) 60%, rgba(11, 14, 20, .2));
    border: 1px solid #24314a;
    border-radius: 12px;
    padding: 1rem 1.15rem 1.15rem;
}

.about-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .55rem;
}

.about-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.about-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .3rem .6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.chip-industry {
    background: rgba(59, 130, 246, .16);
    border-color: rgba(59, 130, 246, .4);
    color: #93c5fd;
}

.chip-cap {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .4);
    color: #86efac;
}

.chip-verdict.valuation-good { background: rgba(34, 197, 94, .16); border-color: rgba(34, 197, 94, .45); color: #86efac; }
.chip-verdict.valuation-fair { background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .45); color: #fcd34d; }
.chip-verdict.valuation-warn { background: rgba(239, 68, 68, .16); border-color: rgba(239, 68, 68, .45); color: #fca5a5; }

.about-lead {
    margin: 0 0 .5rem;
    font-size: 1.02rem;
    line-height: 1.55;
    font-weight: 600;
    color: #f1f5f9;
}

/* About body as scannable, colour-marked bullets */
.about-bullets {
    list-style: none;
    margin: .3rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.about-bullets li {
    position: relative;
    padding-left: 1.4rem;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.about-bullets li::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 0;
    color: #60a5fa;
    font-weight: 700;
}

.company-about-card .company-about-text {
    color: var(--text-muted);
}

/* LLM-generated "Key USP" bullets under the Research brief */
.usp-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, .1), rgba(59, 130, 246, .06) 60%, rgba(11, 14, 20, .2));
    border: 1px solid #33305a;
    border-radius: 12px;
    padding: 1rem 1.15rem 1.1rem;
}

.usp-list {
    list-style: none;
    margin: .4rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.usp-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: .92rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.usp-list li::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    color: #c4b5fd;
    font-size: .9rem;
}

.usp-list li strong {
    color: #ddd6fe;
    font-weight: 700;
}

.usp-foot {
    margin: .8rem 0 0;
    font-size: .72rem;
    color: var(--text-faint);
}

.valuation-check {
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem 1rem;
}

.valuation-quarter-note {
    margin: 0 0 .6rem;
    font-size: .82rem;
    color: #94a3b8;
}

.valuation-date-sep {
    margin: 0 .35rem;
    color: #475569;
}

.report-fold {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-inset);
    overflow: hidden;
}

.report-fold > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem .95rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    border-bottom: 1px solid transparent;
}

.report-fold[open] > summary {
    border-bottom-color: var(--border);
}

.report-fold > summary::-webkit-details-marker {
    display: none;
}

.report-fold > summary::after {
    content: "▾";
    font-size: .85rem;
    color: #94a3b8;
    transition: transform .15s ease;
}

.report-fold:not([open]) > summary::after {
    transform: rotate(-90deg);
}

.report-fold.company-about {
    background: transparent;
}

.report-fold.company-about > p {
    padding: .8rem 1rem 1rem;
}

.valuation-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .6rem 1rem;
}

@media (max-width: 640px) {
    .valuation-kpis {
        grid-template-columns: 1fr 1fr;
        gap: .35rem .5rem;
    }
    .valuation-kpis > div {
        padding: .25rem .4rem;
        background: rgba(255,255,255,.02);
        border-radius: 4px;
    }
    .valuation-kpis label { font-size: .58rem; }
    .valuation-kpis span { font-size: .78rem; }
}

.valuation-kpis label {
    display: block;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-dim);
}

.hint-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: .35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    font-size: .62rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.valuation-kpis span {
    font-size: .86rem;
    color: #dbeafe;
    font-weight: 700;
}

.valuation-note,
.valuation-notes {
    margin: .75rem 0 0;
    font-size: .82rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.valuation-notes {
    padding-left: 1.2rem;
}

.valuation-notes li {
    margin: .28rem 0;
}

.valuation-notes li::marker {
    color: var(--accent);
}

.valuation-note.valuation-good,
.valuation-notes.valuation-good {
    color: #86efac;
}

.valuation-note.valuation-fair,
.valuation-notes.valuation-fair {
    color: #fcd34d;
}

.valuation-note.valuation-warn,
.valuation-notes.valuation-warn {
    color: #fca5a5;
}

.peer-compare-wrap {
    margin-top: .85rem;
    border-top: 1px solid var(--border);
    padding-top: .7rem;
}

.peer-compare-title {
    margin: 0;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
}

.peer-compare-note {
    margin: .25rem 0 .6rem;
    font-size: .76rem;
    color: var(--text-dim);
}

.peer-compare-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.peer-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: #0b1020;
}

.peer-compare-table th,
.peer-compare-table td {
    padding: .52rem .6rem;
    border-bottom: 1px solid #1f2937;
    text-align: left;
    white-space: nowrap;
}

.peer-compare-table th {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-dim);
    background: #0f172a;
}

.peer-compare-table td {
    font-size: .8rem;
    color: #dbeafe;
}

.peer-compare-table tbody tr:hover {
    background: #111c33;
}

.peer-name {
    font-weight: 700;
    color: #e2e8f0;
}

.peer-symbol {
    font-size: .68rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Trend-change signals + compact price chart, side by side to save vertical space */
.analysis-row {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: stretch;
}

.analysis-row > .analysis-col {
    flex: 1 1 340px;
    min-width: 0;
}

.analysis-row > .analysis-signals .signals {
    margin-top: 0;
}

.analysis-row > .analysis-chart {
    background: var(--bg-card, var(--bg-inset));
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    padding: .85rem 1rem .4rem;
}

@media (max-width: 760px) {
    .analysis-row {
        flex-direction: column;
    }
}

/* Indicator grid inside the report */
.report .kpis {
    margin-top: 0;
}

.report .kpi {
    background: var(--bg-inset);
    border-color: var(--border);
}

/* The AI narrative, formatted like a report body */
.report-body {
    max-width: 780px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    line-height: 1.7;
    font-size: .92rem;
    color: var(--text);
}

.report-body > :first-child {
    margin-top: 0;
}

.report-body > :last-child {
    margin-bottom: 0;
}

.report-body h1,
.report-body h2 {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    margin: 1.5rem 0 .6rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--border);
}

.report-body h1:first-child {
    display: none;
}

.report-body h3 {
    font-size: .98rem;
    color: var(--accent);
    margin: 1.1rem 0 .4rem;
}

.report-body ul,
.report-body ol {
    margin: .5rem 0 .9rem;
    padding-left: 1.2rem;
}

.report-body li {
    margin: .3rem 0;
}

.report-body li::marker {
    color: var(--accent);
}

.report-body p {
    margin: .55rem 0;
}

.report-body strong {
    color: #ffffff;
}

.report-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
}

.report-body a:hover {
    color: #ffce7a;
}

.report-body code {
    background: #0a1424;
    padding: .1rem .35rem;
    border-radius: .3rem;
    font-size: .88em;
}

.report-body blockquote {
    margin: .8rem 0;
    padding: .6rem 1rem;
    border-left: 3px solid var(--accent);
    background: rgba(245, 166, 35, .07);
    border-radius: 0;
    color: var(--text);
}

.report-body table {
    width: 100%;
    border-collapse: collapse;
    margin: .8rem 0;
    font-size: .9rem;
}

.report-body th,
.report-body td {
    text-align: left;
    padding: .45rem .65rem;
    border-bottom: 1px solid #2b3b5c;
}

.report-body th {
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .04em;
}

.report-body hr {
    border: none;
    border-top: 1px solid #2b3b5c;
    margin: 1.2rem 0;
}

/* Loading + trending live inside the report sheet */
.report .status {
    margin-top: 1.5rem;
}

.report .while-you-wait {
    margin-top: 1rem;
}

/* Glanceable brief: make the leading verdict blockquote a bold callout */
.brief blockquote:first-child {
    margin: 0 0 1.1rem;
    padding: .85rem 1.15rem;
    border-left: 4px solid var(--accent);
    background: rgba(245, 166, 35, .1);
    border-radius: 0;
    font-size: 1rem;
    color: #fff4e0;
}

.brief blockquote:first-child strong {
    color: var(--accent);
    letter-spacing: .02em;
}

.brief h2 {
    font-size: 1rem;
    color: var(--accent);
    margin: 1.25rem 0 .4rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--border);
}

/* ---- Brief section system (clean, scannable, fintech-style) ---- */
/* Markdig auto-identifiers slug each heading, so we can theme sections by topic. */
.brief h2 {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.4rem 0 .55rem;
    padding: 0 0 .4rem;
    border-bottom: 1px solid var(--border);
    border-left: none;
}

.brief h2::before {
    font-size: 1rem;
    line-height: 1;
}

.brief h2[id="whats-driving-it"]::before { content: "📈"; }
.brief h2[id="technicals"]::before { content: "📊"; }
.brief h2[id="earnings-call-takeaways"]::before { content: "🎙️"; }
.brief h2[id="research-notes"]::before { content: "📝"; }
.brief h2[id="retail-buzz"]::before { content: "💬"; }

/* Moat & Risks: the two key call-outs, shown as tidy tinted cards. */
.brief h2[id="moat"],
.brief h2[id="risks"] {
    margin: 1.5rem 0 0;
    padding: .55rem .8rem;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.brief h2[id="moat"] {
    color: #6ee7b7;
    background: rgba(34, 197, 94, .12);
}
.brief h2[id="moat"]::before { content: "🛡️"; }

.brief h2[id="risks"] {
    color: #fcd34d;
    background: rgba(245, 158, 11, .12);
}
.brief h2[id="risks"]::before { content: "⚠️"; }

.brief h2[id="moat"] + ul,
.brief h2[id="risks"] + ul {
    margin: 0 0 .25rem;
    padding: .65rem 1rem .7rem 2rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    list-style: none;
}

.brief h2[id="moat"] + ul {
    background: rgba(34, 197, 94, .05);
    border: 1px solid rgba(34, 197, 94, .18);
    border-top: none;
}

.brief h2[id="risks"] + ul {
    background: rgba(245, 158, 11, .05);
    border: 1px solid rgba(245, 158, 11, .18);
    border-top: none;
}

.brief h2[id="moat"] + ul li,
.brief h2[id="risks"] + ul li {
    position: relative;
}

.brief h2[id="moat"] + ul li::before {
    content: "✓";
    position: absolute;
    left: -1.25rem;
    color: #34d399;
    font-weight: 800;
}

.brief h2[id="risks"] + ul li::before {
    content: "!";
    position: absolute;
    left: -1.1rem;
    color: #fbbf24;
    font-weight: 800;
}

.brief .brief-callout {
    margin: 1rem 0;
    padding: .65rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: .82rem;
    line-height: 1.55;
}
.brief .brief-callout strong {
    display: block;
    margin-bottom: .25rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.brief .brief-bottomline {
    border-color: rgba(34, 197, 94, .28);
    background: rgba(34, 197, 94, .06);
}
.brief .brief-bottomline strong {
    color: #6ee7b7;
}
.brief .brief-valuation {
    border-color: rgba(99, 102, 241, .28);
    background: rgba(99, 102, 241, .06);
}
.brief .brief-valuation strong {
    color: #a5b4fc;
}

/* Callouts promoted to top of research report (above Management Navigation) */
.brief-callouts-top .brief-callout {
    margin: 0 0 .8rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    border: 1px solid;
    font-size: .84rem;
    line-height: 1.6;
}
.brief-callouts-top .brief-callout strong {
    display: block;
    margin-bottom: .3rem;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
}
.brief-callouts-top .brief-bottomline {
    border-color: rgba(34, 197, 94, .3);
    background: rgba(34, 197, 94, .07);
}
.brief-callouts-top .brief-bottomline strong {
    color: #6ee7b7;
}
.brief-callouts-top .brief-valuation {
    border-color: rgba(99, 102, 241, .3);
    background: rgba(99, 102, 241, .07);
}
.brief-callouts-top .brief-valuation strong {
    color: #a5b4fc;
}

.brief .mr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin: 1rem 0;
}

.brief .mr-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.brief .mr-card summary {
    cursor: pointer;
    list-style: none;
}
.brief .mr-card summary::-webkit-details-marker { display: none; }
.brief .mr-card summary::marker { display: none; content: ""; }

.brief .mr-card summary h3 {
    position: relative;
    padding-right: 1.5rem;
}
.brief .mr-card summary h3::after {
    content: "▾";
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .65rem;
    opacity: .6;
    transition: transform .2s;
}
.brief .mr-card:not([open]) summary h3::after {
    transform: translateY(-50%) rotate(-90deg);
}

.brief .mr-card h3 {
    margin: 0;
    padding: .5rem .75rem;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.brief .mr-card ul {
    margin: 0;
    padding: .65rem .9rem .75rem 1.9rem;
    list-style: none;
}

.brief .mr-card li {
    position: relative;
    margin: .25rem 0;
}

.brief .mr-moat {
    border-color: rgba(34, 197, 94, .22);
    background: rgba(34, 197, 94, .05);
}

.brief .mr-moat h3 {
    color: #6ee7b7;
    background: rgba(34, 197, 94, .12);
}

.brief .mr-moat li::before {
    content: "✓";
    position: absolute;
    left: -1.1rem;
    color: #34d399;
    font-weight: 800;
}

.brief .mr-risks {
    border-color: rgba(245, 158, 11, .24);
    background: rgba(245, 158, 11, .05);
}

.brief .mr-risks h3 {
    color: #fcd34d;
    background: rgba(245, 158, 11, .12);
}

.brief .mr-risks li::before {
    content: "!";
    position: absolute;
    left: -1rem;
    color: #fbbf24;
    font-weight: 800;
}

@media (max-width: 900px) {
    .brief .mr-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Company logo in the report masthead ---- */
.report-masthead .rm-logo {
    width: 44px;
    height: 44px;
    border-radius: 2px;
    object-fit: contain;
    background: #ffffff;
    padding: 4px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* Hidden when the logo source 404s (handled by the img onerror handler). */
.report-masthead .rm-logo.rm-logo-missing {
    display: none;
}

/* ---- PWA install banner (mobile) ---- */
#pwa-install-banner {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translate(-50%, 160%);
    z-index: 60;
    width: min(560px, calc(100% - 20px));
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .8rem;
    background: linear-gradient(135deg, #14203a, #0f1726);
    border: 1px solid #2a3a56;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: transform .32s cubic-bezier(.16, 1, .3, 1), opacity .32s;
}

#pwa-install-banner.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

#pwa-install-banner .pwa-ib-icon {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffcf5a, #f5a623);
    color: #0b0e14;
    font-size: 1.1rem;
    font-weight: 700;
}

#pwa-install-banner .pwa-ib-text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
    flex: 1;
}

#pwa-install-banner .pwa-ib-text strong {
    font-size: .9rem;
    color: #f8fafc;
}

#pwa-install-banner .pwa-ib-text span {
    font-size: .76rem;
    line-height: 1.35;
    color: var(--text-dim);
}

#pwa-install-banner .pwa-ib-install {
    flex-shrink: 0;
    border: 0;
    cursor: pointer;
    padding: .55rem .95rem;
    border-radius: 9px;
    font-weight: 700;
    font-size: .82rem;
    color: #0b0e14;
    background: linear-gradient(180deg, #ffcf5a, #f5a623);
    box-shadow: 0 4px 12px rgba(245, 166, 35, .35);
}

#pwa-install-banner .pwa-ib-install:active {
    transform: translateY(1px);
}

#pwa-install-banner .pwa-ib-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--text-faint);
    font-size: 1rem;
    cursor: pointer;
    padding: .3rem .35rem;
    line-height: 1;
}

/* Never show the install banner on desktop widths. */
@media (min-width: 821px) {
    #pwa-install-banner {
        display: none;
    }
}

/* ---- Instant top navigation progress bar ---- */
#app-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(245, 166, 35, .7);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
}

#app-progress.active {
    width: 90%;
    opacity: 1;
    transition: width 8s cubic-bezier(.1, .7, .25, 1), opacity .2s ease;
}

#app-progress.done {
    width: 100%;
    opacity: 0;
    transition: width .25s ease, opacity .4s ease .15s;
}

/* ---- Prominent "analysing" overlay shown while a ticker selection loads ---- */
#app-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(7, 10, 16, .82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}

#app-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

#app-nav-overlay .nav-ov-card {
    width: min(680px, 96vw);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.6rem 1.6rem 1.4rem;
    text-align: center;
    box-shadow: var(--shadow);
    font-family: var(--mono);
}

#app-nav-overlay .nav-ov-spinner {
    width: 2.1rem;
    height: 2.1rem;
    margin: 0 auto .9rem;
    border: 3px solid #2b3340;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

#app-nav-overlay .nav-ov-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: .02em;
    color: var(--text);
}

#app-nav-overlay .nav-ov-title .nav-ov-sym {
    color: var(--accent);
}

#app-nav-overlay .nav-ov-about {
    display: none;
    margin-top: .85rem;
    padding: .8rem .95rem;
    text-align: left;
    font-size: .82rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
}

#app-nav-overlay .nav-ov-about strong {
    color: var(--accent);
    font-weight: 700;
}

#app-nav-overlay .nav-ov-news {
    display: none;
    margin-top: .7rem;
    text-align: left;
}

#app-nav-overlay .nav-ov-news.show {
    display: block;
    animation: fadeIn .25s ease-out;
}

#app-nav-overlay .nav-ov-news-h {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin-bottom: .35rem;
}

#app-nav-overlay .nav-ov-news ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

#app-nav-overlay .nav-ov-news li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
}

#app-nav-overlay .nav-ov-news-time {
    flex-shrink: 0;
    font-size: .66rem;
    color: var(--text-faint);
    white-space: nowrap;
}

#app-nav-overlay .nav-ov-news a {
    color: #dbeafe;
    text-decoration: none;
    font-size: .76rem;
    line-height: 1.35;
}

#app-nav-overlay .nav-ov-news a:hover {
    color: #fff;
    text-decoration: underline;
}

#app-nav-overlay .nav-ov-about.show {
    display: block;
    animation: fadeIn .25s ease-out;
}

#app-nav-overlay .nav-ov-sub {
    margin-top: .55rem;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--text-dim);
}

#app-nav-overlay .nav-ov-bar {
    position: relative;
    height: 3px;
    margin-top: 1.1rem;
    border-radius: 3px;
    background: var(--bg-inset);
    overflow: hidden;
}

#app-nav-overlay .nav-ov-bar span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: progress-slide 1.5s ease-in-out infinite;
}

/* Breaking market news list */
.market-news {
    margin-top: 1rem;
    padding: 1.1rem 1.35rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.market-news h2 {
    margin: 0 0 .25rem;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}

.market-news .muted {
    margin: 0 0 .75rem;
    color: #94a3b8;
    font-size: .85rem;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.news-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .85rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item a {
    color: var(--text);
    text-decoration: none;
    font-size: .92rem;
    line-height: 1.35;
    transition: color .15s;
}

.news-item a:hover {
    color: var(--accent);
}

.news-time {
    flex: 0 0 auto;
    color: #64748b;
    font-size: .75rem;
    white-space: nowrap;
}

/* Animated "consulting the agent mesh" progress indicator */
.agent-progress {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: 1.5rem;
    padding: .9rem 1.1rem;
    border-radius: var(--radius);
    background: var(--bg-inset);
    border: 1px solid var(--border);
}

.agent-progress .spinner {
    flex: 0 0 auto;
    width: 1.4rem;
    height: 1.4rem;
}

.agent-progress-text {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.agent-progress-title {
    font-weight: 700;
    color: #e2e8f0;
}

.agent-progress-sub {
    font-size: .82rem;
    color: #94a3b8;
}

/* Animated trailing dots after the title */
.dots span {
    opacity: 0;
    animation: dot-blink 1.4s infinite both;
}

.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }

@keyframes dot-blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* Indeterminate sliding progress bar */
.agent-progress-bar {
    position: relative;
    height: 3px;
    margin-top: .6rem;
    border-radius: 3px;
    background: var(--bg-inset);
    overflow: hidden;
}

.agent-progress-bar span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 35%;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: progress-slide 1.5s ease-in-out infinite;
}

@keyframes progress-slide {
    0% { left: -35%; }
    100% { left: 100%; }
}

/* ---- Search bar ---- */

.ticker-search-wrap {
    width: min(920px, 100%);
    margin: 0 auto;
    box-sizing: border-box;
}

.ticker-search {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.5rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 1rem;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.ticker-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(245, 166, 35, .2);
}

.ts-icon {
    color: var(--text-faint);
    font-size: 1.12rem;
}

.ts-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    font-size: 1.14rem;
    padding: .95rem .62rem;
    font-family: var(--mono);
    box-sizing: border-box;
}

.ts-input::placeholder {
    color: #8899ad;
    font-size: .97em;
}

.research-search-hero .ticker-search {
    background: rgba(15, 23, 42, .65);
    border-color: rgba(245, 166, 35, .22);
    min-height: 3.6rem;
}

.research-search-hero .ticker-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .15), 0 4px 16px rgba(0, 0, 0, .3);
}

.ts-clear {
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    font-size: .85rem;
    padding: .25rem .4rem;
}

.ts-clear:hover {
    color: #e2e8f0;
}

.ts-results {
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: .3rem;
    list-style: none;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
    z-index: 30;
    max-height: 360px;
    overflow-y: auto;
}

.ts-result {
    display: grid;
    grid-template-columns: minmax(5rem, max-content) 1fr auto;
    align-items: baseline;
    gap: .6rem;
    padding: .55rem .65rem;
    border-radius: .5rem;
    cursor: pointer;
}

.ts-result.active,
.ts-result:hover {
    background: var(--bg-inset);
}

.ts-result .ts-sym {
    font-weight: 700;
    color: #ffffff;
    font-size: .9rem;
    white-space: nowrap;
}

.ts-result .ts-name {
    color: #cbd5e1;
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-result .ts-exch {
    color: #64748b;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Trending suggestions dropdown */
.ts-trending-header {
    padding: .4rem .65rem .25rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #f5a623;
    pointer-events: none;
}

.ts-result-trending {
    grid-template-columns: 24px minmax(4rem, max-content) 1fr auto;
}

.ts-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    background: #1e293b;
}

.ts-mcap {
    color: #64748b;
    font-size: .74rem;
    white-space: nowrap;
}

/* ── Run Progress Bar ── */
.run-progress {
    margin: 0 0 1.2rem;
}

.rp-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: .4rem;
}

.rp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--up), var(--accent));
    border-radius: 2px;
    transition: width .6s ease;
}

.rp-stages {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rp-stage {
    font-family: var(--ui-sans);
    font-size: .62rem;
    font-weight: 500;
    color: var(--text-faint);
    letter-spacing: .02em;
    transition: color .2s;
    position: relative;
}

.rp-stage.done {
    color: var(--up);
}

.rp-stage.done::before {
    content: '✓ ';
    font-size: .55rem;
}

.rp-stage.active {
    color: var(--accent);
    font-weight: 600;
}

.rp-stage.active::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: .3rem;
    vertical-align: middle;
    animation: pulse-dot 1s infinite;
}

@media (max-width: 640px) {
    .rp-stages {
        gap: .2rem;
    }
    .rp-stage {
        font-size: .55rem;
    }
}

/* ── Result Tabs (Overview / Valuation / Full Brief) ── */
.result-tabs {
    display: flex;
    gap: .25rem;
    margin: 1.2rem 0 .8rem;
    padding: .35rem;
    position: sticky;
    top: 52px;
    z-index: 20;
    background: rgba(14, 18, 25, .95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.result-tab {
    flex: 1;
    padding: .65rem 1.2rem;
    font-size: .88rem;
    font-weight: 600;
    font-family: var(--ui-sans);
    color: var(--text-dim);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color .2s, background .2s, box-shadow .2s;
    border-radius: 7px;
    letter-spacing: .01em;
    text-align: center;
}

.result-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, .05);
}

.result-tab.active {
    color: #0b0e14;
    background: linear-gradient(135deg, #ffcf5a, #f5a623);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(245, 166, 35, .35);
}

/* ── Run Metadata footer ── */
.run-metadata {
    margin-top: 1.5rem;
    padding: .6rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid var(--border);
    font-size: .72rem;
    color: var(--text-faint);
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.rm-sep {
    opacity: .4;
}

@media (max-width: 640px) {
    .run-steps {
        gap: 0;
    }
    .rs-connector {
        width: 1rem;
    }
    .rs-label {
        display: none;
    }
    .result-tabs {
        overflow-x: auto;
    }
    .result-tab {
        padding: .5rem .7rem;
        font-size: .8rem;
        white-space: nowrap;
    }
}

/* Floating toast notification for research progress */
.research-toast {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1.2rem;
    background: rgba(14, 18, 25, .95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(245, 166, 35, .15);
    color: #f8fafc;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    animation: toast-in .3s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(245, 166, 35, .3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.research-search-hero {
    margin: 2.2rem 0;
    width: 100%;
    padding: 1.8rem 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 166, 35, .12) 0%, rgba(30, 58, 95, .22) 50%, rgba(11, 14, 20, .7) 100%);
    border: 1px solid rgba(245, 166, 35, .18);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px rgba(245, 166, 35, .06);
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 10;
}

.research-search-hero .ticker-search-wrap {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 720px) {
    .research-search-hero {
        margin: 1rem 0 1.2rem;
        padding: 1rem .6rem;
    }

    .ts-input {
        font-size: 1.02rem;
        padding: .82rem .55rem;
    }
}

/* Popular-style snapshot card on the Research page */
.research-card-wrap {
    max-width: 360px;
}

.card.research-card {
    cursor: default;
}

.card.research-card:hover {
    border-color: var(--border);
    transform: none;
}

.card.research-card .stats {
    grid-template-columns: repeat(2, 1fr);
}

/* ---- Track button (on trend-change + research signal rows) ---- */
.tc-track {
    align-self: center;
    flex: 0 0 auto;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    background: var(--bg-inset);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 700;
    font-size: .72rem;
    padding: .35rem .7rem;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.1;
    transition: background-color .15s, color .15s, border-color .15s;
}

.tc-track:hover {
    background: var(--accent);
    color: #0b0e14;
}

.tc-track.tracked {
    background: #064e3b;
    border-color: #059669;
    color: #6ee7b7;
    cursor: default;
}

/* ---- Earnings Calendar (Earnings Whispers grid) ---- */
.ew-nav { display: flex; align-items: center; gap: .5rem; }
.ew-nav-btn {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--fg); cursor: pointer; padding: .3rem .55rem; font-size: .8rem; transition: border-color .15s;
}
.ew-nav-btn:hover:not(:disabled) { border-color: var(--accent); }
.ew-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.ew-today-btn {
    background: transparent; border: 1px solid var(--accent); border-radius: 3px;
    color: var(--accent); cursor: pointer; padding: .1rem .45rem; font-size: .65rem;
    font-weight: 600; margin-left: .3rem; transition: background .15s;
}
.ew-today-btn:hover { background: rgba(56, 189, 248, .12); }

.ew-week-section {
    margin-top: 1.5rem;
}

.ew-week-label {
    font-size: .95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text);
    margin: 0 0 .6rem;
}

.ew-week-dates {
    font-weight: 500;
    font-size: .78rem;
    color: #7f8ea3;
    margin-left: .4rem;
}

.ew-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .5rem;
}

.ew-col {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    min-width: 0;
}

.ew-col.ew-today {
    background: rgba(245, 166, 35, .06);
    border-radius: var(--radius);
    padding: .4rem;
    border: 1px solid rgba(245, 166, 35, .2);
}

.ew-col-head {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    padding: .3rem .4rem;
    border-bottom: 2px solid var(--accent);
    margin-bottom: .15rem;
}

.ew-dow {
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text);
}

.ew-date {
    font-size: .68rem;
    color: #7f8ea3;
}

.ew-empty {
    font-size: .72rem;
    color: #475569;
    text-align: center;
    padding: 1rem 0;
}

.ew-cards {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.ew-card {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .5rem .6rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.ew-card:hover, .ew-card:focus-visible {
    background: #131825;
    border-color: var(--accent);
    outline: none;
}

.ew-card.ew-past {
    opacity: .75;
    border-left: 3px solid #475569;
}

.ew-card-main {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.ew-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain;
    background: #1e293b;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.ew-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ew-name {
    font-size: .74rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ew-ticker {
    font-size: .6rem;
    letter-spacing: .06em;
    color: #7f8ea3;
    text-transform: uppercase;
}

.ew-badges {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.ew-time {
    font-size: .6rem;
    font-weight: 600;
    color: #94a3b8;
}

.ew-mcap {
    font-size: .6rem;
    font-weight: 600;
    color: #64748b;
}

.ew-signals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
}

.ew-pe {
    font-size: .6rem;
    font-weight: 600;
    color: #7f8ea3;
}

.ew-reaction {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding-top: .15rem;
    border-top: 1px dashed rgba(255,255,255,.08);
}

.ew-reaction-label {
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}

.ew-levels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
}

/* Responsive: stack columns on narrow screens */
@media (max-width: 900px) {
    .ew-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 520px) {
    .ew-grid {
        grid-template-columns: 1fr;
    }
}

.ec-chip {
    font-size: .62rem;
    font-weight: 700;
    padding: .12rem .4rem;
    border-radius: 2px;
    border: 1px solid var(--border);
    background: var(--bg);
}

.ec-chip.valuation-good { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.ec-chip.valuation-fair { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .4); color: #fcd34d; }
.ec-chip.valuation-warn { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.ec-chip.ai-verdict-buy { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.ec-chip.ai-verdict-hold, .ec-chip.ai-verdict-neutral { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .4); color: #fcd34d; }
.ec-chip.ai-verdict-avoid { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.ec-chip-label { opacity: .6; font-weight: 500; margin-right: .15rem; }
.spinner-xs { display: inline-block; width: .55rem; height: .55rem; border: 1.5px solid rgba(255,255,255,.2); border-top-color: currentColor; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }

/* Earnings Prediction Scorecard */
.ew-scorecard { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.ew-scorecard-title { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .25rem; }
.ew-scorecard-desc { font-size: .75rem; color: #94a3b8; margin: 0 0 1rem; }
.ew-scorecard-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ew-scorecard-table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.ew-scorecard-table th {
    text-align: left; padding: .4rem .5rem; font-size: .6rem; text-transform: uppercase;
    letter-spacing: .05em; color: #94a3b8; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ew-scorecard-table td { padding: .4rem .5rem; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.ew-scorecard-table tr.sc-up { border-left: 2px solid #16a34a; }
.ew-scorecard-table tr.sc-down { border-left: 2px solid #dc2626; }
.ew-scorecard-table tr.sc-future { border-left: 2px solid #f59e0b; opacity: .75; }
.sc-stock { white-space: nowrap; }
.sc-sym { color: var(--accent); cursor: pointer; font-weight: 700; margin-right: .3rem; }
.sc-sym:hover { text-decoration: underline; }
.sc-name { color: #94a3b8; font-size: .65rem; }
.sc-date { white-space: nowrap; color: #cbd5e1; }
.sc-timing { font-size: .6rem; font-weight: 700; color: #cbd5e1; }
.sc-signal .ec-chip { font-size: .58rem; }
.sc-reaction { white-space: nowrap; font-weight: 700; }
.sc-pending { color: #64748b; font-style: italic; font-size: .6rem; }
.sc-icons { white-space: nowrap; }
.sc-icon { display: inline-block; font-size: .72rem; margin-right: .15rem; cursor: help; }
.sc-summary { font-size: .62rem; color: #cbd5e1; line-height: 1.35; max-width: 260px; min-width: 140px; }

.ec-signal-label {
    font-size: .62rem;
    font-weight: 700;
    padding: .08rem .35rem;
    border-radius: 2px;
}

.ec-signal-label.bull { color: #4ade80; }
.ec-signal-label.bear { color: #f87171; }

/* ---- Management Voice chip (KPI row) ---- */
.mgmt-offensive { --mgmt-clr: #16a34a; background: rgba(22,163,74,.12) !important; color: #4ade80 !important; border-color: rgba(22,163,74,.35) !important; }
.mgmt-steady   { --mgmt-clr: #3b82f6; background: rgba(59,130,246,.12) !important; color: #60a5fa !important; border-color: rgba(59,130,246,.35) !important; }
.mgmt-pivoting  { --mgmt-clr: #eab308; background: rgba(234,179,8,.12) !important;  color: #facc15 !important; border-color: rgba(234,179,8,.35) !important; }
.mgmt-defensive { --mgmt-clr: #f97316; background: rgba(249,115,22,.12) !important; color: #fb923c !important; border-color: rgba(249,115,22,.35) !important; }
.mgmt-crisis    { --mgmt-clr: #dc2626; background: rgba(220,38,38,.12) !important;  color: #f87171 !important; border-color: rgba(220,38,38,.35) !important; }
.mgmt-unknown   { --mgmt-clr: #64748b; background: rgba(100,116,139,.12) !important; color: #94a3b8 !important; border-color: rgba(100,116,139,.35) !important; }

/* ---- Management Navigation section ---- */
.mgmt-nav-section { margin-top: 1.5rem; }
.mgmt-trajectory-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.mgmt-quarter-chip {
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    padding: .35rem .65rem; border-radius: 6px; border: 1px solid;
    font-size: .7rem; font-weight: 700; min-width: 56px; text-align: center;
}
.mgmt-q-label { font-size: .6rem; opacity: .8; }
.mgmt-q-emoji { font-size: .9rem; }
/* Replace emoji with a CSS-rendered colored dot for guaranteed visibility */
.mgmt-q-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--mgmt-clr, #64748b);
    box-shadow: 0 0 6px var(--mgmt-clr, transparent);
}
.mgmt-tone-trajectory { font-size: .78rem; color: #cbd5e1; font-style: italic; margin: 0 0 1rem; }
.mgmt-detail-block { margin-bottom: 1rem; }
.mgmt-detail-block h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin: 0 0 .35rem; }
.mgmt-detail-text { font-size: .78rem; color: #e2e8f0; line-height: 1.55; }
.mgmt-bullets { list-style: none; padding: 0; margin: 0; }
.mgmt-bullets li { padding: .2rem 0; padding-left: 1rem; position: relative; }
.mgmt-bullets li::before { content: "•"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.mgmt-quote {
    margin: .75rem 0 0; padding: .6rem 1rem; border-left: 3px solid var(--accent);
    background: rgba(99,102,241,.06); border-radius: 0 6px 6px 0;
    font-size: .78rem; color: #cbd5e1; font-style: italic; line-height: 1.5;
}

/* ---- Management Voice deep-dive link ---- */
.mv-deep-link {
    font-size: .7rem; font-weight: 600; color: var(--accent); text-decoration: none;
    margin-left: .75rem; white-space: nowrap;
}
.mv-deep-link:hover { text-decoration: underline; }
.rm-kpi-link { text-decoration: none; cursor: pointer; transition: filter .15s; }
.rm-kpi-link:hover { filter: brightness(1.25); }

/* ---- Management Voice dedicated page ---- */
.mv-search-bar {
    max-width: 100%;
    margin: 1.5rem 0;
    padding: 1.8rem 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 166, 35, .12) 0%, rgba(30, 58, 95, .22) 50%, rgba(11, 14, 20, .7) 100%);
    border: 1px solid rgba(245, 166, 35, .18);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px rgba(245, 166, 35, .06);
    box-sizing: border-box;
}
.mv-search-bar .ticker-search-wrap { width: 100%; max-width: 100%; }
.mv-search-bar .ticker-search {
    background: rgba(15, 23, 42, .65);
    border-color: rgba(245, 166, 35, .22);
    min-height: 3.6rem;
}
.mv-search-bar .ticker-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .15), 0 4px 16px rgba(0, 0, 0, .3);
}
@media (max-width: 720px) {
    .mv-search-bar { padding: 1rem .6rem; margin: 1rem 0; }
}
.mv-search-form { display: flex; gap: .5rem; }
.mv-search-input {
    flex: 1; padding: .65rem 1rem; font-size: .88rem; color: #e2e8f0;
    background: var(--bg-inset); border: 1px solid var(--border); border-radius: 10px;
    outline: none; transition: border-color .15s;
}
.mv-search-input:focus { border-color: var(--accent); }
.mv-search-input::placeholder { color: #475569; }
.mv-search-btn {
    padding: .65rem 1.25rem; background: var(--accent); color: #fff; font-weight: 700;
    font-size: .82rem; border: none; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
.mv-search-btn:hover { filter: brightness(1.15); }
.mv-search-btn:disabled { opacity: .5; cursor: not-allowed; }
.mv-results { display: flex; flex-direction: column; gap: 1.5rem; }

.mv-posture-card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
    padding: 1.25rem 1.5rem;
}
.mv-posture-main { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.mv-posture-emoji { font-size: 2rem; }
.mv-posture-label { font-size: 1.2rem; font-weight: 800; display: block; }
.mv-posture-desc { font-size: .7rem; color: #64748b; display: block; }
.mv-rationale { font-size: .82rem; color: #cbd5e1; line-height: 1.55; margin: 0; }

.mv-section-h { font-size: .88rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #e2e8f0; margin: 0 0 .75rem; }
.mv-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .mv-nav-grid { grid-template-columns: 1fr; } }

.mv-filings-section { margin-top: .5rem; }
.mv-filings-desc { font-size: .72rem; color: #64748b; margin: 0 0 1rem; }
.mv-filings-desc a { color: var(--accent); }

.mv-filing-card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: .65rem; overflow: hidden;
}
.mv-filing-card[open] { border-color: rgba(99,102,241,.3); }
.mv-filing-header {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .75rem 1rem; cursor: pointer; user-select: none;
}
.mv-filing-header:hover { background: rgba(255,255,255,.02); }
.mv-filing-meta { flex: 1; min-width: 140px; }
.mv-filing-quarter { font-weight: 700; font-size: .82rem; color: #e2e8f0; margin-right: .5rem; }
.mv-filing-date { font-size: .7rem; color: #64748b; }
.mv-filing-posture { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; }
.mv-sec-link {
    font-size: .68rem; color: var(--accent); text-decoration: none; white-space: nowrap; margin-left: auto;
}
.mv-sec-link:hover { text-decoration: underline; }
.mv-filing-body { padding: 0 1rem 1rem; border-top: 1px solid var(--border); }
.mv-filing-text {
    font-size: .72rem; color: #94a3b8; line-height: 1.6; white-space: pre-wrap;
    max-height: 400px; overflow-y: auto;
}
.mv-no-text { font-size: .75rem; color: #64748b; font-style: italic; }
.mv-no-text a { color: var(--accent); }

.mv-legend { margin-top: 1rem; }
.mv-legend-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin: 0 0 .5rem; }
.mv-legend-grid { display: flex; flex-direction: column; gap: .25rem; font-size: .72rem; color: #94a3b8; }
.mv-legend-dot { margin-right: .25rem; }

/* Sticky posture legend bar */
.mv-sticky-legend {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    display: flex;
    justify-content: center;
    gap: .5rem 1.2rem;
    flex-wrap: wrap;
    padding: .5rem 1rem;
    background: rgba(14, 18, 25, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    font-size: .72rem;
    color: #94a3b8;
}
.mv-sl-item {
    cursor: default;
    white-space: nowrap;
    transition: color .15s;
}
.mv-sl-item:hover {
    color: var(--text);
}
@media (max-width: 820px) {
    .mv-sticky-legend { gap: .35rem .7rem; font-size: .65rem; padding: .4rem .6rem env(safe-area-inset-bottom, .4rem); }
    /* Push mobile bottom bar above the legend when both are shown */
    .mv-sticky-legend ~ .mobile-bottom-bar { display: none; }
}

.mv-empty { text-align: center; padding: 3rem 1rem; color: #64748b; }
.mv-empty strong { color: #e2e8f0; }
.mv-empty-hint { font-size: .75rem; margin-top: .5rem; }
.mv-footer { margin-top: 2rem; font-size: .65rem; color: #475569; text-align: center; }
.mv-footer a { color: var(--accent); }

/* ---- Tracked trades page ---- */
.trade-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.25rem 0;
}

/* Market-cap filter chips on the Tracked trades page */
.cap-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1rem;
}

.cap-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    color: var(--text-dim);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .12s, background-color .12s, border-color .12s;
}

.cap-chip:hover {
    color: var(--text);
    border-color: #2a3a56;
}

.cap-chip.active {
    color: #0b0e14;
    background: linear-gradient(180deg, #ffcf5a, #f5a623);
    border-color: #f5a623;
}

.cap-chip .cap-count {
    font-size: .7rem;
    font-weight: 700;
    padding: .05rem .4rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
    color: inherit;
}

.cap-chip.active .cap-count {
    background: rgba(11, 14, 20, .18);
}

/* Live per-signal performance panel on the Tracked trades page */
.signal-perf {
    margin: 0 0 1.25rem;
    padding: 1rem 1.15rem 1.1rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.signal-perf-h {
    margin: 0 0 .7rem;
    font-size: .95rem;
    color: #f8fafc;
}

.signal-perf-h .muted {
    font-weight: 400;
    font-size: .78rem;
}

.signal-perf-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.sp-row {
    display: grid;
    grid-template-columns: 2fr .8fr 1fr 1.1fr 1fr;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    font-size: .84rem;
    border-bottom: 1px solid #1f2937;
}

.sp-row:last-child {
    border-bottom: 0;
}

.sp-head {
    background: #0f172a;
    color: var(--text-dim);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sp-name {
    font-weight: 700;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-verdict {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .12rem .45rem;
    border-radius: 999px;
    justify-self: start;
}

.sp-verdict.sp-keep { background: rgba(34,197,94,.15); color: #86efac; }
.sp-verdict.sp-drop { background: rgba(239,68,68,.15); color: #fca5a5; }
.sp-verdict.sp-off { background: rgba(239,68,68,.28); color: #fecaca; }
.sp-verdict.sp-watch { background: rgba(148,163,184,.15); color: #cbd5e1; }

.signal-perf-note {
    margin: .6rem 0 0;
    font-size: .72rem;
}

/* Rich loading card shown while Tracked trades fetches prices */
.trade-loading {
    margin: 1.25rem 0;
    padding: 1.1rem 1.25rem;
    background: radial-gradient(120% 140% at 0% 0%, rgba(245, 166, 35, .1), rgba(11, 14, 20, .5) 60%);
    border: 1px solid #253044;
    border-radius: 12px;
}

.trade-loading .tl-head {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
}

.trade-loading .tl-head h2 {
    margin: 0 0 .2rem;
    font-size: 1.1rem;
    color: #f8fafc;
}

.trade-loading .tl-head .muted {
    margin: 0;
    font-size: .85rem;
}

.trade-loading .tl-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .7rem;
    margin-top: 1rem;
}

.trade-loading .tl-stat {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .6rem .75rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.trade-loading .tl-stat label {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-dim);
}

.trade-loading .tl-stat span {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-loading .tl-news {
    margin-top: 1.1rem;
    border-top: 1px solid var(--border);
    padding-top: .8rem;
}

.trade-loading .tl-news h3 {
    margin: 0 0 .5rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
}

.trade-loading .tl-news ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.trade-loading .tl-news li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}

.trade-loading .tl-news a {
    color: #dbeafe;
    text-decoration: none;
    font-size: .85rem;
    line-height: 1.35;
}

.trade-loading .tl-news a:hover {
    color: #fff;
    text-decoration: underline;
}

.trade-loading .tl-news-time {
    flex-shrink: 0;
    font-size: .7rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.ts-stat {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 6rem;
    padding: .75rem 1rem;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ts-stat label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-dim);
}

.ts-stat span {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.tc-sym-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tc-name {
    font-size: .82rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-table {
    margin-top: .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.trade-table .tr {
    display: grid;
    grid-template-columns: 1.6fr .7fr 1fr 1fr .9fr 1fr 1fr 1.4fr auto;
    align-items: center;
    gap: .5rem;
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
    color: #cbd5e1;
}

.trade-table .tr:last-child {
    border-bottom: none;
}

.trade-table .tr.head {
    background: var(--bg-card);
    color: var(--text-dim);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.tp-name {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #f8fafc;
    max-width: 16ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-sym {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    padding: 0;
}

.trade-sym .trade-sym-txt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    min-width: 0;
}

.trade-sym .t-name {
    font-weight: 700;
    color: #ffffff;
    font-size: .86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 24ch;
}

.trade-sym .t-sym {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7f8ea3;
}

.trade-sym:hover .t-name {
    color: var(--accent);
}

.trade-sym .t-src {
    font-size: .68rem;
    color: #64748b;
}

.side-long {
    color: #6ee7b7;
    font-weight: 700;
}

.side-short {
    color: #fca5a5;
    font-weight: 700;
}

.trade-status {
    font-weight: 700;
    font-size: .74rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    text-align: center;
    white-space: nowrap;
}

.st-target { background: #064e3b; color: #6ee7b7; }
.st-moving { background: #3a2c08; color: var(--accent); }
.st-loss { background: #431d1d; color: #fca5a5; }
.st-stop { background: #7f1d1d; color: #fecaca; }
.st-unknown { background: #1c2230; color: #cbd5e1; }
.st-expired { background: #2a2333; color: #d8b4fe; }

.trade-del {
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    font-size: .85rem;
    padding: .2rem .4rem;
}

.trade-del:hover {
    color: #fca5a5;
}

.trade-foot {
    margin-top: 1rem;
    font-size: .78rem;
}

.admin-analysis {
    margin-top: 1rem;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #0f1420, #0d1220);
    padding: .8rem;
    border-radius: 2px;
}

.admin-analysis h2 {
    margin: 0;
    font-size: .95rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.admin-analysis header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .5rem;
}

@media (max-width: 820px) {
    .trade-table .tr {
        grid-template-columns: 1.6fr 1fr .9fr 1.1fr auto;
        gap: .45rem;
        padding: .62rem .7rem;
    }

    .trade-table .tr span:nth-child(2),
    .trade-table .tr span:nth-child(3),
    .trade-table .tr span:nth-child(6),
    .trade-table .tr span:nth-child(7) {
        display: none;
    }

    .trade-sym .t-src {
        display: none;
    }

    .trade-sym .t-sym {
        font-size: .86rem;
    }

    .trade-status {
        font-size: .68rem;
        padding: .2rem .42rem;
    }
}

@media (max-width: 560px) {
    .trade-table .tr {
        font-size: .8rem;
    }

    .trade-table .tr.head {
        font-size: .62rem;
        letter-spacing: .03em;
    }
}

/* ---- Error boundary ---- */
.error-boundary-card {
    max-width: 420px; margin: 4rem auto; padding: 2rem; text-align: center;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
}
.error-boundary-card h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; color: var(--accent); }
.error-boundary-card p { font-size: .82rem; color: #94a3b8; margin: 0 0 1.2rem; line-height: 1.6; }
.btn-retry {
    padding: .5rem 1.5rem; border: none; border-radius: 6px; cursor: pointer;
    background: var(--accent); color: #fff; font-weight: 700; font-size: .82rem;
}
.btn-retry:hover { filter: brightness(1.15); }

/* ---- Data timestamp / disclaimer (KPI strip) ---- */
.rm-data-ts {
    display: flex; gap: .5rem; flex-direction: column; font-size: .62rem; color: #64748b;
    padding-top: .5rem; justify-content: flex-start; width: 100%;
}
.rm-disclaimer { font-style: italic; }

.rm-disclaimer-footer {
    flex-basis: 100%;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    font-size: .62rem;
    color: #64748b;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    margin-top: .5rem;
    text-align: left;
    align-items: center;
    flex-wrap: nowrap;
}

.rm-disclaimer-footer span:last-child {
    font-style: italic;
    white-space: nowrap;
}

/* ---- Site footer ---- */
.site-footer {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
}

.site-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
}

.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .82rem;
    color: var(--accent);
}

.site-footer .brand-mark.sm {
    font-size: .8rem;
    color: var(--accent);
}

.site-footer .footer-copy {
    color: var(--text-faint);
    font-size: .76rem;
    letter-spacing: .02em;
}

.footer-stats-inline {
    display: inline;
    font-size: .72rem;
    color: var(--text-muted);
    letter-spacing: .03em;
}

.fstat-val {
    font-weight: 700;
    color: var(--accent);
    font-size: .78rem;
}

.fstat-sep {
    color: var(--text-faint);
    opacity: .5;
}

.site-footer .footer-share {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: #0b0e14;
    background: #25d366;
    border: 1px solid #1faa52;
    padding: .45rem .85rem;
    border-radius: 2px;
    white-space: nowrap;
    transition: filter .15s;
}

.site-footer .footer-share:hover {
    filter: brightness(1.08);
}

.site-footer .footer-contact {
    margin-left: 0;
    background: #2196f3;
    border-color: #1976d2;
    color: #fff;
}

@media (max-width: 640px) {
    .site-footer .footer-share {
        margin-left: 0;
    }

    .site-footer {
        padding-bottom: 4.5rem;
    }

    .site-footer .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: .6rem;
    }
}

/* ── Visitor analytics (/analytics) ───────────────────────────────────────── */
.analytics .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .5rem;
    margin-bottom: 1rem;
}

.analytics .kpi-tile {
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: .7rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.analytics .kpi-tile label {
    color: var(--text-dim);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.analytics .kpi-val {
    color: var(--text);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.analytics .kpi-val-sm {
    font-size: 1.05rem;
    word-break: break-all;
}

.analytics .kpi-sub {
    color: var(--text-faint);
    font-size: .7rem;
    letter-spacing: .02em;
}

.analytics .an-chart-card,
.analytics .an-panel,
.analytics .an-recent {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    margin-bottom: 1rem;
}

.analytics .an-chart-card h2,
.analytics .an-panel h2,
.analytics .an-recent h2 {
    color: var(--accent);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 .6rem;
}

.analytics .an-breakdowns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 0;
}

.analytics .an-breakdowns .an-panel {
    margin-bottom: 0;
}

.analytics .an-bar-row {
    display: grid;
    grid-template-columns: minmax(70px, 34%) 1fr auto;
    align-items: center;
    gap: .5rem;
    padding: .2rem 0;
}

.analytics .an-bar-label {
    color: var(--text-dim);
    font-size: .76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics .an-bar-track {
    height: 8px;
    background: var(--bg-inset);
    border-radius: 1px;
    overflow: hidden;
}

.analytics .an-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 1px;
}

.analytics .an-bar-count {
    color: var(--text);
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
    min-width: 2ch;
    text-align: right;
}

.analytics .an-table {
    display: flex;
    flex-direction: column;
    font-size: .76rem;
}

.analytics .an-tr {
    display: grid;
    grid-template-columns: 8.5rem 9rem 1.3fr 6rem 6rem 6rem 1fr .8fr;
    gap: .5rem;
    padding: .4rem .25rem;
    border-bottom: 1px solid var(--border-soft);
    align-items: center;
}

.analytics .an-tr.head {
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .66rem;
    border-bottom: 1px solid var(--border);
}

.analytics .an-tr .mono-cell {
    font-family: var(--mono);
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics .an-country {
    color: var(--text);
}

.analytics .an-flag {
    margin-left: .25rem;
}

.analytics .an-pill {
    display: inline-block;
    padding: .1rem .4rem;
    border-radius: 2px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .03em;
    border: 1px solid var(--border);
}

.analytics .an-pill-mobile {
    color: #38bdf8;
    border-color: #1e3a4d;
}

.analytics .an-pill-tablet {
    color: #c084fc;
    border-color: #3b2f4d;
}

.analytics .an-pill-bot {
    color: var(--text-faint);
    border-color: var(--border);
}

.analytics .an-pill-desktop {
    color: var(--up);
    border-color: #1c3a28;
}

@media (max-width: 760px) {
    .analytics .an-tr {
        grid-template-columns: 1fr 1fr;
        gap: .2rem .5rem;
    }

    .analytics .an-tr.head {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   TESTING-TEAM HARDENING — Touch targets, table scroll, error suppression
   ═══════════════════════════════════════════════════════════════════════ */

/* Touch target minimum for ticker chips and interactive pills */
.ticker-chip, .trend-pill, .other-item, .mbb-tab {
    min-height: 44px;
    min-width: 44px;
}

/* Generic table horizontal scroll (valuation tables, trend matrices) */
.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.table-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}
.table-scroll-wrap.is-scrollable::after {
    opacity: 1;
}

/* Suppress default Blazor error banner — we use custom ErrorBoundary */
#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: .7rem 1.2rem;
    background: rgba(30, 41, 59, .95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    color: #e2e8f0;
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    justify-content: center;
}

#blazor-error-ui .blazor-error-text {
    display: flex;
    align-items: center;
    gap: .4rem;
}

#blazor-error-ui .blazor-error-text::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

#blazor-error-ui .reload {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

#blazor-error-ui .reload:hover {
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    opacity: .6;
    margin-left: .5rem;
}

#blazor-error-ui .dismiss:hover {
    opacity: 1;
}

/* Progressive loading stages */
.load-stages { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.load-stage { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--text-muted); }
.load-stage.done { color: var(--text-secondary); }
.load-stage.active { color: var(--accent); font-weight: 600; }
.load-stage-ico { width: 18px; text-align: center; }
.load-stage.done .load-stage-ico::after { content: '✓'; color: #22c55e; }
.load-stage.active .load-stage-ico::after { content: ''; }
.load-stage.pending .load-stage-ico::after { content: '○'; opacity: .4; }

/* ── Management Voice loading overlay ──────────────────────────────────────── */
.mv-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 20, .85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1rem;
    animation: fadeIn .25s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.mv-loading-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.mv-loading-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.mv-loading-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #1e293b;
    padding: 4px;
}

.mv-loading-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #e2e8f0;
}

.mv-loading-price {
    font-size: .85rem;
    color: var(--text-muted);
}

.mv-loading-card .agent-progress {
    margin-top: 0;
}

.mv-loading-tips {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.mv-loading-tips h4 {
    margin: 0 0 .6rem;
    font-size: .85rem;
    color: var(--text-secondary);
}

.mv-loading-tips ul {
    margin: 0;
    padding: 0 0 0 1.2rem;
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.mv-loading-tips li {
    margin-bottom: .35rem;
}

.mv-loading-tips strong {
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .mv-loading-card {
        padding: 1.25rem 1.25rem;
        margin: 0 .5rem;
    }
}

/* ── KPI fetching placeholder ──────────────────────────────────────────────── */
.kpi-fetching {
    color: var(--text-faint) !important;
    font-style: italic;
    animation: kpi-pulse 1.5s ease-in-out infinite;
}

@keyframes kpi-pulse {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}
