@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700&display=swap');

:root {
    --bg-primary:    #06060f;
    --bg-secondary:  #0e0e1c;
    --surface-1:     rgba(148, 163, 184, 0.04);
    --surface-2:     rgba(148, 163, 184, 0.07);
    --surface-3:     rgba(148, 163, 184, 0.10);
    --border-subtle: rgba(148, 163, 184, 0.10);
    --border-default:rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.26);
    --text-primary:    #e9edf3;
    --text-secondary:  #98a3b8;
    --text-tertiary:   #69748a;
    --text-quaternary: #4a5568;
    --accent-blue:     #3d7bfd;
    --accent-cyan:     #5b9fff;
    --accent-purple:   #c9a227;
    --success: #1fae74;
    --warning: #c9922f;
    --danger:  #e5484d;
    --gold:    #c9a227;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
    margin: 0;
}

body {
    background-color: #06060f;
    background-image: radial-gradient(at 50% 0%, rgba(61, 123, 253, 0.05) 0%, transparent 60%);
    background-size: 100% 100%;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-secondary);
}

/* ── Hex grid background (replaces the old square grid site-wide) ────────
   #hexbg is populated by assets/hexgrid.js: a fixed, viewport-sized grid
   (deliberately not document-height — see the comment in hexgrid.js).
   Landing gets a gradient from the top plus a hover highlight; the app
   pages (loading/backtest) get a plain, dim, static grid — see the
   initHexGrid() call on each page for which mode it's running in. ──────── */
#hexbg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#hexbg polygon { fill: none; stroke-width: 1; transition: stroke .28s ease, stroke-width .28s ease; }
.hexbg-wash {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(at 50% 0%, rgba(61, 123, 253, 0.07) 0%, transparent 62%);
}
.app-shell, .landing-container { position: relative; z-index: 1; }

/* Landing only: a hairline across the very top of the viewport tracking
   overall page scroll, driven by initScrollProgress() in landing.js. */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 90; background: rgba(148, 163, 184, .06); pointer-events: none; }
.scroll-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); box-shadow: 0 0 8px rgba(61, 123, 253, .55); transition: width .1s linear; }
@media (prefers-reduced-motion: reduce) { .scroll-progress-fill { transition: none; } }

input[type="text"], input[type="email"] {
    font-size: 14px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 14px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
}
input[type="text"]:focus, input[type="email"]:focus {
    border-color: rgba(61, 123, 253, 0.45);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(61, 123, 253, 0.14);
    outline: none;
}

/* ── App shell (sidebar + main) ───────────────────────────────────── */
.app-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}
.sidebar {
    background: rgba(14, 14, 28, 0.78);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid var(--border-subtle);
    width: 280px;
    flex-shrink: 0;
    min-height: 100vh;
    padding: 20px 22px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
}
.main-col {
    flex: 1;
    min-width: 0;
}
.block-container {
    padding: 2rem 3rem 4rem 3rem;
    max-width: 1240px;
    margin: 0 auto;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        min-height: 0;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
}
@media (max-width: 720px) {
    .block-container { padding: 1.5rem 1rem 3rem 1rem; }

    /* Phone only (tablet/laptop keep the stacked-sidebar-on-top layout as
       is): the sidebar's ticker list, duplicate brand header, and subscribe
       form were all appearing above the tab bar and cards, which reads as
       clutter/collision before you even reach the page. Hide the sidebar
       entirely and re-show just a subscribe module at the very bottom of
       the page instead (see .subscribe-mobile below). */
    .sidebar { display: none; }
}

.subscribe-mobile { display: none; }
@media (max-width: 720px) {
    .subscribe-mobile {
        display: block;
        margin-top: 32px;
        padding-top: 24px;
        border-top: 1px solid var(--border-subtle);
    }
}

.grid {
    display: grid;
    gap: 14px;
}
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    padding: 9px 18px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}
.btn:hover {
    background: var(--surface-3);
    border-color: var(--border-default);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; box-sizing: border-box; }
/* Agree/Continue CTA — an animated instrument-trace border instead of a flat
   filled button. The visible shape is drawn by three stacked SVG polygons
   (fill, static base outline, a bright running segment); .btn-primary is
   just the positioning box. See the .btn-shape markup wherever this class
   is used. */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 236px;
    height: 54px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.btn-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.btn-fill { fill: var(--bg-primary); }
.btn-wash { fill: var(--accent-blue); opacity: .08; }
.btn-trace-base { fill: none; stroke: var(--border-strong); stroke-width: 1.3; }
.btn-trace-run {
    fill: none; stroke: url(#btnTraceGrad); stroke-width: 2.2; stroke-linecap: round;
    stroke-dasharray: 78 474; filter: drop-shadow(0 0 7px rgba(91, 159, 255, .75));
    animation: btnTrace 7.5s linear infinite, btnTraceBreathe 3.6s ease-in-out infinite;
}
@keyframes btnTrace { to { stroke-dashoffset: -552; } }
@keyframes btnTraceBreathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .btn-trace-run { animation: none; opacity: .6; } }
.btn-label { position: relative; color: var(--text-primary); font-weight: 600; font-size: 14px; letter-spacing: .01em; }

/* ── Cards ─────────────────────────────────────────────────────────── */
.ipo-card, .ipo-card-loading {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.ipo-card:hover, .ipo-card-loading:hover {
    background: var(--surface-2);
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.card-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    letter-spacing: -0.022em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 400;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta-dim {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 3px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-ratios {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 9px;
    letter-spacing: -0.02em;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-context {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    letter-spacing: -0.005em;
}
.card-actual {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ── Score badges ──────────────────────────────────────────────────── */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 8px 12px;
    border-radius: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.03em;
    border: 1px solid transparent;
}
.score-high {
    background: rgba(31, 174, 116, 0.08);
    color: #1fae74;
    border-color: rgba(31, 174, 116, 0.32);
}
.score-mid  {
    background: rgba(201, 146, 47, 0.08);
    color: #c9922f;
    border-color: rgba(201, 146, 47, 0.32);
}
.score-low  {
    background: rgba(229, 72, 77, 0.08);
    color: #e5484d;
    border-color: rgba(229, 72, 77, 0.32);
}

/* Hero score (used on result panel) */
.score-mega {
    font-family: 'Inter', sans-serif;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
}
.score-mega-high { color: #1fae74; }
.score-mega-mid  { color: #c9922f; }
.score-mega-low  { color: #e5484d; }

/* ── Conviction labels ─────────────────────────────────────────────── */
.conviction-exceptional, .conviction-strong, .conviction-moderate,
.conviction-cautious, .conviction-avoid {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 0;
    letter-spacing: 0.01em;
    border: none;
    background: none;
}
.conviction-exceptional { color: #c9a227; }
.conviction-strong      { color: #1fae74; }
.conviction-moderate    { color: #5b9fff; }
.conviction-cautious    { color: #c9922f; }
.conviction-avoid       { color: #e5484d; }

/* ── Result panel ──────────────────────────────────────────────────── */
.result-panel {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 32px 36px;
    margin: 8px 0 28px 0;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px rgba(0, 0, 0, 0.4);
}
/* ── Analysis view — header row ─────────────────────────────────────── */
.rv-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
.rv-head-main { min-width: 0; flex: 1 1 320px; }
.rv-head-score { text-align: right; flex-shrink: 0; }
.rv-score-lab {
    font-family: 'Inter', sans-serif;
    font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-quaternary); font-weight: 600; margin-bottom: 4px;
}
.rv-score-num {
    font-size: 54px; font-weight: 800; line-height: 0.9; letter-spacing: -0.05em;
}
.rv-score-con { font-size: 13px; font-weight: 600; margin-top: 8px; }
.rv-score-f {
    font-family: 'Inter', sans-serif; font-size: 11px;
    color: var(--text-quaternary); margin-top: 8px; font-weight: 500; letter-spacing: -0.02em;
}
/* ── Metric strip (Option-2 signature band) ─────────────────────────── */
.rv-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    margin: 22px 0 4px 0;
    background: var(--border-subtle);
    gap: 1px;
}
.rv-cell { background: var(--bg-primary); padding: 15px 16px; }
.rv-cell-lab {
    font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-quaternary); font-weight: 600; margin-bottom: 8px;
}
.rv-cell-val {
    font-family: 'Inter', sans-serif; font-size: 17px;
    font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary);
}
.rv-pos { color: var(--success); }
.rv-neg { color: var(--danger); }
/* ── Lead assessment ────────────────────────────────────────────────── */
.rv-assess {
    font-size: 15px; line-height: 1.78; color: var(--text-secondary);
    margin: 4px 0 2px 0;
}
.rv-assess b { color: var(--text-primary); font-weight: 600; }
/* ── Deal-signal rows (probability column) ──────────────────────────── */
.rv-sig-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px;
}
.rv-sig-row:last-child { border-bottom: none; }
.rv-sig-name { color: var(--text-secondary); }
.rv-sig-yes {
    font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600;
    letter-spacing: 0.04em; color: var(--accent-cyan);
}
.rv-sig-no {
    font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600;
    letter-spacing: 0.04em; color: var(--text-quaternary);
}
@media (max-width: 720px) {
    .rv-head-score { text-align: left; }
    .rv-score-num { font-size: 44px; }
    .rv-strip { grid-template-columns: repeat(2, 1fr); }
}
.result-name {
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.035em;
    line-height: 1.15;
}
.result-ticker {
    display: inline-block;
    background: rgba(61, 123, 253, 0.16);
    color: #5b9fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 12px;
    vertical-align: middle;
    letter-spacing: -0.02em;
}
.actual-badge-pos {
    display: inline-block;
    background: rgba(31, 174, 116, 0.13);
    color: #1fae74;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: -0.02em;
}
.actual-badge-neg {
    display: inline-block;
    background: rgba(229, 72, 77, 0.13);
    color: #e5484d;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: -0.02em;
}
.result-meta {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 10px;
    font-weight: 400;
    letter-spacing: -0.005em;
}
.section-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin-bottom: 14px;
    font-weight: 600;
}

/* ── Score breakdown ───────────────────────────────────────────────── */
.score-breakdown {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.score-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 5px 0;
    font-weight: 400;
    letter-spacing: -0.005em;
}
.score-breakdown-val {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    letter-spacing: -0.02em;
}

/* ── Feature & ratio rows ──────────────────────────────────────────── */
.feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.005em;
}
.feature-row:last-child { border-bottom: none; }

.ratio-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: -0.005em;
}
.ratio-row:last-child { border-bottom: none; }

.ratio-val-good { font-family: 'Inter', sans-serif; font-weight: 600; color: #1fae74; letter-spacing: -0.02em; }
.ratio-val-mid  { font-family: 'Inter', sans-serif; font-weight: 600; color: #c9922f; letter-spacing: -0.02em; }
.ratio-val-bad  { font-family: 'Inter', sans-serif; font-weight: 600; color: #e5484d; letter-spacing: -0.02em; }

/* ── Probability ───────────────────────────────────────────────────── */
.prob-header {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: -0.005em;
}
.prob-pct {
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
}
.prob-sublabel {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-quaternary);
    margin-top: 8px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.005em;
}
.prob-bar-bg {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    height: 6px;
    margin: 14px 0 24px 0;
    overflow: hidden;
}

/* ── Financials ────────────────────────────────────────────────────── */
.fin-label {
    color: var(--text-tertiary);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 4px;
}
.fin-val {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.fin-val-pos {
    color: #1fae74;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.fin-val-neg {
    color: #e5484d;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

/* ── Boxes ─────────────────────────────────────────────────────────── */
.score-summary-box {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
    letter-spacing: -0.005em;
}
.analysis-box {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-blue);
    padding: 22px 26px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-top: 4px;
    overflow: visible;
    display: block;
    font-weight: 400;
    letter-spacing: -0.005em;
}

/* ── Status pills ──────────────────────────────────────────────────── */
.status-active, .status-hold, .status-none {
    display: inline-block;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    letter-spacing: -0.005em;
}
.status-active { background: rgba(31, 174, 116, 0.13);  color: #1fae74; }
.status-hold   { background: rgba(201, 146, 47, 0.13); color: #c9922f; }
.status-none   { background: rgba(201, 162, 39, 0.13); color: #c9a227; }

/* ── Notes ─────────────────────────────────────────────────────────── */
.filing-note {
    background: rgba(31, 174, 116, 0.06);
    border: 1px solid rgba(31, 174, 116, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: rgba(140, 205, 175, 1);
    font-family: 'Inter', sans-serif;
    margin-top: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.005em;
}
.data-note {
    background: rgba(201, 146, 47, 0.06);
    border: 1px solid rgba(201, 146, 47, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: rgba(201, 168, 122, 1);
    font-family: 'Inter', sans-serif;
    margin-top: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

/* ── Misc ──────────────────────────────────────────────────────────── */
hr.divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 16px 0;
}
h1, h2, h3 {
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: -0.035em !important;
    font-weight: 700 !important;
}
h1 { font-size: 36px !important; }
h2 { font-size: 28px !important; }
h3 { font-size: 20px !important; }
p  {
    color: var(--text-secondary);
    letter-spacing: -0.005em;
}

.brand-strip {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 4px 0 8px 0;
    font-weight: 600;
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(120, 138, 168, 0.14);
    border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 138, 168, 0.24); }

/* ── About modal ───────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9998;
}
.modal-card {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(9, 12, 18, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    padding: 36px 38px 32px 38px;
    max-width: 520px;
    width: 88%;
    max-height: 70vh;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    color: #9aa5b8;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: -0.005em;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
    z-index: 9999;
    box-sizing: border-box;
}
.modal-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #e9edf3;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 20px;
}
.modal-card p { margin: 0 0 16px 0; color: #9aa5b8; font-weight: 400; }
.modal-card p:last-child { margin-bottom: 0; }
.modal-close-wrap { position: fixed; top: 83%; left: 50%; transform: translateX(-50%); z-index: 10000; width: 130px; }
.modal-close-wrap .btn {
    width: 100%;
    background: rgba(61, 123, 253, 0.20);
    border: 1px solid rgba(61, 123, 253, 0.42);
    color: #5b9fff;
    font-weight: 600;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.modal-close-wrap .btn:hover {
    background: rgba(61, 123, 253, 0.30);
    border-color: rgba(61, 123, 253, 0.62);
}

/* ── TICKER TAPE ───────────────────────────────────────────────────── */
.ticker-tape-shell {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(148, 163, 184, 0.03);
    margin: 0 0 40px 0;
    padding: 10px 0;
}
.ticker-tape-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 48s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .ticker-tape-track { animation: none; }
}
.ticker-tape-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: -0.01em;
    padding: 0 22px;
    white-space: nowrap;
    border-right: 1px solid var(--border-subtle);
}
.ticker-tape-item .tt-name { color: var(--text-tertiary); font-weight: 500; }
.ticker-tape-item .tt-score { color: var(--text-primary); font-weight: 600; }
.ticker-tape-item .tt-move { font-weight: 600; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── VERIFIED CALLS (track record blotter) ────────────────────────── */
.blotter-shell {
    background: rgba(14, 14, 28, .55);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 56px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.blotter-head {
    display: grid;
    grid-template-columns: 60px 1.3fr .9fr 1.1fr 2.2fr;
    gap: 16px;
    padding: 12px 22px;
    background: rgba(148, 163, 184, 0.05);
    border-bottom: 1px solid var(--border-subtle);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.blotter-row {
    display: grid;
    grid-template-columns: 60px 1.3fr .9fr 1.1fr 2.2fr;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
}
.blotter-row:last-child { border-bottom: none; }
.blotter-ticker {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.015em;
}
.blotter-sector {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
    font-weight: 400;
}
.blotter-conv { font-family: 'Inter', sans-serif; font-size: 10px; color: var(--text-quaternary); margin-top: 4px; font-weight: 500; }
.blotter-date {
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    color: var(--text-tertiary);
}
.blotter-actual-num { font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 5px; }
.blotter-actual-cap { display: flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; font-size: 10px; color: var(--text-quaternary); margin-top: 5px; font-weight: 500; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-blue); display: inline-block; flex-shrink: 0; animation: pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(1.6); } }
.blotter-note {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}
.blotter-ring { position: relative; width: 44px; height: 44px; }
.blotter-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.blotter-ring circle { fill: none; cx: 22; cy: 22; r: 18; stroke-width: 2.6; }
.blotter-ring-track { stroke: var(--border-default); }
.blotter-ring-fill { stroke: var(--accent-blue); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset 1.1s cubic-bezier(.16, 1, .3, 1); }
.blotter-ring-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 800; color: var(--text-primary); }
@media (max-width: 720px) {
    .blotter-head { display: none; }
    .blotter-row { grid-template-columns: 44px 1fr; gap: 10px 14px; }
    .blotter-row > div:not(.blotter-ring) { grid-column: 2; }
}

/* ── LANDING PAGE ──────────────────────────────────────────────────── */
.landing-hero-wrap {
    position: relative;
    padding-top: 6px;
}

/* ── Hero stage (cinematic canvas animation) — used to live inside a
   components.html iframe's own <style>; ported over 1:1 since it no
   longer needs to be isolated from the rest of the page. ────────────── */
.stage { position: relative; width: 100%; height: 620px; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.stage .logo {
    position: absolute; left: 50%; top: 20%; transform: translate(-50%, -50%);
    width: 150px; height: 150px; z-index: 3; pointer-events: none;
}
.stage .logo img {
    width: 100%; height: 100%; object-fit: contain; opacity: 0;
    filter: drop-shadow(0 22px 46px rgba(61, 123, 253, 0.30));
}
.stage .copy {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 4;
    display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px;
}
.stage .eyebrow {
    font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; color: #5b9fff;
    text-transform: uppercase; letter-spacing: 0.24em; margin-bottom: 22px; opacity: 0;
    text-shadow: 0 0 18px rgba(6, 6, 15, .85);
}
.stage .title {
    font-family: 'Inter', sans-serif; font-size: clamp(40px, 7vw, 66px); font-weight: 800;
    letter-spacing: -0.045em; line-height: 1.0; margin-bottom: 20px; color: #e9edf3; opacity: 0;
    text-shadow: 0 0 24px rgba(6, 6, 15, .9), 0 0 48px rgba(6, 6, 15, .75);
}
.stage .title .mk { color: #3d7bfd; }
.stage .sub {
    font-family: 'Inter', sans-serif; font-size: clamp(15px, 1.5vw, 18px); color: #98a3b8;
    max-width: 580px; line-height: 1.5; letter-spacing: -0.01em; opacity: 0;
    text-shadow: 0 0 20px rgba(6, 6, 15, .85);
}
.stage .stats {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 34px; z-index: 4;
    display: flex; align-items: center; background: rgba(14, 14, 28, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.10); border-radius: 16px; padding: 18px 8px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); opacity: 0;
}
.stage .stat { padding: 0 clamp(16px, 2.4vw, 28px); text-align: center; }
.stage .snum { font-family: 'Inter', sans-serif; font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -0.035em; color: #e9edf3; }
.stage .slab { font-family: 'Inter', sans-serif; font-size: 9.5px; color: #69748a; text-transform: uppercase; letter-spacing: 0.10em; font-weight: 600; margin-top: 6px; }
.stage .sdiv { width: 1px; height: 34px; background: rgba(148, 163, 184, 0.10); }
@media (max-width: 640px) {
    .stage {
        display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
        padding: 26px 0 20px; height: 620px;
    }
    .stage .logo { position: static; transform: none; width: 104px; height: 104px; margin-bottom: 6px; flex-shrink: 0; }
    .stage .copy { position: static; transform: none; width: 100%; margin-bottom: 18px; }
    .stage .eyebrow { margin-bottom: 16px; }
    .stage .title { font-size: 38px; margin-bottom: 14px; }
    .stage .sub { font-size: 14px; line-height: 1.45; max-width: 90%; }
    .stage .stats { position: static; transform: none; margin: 0 auto; flex-wrap: wrap; gap: 4px 0; max-width: 90%; bottom: auto; }
    .stage .sdiv { display: none; }
    .stage .stat { flex: 0 0 50%; padding: 9px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .stage * { animation: none !important; }
}

.hero-cubes {
    position: absolute;
    top: -18px;
    right: -6px;
    width: 200px;
    height: auto;
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 900px) {
    .hero-cubes { width: 130px; top: -8px; right: -4px; opacity: 0.8; }
}
@media (max-width: 720px) {
    .hero-cubes { display: none; }
}
.landing-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    text-align: center;
    margin: 8px 0 22px 0;
    opacity: 0.85;
}
.landing-logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    box-shadow: 0 16px 48px rgba(61, 123, 253, 0.32),
                0 0 0 1px rgba(120, 138, 168, 0.20),
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
    margin: 0 auto 28px auto;
    display: block;
}
.landing-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 64px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    text-align: center;
    letter-spacing: -0.045em !important;
    line-height: 1.05 !important;
    margin: 0 0 18px 0 !important;
}
.landing-title .title-mark { color: var(--accent-blue); }
.landing-subtitle-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 0 46px 0;
}
.landing-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    max-width: 680px;
    margin: 0 !important;
    line-height: 1.5;
    letter-spacing: -0.012em;
}
.landing-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 0 auto 56px auto;
    padding: 22px 32px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    max-width: 720px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.landing-stat {
    flex: 1;
    text-align: center;
    padding: 0 16px;
}
.landing-stat-num {
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.035em;
    line-height: 1.05;
}
.landing-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-weight: 600;
    margin-top: 8px;
}
.landing-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-subtle);
    flex-shrink: 0;
}
.landing-section-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    margin: 8px 0 20px 0;
}
.landing-h2 {
    font-family: 'Poppins', sans-serif !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.01em !important;
    margin: 0 0 28px 0 !important;
    line-height: 1.15;
}

/* ── Conviction-score mechanism (replaces the three feature boxes) ───────
   A scroll-scrubbed section: the ring fills and the score counts up as the
   pinned panel scrolls past, in sync with the active item in the list next
   to it. Driven by initMechanism() in landing.js. ────────────────────────── */
.mechanism { position: relative; height: 128vh; margin: 4px 0 30px 0; }
.mech-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: min(8vh, 64px); }
.mech-pair { display: flex; align-items: center; justify-content: center; gap: clamp(36px, 7vw, 110px); flex-wrap: wrap; width: 100%; }
.mech-visual { position: relative; width: min(30vw, 400px); height: min(30vw, 400px); flex: none; }
.gauge { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.gauge-track { fill: none; cx: 100; cy: 100; r: 82; stroke-width: 1.4; stroke: var(--border-default); animation: trackBreathe 4.5s ease-in-out infinite; }
@keyframes trackBreathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.gauge-fill { fill: none; cx: 100; cy: 100; r: 82; stroke-width: 2.2; stroke: var(--accent-blue); stroke-linecap: round; stroke-dasharray: 515.2; stroke-dashoffset: 515.2; filter: drop-shadow(0 0 7px rgba(61, 123, 253, .75)); transition: stroke-dashoffset .08s linear; }
.gauge-bezel { fill: none; cx: 100; cy: 100; r: 94; stroke-width: 1; stroke: var(--border-subtle); stroke-dasharray: 1.5 7; transform-origin: 100px 100px; animation: bezelSpin 90s linear infinite; }
.gauge-bezel-2 { fill: none; cx: 100; cy: 100; r: 99; stroke-width: 1; stroke: rgba(61, 123, 253, .22); stroke-dasharray: 0.5 11; transform-origin: 100px 100px; animation: bezelSpin 130s linear infinite reverse; }
@keyframes bezelSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gauge-track, .gauge-bezel, .gauge-bezel-2, .gauge-fill { animation: none; transition: none; } }
.mech-readout { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; }
.mech-number { font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-size: clamp(48px, 5.4vw, 60px); font-weight: 800; letter-spacing: -.03em; color: var(--text-primary); }
.mech-label { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-tertiary); font-weight: 600; margin-top: 2px; }
.mech-copy {
    flex: none; width: min(420px, 92vw); box-sizing: border-box; padding: 30px 32px;
    background: rgba(14, 14, 28, .55); border: 1px solid var(--border-subtle); border-radius: 18px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.mech-index { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.mech-index li { position: relative; display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; opacity: .44; transition: opacity .4s ease; }
.mech-index li::before { content: ''; position: absolute; left: -16px; top: 2px; bottom: 2px; width: 2px; background: var(--accent-blue); opacity: 0; transition: opacity .4s ease; box-shadow: 0 0 8px rgba(61, 123, 253, .8); }
.mech-index li.active { opacity: 1; }
.mech-index li.active::before { opacity: 1; }
.mech-index .idx { font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 700; color: var(--accent-cyan); padding-top: 3px; }
.mech-index h3 { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 700; letter-spacing: -.015em; color: var(--text-primary); margin: 0 0 5px 0; }
.mech-index p { font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.58; color: var(--text-secondary); max-width: 34ch; margin: 0; }
.mech-index li.active p { color: var(--text-primary); }
@media (max-width: 760px) {
    .mechanism { height: 180vh; }
    .mech-sticky { flex-direction: column; padding-top: 12vh; gap: 32px; }
    .mech-visual { width: 240px; height: 240px; }
    .mech-number { font-size: 38px; }
}
/* ── Mobile (≤720px) ─ only changes mobile, never desktop ─────────── */
@media (max-width: 720px) {
    /* Landing hero */
    .landing-logo { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 22px; }
    .landing-eyebrow { font-size: 10px; letter-spacing: 0.18em; margin: 4px 0 18px 0; }
    .landing-title { font-size: 42px !important; line-height: 1.05 !important; letter-spacing: -0.04em !important; }
    .landing-subtitle { font-size: 15px; line-height: 1.5; max-width: 100%; padding: 0 4px; }
    .landing-subtitle-wrap { margin-bottom: 36px; padding: 0 4px; }

    /* Stats strip stacks vertically */
    .landing-stats {
        flex-direction: column;
        gap: 16px;
        padding: 20px 22px;
        margin-bottom: 44px;
    }
    .landing-stat { padding: 6px 0; }
    .landing-stat-num { font-size: 26px; }
    .landing-stat-label { font-size: 10px; }
    .landing-stat-divider { width: 80%; height: 1px; margin: 0 auto; }

    /* Section labels and headings */
    .landing-section-label { font-size: 10px; letter-spacing: 0.14em; }
    .landing-h2 { font-size: 24px !important; margin: 0 0 22px 0 !important; }

    /* How it works tightens */
    .how-it-works { padding: 22px 20px; border-radius: 14px; margin-bottom: 44px; }
    .how-row { gap: 14px; padding: 12px 0; }
    .how-text { font-size: 13.5px; }

    /* Disclaimer scroll comfortably reachable */
    .disclaimer-shell { border-radius: 14px; padding: 4px; }
    .disclaimer-scroll { padding: 18px 20px; max-height: 280px; font-size: 13px; }

    /* Top nav: stack brand and tabs vertically */
    .top-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
        margin: -4px 0 16px 0;
    }
    .top-nav-brand { justify-content: flex-start; }
    .top-nav-brand img { width: 28px; height: 28px; }
    .top-nav-brand-text { font-size: 13px; }
    .top-nav-brand-sub { font-size: 9px; letter-spacing: 0.14em; }
    .top-nav-tabs { width: 100%; justify-content: stretch; }
    .top-nav-tab {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 7px 10px;
        font-size: 12px;
    }

    /* Result panel tightens */
    .result-panel {
        padding: 22px 18px;
        border-radius: 16px;
        margin: 4px 0 22px 0;
    }
    .result-name { font-size: 22px; }
    .result-ticker { font-size: 11px; padding: 3px 8px; margin-left: 8px; }
    .actual-badge-pos, .actual-badge-neg { font-size: 10px; padding: 3px 8px; }
    .result-meta { font-size: 12px; }

    /* Hero score and probability shrink */
    .score-mega { font-size: 44px; }
    .prob-pct { font-size: 32px; }

    /* Score breakdown / boxes */
    .score-breakdown { padding: 14px 16px; border-radius: 12px; }
    .score-summary-box, .analysis-box { padding: 16px 18px; font-size: 13px; }

    /* Page headings */
    h1 { font-size: 28px !important; }
    h2 { font-size: 22px !important; }

    /* About modal text size */
    .modal-card { font-size: 13px !important; }
}
.how-it-works {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 32px 36px;
    margin-bottom: 56px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.how-row {
    display: flex;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    align-items: flex-start;
}
.how-row:last-child { border-bottom: none; }
.how-num {
    flex-shrink: 0;
    width: 28px;
    color: var(--accent-blue);
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 16px;
    font-weight: 700;
    padding-top: 1px;
}
.how-text {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: -0.005em;
}
.how-text b { color: var(--text-primary); font-weight: 600; }

.disclaimer-shell {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 4px;
    margin-bottom: 22px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.disclaimer-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding: 24px 28px;
    border-radius: 14px;
    background: rgba(6, 6, 15, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    line-height: 1.72;
    color: var(--text-secondary);
    letter-spacing: -0.005em;
}
.disclaimer-scroll h4 {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin: 22px 0 8px 0 !important;
    letter-spacing: -0.012em !important;
    text-transform: none !important;
}
.disclaimer-scroll h4:first-child { margin-top: 0 !important; }
.disclaimer-scroll p { color: var(--text-secondary); margin: 0 0 12px 0; font-weight: 400; }
.disclaimer-scroll em {
    color: var(--text-tertiary);
    font-style: normal;
    font-size: 12px;
    display: block;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.landing-footer {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-quaternary);
    margin-top: 32px;
    letter-spacing: -0.005em;
    font-weight: 400;
}

/* Landing page uses its own centered container instead of the sidebar shell. */
.landing-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem 1.5rem;
    box-sizing: border-box;
}
@media (max-width: 720px) {
    .landing-container { padding: 1.5rem 1.1rem 3rem 1.1rem; }
}

/* Center forcing for landing title */
.landing-title-wrap {
    text-align: center;
    width: 100%;
    margin: 0 auto 18px auto;
}
.landing-title-wrap h1 {
    text-align: center !important;
    width: 100%;
    margin: 0 auto !important;
}

/* ── TOP NAV BAR (main app) ───────────────────────────────────────── */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    margin: -8px 0 20px 0;
    background: rgba(14, 14, 28, 0.55);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.top-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.18s;
}
.top-nav-brand:hover { opacity: 0.85; }
.top-nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(120, 138, 168, 0.18);
}
.top-nav-brand-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.022em;
}
.top-nav-brand-sub {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 2px;
}
.top-nav-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-1);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}
.top-nav-tab {
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.005em;
    white-space: nowrap;
}
.top-nav-tab:hover {
    background: var(--surface-2);
    color: var(--text-primary) !important;
}
.top-nav-tab.active {
    background: none;
    color: var(--text-primary) !important;
    font-weight: 600;
}
/* dim track spanning the tab, plus a small bright comet running back and
   forth along it — the same "armed instrument" trace as the landing CTA
   button, scaled down, so the two read as one signature rather than two
   unrelated accents. */
.top-nav-tab.active::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 1px;
    background: var(--border-strong);
}
.top-nav-tab.active::after {
    content: '';
    position: absolute;
    left: 14px;
    bottom: 2px;
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue) 40%, var(--accent-cyan) 70%, transparent);
    filter: drop-shadow(0 0 4px rgba(61, 123, 253, .8));
    animation: tabTrace 2.6s ease-in-out infinite;
}
@keyframes tabTrace {
    0%, 100% { left: 14px; }
    50% { left: calc(100% - 30px); }
}
@media (prefers-reduced-motion: reduce) {
    .top-nav-tab.active::after { animation: none; left: calc(100% - 30px); }
}
.top-nav-tab.active:hover { color: var(--text-primary) !important; }
a.top-nav-brand,
a.top-nav-tab { text-decoration: none !important; }

/* Disclaimer scroll robustness — high specificity so Streamlit defaults
   never bleed through and the layout is consistent across browsers. */
.disclaimer-scroll, .disclaimer-scroll * { box-sizing: border-box; }
.disclaimer-scroll p,
.disclaimer-shell .disclaimer-scroll p {
    color: var(--text-secondary) !important;
    margin: 0 0 14px 0 !important;
    font-weight: 400 !important;
    font-size: 13.5px !important;
    line-height: 1.72 !important;
    letter-spacing: -0.005em !important;
}
.disclaimer-scroll h4,
.disclaimer-shell .disclaimer-scroll h4 {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin: 22px 0 8px 0 !important;
    letter-spacing: -0.012em !important;
    text-transform: none !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
.disclaimer-scroll h4:first-child,
.disclaimer-shell .disclaimer-scroll h4:first-child { margin-top: 0 !important; }

/* ── SITE CHROME (new — plain-HTML equivalents of the old inline styles) ─── */
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px 0; }
.sidebar-brand img { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; }
.sidebar-brand-name { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.022em; }
.sidebar-brand-sub { font-size: 10px; color: var(--text-quaternary); font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; margin-top: 3px; }
.sidebar-hr { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }
.sidebar-label { font-size: 10px; color: var(--text-tertiary); font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 10px; font-weight: 600; }
.sidebar-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-family: 'Inter', sans-serif; color: var(--text-secondary); padding: 5px 0; letter-spacing: -0.01em; text-decoration: none; }
.sidebar-row-ticker { color: var(--text-primary); font-weight: 500; flex: 1; }
.sidebar-mini-badge { font-size: 10px; padding: 2px 8px; }
.sidebar-row-actual { font-size: 10px; font-weight: 600; min-width: 46px; text-align: right; }
.sidebar-footer-label { font-family: 'Inter', sans-serif; font-size: 10px; color: var(--text-quaternary); text-transform: uppercase; letter-spacing: 0.14em; padding: 4px 0 10px 0; font-weight: 600; }

.subscribe-form { display: flex; flex-direction: column; gap: 8px; }
.subscribe-msg { font-size: 12px; font-family: 'Inter', sans-serif; font-weight: 500; border-radius: 8px; padding: 8px 12px; letter-spacing: -0.005em; margin-top: 8px; }
.subscribe-msg-success { color: #1fae74; background: rgba(31, 174, 116, 0.10); border: 1px solid rgba(31, 174, 116, 0.20); }
.subscribe-msg-already { color: #c9922f; background: rgba(201, 146, 47, 0.10); border: 1px solid rgba(201, 146, 47, 0.20); }
.subscribe-msg-error   { color: #e5484d; background: rgba(229, 72, 77, 0.10);  border: 1px solid rgba(229, 72, 77, 0.20); }

.page-title { margin-bottom: 6px; }
.page-sub { font-size: 14px; color: var(--text-tertiary); margin-bottom: 18px; font-weight: 400; letter-spacing: -0.005em; }

.regime-banner {
    background: rgba(229, 72, 77, 0.11);
    border: 1px solid rgba(229, 72, 77, 0.28);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.005em;
    flex-wrap: wrap;
}
.regime-banner-label { color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.10em; font-weight: 600; font-size: 11px; }
.regime-banner-value { background: rgba(229, 72, 77, 0.32); color: #e5484d; font-weight: 600; padding: 4px 12px; border-radius: 6px; letter-spacing: 0.04em; font-size: 11px; }
.regime-banner-note { color: var(--text-tertiary); font-size: 12px; font-weight: 400; }

.watchlist-item { padding: 14px 0; border-bottom: 1px solid var(--border-subtle); font-family: 'Inter', sans-serif; }
.watchlist-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.watchlist-name { color: var(--text-primary); font-size: 14px; font-weight: 600; letter-spacing: -0.018em; }
.watchlist-sector { color: var(--text-tertiary); font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em; font-weight: 600; flex-shrink: 0; }
.watchlist-note { color: var(--text-secondary); font-size: 12px; margin-top: 5px; line-height: 1.55; font-weight: 400; letter-spacing: -0.005em; }
.watchlist-empty { font-size: 13px; color: var(--text-tertiary); font-family: 'Inter', sans-serif; padding: 14px 0; font-weight: 400; }

.card-flag-row { background: rgba(229, 72, 77, 0.04); border: 1px solid rgba(229, 72, 77, 0.12); border-radius: 8px; padding: 8px 13px; margin-bottom: 7px; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: -0.005em; }
.card-flag-label { color: var(--text-tertiary); font-weight: 500; }
.card-flag-detail { color: var(--warning); font-weight: 500; }

.rv-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.rv-cols-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) {
    .rv-cols, .rv-cols-3 { grid-template-columns: 1fr; gap: 20px; }
}

.spinner-row { display: flex; align-items: center; gap: 10px; padding: 24px 0; color: var(--text-tertiary); font-family: 'Inter', sans-serif; font-size: 13px; }
.spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent-blue);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cta-wrap { margin-top: 8px; }
.hidden { display: none !important; }
a { color: inherit; }
