/* Stock Page Styles */

/* ═══════════════════════════════════════════════════════════════════════
   CAPITAL VISUAL OVERRIDE — source of truth: capital/index.html
   This block forces .capital visual language on every stock page element.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Body & Background ── */
body {
    background: #08080c !important;
    color: rgba(255,255,255,0.88) !important;
    font-weight: 300 !important;
    -webkit-font-smoothing: antialiased !important;
    scroll-behavior: smooth;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.05); border-radius: 3px; }
/* Kill old ambient glow orbs */
.ambient-glow { display: none !important; }
/* Kill old scanlines overlay */
body::after { display: none !important; }

/* .capital noise texture overlay */
.noise {
    position: fixed !important;
    inset: 0 !important;
    opacity: 0.02 !important;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") !important;
    pointer-events: none !important;
    z-index: 1 !important;
    mix-blend-mode: overlay !important;
}

/* .capital page glow */
body::before {
    content: '';
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(139,92,246,0.16) 0%, rgba(124,58,237,0.08) 30%, rgba(91,33,182,0.03) 55%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: capitalBreathe 5s ease-in-out infinite;
}
@keyframes capitalBreathe { 0%,100%{opacity:.6} 50%{opacity:1} }

/* ── Nav — .capital feed-header pattern ── */
.nav {
    background: linear-gradient(180deg, rgba(8,8,12,0.98) 60%, rgba(8,8,12,0.92) 85%, rgba(8,8,12,0)) !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.nav::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: 100% !important;
    background: linear-gradient(180deg, rgba(139,92,246,0.06) 0%, rgba(91,33,182,0.02) 50%, transparent 100%) !important;
    pointer-events: none !important;
    z-index: -1 !important;
}
.nav-inner::before {
    display: none !important;
}
/* Nav links → .capital tab style */
.nav-pages .nav-link,
.nav-link {
    font-size: 13px !important;
    font-weight: 300 !important;
    color: rgba(255,255,255,0.58) !important;
    border-radius: 22px !important;
    padding: 12px 14px !important;
    transition: all 0.35s !important;
    letter-spacing: -0.005em !important;
}
.nav-pages .nav-link:hover,
.nav-link:hover {
    color: rgba(255,255,255,0.75) !important;
    background: rgba(139,92,246,0.04) !important;
}
.nav-pages .nav-link.active,
.nav-link.active {
    color: #c4b5fd !important;
    font-weight: 300 !important;
    background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(124,58,237,0.08)) !important;
    border: 0.5px solid rgba(139,92,246,0.2) !important;
    box-shadow: 0 0 16px rgba(139,92,246,0.08) !important;
}
/* Logo brand — .capital gradient */
.logo-lambda {
    background: linear-gradient(135deg, rgba(255,255,255,0.88), #c4b5fd) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 1px 0 rgba(139,92,246,0.15)) drop-shadow(0 2px 3px rgba(0,0,0,0.6)) !important;
}
.logo-ntitrend,
.logo-labs {
    background: linear-gradient(135deg, rgba(255,255,255,0.65), rgba(196,181,253,0.6)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
.logo-line {
    background: rgba(139,92,246,0.25) !important;
}
/* Nav sep — purple */
.nav-sep {
    background: rgba(139,92,246,0.12) !important;
}
/* Nav search & CTAs */
.nav-search {
    background: rgba(139,92,246,0.06) !important;
    border: 0.5px solid rgba(139,92,246,0.12) !important;
    border-radius: 14px !important;
}
.nav-search:focus-within {
    border-color: rgba(139,92,246,0.3) !important;
    box-shadow: 0 0 20px rgba(139,92,246,0.08) !important;
}
.nav-cta,
.nav-login {
    font-size: 11px !important;
    font-weight: 300 !important;
    border-radius: 14px !important;
    padding: 8px 14px !important;
}
.nav-cta {
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(124,58,237,0.15)) !important;
    border: 0.5px solid rgba(139,92,246,0.3) !important;
    color: #c4b5fd !important;
}
.nav-cta:hover {
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(124,58,237,0.2)) !important;
}

/* ── Desktop layout ── */
body {
    margin: 0 auto !important;
    padding-bottom: 72px !important;
    min-height: 100dvh !important;
    position: relative !important;
    overflow-x: hidden !important;
}
.stock-container {
    padding: 12px 10px 90px !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}
@media (min-width: 1024px) {
    .stock-container { max-width: 960px !important; padding: 12px 24px 90px !important; }
}
.bnav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

/* ── Mobile-only layout — .capital pattern ── */
@media (max-width: 768px) {
.nav { display: none !important; }
body {
    max-width: 430px !important;
    padding-top: 0 !important;
}
.stock-container {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 10px 90px !important;
    max-width: 430px !important;
}
.bnav {
    max-width: 430px !important;
}
} /* end mobile */

/* .capital bottom nav */
.bnav {
    z-index: 50 !important;
    background: linear-gradient(to top, #08080c 50%, rgba(8,8,12,0.85) 80%, transparent) !important;
    padding: 10px 0 calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    justify-content: space-around !important;
}
.bnav::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 10% !important;
    right: 10% !important;
    height: 0.5px !important;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.15), transparent) !important;
}
.ni {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
    font-size: 10px !important;
    font-weight: 300 !important;
    color: rgba(255,255,255,0.35) !important;
    cursor: pointer !important;
    padding: 8px 16px !important;
    min-height: 44px !important;
    border: none !important;
    background: none !important;
    font-family: inherit !important;
    text-decoration: none !important;
}
.ni svg {
    opacity: 0.4 !important;
    transition: opacity 0.2s !important;
}
.ni.on {
    color: #c4b5fd !important;
    position: relative !important;
}
.ni.on svg {
    opacity: 0.85 !important;
    filter: drop-shadow(0 0 6px rgba(139,92,246,0.4)) !important;
}

/* Desktop banner — shown on wide screens */
.mobile-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(124,58,237,0.1));
    border-bottom: 0.5px solid rgba(139,92,246,0.2);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 300;
    text-align: center;
    padding: 12px 48px 12px 16px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}
.mobile-banner-link {
    color: #c4b5fd;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 400;
}
.mobile-banner-link:hover { text-decoration: underline; }
.mobile-banner-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}
@media (min-width: 600px) {
    .mobile-banner { display: block; }
    body { padding-top: 44px !important; }
    .stock-container { padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important; }
}

/* ── Hero — .capital card pattern ── */
.stock-hero {
    background: linear-gradient(170deg, rgba(139,92,246,0.05), rgba(91,33,182,0.02)) !important;
    backdrop-filter: blur(60px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(60px) saturate(1.3) !important;
    border: 0.5px solid rgba(139,92,246,0.1) !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(139,92,246,0.04) inset !important;
    position: relative;
    overflow: hidden;
    padding: 20px !important;
    margin-bottom: 14px !important;
}
.stock-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 5%; right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,181,253,0.3), rgba(139,92,246,0.5), rgba(196,181,253,0.3), transparent);
    z-index: 3;
}
.stock-hero h1,
.stock-hero-identity h1 {
    font-weight: 300 !important;
    letter-spacing: -0.02em !important;
    color: rgba(255,255,255,0.88) !important;
}
.stock-price {
    font-weight: 150 !important;
    letter-spacing: -0.02em !important;
    color: rgba(255,255,255,0.88) !important;
}
.stock-change { font-weight: 300 !important; }
.stock-sector { color: #a78bfa !important; font-weight: 350 !important; letter-spacing: 0.04em !important; opacity: 0.6 !important; }

/* ── Tabs removed — capital uses single-scroll layout ── */
.layout-tabs { display: none !important; }
.layout-tab-panel { display: none !important; }

/* ── Capital Layout — .capital stock detail ── */
#capitalLayout {
    padding: 0;
}

/* 52W Range bar */
.cap-range52 { display:flex; align-items:center; gap:6px; margin-top:10px; padding:4px 0; }
.cap-range52-lo, .cap-range52-hi { font-size:9px; color:rgba(255,255,255,.45); font-weight:300; min-width:28px; }
.cap-range52-hi { text-align:right; }
.cap-range52-track { flex:1; height:4px; border-radius:2px; background:rgba(139,92,246,.06); position:relative; overflow:visible; }
.cap-range52-fill { height:100%; border-radius:2px; background:linear-gradient(90deg,rgba(251,113,133,.4),rgba(139,92,246,.4),rgba(52,211,153,.4)); position:absolute; left:0; top:0; width:100%; }
.cap-range52-dot { width:8px; height:8px; border-radius:50%; position:absolute; top:50%; transform:translate(-50%,-50%); box-shadow:0 0 8px rgba(139,92,246,.3); transition:left 1s cubic-bezier(.22,1,.36,1); }
.cap-range52-label { position:absolute; top:-14px; transform:translateX(-50%); font-size:7px; font-weight:300; letter-spacing:.03em; white-space:nowrap; }

/* Forward estimate cards */
.cap-nums { display:flex; gap:8px; margin:16px 0 10px; }
.cap-num {
    flex:1; text-align:center; padding:18px 6px 14px; border-radius:18px; position:relative; overflow:hidden;
    background:linear-gradient(170deg,rgba(139,92,246,.08),rgba(91,33,182,.02));
    border:.5px solid rgba(139,92,246,.1);
}
.cap-num::before { content:''; position:absolute; top:0; left:12%; right:12%; height:.5px; background:linear-gradient(90deg,transparent,rgba(196,181,253,.15),transparent); }
.cap-num-v { font-size:34px; font-weight:100; letter-spacing:-.06em; line-height:1; color:#c4b5fd; text-shadow:0 0 30px rgba(139,92,246,.15); }
.cap-num-u { font-size:13px; font-weight:100; color:#8b5cf6; }
.cap-num-l { font-size:9px; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:.08em; margin-top:8px; font-weight:300; }

/* Scenario cards */
.cap-scenarios { padding:6px 10px 0; display:flex; gap:8px; position:relative; z-index:1; }
.cap-scenario-card {
    flex:1; border-radius:18px; padding:16px 14px; display:flex; flex-direction:column; min-height:120px;
    cursor:pointer; transition:all .25s cubic-bezier(.16,1,.3,1); position:relative;
    backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); box-shadow:0 4px 20px rgba(0,0,0,.2);
}
.cap-scenario-card:active { transform:scale(.95); opacity:.85; }
.cap-scenario-tag { font-size:9px; text-transform:uppercase; letter-spacing:.1em; font-weight:350; margin-bottom:6px; }
.cap-scenario-price { font-size:28px; font-weight:150; letter-spacing:-.04em; margin-bottom:2px; }
.cap-scenario-delta { font-size:13px; font-weight:300; margin-bottom:8px; letter-spacing:-.01em; }

/* Section labels */
.cap-section-label { font-size:8px; color:#a78bfa; letter-spacing:.1em; text-transform:uppercase; margin-bottom:6px; font-weight:380; }

/* Key debate */
.cap-key-issue {
    background:rgba(255,255,255,.02);
    border:1px solid rgba(255,255,255,.05); border-radius:12px; padding:20px; box-shadow:0 4px 16px rgba(0,0,0,.12);
    transition:background .15s;
}
.cap-key-issue-title { font-size:15px; font-weight:300; margin-bottom:14px; line-height:1.4; letter-spacing:-.01em; color:rgba(255,255,255,.88); }
.cap-key-issue-row { display:flex; gap:14px; margin-top:10px; }
.cap-ki-side { flex:1; font-size:11px; line-height:1.5; font-weight:300; padding:10px; border-radius:10px; background:rgba(0,0,0,.15); }
.cap-ki-label { font-size:8px; text-transform:uppercase; letter-spacing:.1em; font-weight:380; margin-bottom:6px; display:inline-block; padding:2px 8px; border-radius:6px; }
.cap-ki-bull { color:#34d399; background:rgba(52,211,153,.08); border:.5px solid rgba(52,211,153,.12); }
.cap-ki-bear { color:#fb7185; background:rgba(251,113,133,.08); border:.5px solid rgba(251,113,133,.12); }

/* Narrative box */
.cap-narrative-box {
    background:rgba(255,255,255,.02);
    border:1px solid rgba(255,255,255,.05); border-radius:12px; padding:20px;
    box-shadow:0 4px 20px rgba(0,0,0,.15);
    transition:background .15s;
}
.cap-narrative-text { font-size:13px; font-weight:300; line-height:1.75; color:rgba(255,255,255,.58); letter-spacing:.01em; }

/* Stats grid */
.cap-stats-grid {
    display:grid; grid-template-columns:1fr 1fr; gap:1px;
    background:rgba(255,255,255,.03); border-radius:12px; overflow:hidden;
    border:1px solid rgba(255,255,255,.05); box-shadow:0 2px 12px rgba(0,0,0,.15);
}
.cap-stat-cell { padding:14px 16px; background:rgba(8,8,12,.85); }
.cap-stat-label { font-size:9px; color:rgba(255,255,255,.45); font-weight:300; text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }
.cap-stat-value { font-size:17px; font-weight:300; letter-spacing:-.03em; color:rgba(255,255,255,.88); }

/* Pills */
.cap-pill { font-size:11px; padding:6px 12px; border-radius:12px; font-weight:300; line-height:1.35; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.cap-pill-catalyst { background:rgba(52,211,153,.06); color:rgba(52,211,153,.75); border:.5px solid rgba(52,211,153,.12); }
.cap-pill-risk { background:rgba(251,113,133,.06); color:rgba(251,113,133,.75); border:.5px solid rgba(251,113,133,.12); }

/* Sparkline (reuse existing price chart or add new) */
.cap-sparkline-wrap { padding:0 10px; margin-bottom:8px; }

/* ── ALL Glass Sections — .capital .ci card pattern ── */
.stock-glass,
.stock-today-section,
.stock-chart-section,
.stock-today-content,
#why-moving-banner,
.earnings-upcoming,
section[id*="section"],
.research-container,
.ownership-grid {
    background: linear-gradient(170deg, rgba(139,92,246,0.05), rgba(91,33,182,0.02)) !important;
    backdrop-filter: blur(60px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(60px) saturate(1.3) !important;
    border: 0.5px solid rgba(139,92,246,0.1) !important;
    border-radius: 22px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(139,92,246,0.04) inset, 0 0 40px rgba(139,92,246,0.06), 0 -4px 30px rgba(139,92,246,0.04) !important;
    position: relative;
    overflow: hidden;
    padding: 20px !important;
    margin-bottom: 14px !important;
}
.stock-glass::before,
.stock-chart-section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 5% !important; right: 5% !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(196,181,253,0.3), rgba(139,92,246,0.5), rgba(196,181,253,0.3), transparent) !important;
    z-index: 3 !important;
}
/* .capital .ci::after — bottom subtle line */
.stock-glass::after,
.stock-today-section::after,
.stock-chart-section::after,
.stock-today-content::after,
.stock-hero::after,
section[id*="section"]::after,
.research-container::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important; left: 20% !important; right: 20% !important;
    height: 0.5px !important;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.08), transparent) !important;
    z-index: 3 !important;
}
.stock-glass:hover {
    border-color: rgba(139,92,246,0.15) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px rgba(139,92,246,0.06) !important;
}

/* ── Section Headings — .capital .lb pattern ── */
.stock-glass h2,
.stock-chart-section h2,
section h2 {
    font-size: 10px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    color: #a78bfa !important;
    margin: 0 0 12px !important;
}

/* ── Stance Strip Chips ── */
.ss-chip {
    font-size: 11px !important;
    font-weight: 300 !important;
    padding: 6px 12px !important;
    border-radius: 14px !important;
    border: 0.5px solid rgba(139,92,246,0.12) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* ── Chart Controls ── */
.stock-range-btn,
.chart-type-btn {
    font-size: 11px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    border: none !important;
    background: rgba(139,92,246,0.04) !important;
    color: rgba(255,255,255,0.45) !important;
    font-weight: 300 !important;
    transition: all 0.15s !important;
}
.stock-range-btn.active,
.stock-range-btn:hover,
.chart-type-btn.active,
.chart-type-btn:hover {
    background: rgba(139,92,246,0.12) !important;
    color: #c4b5fd !important;
    font-weight: 350 !important;
}

/* ── Chart Overlay Buttons ── */
.chart-overlay-btn {
    border: 0.5px solid rgba(139,92,246,0.12) !important;
    background: rgba(139,92,246,0.04) !important;
    color: rgba(255,255,255,0.45) !important;
    border-radius: 14px !important;
}
.chart-overlay-btn.active,
.chart-overlay-btn:hover {
    background: rgba(139,92,246,0.1) !important;
    color: #c4b5fd !important;
    border-color: rgba(139,92,246,0.2) !important;
}

/* ── Performance Strip Returns ── */
.perf-cell {
    border-radius: 14px !important;
    border: 0.5px solid rgba(139,92,246,0.08) !important;
    background: linear-gradient(170deg, rgba(139,92,246,0.06), rgba(91,33,182,0.02)) !important;
}

/* ── Today Narrative — flatten inner card, content inherits parent glass ── */
.today-narrative {
    background: linear-gradient(170deg, rgba(139,92,246,0.05), rgba(91,33,182,0.02)) !important;
    border: 0.5px solid rgba(139,92,246,0.1) !important;
    border-radius: 16px !important;
    color: rgba(255,255,255,0.58) !important;
    font-weight: 300 !important;
    line-height: 1.75 !important;
}
.stock-today-content {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: rgba(255,255,255,0.58) !important;
    font-weight: 300 !important;
    line-height: 1.75 !important;
}
.stock-today-content::before,
.stock-today-content::after { display: none !important; }

/* ── Key Stats Bars & Ranges ── */
.ks-quality-bar,
.ks-range-track {
    background: rgba(139,92,246,0.06) !important;
    border-radius: 4px !important;
}
.ks-range-dot {
    background: rgba(255,255,255,0.9) !important;
    border: 2px solid rgba(139,92,246,0.85) !important;
}
.ks-stat {
    border-bottom: 1px solid rgba(139,92,246,0.04) !important;
}
.ks-stat-value { color: rgba(255,255,255,0.88) !important; font-weight: 350 !important; }
.ks-stat-label { color: rgba(255,255,255,0.45) !important; font-weight: 300 !important; }
.ks-zone-bar { border-radius: 4px !important; }

/* ── Valuation Badges ── */
.val-badge {
    font-size: 9px !important;
    font-weight: 350 !important;
    border-radius: 20px !important;
    letter-spacing: 0.08em !important;
}

/* ── Research Section: Scenario Cards, Catalysts, Risks ── */
.sc-card {
    backdrop-filter: blur(60px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(60px) saturate(1.3) !important;
    border-radius: 18px !important;
}
.catalyst-item,
.risk-item,
.key-issue-card {
    background: linear-gradient(170deg, rgba(139,92,246,0.04), rgba(91,33,182,0.02)) !important;
    border: 0.5px solid rgba(139,92,246,0.08) !important;
    border-radius: 14px !important;
}

/* ── Earnings & News ── */
.news-item {
    border-bottom: 1px solid rgba(139,92,246,0.04) !important;
}

/* ── Price Target Visualization ── */
.pt-track {
    background: rgba(139,92,246,0.03) !important;
    border-radius: 16px !important;
}

/* ── Insider/Ownership Tables ── */
table, .stock-table {
    border-collapse: collapse !important;
}
table th {
    font-weight: 350 !important;
    color: rgba(255,255,255,0.45) !important;
    border-bottom: 0.5px solid rgba(139,92,246,0.06) !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
table td {
    border-bottom: 0.5px solid rgba(139,92,246,0.03) !important;
    color: rgba(255,255,255,0.58) !important;
    font-weight: 300 !important;
}

/* ── X-Ray Collapsible ── */
.stock-xray {
    border: 0.5px solid rgba(139,92,246,0.08) !important;
    border-radius: 14px !important;
    background: rgba(139,92,246,0.02) !important;
}

/* ── Global Text Color Overrides ── */
.text-pos, .stock-change.positive { color: #34d399 !important; }
.text-neg, .stock-change.negative { color: #fb7185 !important; }
.text-gold { color: #d4af37 !important; }

/* ── Shimmer/Loading ── */
.shimmer-text, .shimmer-price, .shimmer-chart, .shimmer-metric {
    background: linear-gradient(90deg, rgba(139,92,246,0.03) 25%, rgba(139,92,246,0.06) 50%, rgba(139,92,246,0.03) 75%) !important;
    background-size: 400px 100% !important;
}

/* ═══ END CAPITAL VISUAL OVERRIDE ═══ */

/* ═══ V6: Normal-scroll stock page (no viewport-fill) ═══ */

/* Container — normal flow, not constrained to viewport */
.stock-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 480px) {
    .stock-container { padding: 0 12px; }
}

/* Tab panels — normal height, no internal scroll */
.stock-container .layout-tab-panel {
    overflow-y: visible;
    overflow-x: visible;
    min-height: auto;
    flex: none;
}

/* Compact hero — single line */
.stock-hero { margin-bottom: 0; }
.stock-hero-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}
.stock-hero-identity { display: flex; align-items: center; gap: 8px; }
.stock-hero-identity h1 { font-size: var(--text-base) !important; margin: 0 !important; }
.stock-hero-price-block { text-align: right; }
.stock-price { font-size: var(--text-lg) !important; }
.stock-stance-strip { margin: 2px 0 0 !important; padding: 2px 0 !important; }

/* Tab actions (share/track/trade) inline with tabs */
.stock-tab-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* ═══ End V6 layout ═══ */

/* Stock page no longer uses .page-layout grid — uses layout-system.css tabs */

/* Chart header with range buttons inline */
.stock-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.stock-chart-header h2 { margin: 0; }

/* Chart glow effect */
#priceChart {
    filter: drop-shadow(var(--chart-glow-green, 0 0 8px rgba(var(--green-rgb),0.3)));
}

/* Sector overlay toggle */
.chart-overlay-btn {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: var(--ls-open);
}
.chart-overlay-btn:hover {
    color: var(--accent-purple);
    border-color: rgba(var(--purple-rgb),0.3);
}
.chart-overlay-btn:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }
.chart-overlay-btn.active {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    background: rgba(var(--purple-rgb),0.1);
}

/* ── Stock-vs-stock compare ─────────────────────────────── */
.chart-compare-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.chart-compare-input-row {
    position: relative;
}
.chart-compare-input {
    font-family: inherit;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    width: 148px;
    outline: none;
    transition: border-color var(--transition-base);
    letter-spacing: var(--ls-open);
}
.chart-compare-input::placeholder { color: var(--text-subtle); }
.chart-compare-input:focus {
    border-color: rgba(var(--gold-rgb),0.5);
}
.chart-compare-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    z-index: 200;
    overflow: hidden;
}
.compare-sugg-item {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    padding: 6px 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.compare-sugg-item:hover { background: rgba(var(--gold-rgb),0.08); color: var(--accent-gold); }
.chart-compare-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.compare-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-2xs);
    font-weight: 300;
    border: 1px solid;
    border-radius: var(--radius-full);
    padding: 2px 8px 2px 10px;
    letter-spacing: var(--ls-open);
}
.compare-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: var(--text-2xs);
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}
.compare-chip-remove:hover { opacity: 1; }

/* tablet layout handled in consolidated responsive section below */

/* ═══ Hero — redesigned "Everything in 5 Seconds" ═══ */
.stock-hero {
    margin-bottom: var(--space-6);
    padding: var(--space-10) var(--space-12) var(--space-8);
    background: rgba(255,255,255,0.02);
    border: 0.5px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.hero-action-line {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--space-4) 0;
    line-height: var(--lh-relaxed);
}
.stock-hero-below {
    margin-bottom: 16px;
}

/* Stance Strip — compact verdict line below price */
.stock-stance-strip {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding: var(--space-4) 0 var(--space-6);
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-tertiary);
    min-height: 0;
}
.stock-stance-strip:empty { display: none; }
/* After-hours / Pre-market price badge */
.stock-after-hours {
    font-size: var(--text-2xs);
    font-family: var(--font-data);
    color: var(--text-secondary);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.ah-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    margin-right: 4px;
}
.ss-chip {
    font-size: 9px;
    font-weight: 350;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}
.ss-chip--pos { color: rgba(52,211,153,0.9); background: rgba(52,211,153,0.06); border-color: rgba(52,211,153,0.15); }
.ss-chip--neg { color: rgba(251,113,133,0.9); background: rgba(251,113,133,0.06); border-color: rgba(251,113,133,0.15); }
.ss-chip--neutral { color: rgba(129,140,248,0.9); background: rgba(129,140,248,0.06); border-color: rgba(129,140,248,0.15); }
.ss-chip--mixed { color: rgba(192,132,252,0.9); background: rgba(192,132,252,0.06); border-color: rgba(192,132,252,0.15); }

.dcf-disagree-note { color: var(--accent-gold); opacity: 0.75; cursor: help; font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 300; }
.ss-item { color: var(--text-tertiary); display: inline-flex; align-items: center; gap: 4px; }
.ss-item strong { font-weight: 300; color: var(--text-primary); }
.ss-bar { display: inline-flex; width: 36px; height: 3px; background: rgba(var(--white-rgb),0.08); border-radius: 2px; overflow: hidden; }
.ss-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease-out; opacity: 0.5; }
.ss-dot { color: var(--text-subtle); font-weight: 300; }
.ss-divider { width: 1px; height: 16px; background: rgba(var(--white-rgb), 0.1); flex-shrink: 0; }
.ss-group { display: inline-flex; align-items: center; gap: var(--space-3); }
.ss-chips { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
/* ── Stock X-Ray (collapsible quick-facts) ─────────────────── */
.stock-xray {
    margin-top: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--b2);
    background: rgba(0,0,0,0.15);
    overflow: hidden;
}
.stock-xray summary {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 7px 14px;
    cursor: pointer;
    list-style: none;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    letter-spacing: var(--ls-wide);
    user-select: none;
    transition: color var(--transition-fast);
}
.stock-xray summary::-webkit-details-marker { display: none; }
.stock-xray summary::marker { display: none; }
.stock-xray summary:hover { color: var(--text-secondary); }
.xray-toggle-icon {
    font-size: 9px;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}
.stock-xray[open] .xray-toggle-icon { transform: rotate(90deg); }
.xray-label {
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: var(--ls-open);
}
.xray-rows {
    padding: 2px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.xray-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding: 4px 14px;
    font-size: var(--text-2xs);
    font-weight: 300;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: background var(--transition-fast);
}
.xray-row:hover { background: var(--s1); }
.xray-row--pos { border-left-color: rgba(var(--green-rgb),0.45); }
.xray-row--neg { border-left-color: rgba(var(--red-rgb),0.45); }
.xray-row--warn { border-left-color: rgba(var(--gold-rgb),0.45); }
.xray-row--neutral { border-left-color: rgba(var(--white-rgb),0.1); }
.xray-row--blue { border-left-color: rgba(var(--blue-rgb),0.45); }
.xray-key {
    flex-shrink: 0;
    width: 76px;
    color: var(--text-subtle);
    font-size: var(--text-2xs);
}
.xray-val {
    color: var(--text-primary);
    font-family: var(--font-mono);
    flex-shrink: 0;
}
.xray-val.xray-pos { color: var(--accent-positive); }
.xray-val.xray-neg { color: var(--accent-negative); }
.xray-val.xray-warn { color: var(--accent-gold); }
.xray-ctx {
    color: var(--text-tertiary);
    font-size: var(--text-2xs);
    font-family: var(--font-body);
}
@media (max-width: 480px) {
    .xray-key { width: 66px; }
    .xray-row { padding: 4px 10px; }
}

/* Row 1: Identity + Price */
.stock-hero-row1 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-12);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.stock-hero-identity {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
/* ── Today's Narrative ─────────────────────────────────────── */
.stock-today-section {
    padding: 0;
    margin-top: 16px;
}
.today-narrative {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 2px solid rgba(var(--purple-rgb), 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    position: relative;
    transition: var(--transition-fast);
}
.today-narrative::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(168,85,247,0.04) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
}
.today-narrative:hover {
    border-color: rgba(255,255,255,0.13);
    border-left-color: var(--accent-purple);
    background: var(--s2);
}
.today-narrative--ai:hover {
    border-left-color: var(--accent-gold);
}
.today-narrative--ai {
    border-left-color: rgba(var(--gold-rgb), 0.35);
}
.today-narrative--ai::before {
    background: linear-gradient(135deg, rgba(168,85,247,0.05) 0%, rgba(212,175,55,0.03) 100%);
}
.today-header {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}
.today-label {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--accent-purple);
    letter-spacing: var(--ls-open);
}
.today-narrative--ai .today-label {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.today-timestamp {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
}
.today-deep-link {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    text-decoration: none;
    margin-left: auto;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.today-deep-link:hover {
    color: var(--accent-gold);
}
/* Today's Analysis summary line */
.today-summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-sm);
    background: rgba(var(--white-rgb),0.03);
    font-size: var(--text-xs);
    font-weight: 300;
}
.today-summary-icon { font-size: var(--text-sm); }
.today-summary--bearish .today-summary-icon { color: var(--accent-negative); }
.today-summary--bullish .today-summary-icon { color: var(--accent-positive); }
.today-summary--neutral .today-summary-icon { color: var(--accent-gold); }
.today-summary-text { flex: 1; color: var(--text-secondary); line-height: var(--lh-snug); }

/* Conviction badge */
.narrative-conviction {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    letter-spacing: var(--ls-normal);
}
.narrative-conviction--high {
    color: var(--accent-positive);
    border-color: rgba(var(--green-rgb),0.25);
    background: rgba(var(--green-rgb),0.08);
}
.narrative-conviction--mid {
    color: var(--accent-gold);
    border-color: rgba(212,175,55,0.25);
    background: rgba(212,175,55,0.08);
}
.narrative-conviction--low {
    color: var(--accent-negative);
    border-color: rgba(var(--red-rgb),0.25);
    background: rgba(var(--red-rgb),0.08);
}
.today-text {
    font-size: var(--text-sm);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}
.today-text.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.today-text-para { margin-top: 0.6em; }
/* Deep section gate — collapsed by default for cleaner page */
.stock-deep-section {
    margin-top: var(--space-4);
}
.stock-deep-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-3) var(--space-4);
    background: var(--surface-1);
    border-radius: var(--radius-md);
    border: 1px solid var(--b2);
    list-style: none;
    transition: var(--transition-fast);
}
.stock-deep-toggle:hover {
    color: var(--text-secondary);
    border-color: rgba(255,255,255,0.12);
}
.stock-deep-toggle::marker { display: none; }
.stock-deep-toggle::-webkit-details-marker { display: none; }
.stock-deep-toggle::before {
    content: '▸ ';
    font-size: var(--text-2xs);
}
.stock-deep-section[open] > .stock-deep-toggle::before {
    content: '▾ ';
}
.stock-deep-count {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    margin-left: auto;
}

/* Source citations */
.today-sources {
    margin-top: 2px;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}
.today-source {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.today-source:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Narrative history timeline */
.narrative-history {
    margin-top: var(--space-3);
}
.narrative-history-toggle {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    list-style: none;
    padding: 6px 0;
}
.narrative-history-toggle::marker { display: none; }
.narrative-history-toggle::-webkit-details-marker { display: none; }
.narrative-history-toggle::before {
    content: '▸ ';
    color: var(--text-subtle);
}
.narrative-history[open] .narrative-history-toggle::before {
    content: '▾ ';
}
.narrative-history-list {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.narrative-day {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}
.narrative-day-date {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--accent-gold);
    white-space: nowrap;
    min-width: 48px;
    padding-top: 2px;
}
.narrative-day-text {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    color: var(--text-tertiary);
    line-height: var(--lh-relaxed);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}
.narrative-day-text.expanded {
    -webkit-line-clamp: unset;
    display: block;
}
@media (max-width: 768px) {
    .stock-today-section { padding: var(--space-2) var(--space-3); }
    .today-narrative { padding: var(--space-2) var(--space-3); }
    .today-header { gap: var(--space-1); }
    .today-deep-link { margin-left: 0; }
    .narrative-day { flex-direction: column; gap: var(--space-1); }
}

.stock-chart-section { margin-top: 0; padding: 20px 24px 8px; }
.stock-hero-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(255,255,255,0.08);
    padding: 6px;
}
.stock-hero h1 {
    font-size: var(--text-xl);
    font-weight: 150;
    color: var(--text-primary);
    margin: 0;
    max-width: 600px;
    letter-spacing: -0.01em;
}
.stock-sector {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    width: 100%;
    margin-top: 2px;
    flex-basis: 100%;
}
.stock-sector-link {
    color: var(--text-subtle);
    text-decoration: none;
    transition: color var(--transition-base);
}
.stock-sector-link:hover { color: var(--accent-purple); }
.stock-etf-pill {
    color: var(--text-subtle);
}
.stock-etf-pill:hover { color: var(--accent-gold); }

.stock-hero-price-block {
    flex-shrink: 0;
    text-align: right;
}
.stock-price-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-10);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.stock-price {
    font-size: var(--text-3xl);
    font-weight: 150;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.hero-verdict-badge {
    align-self: center;
    font-size: var(--text-2xs);
}

/* Row 2: Stance Bar */
.hero-stance-bar {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
    flex-wrap: wrap;
}
.hero-stance-bar--bullish {
    background: rgba(var(--green-rgb),0.08);
    border-color: rgba(var(--green-rgb),0.25);
}
.hero-stance-bar--bearish {
    background: rgba(var(--red-rgb),0.08);
    border-color: rgba(var(--red-rgb),0.25);
}
.hero-stance-bar--cautious {
    background: rgba(234,179,8,0.08);
    border-color: rgba(234,179,8,0.25);
}
.hero-stance-label {
    font-size: var(--text-2xs);
    font-weight: 300;
    letter-spacing: var(--ls-open);
    flex-shrink: 0;
    padding: 3px 12px;
    border-radius: var(--radius-full);
}
.hero-stance-bar--bullish .hero-stance-label { color: var(--accent-positive); background: rgba(var(--green-rgb), 0.12); }
.hero-stance-bar--bearish .hero-stance-label { color: var(--accent-negative); background: rgba(var(--red-rgb), 0.12); }
.hero-stance-bar--cautious .hero-stance-label { color: var(--accent-gold); background: rgba(var(--gold-rgb), 0.12); }

.hero-stance-divider {
    width: 1px;
    height: 18px;
    background: var(--border-subtle);
    flex-shrink: 0;
}
.hero-stance-thesis {
    flex: 1;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: var(--lh-snug);
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-stance-date {
    display: block;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    margin-top: var(--space-3);
    letter-spacing: var(--ls-normal);
}
.hero-stance-quality {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
}
.hero-stance-quality-label {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
}
.hero-stance-quality-val {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-secondary);
}

/* Row 3: Hero Metrics Grid — .capital .num pattern */
.hero-metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: var(--space-4);
}
.hm-row {
    display: flex;
    gap: 8px;
}
.hm-row:first-child {
    border-bottom: none;
}
.hm-cell {
    flex: 1;
    text-align: center;
    padding: 18px 6px 14px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(170deg, rgba(139,92,246,0.08), rgba(91,33,182,0.02));
    border: 0.5px solid rgba(139,92,246,0.1);
    backdrop-filter: blur(60px) saturate(1.3);
    -webkit-backdrop-filter: blur(60px) saturate(1.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.hm-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 0.5px;
    background: linear-gradient(90deg, transparent, rgba(196,181,253,0.15), transparent);
}
.hm-cell:last-child {
    border-right: none;
}
.hm-cell--empty .hm-val {
    opacity: 0.4;
}
.hm-cell[data-goto-tab] {
    transition: all 0.2s ease;
    cursor: pointer;
}
.hm-cell[data-goto-tab]:hover {
    background: linear-gradient(170deg, rgba(139,92,246,0.12), rgba(91,33,182,0.04));
    border-color: rgba(139,92,246,0.2);
}
.hm-label {
    font-size: 9px;
    font-weight: 300;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
    white-space: nowrap;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.hm-val {
    font-size: 28px;
    font-weight: 100;
    color: #c4b5fd;
    line-height: 1;
    letter-spacing: -0.06em;
    text-shadow: 0 0 30px rgba(139,92,246,0.15);
}
.hm-val.text-pos { color: #34d399; }
.hm-val.text-neg { color: #fb7185; }
.hm-val.text-gold { color: #d4af37; }
.hm-bar {
    width: 60%;
    height: 4px;
    background: rgba(139,92,246,0.04);
    border-radius: 2px;
    margin: 8px auto 0;
    overflow: hidden;
}
.hm-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: rgba(196,181,253,0.3);
    transition: width 1s cubic-bezier(0.22,1,0.36,1);
}
.hm-bar-fill.text-pos { background: rgba(52,211,153,0.5); opacity: 1; }
.hm-bar-fill.text-neg { background: rgba(251,113,133,0.5); opacity: 1; }
.hm-bar-fill.text-gold { background: var(--accent-gold); opacity: 0.5; }
.hm-ctx {
    font-size: 10px;
    font-weight: 100;
    color: rgba(139,92,246,0.6);
    margin-top: 6px;
    letter-spacing: 0.02em;
}

/* Performance Strip — return bars below chart */
.perf-strip {
    display: flex;
    align-items: flex-start;
    gap: var(--space-8);
    padding: 8px 10px;
    margin-top: -1px;
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.perf-strip-title {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    margin-bottom: var(--space-6);
    letter-spacing: var(--ls-wide);
}
.perf-strip-bars {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-3);
    align-items: end;
    height: 48px;
    flex: 1;
}
.perf-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
    border-radius: var(--radius-sm);
    padding: 4px 2px;
    transition: background 0.15s ease;
}
.perf-bar-item:hover {
    background: rgba(var(--purple-rgb), 0.08);
}
.perf-bar-label {
    font-size: var(--text-2xs);
    color: var(--text-tertiary);
    font-weight: 300;
    order: 3;
}
.perf-bar-track {
    width: 60%;
    max-width: 40px;
    flex: 1;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    order: 1;
}
.perf-bar-fill {
    width: 100%;
    border-radius: var(--radius-sm);
    transition: height 0.6s ease;
    min-height: 3px;
}
.perf-bar-fill.perf-bar--pos { background: var(--accent-positive); }
.perf-bar-fill.perf-bar--neg { background: var(--accent-negative); }
.perf-bar-val {
    font-size: var(--text-2xs);
    font-weight: 300;
    order: 2;
}

@media (max-width: 480px) {
    .perf-strip-bars {
        grid-template-columns: repeat(6, 1fr);
        height: 64px;
    }
}

/* Row 4: Quick Nav pills */
.hero-quick-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
    position: sticky;
    top: 56px;
    z-index: 10;
    background: var(--bg-primary, #1a0e2e);
    padding: var(--space-6) var(--space-16);
    border-bottom: 1px solid var(--surface-2);
}
.hero-nav-pill {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px 14px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.hero-nav-pill--active {
    color: var(--text-primary);
    border-color: rgba(var(--purple-rgb), 0.4);
    background: rgba(var(--purple-rgb), 0.12);
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
    letter-spacing: var(--ls-open);
}
.hero-nav-pill:hover {
    color: var(--accent-purple);
    border-color: rgba(var(--purple-rgb),0.4);
    background: rgba(var(--purple-rgb),0.07);
}
.hero-nav-pill:focus-visible {
    outline: 2px solid rgba(var(--gold-rgb), 0.7);
    outline-offset: 2px;
}
.hero-nav-pill--report {
    color: rgba(var(--gold-rgb), 0.85);
    border-color: rgba(var(--gold-rgb), 0.25);
}
.hero-nav-pill--report:hover {
    color: rgba(var(--gold-rgb), 1);
    border-color: rgba(var(--gold-rgb), 0.5);
    background: rgba(var(--gold-rgb), 0.07);
}
.hero-nav-pill--share {
    color: rgba(var(--purple-rgb), 0.85);
    border-color: rgba(var(--purple-rgb), 0.25);
}
.hero-nav-pill--share:hover {
    color: rgba(var(--purple-rgb), 1);
    border-color: rgba(var(--purple-rgb), 0.5);
    background: rgba(var(--purple-rgb), 0.07);
}
.hero-nav-pill--track {
    color: var(--text-secondary);
    border-color: rgba(var(--gold-rgb), 0.25);
}
.hero-nav-pill--track:hover {
    color: rgba(var(--gold-rgb), 1);
    border-color: rgba(var(--gold-rgb), 0.5);
    background: rgba(var(--gold-rgb), 0.07);
}
.hero-nav-pill--tracked {
    color: rgba(129,140,248, 0.85);
    border-color: rgba(129,140,248, 0.25);
    background: rgba(129,140,248, 0.08);
}
.hero-nav-pill--broker {
    color: rgba(52,211,153, 0.75);
    border-color: rgba(52,211,153, 0.15);
    background: rgba(52,211,153, 0.06);
    text-decoration: none;
}
.hero-nav-pill--broker:hover {
    color: rgba(var(--green-rgb), 1);
    border-color: rgba(var(--green-rgb), 0.5);
    background: rgba(var(--green-rgb), 0.07);
}
.hero-nav-pill--copied {
    color: var(--up);
    border-color: var(--up);
    background: var(--up-d);
    animation: flash-copied var(--transition-normal) ease-out;
}
@keyframes flash-copied {
    0% { background: var(--up-g); }
    100% { background: var(--up-d); }
}
.share-icon {
    display: inline-block;
    margin-right: 4px;
}

/* Ticker + sector subtitle under company name */
.stock-ticker-sub {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    font-weight: var(--fw-body);
    letter-spacing: var(--ls-open);
    margin-top: 2px;
}
.stock-ticker-sub a { color: var(--text-subtle); text-decoration: none; }
.stock-ticker-sub a:hover { color: var(--text-secondary); }

.live-badge {
    display: none; /* Removed — adds noise without value */
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stock-change {
    font-size: var(--text-sm);
    font-weight: 300;
}

.stock-change.positive {
    color: var(--accent-positive);
}

.stock-change.negative {
    color: var(--accent-negative);
}
.stock-verdict-badge { display: none; }
.dcf-mini-bar {
    display: inline-block;
    width: 48px;
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    position: relative;
    vertical-align: middle;
    margin-left: 6px;
}
.dcf-mini-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    opacity: 0.5;
}
.dcf-mini-dot {
    position: absolute;
    top: -2px;
    width: 4px;
    height: 8px;
    background: rgba(var(--white-rgb), 0.7);
    border-radius: 1px;
    transform: translateX(-2px);
}

.stock-change-period {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    margin-left: 6px;
    vertical-align: middle;
}

/* Metrics Grid */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-10);
    margin-bottom: 14px;
}
.section-header-row h2 { margin: 0; }
.stock-fundamentals-section h2 { margin: 0 0 14px; }

.csv-export-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--text-2xs);
    font-weight: 300;
    letter-spacing: var(--ls-open);
    padding: 4px 10px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}
.csv-export-btn:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.stock-metrics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stock-metric-card {
    flex: 1 1 calc(25% - 6px);
    min-width: 100px;
    text-align: center;
    padding: 18px 6px 14px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(170deg, rgba(139,92,246,0.08), rgba(91,33,182,0.02));
    border: 0.5px solid rgba(139,92,246,0.1);
    backdrop-filter: blur(60px) saturate(1.3);
    -webkit-backdrop-filter: blur(60px) saturate(1.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}
.stock-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 0.5px;
    background: linear-gradient(90deg, transparent, rgba(196,181,253,0.15), transparent);
}
.stock-metric-card:hover {
    border-color: rgba(139,92,246,0.2);
    background: linear-gradient(170deg, rgba(139,92,246,0.12), rgba(91,33,182,0.04));
    transform: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.stock-metric-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(196,181,253,0.25), transparent);
}
.stock-metric-card:focus-visible {
    outline: 2px solid rgba(139,92,246,0.5);
    outline-offset: 2px;
}
.stock-metric-label {
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
}
.stock-metric-value {
    font-size: 28px;
    font-weight: 100;
    color: #c4b5fd;
    line-height: 1;
    letter-spacing: -0.06em;
    text-shadow: 0 0 30px rgba(139,92,246,0.15);
    margin-top: 0;
}
.metric-subtitle {
    font-size: 10px;
    color: rgba(139,92,246,0.6);
    font-weight: 100;
    display: block;
    margin-top: 4px;
}
.stock-metric-sector {
    font-size: 10px;
    font-weight: 100;
    color: rgba(139,92,246,0.6);
    margin-top: 6px;
    min-height: 16px;
}
.metric-compare-bar {
    width: 60%;
    height: 4px;
    background: rgba(139,92,246,0.04);
    border-radius: 2px;
    margin: 6px auto 0;
    position: relative;
    overflow: visible;
}
.metric-compare-fill {
    height: 100%;
    border-radius: 2px;
    opacity: 1;
}
.metric-compare-mark {
    position: absolute;
    top: -2px;
    width: 1px;
    height: 7px;
    background: var(--text-tertiary);
    border-radius: 1px;
}

/* Collapsible sections (details/summary) */
.stock-collapse {
    list-style: none;
}
.stock-collapse-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    padding: 4px 0;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.stock-collapse-toggle:hover {
    background: var(--surface-3);
}
.stock-collapse-toggle:focus-visible {
    outline: 2px solid rgba(var(--gold-rgb), 0.7);
    outline-offset: 2px;
}
.stock-collapse-toggle h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stock-collapse-toggle::after {
    content: '+';
    font-size: var(--text-sm);
    font-weight: 300;
    color: var(--text-subtle);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: 12px;
}
.stock-collapse[open] > .stock-collapse-toggle::after {
    content: '\2212';
}
.stock-collapse > :not(summary) {
    animation: stockCollapseIn 0.25s ease;
}
@keyframes stockCollapseIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.stock-collapse summary::-webkit-details-marker { display: none; }
.stock-collapse-toggle > div { flex: 1; min-width: 0; }
.disc-teaser {
    margin: 2px 0 0;
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    font-weight: 300;
}

/* Fundamentals AI insight */
.fundamentals-ai-insight {
    margin-top: 14px;
    padding: 12px 16px;
    font-size: var(--text-xs);
    line-height: var(--lh-relaxed);
}
.fundamentals-ai-insight .ai-widget-badge {
    margin-right: 8px;
    vertical-align: middle;
}
.fundamentals-ai-text { display: inline; }

/* ── Decision Helper ─────────────────────────────────────────────────── */
#decision-helper {
    padding: 0 24px;
    margin-top: 16px;
}
.dh-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-base);
}
.dh-card:hover {
    border-color: rgba(var(--purple-rgb), 0.2);
    box-shadow: 0 4px 20px rgba(var(--black-rgb), 0.15);
}
.dh-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.dh-title {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: var(--ls-open);
    flex: 1;
}
.dh-pro-badge {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--accent-gold);
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    border-radius: var(--radius-full);
    padding: 1px 7px;
    letter-spacing: var(--ls-caps);
}
.dh-bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.dh-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    align-items: center;
    gap: 10px;
}
.dh-row-label {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-tertiary);
}
.dh-bar-track {
    height: 6px;
    background: var(--s2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.dh-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.dh-bar--pos { background: linear-gradient(90deg, rgba(var(--green-rgb),0.6), rgba(var(--green-rgb),0.9)); }
.dh-bar--mid { background: linear-gradient(90deg, rgba(var(--gold-rgb),0.5), rgba(var(--gold-rgb),0.8)); }
.dh-bar--neg { background: linear-gradient(90deg, rgba(var(--red-rgb),0.5), rgba(var(--red-rgb),0.8)); }
.dh-row-value {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    text-align: right;
}
.dh-row-score {
    color: var(--text-subtle);
}
.dh-row-explain {
    grid-column: 1 / -1;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    margin-top: -4px;
    padding-left: 90px;
}
.dh-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 12px 0 10px;
}
.dh-verdict {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.dh-verdict-action {
    font-size: var(--text-xs);
    font-weight: 300;
    letter-spacing: var(--ls-caps);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.dh-verdict--buy .dh-verdict-action {
    background: rgba(var(--green-rgb), 0.15);
    color: var(--accent-positive);
    border: 1px solid rgba(var(--green-rgb), 0.3);
}
.dh-verdict--avoid .dh-verdict-action {
    background: rgba(var(--red-rgb), 0.15);
    color: var(--accent-negative);
    border: 1px solid rgba(var(--red-rgb), 0.3);
}
.dh-verdict--hold .dh-verdict-action {
    background: rgba(var(--gold-rgb), 0.12);
    color: var(--accent-gold);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
}
.dh-verdict-text {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    line-height: var(--lh-normal);
}

/* Mobile */
@media (max-width: 600px) {
    #decision-helper { padding: 0 12px; }
    .dh-row { grid-template-columns: 72px 1fr 96px; gap: 8px; }
    .dh-verdict-text { display: none; }
}

/* Print: hide decision helper */
@media print {
    #decision-helper { display: none !important; }
}

/* ── Stock DNA ──────────────────────────────────────────────────── */
.dna-strip-wrap {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.dna-title {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    letter-spacing: var(--ls-normal);
    margin-bottom: 6px;
}
.dna-bar {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    gap: 2px;
}
.dna-seg {
    flex: 1;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.dna-seg:hover {
    opacity: 0.9;
    transform: scaleY(1.4);
    transform-origin: center;
    z-index: 1;
}
.dna-seg:hover .dna-tooltip {
    opacity: 1;
    pointer-events: none;
    transform: translateX(-50%) translateY(-4px);
}
.dna-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(20, 12, 36, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 5px 9px;
    white-space: nowrap;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.dna-tooltip strong {
    font-weight: var(--fw-body);
    color: var(--text-primary);
}
.dna-labels {
    display: flex;
    margin-top: 4px;
    gap: 2px;
}
.dna-label {
    flex: 1;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    text-align: center;
    letter-spacing: var(--ls-normal);
    line-height: 1;
}
@media (max-width: 600px) {
    .dna-tooltip { display: none; }
    .dna-label { font-size: var(--text-2xs); }
}

/* Glass card base (shared for sections) */
.stock-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-top: 16px;
    animation: stockSectionIn 0.4s ease both;
    transition: border-color var(--transition-fast), box-shadow var(--transition-base);
}
.stock-glass:hover {
    border-color: rgba(var(--purple-rgb), 0.15);
    box-shadow: 0 4px 20px rgba(var(--black-rgb), 0.15);
}
@keyframes stockSectionIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.stock-glass h2 {
    font-size: var(--text-sm);
    font-weight: var(--fw-heading);
    color: var(--text-secondary);
    margin: 0 0 14px;
    letter-spacing: var(--ls-normal);
}

.stock-ownership-section details { border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 12px; }
.stock-ownership-section details:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* Chart type toggle (Line/Candle) */
.chart-type-toggle {
    display: flex;
    background: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2px;
}
.chart-type-btn {
    background: none;
    border: none;
    color: var(--text-subtle);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-xs);
    font-family: inherit;
    transition: all var(--transition-base);
}
.chart-type-btn:hover { color: var(--text-tertiary); }
.chart-type-btn:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }
.chart-type-btn.active {
    background: rgba(var(--purple-rgb),0.2);
    color: var(--accent-purple);
}

/* Chart section */
.stock-range-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.stock-range-btn {
    background: var(--border-subtle);
    border: none;
    color: var(--text-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-xs);
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}

.stock-range-btn:hover {
    background: var(--border-medium);
    color: var(--text-secondary);
}

.stock-range-btn:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }
.stock-range-btn.active {
    background: rgba(var(--purple-rgb),0.2);
    color: var(--accent-purple);
}

#priceChart {
    width: 100%;
    height: 380px;
}

/* First glass card in main (chart) - no extra top margin */
.page-main > .stock-glass:first-child {
    margin-top: 0;
}

/* Research section */
.stock-thesis {
    font-size: var(--text-xs);
    line-height: var(--lh-loose);
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.stock-targets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-16);
    margin-bottom: 24px;
}

.stock-target-current {
    border-color: var(--border-medium);
    background: var(--surface-3);
    position: relative;
}

.stock-target-current::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--border-light);
}

.stock-target-card {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--card-pad-md);
    position: relative;
    overflow: hidden;
}
.stock-target-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--surface-6);
}
.stock-target-card:nth-child(2)::before { background: rgba(var(--red-rgb),0.4); }
.stock-target-card:nth-child(3)::before { background: rgba(var(--gold-rgb),0.4); }
.stock-target-card:nth-child(4)::before { background: rgba(var(--green-rgb),0.4); }

.stock-target-label {
    font-size: var(--text-xs);
    color: var(--text-subtle);
    letter-spacing: 0.5px;
}

.stock-target-price {
    font-size: var(--text-base);
    font-weight: var(--fw-body);
    color: var(--text-primary);
    margin: 6px 0 4px;
}

.stock-target-price.bear {
    color: var(--accent-negative);
}

.stock-target-price.base {
    color: var(--text-primary);
}

.stock-target-price.bull {
    color: var(--accent-positive);
}

.stock-target-prob {
    font-size: var(--text-xs);
    color: var(--text-subtle);
}

/* Price Scenario Gauge */
/* ── Scenario Cards (.capital-style) ── */
.sc-cards {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.sc-card {
    flex: 1;
    border-radius: 18px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.06);
}

.sc-card:active {
    transform: scale(0.97);
}

.sc-card--bear {
    background: linear-gradient(170deg, rgba(251, 113, 133, 0.08), rgba(251, 113, 133, 0.02));
    border: 0.5px solid rgba(251, 113, 133, 0.15);
}

.sc-card--base {
    background: linear-gradient(170deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border: 0.5px solid rgba(139, 92, 246, 0.15);
}

.sc-card--bull {
    background: linear-gradient(170deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.02));
    border: 0.5px solid rgba(52, 211, 153, 0.15);
}

.sc-tag {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 350;
    margin-bottom: 6px;
}

.sc-card--bear .sc-tag { color: rgba(251, 113, 133, 0.75); }
.sc-card--base .sc-tag { color: rgba(167, 139, 250, 0.75); }
.sc-card--bull .sc-tag { color: rgba(52, 211, 153, 0.75); }

.sc-price {
    font-size: 26px;
    font-weight: 150;
    letter-spacing: -0.04em;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.sc-delta {
    font-size: 13px;
    font-weight: 300;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.sc-prob {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-prob-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.sc-prob-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.sc-card--bear .sc-prob-fill { background: rgba(251, 113, 133, 0.5); }
.sc-card--base .sc-prob-fill { background: rgba(167, 139, 250, 0.5); }
.sc-card--bull .sc-prob-fill { background: rgba(52, 211, 153, 0.5); }

.sc-prob-pct {
    font-size: 10px;
    color: var(--text-subtle);
    font-weight: 300;
    min-width: 24px;
    text-align: right;
}

@media (max-width: 600px) {
    .sc-cards { gap: 6px; }
    .sc-card { padding: 12px 10px; min-height: 100px; border-radius: 14px; }
    .sc-price { font-size: 20px; }
    .sc-delta { font-size: 11px; }
}

.stock-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-24);
}

.stock-two-col h3 {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-subtle);
    letter-spacing: 0.5px;
    margin: 0 0 10px;
}

.stock-two-col ul {
    margin: 0;
    padding: 0 0 0 16px;
    font-size: var(--text-xs);
    color: var(--text-subtle);
    line-height: var(--lh-loose);
}

/* AI section */
.stock-ai-content {
    font-size: var(--text-xs);
    line-height: var(--lh-loose);
    color: var(--text-tertiary);
}

/* Peers table */
.stock-peers-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-peers-table th,
.stock-peers-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.stock-peers-table th {
    color: var(--text-subtle);
    font-weight: var(--fw-body);
    font-size: var(--text-xs);
    letter-spacing: var(--ls-normal);
}

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

.stock-peers-table tr:hover td {
    background: var(--surface-3);
}
.stock-peers-table tr:hover td:first-child {
    box-shadow: inset 3px 0 0 rgba(var(--purple-rgb), 0.4);
}

.peers-show-more {
    display: block;
    margin: 10px auto 0;
    padding: 6px 18px;
    background: rgba(var(--purple-rgb),0.1);
    border: 1px solid rgba(var(--purple-rgb),0.2);
    border-radius: var(--radius-md);
    color: var(--accent-purple);
    font-size: var(--text-xs);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
}

.peers-show-more:hover {
    background: rgba(var(--purple-rgb),0.2);
    color: var(--accent-purple-light);
}
.peers-show-more:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }

/* Peers comparison table */
.peers-compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: var(--space-14);
}
.peers-compare-table { min-width: 640px; }
.peers-compare-table th:not(:first-child):not(.peers-col-name),
.peers-compare-table td:not(:first-child):not(.peers-col-name) {
    text-align: right;
}
.peers-col-name {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.peers-compare-current td {
    background: rgba(var(--purple-rgb), 0.07);
    color: var(--text-secondary);
}
.peers-compare-current td:first-child {
    box-shadow: inset 3px 0 0 rgba(var(--purple-rgb), 0.6);
}
.peers-compare-current:hover td {
    background: rgba(var(--purple-rgb), 0.12);
}

/* Similar Stocks — Horizontal Card Row */
#similar-stocks-container:not(:empty) {
    margin-top: var(--space-20);
    padding-top: var(--space-16);
    border-top: 1px solid var(--border-subtle);
}
.similar-heading {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
    margin: 0 0 8px;
    letter-spacing: var(--ls-open);
}
.sim-row {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: var(--space-2);
}
.sim-row::-webkit-scrollbar { display: none; }
.sim-card {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: 10px 14px;
    background: var(--surface-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.sim-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-1px);
}
.sim-logo {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.sim-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sim-ticker {
    font-size: var(--text-xs);
    font-weight: 300;
}
.sim-name {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
}
.sim-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
    margin-left: 4px;
}
.sim-quality {
    font-size: var(--text-2xs);
    font-weight: 300;
}
.sim-price {
    font-size: var(--text-2xs);
    color: var(--text-secondary);
}
.sim-match {
    font-size: var(--text-2xs);
    color: var(--accent-gold);
    font-weight: var(--fw-body);
    position: relative;
    overflow: hidden;
}
.sim-match-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    border-radius: 1px;
    opacity: 0.4;
}
.sim-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.sim-compare-link {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    text-decoration: none;
    text-align: center;
    padding: 2px 0;
    transition: color var(--transition-fast);
}
.sim-compare-link:hover {
    color: var(--accent-purple);
}
.sim-links {
    display: flex;
    gap: 4px;
    margin-top: 3px;
    padding-top: 2px;
}
.sim-action-link {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.sim-action-link:hover {
    color: var(--accent-purple);
}
.similar-pct-mid {
    background: var(--surface-5);
    color: var(--text-tertiary);
}

/* Insider Activity Section */
.insider-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.insider-header h2 { margin: 0; }
.insider-signal-badge { font-size: var(--text-2xs); font-weight: var(--fw-body); padding: 3px 12px; border-radius: var(--radius-full); letter-spacing: var(--ls-open); }
.insider-bullish { background: rgba(var(--green-rgb),0.15); color: var(--accent-positive); }
.insider-bearish { background: rgba(var(--red-rgb),0.15); color: var(--accent-negative); }
.insider-neutral { background: var(--surface-5); color: var(--text-subtle); }
.insider-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-bottom: 14px; }
.insider-kpi { text-align: center; padding: 10px 8px; background: var(--surface-1); border: 1px solid var(--surface-4); border-radius: var(--radius-md); }
.insider-kpi-val { font-size: var(--text-sm); font-weight: var(--fw-body); color: var(--text-primary); margin-bottom: 2px; }
.insider-kpi-label { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); }
.insider-interp { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-tertiary); line-height: var(--lh-relaxed); padding: 10px 12px; background: rgba(var(--purple-rgb),0.04); border-left: 2px solid rgba(var(--purple-rgb),0.3); border-radius: var(--radius-sm); margin-bottom: 14px; }
.insider-trades-title { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); letter-spacing: var(--ls-open); margin-bottom: 8px; }
.insider-trades-list { display: flex; flex-direction: column; gap: var(--space-4); }
.insider-trade-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-1); border-radius: var(--radius-sm); font-size: var(--text-2xs); font-weight: var(--fw-body); }
.insider-trade-name { color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insider-trade-title { color: var(--text-subtle); flex: 0 0 auto; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insider-trade-type { flex-shrink: 0; min-width: 32px; text-align: center; }
.insider-trade-val { color: var(--text-tertiary); flex-shrink: 0; min-width: 60px; text-align: right; }
.insider-trade-date { color: var(--text-subtle); flex-shrink: 0; min-width: 80px; text-align: right; }
@media (max-width: 600px) { .insider-trade-title, .insider-trade-date { display: none; } }

/* ETF Ownership */
.etf-count-badge {
    font-size: var(--text-2xs);
    color: var(--accent-gold, rgba(var(--gold-rgb),0.9));
    background: rgba(var(--gold-rgb),0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 300;
}
.etf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-10); }
.etf-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.etf-card:hover { transform: translateY(-2px); border-color: var(--accent-purple, #9664dc); }
.etf-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.etf-card-symbol {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--accent-gold, #d4af37);
}
.etf-card-name {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.etf-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.etf-card-metric { text-align: center; }
.etf-card-val { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-primary); }
.etf-card-label { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); }

/* ═══ Financial Statements ═══ */
#financials-statements-section h2 { margin: 0; font-size: var(--text-base); font-weight: var(--fw-body); }
.fin-stmt-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fin-stmt-tabs, .fin-stmt-period-tabs { display: flex; gap: 2px; }
.fin-stmt-tab, .fin-period-tab {
    padding: 3px 10px;
    font-size: var(--text-2xs);
    font-family: var(--font-body);
    font-weight: var(--fw-body);
    border: 1px solid var(--surface-4);
    background: transparent;
    color: var(--text-subtle);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.fin-stmt-tab:hover, .fin-period-tab:hover { border-color: var(--accent-purple, #a855f7); color: var(--text-secondary); }
.fin-stmt-tab.active { background: rgba(var(--purple-rgb), 0.15); border-color: rgba(var(--purple-rgb), 0.3); color: var(--text-primary); }
.fin-period-tab.active { background: rgba(var(--gold-rgb), 0.12); border-color: rgba(var(--gold-rgb), 0.25); color: var(--text-primary); }
.fin-stmt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fin-stmt-table { width: 100%; border-collapse: collapse; font-size: var(--text-2xs); font-weight: var(--fw-body); white-space: nowrap; }
.fin-stmt-table th { text-align: right; color: var(--text-subtle); padding: 6px 10px; border-bottom: 1px solid var(--surface-4); font-weight: var(--fw-body); }
.fin-stmt-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--glass-bg); z-index: 1; min-width: 160px; }
.fin-stmt-table td { padding: 6px 10px; color: var(--text-secondary); border-bottom: 1px solid var(--surface-2); text-align: right; font-variant-numeric: tabular-nums; }
.fin-stmt-table td:first-child { text-align: left; color: var(--text-tertiary); position: sticky; left: 0; background: var(--glass-bg); z-index: 1; }
.fin-stmt-table tr:hover td { background: var(--surface-3); }
.fin-stmt-table tr:hover td:first-child { background: var(--surface-3); }
.fin-stmt-table .fin-row-header { color: var(--text-primary); font-weight: var(--fw-body); }
.fin-stmt-table .fin-row-total { border-top: 2px solid rgba(var(--purple-rgb), 0.3); color: var(--text-primary); }
.fin-stmt-table .fin-row-total td { padding-top: 8px; }
.fin-stmt-table .fin-val-neg { color: var(--accent-negative); }
.fin-stmt-table .fin-yoy-badge { display: block; font-size: 0.72em; font-weight: var(--fw-body); letter-spacing: 0.01em; line-height: 1.4; color: var(--text-subtle); }
.fin-stmt-table .fin-yoy-badge.pos { color: var(--accent-positive); }
.fin-stmt-table .fin-yoy-badge.neg { color: var(--accent-negative); }
.fin-trend-bar { position: absolute; left: 0; bottom: 0; height: 100%; border-radius: 2px; pointer-events: none; }
.fin-val-text { position: relative; z-index: 1; }
@media (max-width: 600px) {
    .fin-stmt-header { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
    .fin-stmt-table th:first-child, .fin-stmt-table td:first-child { min-width: 120px; }
}

.fin-stmt-dl {
    display: block;
    margin: 12px 0 0 auto;
    padding: 4px 12px;
    font-size: var(--text-2xs);
    font-family: var(--font-body);
    font-weight: var(--fw-body);
    color: var(--text-subtle);
    background: transparent;
    border: 1px solid var(--surface-4);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.fin-stmt-dl:hover { border-color: var(--accent-purple, #a855f7); color: var(--text-secondary); }

/* ═══ Analyst Rating Changes ═══ */
#analyst-ratings-section h2 { margin: 0 0 14px; font-size: var(--text-base); font-weight: var(--fw-body); }
.rating-changes-list { display: flex; flex-direction: column; gap: var(--space-6); }
.rating-change-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-1); border-radius: var(--radius-sm); font-size: var(--text-2xs); font-weight: var(--fw-body); flex-wrap: wrap; }
.rating-change-date { color: var(--text-subtle); min-width: 70px; flex-shrink: 0; }
.rating-change-firm { color: var(--text-secondary); min-width: 100px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating-action { padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--text-2xs); white-space: nowrap; flex-shrink: 0; }
.rating-upgrade { background: rgba(var(--green-rgb),0.12); color: var(--accent-positive); }
.rating-downgrade { background: rgba(var(--red-rgb),0.12); color: var(--accent-negative); }
.rating-maintain { background: var(--surface-5); color: var(--text-subtle); }
.rating-grade { color: var(--text-tertiary); flex-shrink: 0; }
.rating-pt { color: var(--text-primary); flex-shrink: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
    .rating-change-row { gap: var(--space-4); }
    .rating-change-firm { min-width: 0; }
    .rating-grade { display: none; }
}

/* ═══ Institutional Ownership ═══ */
#institutional-section h2 { margin: 0 0 14px; font-size: var(--text-base); font-weight: var(--fw-body); }
.inst-badge {
    font-size: var(--text-2xs);
    color: var(--accent-gold, rgba(var(--gold-rgb),0.9));
    background: rgba(var(--gold-rgb),0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 300;
}
.inst-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-bottom: 14px; }
.inst-kpi { text-align: center; padding: 10px 8px; background: var(--surface-1); border: 1px solid var(--surface-4); border-radius: var(--radius-md); }
.inst-kpi-val { font-size: var(--text-sm); font-weight: var(--fw-body); color: var(--text-primary); margin-bottom: 2px; }
.inst-kpi-label { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); }
.inst-interp { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-tertiary); line-height: var(--lh-relaxed); padding: 10px 12px; background: rgba(var(--purple-rgb),0.04); border-left: 2px solid rgba(var(--purple-rgb),0.3); border-radius: var(--radius-sm); margin-bottom: 14px; }
.inst-flow { margin-bottom: 14px; }
.inst-flow-bar { height: 8px; border-radius: var(--radius-full); background: rgba(var(--red-rgb),0.25); overflow: hidden; margin-bottom: 6px; }
.inst-flow-pos { height: 100%; background: rgba(var(--green-rgb),0.5); border-radius: var(--radius-full); }
.inst-flow-labels { display: flex; justify-content: space-between; font-size: var(--text-2xs); font-weight: var(--fw-body); }
.inst-holders-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.inst-holders-table { width: 100%; border-collapse: collapse; font-size: var(--text-2xs); font-weight: var(--fw-body); }
.inst-holders-table th { text-align: left; color: var(--text-subtle); padding: 6px 8px; border-bottom: 1px solid var(--surface-4); font-weight: var(--fw-body); letter-spacing: var(--ls-normal); }
.inst-holders-table td { padding: 6px 8px; color: var(--text-secondary); border-bottom: 1px solid var(--surface-2); }
.inst-holders-table tr:hover { background: var(--surface-3); }
.inst-holders-table td:nth-child(2),
.inst-holders-table td:nth-child(3),
.inst-holders-table td:nth-child(4),
.inst-holders-table th:nth-child(2),
.inst-holders-table th:nth-child(3),
.inst-holders-table th:nth-child(4) { text-align: right; }
@media (max-width: 600px) {
    .inst-holders-table td:nth-child(3), .inst-holders-table th:nth-child(3) { display: none; }
}

/* ═══ Congressional Trading ═══ */
#congressional-section h2 { margin: 0 0 14px; font-size: var(--text-base); font-weight: var(--fw-body); }
.congress-table { width: 100%; border-collapse: collapse; font-size: var(--text-2xs); font-weight: var(--fw-body); }
.congress-table th { text-align: left; color: var(--text-subtle); padding: 6px 8px; border-bottom: 1px solid var(--surface-4); font-weight: var(--fw-body); letter-spacing: var(--ls-normal); }
.congress-table td { padding: 6px 8px; color: var(--text-secondary); border-bottom: 1px solid var(--surface-2); }
.congress-table tr:hover { background: var(--surface-3); }
.congress-table td:nth-child(4),
.congress-table td:nth-child(5),
.congress-table th:nth-child(4),
.congress-table th:nth-child(5) { text-align: right; }
@media (max-width: 600px) {
    .congress-table td:nth-child(2), .congress-table th:nth-child(2),
    .congress-table td:nth-child(5), .congress-table th:nth-child(5) { display: none; }
}

/* ═══ SEC Filings ═══ */
#sec-filings-section h2 { margin: 0 0 14px; font-size: var(--text-base); font-weight: var(--fw-body); }
.sec-filings-list { display: flex; flex-direction: column; gap: var(--space-6); }
.sec-filing-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-1); border-radius: var(--radius-sm); transition: var(--transition-fast); }
.sec-filing-item:hover { background: var(--surface-3); }
.sec-badge { font-size: var(--text-2xs); font-weight: var(--fw-body); padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0; background: var(--surface-5); color: var(--text-subtle); min-width: 40px; text-align: center; }
.sec-badge--annual { background: rgba(var(--gold-rgb),0.12); color: var(--accent-gold, rgba(var(--gold-rgb),0.9)); }
.sec-badge--quarterly { background: rgba(var(--purple-rgb),0.12); color: var(--accent-purple, #a855f7); }
.sec-badge--event { background: rgba(var(--green-rgb),0.10); color: var(--accent-positive); }
.sec-filing-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sec-filing-title { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-secondary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.sec-filing-title:hover { color: var(--accent-purple, #a855f7); }
.sec-filing-date { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); }
.sec-view-all { display: block; text-align: center; margin-top: 12px; padding: 8px; font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--accent-purple, #a855f7); text-decoration: none; border: 1px solid var(--surface-4); border-radius: var(--radius-md); transition: var(--transition-fast); }
.sec-view-all:hover { background: var(--surface-3); border-color: var(--accent-purple, #a855f7); }

/* ═══ Executive Compensation ═══ */
#exec-comp-section h2 { margin: 0 0 14px; font-size: var(--text-base); font-weight: var(--fw-body); }
.exec-comp-list { display: flex; flex-direction: column; gap: var(--space-10); }
.exec-comp-row { display: flex; flex-direction: column; gap: 4px; }
.exec-comp-info { display: flex; align-items: baseline; gap: 8px; }
.exec-comp-name { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-primary); }
.exec-comp-title { font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-comp-total { font-size: var(--text-xs); font-weight: var(--fw-body); color: var(--text-primary); }
.exec-comp-year { font-size: var(--text-2xs); color: var(--text-subtle); }
.exec-comp-bar { display: flex; height: 6px; border-radius: var(--radius-full); overflow: hidden; min-width: 40px; }
.exec-bar-salary { background: var(--accent-purple, #a855f7); }
.exec-bar-stock { background: var(--accent-positive, #22c55e); }
.exec-bar-option { background: rgba(var(--gold-rgb),0.7); }
.exec-bar-bonus { background: var(--accent-blue); }
.exec-bar-other { background: rgba(255,255,255,0.15); }
.exec-comp-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--surface-4); }
.exec-legend-item { display: flex; align-items: center; gap: 4px; font-size: var(--text-2xs); font-weight: var(--fw-body); color: var(--text-subtle); }
.exec-legend-dot { width: 8px; height: 8px; border-radius: var(--radius-full); display: inline-block; }

/* Revenue Breakdown */
.rev-year-badge {
    font-size: var(--text-2xs);
    color: var(--accent-gold, rgba(var(--gold-rgb),0.9));
    background: rgba(var(--gold-rgb),0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 300;
}
.rev-donut-wrap { display: flex; justify-content: center; margin: 0.5rem 0 1rem; }
.rev-bars { display: flex; flex-direction: column; gap: 8px; }
.rev-row {
    display: grid;
    grid-template-columns: 140px 1fr 70px;
    align-items: center;
    gap: 10px;
}
.rev-name {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rev-bar-wrap {
    height: 10px;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.rev-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.6s ease, filter 0.15s ease;
}
.rev-row:hover .rev-bar { filter: brightness(1.4); }
.rev-row:hover .rev-name { color: var(--text-primary); }
.rev-row:hover .rev-val { color: var(--text-primary); }
.rev-row { cursor: default; transition: background var(--transition-fast); border-radius: var(--radius-sm); padding: 3px 6px; margin: -3px -6px; }
.rev-row:hover { background: var(--surface-3); }
.rev-val {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    color: var(--text-tertiary);
    text-align: right;
}
.rev-pct { color: var(--text-subtle); font-size: var(--text-2xs); margin-left: 2px; }
.rev-yoy { font-size: var(--text-2xs); margin-left: 4px; font-weight: var(--fw-body); }
.rev-type-label {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    color: var(--text-subtle);
    letter-spacing: var(--ls-open);
    padding: 10px 0 4px;
}
@media (max-width: 600px) {
    .rev-row { grid-template-columns: 100px 1fr 60px; }
}

/* Relative Performance */
.relperf-period { display: flex; flex-direction: column; gap: 5px; }
.relperf-period-label {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    letter-spacing: var(--ls-wide);
}
.relperf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    padding: 3px 6px;
    margin: -3px -6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.relperf-row:hover { background: var(--surface-3); }
.relperf-row:hover .relperf-name { color: var(--text-primary); }
.relperf-row:hover .relperf-bar-fill { filter: brightness(1.3); }
.relperf-name {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-tertiary);
    min-width: 50px;
    flex-shrink: 0;
}
.relperf-bar-wrap {
    flex: 1;
    height: 14px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}
.relperf-bar-center {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.15);
    z-index: 2;
}
.relperf-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: var(--radius-md);
    transition: width 0.6s cubic-bezier(0.22,1,0.36,1), left 0.6s cubic-bezier(0.22,1,0.36,1);
}
.relperf-bar-fill.relperf-pos { background: linear-gradient(90deg, rgba(34,197,94,0.6), rgba(34,197,94,0.9)); }
.relperf-bar-fill.relperf-neg { background: linear-gradient(270deg, rgba(239,68,68,0.6), rgba(239,68,68,0.9)); }
.relperf-bar-fill.relperf-sector { background: linear-gradient(90deg, rgba(var(--purple-rgb),0.3), rgba(var(--purple-rgb),0.6)); }
.relperf-val {
    font-size: var(--text-2xs);
    font-weight: 300;
    min-width: 52px;
    text-align: right;
    flex-shrink: 0;
}

/* Factor Profile */
.factor-badge {
    font-size: var(--text-2xs);
    font-weight: 300;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.factor-radar {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}
.factor-radar svg { max-width: 360px; width: 100%; height: auto; }
.factor-radar-grid { fill: none; stroke: var(--s2); stroke-width: 0.5; }
.factor-radar-axis { stroke: rgba(255,255,255,0.08); stroke-width: 0.5; }
.factor-radar-area {
    fill: url(#factorGradient);
    stroke: var(--accent-purple);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 8px rgba(var(--purple-rgb),0.3));
    animation: radarDraw 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes radarDraw {
    from { opacity: 0; transform: scale(0.3); transform-origin: center; }
    to { opacity: 1; transform: scale(1); transform-origin: center; }
}
.factor-radar-dot {
    fill: var(--accent-purple);
    r: 4;
    filter: drop-shadow(0 0 4px rgba(var(--purple-rgb),0.5));
    animation: radarDraw 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
.factor-radar-label {
    font-size: var(--text-2xs);
    font-weight: 300;
    fill: var(--text-secondary);
    font-family: var(--font-body);
    text-anchor: middle;
}
.factor-radar-ring-label {
    font-size: var(--text-2xs);
    font-weight: 300;
    fill: rgba(255,255,255,0.35);
    font-family: var(--font-body);
}
.factor-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}
.factor-legend-info {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-2xs);
    color: var(--text-tertiary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--b1);
    margin-bottom: 4px;
    cursor: help;
}
.info-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: var(--text-3xs);
    font-weight: 300;
    color: var(--text-tertiary);
}
.factor-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-2xs);
    font-weight: 300;
}
.factor-legend-score {
    font-size: var(--text-xs);
    font-weight: 300;
    min-width: 28px;
}
.factor-legend-detail { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.factor-legend-label { color: var(--text-subtle); }
.factor-legend-bar { height: 3px; background: var(--surface-5); border-radius: var(--radius-micro); overflow: hidden; }
.factor-legend-bar-fill { height: 100%; border-radius: var(--radius-micro); transition: width 0.6s cubic-bezier(0.22,1,0.36,1); }
.factor-score-high { color: var(--accent-positive); background: rgba(34,197,94,0.12); }
.factor-score-mid { color: var(--accent-gold); background: rgba(var(--gold-rgb),0.12); }
.factor-score-low { color: var(--accent-negative); background: rgba(239,68,68,0.12); }
.factor-score-na { color: var(--text-tertiary); background: var(--surface-5); font-style: italic; }
.factor-radar-dot-na { opacity: 0; }
.factor-peer-legend{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;padding-top:8px;border-top:1px solid var(--b2)}
.factor-peer-tag{font-size:var(--text-2xs);color:var(--text-subtle);background:var(--surface-5);border:1px solid rgba(255,255,255,0.08);border-radius:var(--radius-sm);padding:2px 7px;font-weight:300}
@media (max-width: 600px) {
    .factor-legend { grid-template-columns: repeat(2, 1fr); }
}

/* Forward Estimates */
.fwd-count-badge {
    font-size: var(--text-2xs);
    color: var(--accent-gold, rgba(var(--gold-rgb),0.9));
    background: rgba(var(--gold-rgb),0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 300;
}
/* Forward estimates charts */
.fwd-chart-wrap { display: flex; flex-direction: column; gap: 12px; }
.fwd-chart-container { position: relative; }
.fwd-pe-row {
    display: flex; justify-content: space-around; gap: 8px;
    padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 8px;
}
.fwd-pe-item { text-align: center; }
.fwd-pe-year { font-size: var(--text-2xs); color: var(--text-subtle); font-weight: 300; }
.fwd-pe-val { font-size: var(--text-sm); font-weight: 300; color: var(--text-primary); }
.fwd-pe-analysts { font-size: 9px; color: var(--text-subtle); font-weight: 300; }

/* AI Widget styles */
.stock-ai-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stock-ai-section h2::before {
    content: '\2728';
    font-size: var(--text-xs);
}

.why-cheap-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 18px;
    background: rgba(var(--purple-rgb),0.15);
    border: 1px solid rgba(var(--purple-rgb),0.3);
    border-radius: var(--radius-full);
    color: var(--accent-purple-light);
    font-size: var(--text-xs);
    font-family: inherit;
    font-weight: var(--fw-body);
    cursor: pointer;
    transition: all var(--transition-base);
}
.why-cheap-btn:hover {
    background: rgba(var(--purple-rgb),0.25);
    border-color: rgba(var(--purple-rgb),0.5);
    color: var(--accent-purple-lighter);
}
.why-cheap-btn:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }
.why-cheap-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.why-cheap-result {
    margin-top: 16px;
    padding: 16px 20px;
    background: rgba(var(--purple-rgb),0.06);
    border: 1px solid rgba(var(--purple-rgb),0.15);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    line-height: var(--lh-loose);
    color: rgba(var(--white-rgb),0.85);
}
.why-cheap-result strong {
    font-weight: var(--fw-body);
    color: var(--text-primary);
}


.ai-research-summary {
    margin: 0 0 20px;
    padding: 16px 20px;
    background: rgba(var(--purple-rgb),0.05);
    border: 1px solid rgba(var(--purple-rgb),0.12);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    line-height: var(--lh-loose);
    color: rgba(var(--white-rgb),0.85);
}
.ai-research-summary strong {
    font-weight: var(--fw-body);
    color: var(--text-primary);
}

.ai-compare-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.ai-compare-label {
    font-size: var(--text-xs);
    letter-spacing: 0.5px;
    color: var(--text-subtle);
}
.ai-compare-chip {
    padding: 5px 14px;
    background: rgba(var(--purple-rgb),0.1);
    border: 1px solid rgba(var(--purple-rgb),0.2);
    border-radius: var(--radius-lg);
    color: var(--accent-purple-light);
    font-size: var(--text-xs);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
}
.ai-compare-chip:hover {
    background: rgba(var(--purple-rgb),0.2);
    border-color: rgba(var(--purple-rgb),0.4);
}
.ai-compare-chip:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }
.ai-compare-chip:disabled {
    opacity: 0.5;
    cursor: wait;
}
.ai-compare-result {
    margin-top: 16px;
    padding: 16px 20px;
    background: rgba(var(--purple-rgb),0.05);
    border: 1px solid rgba(var(--purple-rgb),0.12);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    line-height: var(--lh-loose);
    color: rgba(var(--white-rgb),0.85);
}
.ai-compare-result strong {
    font-weight: var(--fw-body);
    color: var(--text-primary);
}
/* ── Earnings Transcript ── */
.et-card {
    padding: 4px;
    border-left: 3px solid var(--accent-gold);
}
.et-header {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 3px;
}
.et-title {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
}
.et-summary {
    font-size: var(--text-2xs);
    font-weight: 300;
    line-height: var(--lh-relaxed);
    color: var(--text-secondary);
}
.et-summary strong {
    font-weight: var(--fw-body);
    color: var(--text-primary);
}
.et-preview {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    line-height: var(--lh-relaxed);
    font-style: italic;
}
.et-prev {
    display: flex;
    gap: 2px;
    margin-top: 3px;
    flex-wrap: wrap;
}
.et-prev-badge {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--text-subtle);
    padding: 2px 8px;
    background: var(--surface-5);
    border-radius: var(--radius-sm);
}

.ai-compare-full-link {
    display: block;
    margin-top: 12px;
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--accent-purple);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.ai-compare-full-link:hover {
    color: var(--accent-gold);
}


/* Loading / shimmer */
.stock-loading {
    background: linear-gradient(90deg,
        rgba(var(--white-rgb),0.04) 0%,
        rgba(var(--white-rgb),0.08) 50%,
        rgba(var(--white-rgb),0.04) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    border-radius: var(--radius-md);
}


.shimmer-text {
    height: 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.shimmer-price {
    height: 28px;
    width: 160px;
    border-radius: var(--radius-sm);
}

.shimmer-metric {
    height: 60px;
    border-radius: var(--radius-md);
}

.shimmer-chart {
    height: 240px;
    border-radius: var(--radius-md);
}
#price-chart-container {
    max-height: 260px;
}

/* ═══ Chart Pair Layout ═══ */
.chart-pair {
    display: flex;
    gap: 4px;
}
.chart-pair > * {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

/* ═══ Responsive — Tablet ═══ */
@media (max-width: 1100px) {
    .stock-container { padding: 20px 16px; }
    .stock-metrics-grid { gap: 8px; }
}

/* ═══ Responsive — Mobile ═══ */
@media (max-width: 768px) {
    .stock-container { padding: 12px; }

    /* Hero: stack vertically */
    .stock-hero { margin-bottom: 14px; }
    .stock-hero-top {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-6);
    }
    .stock-hero h1 {
        font-size: var(--text-lg);
        white-space: normal;
        line-height: var(--lh-snug);
    }
    .stock-price { font-size: var(--text-lg); }
    .stock-price-row { flex-wrap: wrap; gap: var(--space-8); }

    /* Tab actions: hide on mobile to give tabs full width */
    .stock-tab-actions { display: none; }

    /* Glass cards: reduce padding */
    .stock-glass { padding: 16px; margin-top: 16px; }
    .chart-pair { flex-direction: column; }
    .chart-pair > * { margin-top: 0; }
    .stock-glass h2 { font-size: var(--text-xs); margin-bottom: 12px; }

    /* Price chart: full width, shorter */
    #priceChart { height: 220px; }
    .shimmer-chart { height: 220px; }
    .stock-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-8);
    }
    .stock-chart-header > div:first-child { width: 100%; justify-content: space-between; }
    .stock-range-btns { gap: var(--space-4); margin-bottom: 8px; flex-wrap: wrap; }
    .stock-range-btn { padding: 5px 10px; }

    /* Metrics: 2-col .capital cards */
    .stock-metric-card { flex: 1 1 calc(50% - 4px); min-width: 80px; padding: 14px 6px 12px; }
    .stock-metric-value { font-size: 22px; }

    /* Research targets: 2 columns */
    .stock-targets {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
    .stock-target-card { padding: var(--card-pad-sm); }
    .stock-target-price { font-size: var(--text-xs); }
    .stock-target-current::after { display: none; }

    /* Catalysts/Risks: single column */
    .stock-two-col {
        grid-template-columns: 1fr;
        gap: var(--space-14);
    }

    /* Peers table: horizontal scroll */
    #peers-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .stock-peers-table { min-width: 520px; }
    .stock-peers-table th,
    .stock-peers-table td { padding: 6px 8px; white-space: nowrap; }
    .peers-compare-table { min-width: 580px; }
    .peers-col-name { max-width: 120px; }

    /* DCF: stack results */
    .dcf-results { flex-direction: column; align-items: flex-start; }
    .dcf-compare { flex-direction: row; flex-wrap: wrap; }
    .dcf-breakdown { font-size: var(--text-2xs); gap: var(--space-4); padding: 6px 10px; }
    .dcf-result-price { font-size: var(--text-md); }
    .dcf-scenarios { flex-wrap: wrap; }
    .dcf-viz-area { height: 140px; }
    .dcf-viz-yaxis { width: 36px; }
    .dcf-viz-y2 { display: none; }
    .dcf-viz-bar span { font-size: var(--text-2xs); }

    /* Key Issues: single column */
    .key-issue-views { grid-template-columns: 1fr; }
    .key-issue-card { padding: var(--card-pad-md); }

    /* Analyst */
    .analyst-grid { grid-template-columns: 1fr; gap: var(--space-12); }

    /* Estimates table */

    /* AI section */
    .ai-compare-chips { gap: var(--space-6); }
    .why-cheap-btn { padding: 7px 14px; }
    .why-cheap-result,
    .ai-compare-result,
    .ai-research-summary { padding: 12px 14px; }

    /* Technical pills: wrap tighter */
    .technical-indicators { gap: var(--space-6); }
    .tech-pill { padding: 3px 10px; }
}

/* ═══ Responsive — Small Mobile ═══ */
@media (max-width: 480px) {
    .stock-container { padding: 10px; }
    .stock-hero h1 { font-size: var(--text-md); }
    .stock-price { font-size: var(--text-md); }
    #priceChart { height: 220px; }
    .shimmer-chart { height: 220px; }
    .stock-glass { padding: 12px; margin-top: 12px; }
    .stock-metric-card { padding: 12px 6px 10px; }
    .stock-metric-value { font-size: 20px; }
    .stock-target-price { font-size: var(--text-xs); }
    .dcf-result-price { font-size: var(--text-base); }
}

/* ═══ Responsive — Android compact (360-412px) ═══ */
@media (max-width: 390px) {
    .stock-container { padding: 8px; }
    .stock-hero { gap: var(--space-2); }
    .stock-hero h1 { font-size: var(--text-sm); }
    .stock-price { font-size: var(--text-sm); }
    .stock-glass { padding: 10px; margin-top: 10px; }
    .stock-metric-grid { gap: var(--space-2); }
    .stock-metric-card { padding: 10px 4px 8px; flex: 1 1 calc(50% - 4px); }
    .stock-metric-value { font-size: 18px; }
    .hero-quick-nav { gap: var(--space-1); }
    .hero-nav-pill { padding: 4px 8px; font-size: var(--text-2xs); }
    .stock-stance-strip { gap: var(--space-2); font-size: var(--text-2xs); }
    .today-narrative { padding: var(--space-3); }
    .today-text { font-size: var(--text-xs); }
    .key-issue-card { padding: var(--space-3); }
    #priceChart { height: 160px; }
    .shimmer-chart { height: 160px; }
}

/* ── Analyst Consensus ── */
.analyst-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-24);
    align-items: center;
}

.analyst-rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    letter-spacing: var(--ls-open);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid;
    margin-bottom: 6px;
}

.analyst-count {
    font-size: var(--text-xs);
    color: var(--text-subtle);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.analyst-upside {
    font-size: var(--text-sm);
    font-weight: var(--fw-body);
}

.analyst-upside.positive { color: var(--accent-positive); }
.analyst-upside.negative { color: var(--accent-negative); }

/* Target range bar */
.target-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.target-label-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.target-label-mid {
    align-items: center;
}

.target-label-name {
    font-size: var(--text-xs);
    letter-spacing: 0.5px;
    color: var(--text-subtle);
}

.target-label-val {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
}

.target-range-bar {
    position: relative;
    height: 6px;
    background: var(--surface-6);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.target-range-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(var(--red-rgb),0.4) 0%, rgba(var(--gold-rgb),0.6) 50%, rgba(var(--green-rgb),0.4) 100%);
    border-radius: var(--radius-sm);
}

.target-range-mid {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent-gold);
    border-radius: 50%;
    border: 2px solid rgba(var(--navy-rgb),0.8);
}

.target-range-current {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid rgba(var(--navy-rgb),0.8);
    z-index: 2;
}

.target-range-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--text-subtle);
    margin-top: 4px;
}

.target-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.target-legend-dot.current { background: #fff; }
.target-legend-dot.consensus { background: var(--accent-gold); }

/* ── Earnings Upcoming / Recent ── */
.earnings-upcoming {
    max-width: 900px;
    margin: 0 auto 16px;
    padding: 0 20px;
}
.earnings-upcoming-card {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    padding: var(--card-pad-md);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}
.earnings-upcoming-card.upcoming {
    border-left: 3px solid var(--accent-gold, #d4af37);
}
.earnings-upcoming-card.reported {
    border-left: 3px solid var(--accent-purple);
}
.earnings-countdown {
    font-size: var(--text-lg);
    font-weight: var(--fw-body);
    color: var(--accent-gold, #d4af37);
    line-height: var(--lh-tight);
    min-width: 44px;
    text-align: center;
}
.earnings-upcoming-card.reported .earnings-countdown {
    color: var(--accent-purple);
    font-size: var(--text-base);
}
.earnings-link-inline {
    display: inline-block;
    margin-top: 8px;
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--accent-purple);
    text-decoration: none;
    letter-spacing: var(--ls-normal);
    transition: opacity var(--transition-fast);
}
.earnings-link-inline:hover {
    opacity: var(--hover-opacity);
}
.earnings-upcoming-info {
    flex: 1;
    min-width: 0;
}
.earnings-upcoming-title {
    font-size: var(--text-sm);
    font-weight: var(--fw-body);
    color: var(--text-primary);
    margin-bottom: 2px;
}
.earnings-upcoming-meta {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-tertiary);
}
.earnings-prob-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.earnings-prob-badge,
.earnings-move-badge {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(var(--green-rgb), 0.12);
    color: rgba(var(--green-rgb), 0.9);
}
.earnings-move-badge {
    background: rgba(var(--purple-rgb), 0.12);
    color: rgba(var(--purple-rgb), 0.9);
}
.earnings-surprise-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}
.earnings-surprise-inline .beat { color: var(--accent-positive); }
.earnings-surprise-inline .miss { color: var(--accent-negative); }
.earnings-estimates-mini {
    display: flex;
    gap: var(--space-20);
    margin-top: 8px;
}
.earnings-est-item {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: var(--fw-body);
}
.earnings-est-item strong {
    font-weight: var(--fw-body);
    color: var(--text-secondary);
}
@media (max-width: 600px) {
    .earnings-upcoming { padding: 0 12px; }
    .earnings-upcoming-card { padding: var(--card-pad-sm); gap: var(--space-12); }
    .earnings-countdown { font-size: var(--text-base); min-width: 36px; }
    .earnings-estimates-mini { gap: var(--space-12); }
}

/* ── Earnings Record ── */
.earnings-record {
    margin-bottom: 20px;
}

.earnings-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.earnings-badge {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid;
}

.earnings-badge.beat {
    color: var(--accent-positive);
    background: rgba(var(--green-rgb),0.12);
    border-color: rgba(var(--green-rgb),0.25);
}

.earnings-badge.miss {
    color: var(--accent-negative);
    background: rgba(var(--red-rgb),0.12);
    border-color: rgba(var(--red-rgb),0.25);
}

.earnings-badge.streak {
    color: var(--accent-positive);
    background: rgba(var(--green-rgb),0.08);
    border-color: rgba(var(--green-rgb),0.15);
}

.earnings-badge.miss-streak {
    color: var(--accent-negative);
    background: rgba(var(--red-rgb),0.08);
    border-color: rgba(var(--red-rgb),0.15);
}

.earnings-badge.date {
    color: var(--text-subtle);
    background: var(--surface-3);
    border-color: rgba(var(--white-rgb),0.08);
    font-weight: var(--fw-body);
}


/* Technical Analysis Section */
.stock-technical-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stock-technical-section h2::before {
    content: '\1F4CA';
    font-size: var(--text-xs);
}

.stock-technical-content {
    font-size: var(--text-xs);
    line-height: var(--lh-loose);
    color: rgba(var(--white-rgb),0.85);
}
.stock-technical-content strong {
    font-weight: var(--fw-body);
    color: var(--text-primary);
}

.technical-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    border: 1px solid;
}
.tech-pill.positive {
    background: rgba(var(--green-rgb),0.1);
    border-color: rgba(var(--green-rgb),0.25);
    color: var(--accent-positive);
}
.tech-pill.negative {
    background: rgba(var(--red-rgb),0.1);
    border-color: rgba(var(--red-rgb),0.25);
    color: var(--accent-negative);
}
.tech-pill.neutral {
    background: var(--surface-4);
    border-color: rgba(var(--white-rgb),0.12);
    color: var(--text-subtle);
}
.tech-pill.warning {
    background: rgba(var(--gold-rgb),0.1);
    border-color: rgba(var(--gold-rgb),0.25);
    color: var(--text-primary);
}

/* Peer Comparison Narrative */
.peer-narrative {
    font-size: var(--text-xs);
    line-height: var(--lh-relaxed);
    color: var(--text-subtle);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--surface-1);
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-3);
}
.peer-narrative strong { color: var(--text-primary); font-weight: var(--fw-body); }
.peer-nar-loading { color: var(--text-subtle); font-size: var(--text-xs); }

/* DCF Price Target Builder */
.dcf-subtitle { font-size: var(--text-xs); color: var(--text-subtle); }
.dcf-scenarios { display: flex; gap: var(--space-6); margin-bottom: 20px; }
.dcf-tab {
    padding: 6px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-6);
    background: var(--surface-2);
    color: var(--text-subtle);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.dcf-tab:hover { background: var(--surface-5); }
.dcf-tab:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; }
.dcf-tab.active { background: rgba(var(--purple-rgb),0.15); color: var(--accent-purple); border-color: rgba(var(--purple-rgb),0.3); }
.dcf-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-16); margin-bottom: 14px; }
.dcf-slider-group { display: flex; flex-direction: column; gap: var(--space-3); }
.dcf-slider-label { display: flex; justify-content: space-between; font-size: var(--text-2xs); color: var(--text-subtle); }
.dcf-slider-val { color: var(--text-secondary); font-weight: var(--fw-body); font-variant-numeric: tabular-nums; }
.dcf-sliders input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 3px;
    border-radius: var(--radius-micro);
    background: var(--surface-6);
    outline: none;
}
.dcf-sliders input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-purple);
    cursor: pointer;
    border: 2px solid rgba(var(--navy-rgb),0.8);
    transition: transform var(--transition-fast);
}
.dcf-sliders input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.dcf-sliders input[type=range]::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent-purple); cursor: pointer;
    border: 2px solid rgba(var(--navy-rgb),0.8);
}
.dcf-results { display: flex; gap: var(--space-16); align-items: center; margin-bottom: 12px; }
.dcf-result-main { flex-shrink: 0; }
.dcf-result-label { font-size: var(--text-2xs); color: var(--text-subtle); }
.dcf-result-price { font-size: var(--text-lg); font-weight: var(--fw-body); color: var(--text-primary); line-height: var(--lh-tight); }
.dcf-result-upside { font-size: var(--text-2xs); font-weight: var(--fw-body); margin-top: 3px; }
.dcf-up { color: var(--accent-positive); }
.dcf-down { color: var(--accent-negative); }
.dcf-flat { color: var(--text-subtle); }
.dcf-compare { display: flex; gap: 8px; flex: 1; }
.dcf-compare-item {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    text-align: center;
}
.dcf-compare-label { font-size: var(--text-2xs); color: var(--text-subtle); margin-bottom: 2px; }
.dcf-compare-val { font-size: var(--text-xs); font-weight: var(--fw-body); color: var(--text-secondary); }
.dcf-compare-item.dcf-up .dcf-compare-val { color: var(--accent-positive); }
.dcf-compare-item.dcf-down .dcf-compare-val { color: var(--accent-negative); }
.dcf-breakdown { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--text-2xs); color: var(--text-subtle); padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-md); margin-bottom: 14px; }
.dcf-breakdown b { color: var(--text-secondary); font-weight: var(--fw-body); }
.dcf-bd-sep { color: var(--text-subtle); opacity: 0.5; }
.dcf-no-data { font-size: var(--text-xs); color: var(--text-subtle); text-align: center; padding: 20px 0; }
/* DCF Projection Chart */
.dcf-viz { margin: 20px 0 16px; padding-top: 16px; border-top: 1px solid var(--surface-3); overflow: hidden; }
.dcf-viz-header { font-size: var(--text-xs); font-weight: 300; color: var(--text-tertiary); margin-bottom: 12px; }
.dcf-viz-area { display: flex; gap: 4px; height: 180px; margin-bottom: 10px; }
.dcf-viz-yaxis { display: flex; flex-direction: column; justify-content: space-between; width: 42px; flex-shrink: 0; }
.dcf-viz-yaxis span { font-size: var(--text-2xs); font-weight: 300; color: var(--text-subtle); text-align: right; font-variant-numeric: tabular-nums; }
.dcf-viz-y2 { text-align: left; }
.dcf-viz-y2 span { text-align: left; color: var(--accent-gold); opacity: 0.6; }
.dcf-viz-bars { flex: 1; display: flex; gap: 4px; position: relative; border-left: 1px solid var(--surface-4); border-bottom: 1px solid var(--surface-4); padding: 0 4px; }
.dcf-viz-group { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.dcf-viz-stack { width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; height: 100%; }
.dcf-viz-bar { border-radius: var(--radius-micro) var(--radius-micro) 0 0; display: flex; align-items: flex-start; justify-content: center; transition: height 0.4s ease, opacity 0.15s ease; min-width: 16px; max-width: 36px; flex: 1; overflow: hidden; cursor: default; }
.dcf-viz-group:hover .dcf-viz-bar { opacity: var(--hover-opacity); }
.dcf-viz-group:hover .dcf-viz-bar span { color: rgba(255,255,255,0.9); }
.dcf-viz-bar span { font-size: var(--text-2xs); font-weight: 300; color: var(--text-subtle); padding-top: 3px; white-space: nowrap; }
.dcf-viz-rev { background: linear-gradient(180deg, rgba(var(--purple-rgb),0.5), rgba(var(--purple-rgb),0.15)); }
.dcf-viz-fcf { background: linear-gradient(180deg, rgba(34,197,94,0.5), rgba(34,197,94,0.15)); }
.dcf-viz-label { font-size: var(--text-2xs); font-weight: 300; color: var(--text-subtle); margin-top: 4px; }
.dcf-viz-line { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.dcf-viz-legend { display: flex; gap: var(--space-14); justify-content: center; flex-wrap: wrap; }
.dcf-viz-legend span { display: flex; align-items: center; gap: 4px; font-size: var(--text-2xs); font-weight: 300; color: var(--text-subtle); }
.dcf-viz-swatch { width: 10px; height: 10px; border-radius: var(--radius-micro); }
.dcf-viz-swatch-rev { background: rgba(var(--purple-rgb),0.4); }
.dcf-viz-swatch-fcf { background: rgba(34,197,94,0.4); }
.dcf-viz-swatch-margin { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-gold); }

/* FCF Waterfall Chart */
.stock-waterfall-wrap { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--surface-3); }
.stock-waterfall-wrap canvas { max-height: 280px; }
.stock-subsection-title {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-tertiary);
    margin: 0 0 12px;
    letter-spacing: var(--ls-open);
}

/* DCF responsive handled in consolidated section below */

/* ── Key Issues ── */
.stock-section-sub {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    margin: -4px 0 16px;
}
.section-source-tag {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    font-weight: 400;
    vertical-align: middle;
    margin-left: 6px;
    opacity: 0.6;
}
.key-issue-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--card-pad-md);
}
/* PRO gate — blur non-first issues for free users */
.key-issue-card.pro-gated {
    position: relative;
    user-select: none;
    pointer-events: none;
}
.key-issue-card.pro-gated .key-issue-views {
    filter: blur(6px);
    opacity: 0.5;
}
.key-issue-card.pro-gated .key-issue-title {
    filter: none;
    opacity: 1;
}
.pro-gate-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(var(--purple-rgb),0.12), rgba(var(--gold-rgb),0.08));
    border: 1px solid rgba(var(--gold-rgb),0.2);
    border-radius: var(--radius-lg);
}
.pro-gate-text {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-secondary);
}
.pro-gate-btn {
    font-size: var(--text-2xs);
    font-weight: 300;
    color: var(--accent-gold);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(var(--gold-rgb),0.3);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}
.pro-gate-btn:hover {
    background: rgba(var(--gold-rgb),0.1);
    border-color: var(--accent-gold);
}
.key-issue-title {
    font-size: var(--text-sm);
    font-weight: var(--fw-body);
    color: var(--text-primary);
    margin-bottom: 14px;
}
.key-issue-views {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-14);
}
.key-issue-view {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-1);
}
.key-issue-bullish { border-left: 3px solid rgba(var(--green-rgb),0.5); }
.key-issue-bearish { border-left: 3px solid rgba(var(--red-rgb),0.5); }
.key-issue-view-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    letter-spacing: var(--ls-open);
    margin-bottom: 8px;
}
.key-issue-bullish .key-issue-view-label { color: var(--accent-positive); }
.key-issue-bearish .key-issue-view-label { color: var(--accent-negative); }
.key-issue-view-text {
    font-size: var(--text-xs);
    line-height: var(--lh-relaxed);
    color: var(--text-tertiary);
    font-weight: var(--fw-body);
}
/* ── Value Drivers tug-of-war balance bar ── */
.vd-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: var(--surface-1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}
.vd-balance-label {
    font-size: 10px;
    font-weight: 300;
    white-space: nowrap;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.vd-balance-label strong { font-weight: 400; }
.vd-balance-opp  { color: var(--accent-positive); }
.vd-balance-risk { color: var(--accent-negative); }
.vd-balance-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    background: var(--s2);
}
.vd-balance-fill { height: 100%; transition: width 0.6s ease; }
.vd-balance-fill--opp  { background: var(--accent-positive); opacity: 0.75; }
.vd-balance-fill--risk { background: var(--accent-negative); opacity: 0.75; }
/* Key issues responsive handled in consolidated section below */

/* ── Peer Scatter Chart ── */
.scatter-tabs{display:flex;gap:4px;margin-bottom:12px;flex-wrap:wrap}
.scatter-tab{background:var(--surface-5);border:1px solid rgba(255,255,255,0.08);border-radius:var(--radius-sm);padding:4px 10px;color:var(--text-tertiary);font-size:var(--text-2xs);font-weight:300;cursor:pointer;transition:all var(--transition-fast)}
.scatter-tab:hover{background:var(--surface-7);color:var(--text-secondary)}
.scatter-tab.active{background:rgba(var(--purple-rgb),0.15);border-color:rgba(var(--purple-rgb),0.4);color:var(--text-primary)}
.stock-scatter-wrap {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-3);
}
.stock-scatter-wrap canvas {
    max-height: 300px;
    width: 100%;
    display: block;
}
.stock-subsection-title {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}
.scatter-note {
    color: var(--text-subtle);
    font-weight: var(--fw-body);
    margin: 6px 0 0;
    text-align: center;
}
.insider-chart-wrap { margin: 0.75rem 0; max-height: 220px; }

.eps-chart-wrap{margin:0.75rem 0 0;max-height:200px}
.rev-margin-chart-wrap{height:280px;position:relative;margin-top:8px}
.debt-equity-chart-wrap{height:280px;position:relative;margin-top:8px}
.ev-trend-chart-wrap{height:280px;position:relative;margin-top:8px}
.dividend-chart-wrap{height:260px;position:relative;margin-top:8px}
.eps-surprise-chart-wrap{height:260px;position:relative;margin-top:8px}
.ks-squeeze-bar{height:3px;background:var(--surface-6);border-radius:var(--radius-micro);margin:-0.25rem 0 0.5rem;overflow:hidden}
.ks-squeeze-fill{height:100%;border-radius:var(--radius-micro);transition:width 0.5s ease}

/* ── DCF Fair Value Indicator ── */
.dcf-fv-wrap{display:flex;gap:20px;align-items:center;flex-wrap:wrap;padding:4px 0}
.dcf-fv-kpi{text-align:center;min-width:80px}
.dcf-fv-val{font-size:var(--text-md);font-weight:300;color:var(--text-primary)}
.dcf-fv-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300;margin-top:2px}
.dcf-fv-upside{font-size:var(--text-md);font-weight:300}
.dcf-fv-upside.pos{color:var(--accent-positive)}
.dcf-fv-upside.neg{color:var(--accent-negative)}
.dcf-fv-bar-wrap{flex:1;min-width:160px}
.dcf-fv-bar-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300;margin-bottom:6px}
.dcf-fv-bar{height:24px;background:var(--surface-6);border-radius:var(--radius-md);overflow:hidden;position:relative}
.dcf-fv-bar-fill{height:100%;border-radius:var(--radius-md);transition:width 0.6s ease}
.dcf-fv-bar-fill.pos{background:linear-gradient(90deg,rgba(34,197,94,0.5),rgba(34,197,94,0.25))}
.dcf-fv-bar-fill.neg{background:linear-gradient(90deg,rgba(239,68,68,0.5),rgba(239,68,68,0.25))}
.dcf-fv-bar-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:var(--text-2xs);font-weight:300;white-space:nowrap;color:rgba(255,255,255,0.75)}
.dcf-fv-divider{width:1px;height:48px;background:var(--surface-7);flex-shrink:0}
.dcf-fv-range{font-size:var(--text-2xs);color:var(--text-tertiary);font-weight:300;margin-top:2px;font-style:italic}
.dcf-fv-note{width:100%;font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300;font-style:italic;margin-top:8px;padding-top:8px;border-top:1px solid var(--surface-4);line-height:1.5}
@media(max-width:600px){.dcf-fv-wrap{gap:var(--space-12)}.dcf-fv-divider{display:none}}

/* Analyst Price Target Consensus */
.pt-wrap{padding:4px 0}
.pt-kpis{display:flex;gap:var(--space-24);margin-bottom:16px;flex-wrap:wrap}
.pt-kpi{text-align:center;min-width:70px}
.pt-kpi-val{font-size:var(--text-md);font-weight:300;color:var(--text-primary)}
.pt-kpi-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300;margin-top:2px}
.pt-kpi-val.pos{color:var(--accent-positive)}
.pt-kpi-val.neg{color:var(--accent-negative)}
.pt-bar-section{position:relative;margin-bottom:10px}
.pt-bar-track{height:10px;border-radius:var(--radius-full);background:linear-gradient(90deg,rgba(239,68,68,0.35),rgba(34,197,94,0.35));position:relative;overflow:visible}
.pt-marker-consensus{position:absolute;top:-5px;width:3px;height:20px;background:rgba(var(--purple-rgb),0.85);border-radius:var(--radius-micro);transform:translateX(-50%)}
.pt-marker-current{position:absolute;top:-7px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:10px solid rgba(255,255,255,0.85);transform:translateX(-50%)}
.pt-bar-labels{display:flex;justify-content:space-between;margin-top:6px}
.pt-bar-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}
.pt-legend{display:flex;gap:var(--space-16);margin-top:10px;flex-wrap:wrap}
.pt-legend-item{display:flex;align-items:center;gap:6px;font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}
.pt-legend-dot{width:10px;height:10px;border-radius:var(--radius-micro)}
.pt-legend-dot.consensus{background:rgba(var(--purple-rgb),0.85)}
.pt-legend-dot.current{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:8px solid rgba(255,255,255,0.85)}
.pt-current-line{font-size:var(--text-xs);color:var(--text-secondary);font-weight:300;margin-top:2px}
@media(max-width:600px){.pt-kpis{gap:var(--space-14)}}

/* ── Key Stats Visual Redesign ── */
/* KPI grid: Market Cap + LTM P/E */
/* Key Stats section in main content (wider than sidebar) */
#key-stats-section .ks-kpi-grid{flex-wrap:wrap}
#key-stats-section .ks-stat-list{display:grid;grid-template-columns:repeat(2, 1fr);gap:0}
#key-stats-section .ks-stat{border-bottom:1px solid var(--border-subtle);padding:6px 12px 6px 0}
@media(max-width:600px){#key-stats-section .ks-kpi-grid{flex-wrap:wrap}#key-stats-section .ks-kpi{flex:1 1 calc(50% - 4px);min-width:80px}#key-stats-section .ks-stat-list{grid-template-columns:1fr}}
.ks-kpi-grid{display:flex;gap:8px;margin-bottom:var(--space-12)}
.ks-kpi{flex:1;text-align:center;padding:18px 6px 14px;border-radius:18px;position:relative;overflow:hidden;background:linear-gradient(170deg,rgba(139,92,246,.08),rgba(91,33,182,.02));border:.5px solid rgba(139,92,246,.1);backdrop-filter:blur(60px) saturate(1.3);-webkit-backdrop-filter:blur(60px) saturate(1.3);box-shadow:0 8px 32px rgba(0,0,0,.15)}
.ks-kpi::before{content:'';position:absolute;top:0;left:12%;right:12%;height:.5px;background:linear-gradient(90deg,transparent,rgba(196,181,253,.15),transparent)}
.ks-kpi-value{font-size:28px;font-weight:100;color:#c4b5fd;line-height:1;letter-spacing:-.06em;text-shadow:0 0 30px rgba(139,92,246,.15)}
.ks-kpi-label{font-size:9px;font-weight:300;color:rgba(255,255,255,.45);letter-spacing:.06em;text-transform:uppercase;margin-top:8px}

/* Quality Score bar */
.ks-quality{margin-bottom:var(--space-12)}
.ks-quality-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.ks-quality-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}
.ks-quality-value{font-size:var(--text-xs);color:var(--text-primary);font-weight:300}
.ks-quality-bar{height:5px;background:var(--surface-6);border-radius:var(--radius-full);overflow:hidden}
.ks-quality-fill{height:100%;border-radius:var(--radius-full);transition:width 0.6s ease}

/* 52-Week Range track */
.ks-range{margin-bottom:var(--space-12)}
.ks-range-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300;margin-bottom:6px}
.ks-range-track{position:relative;height:6px;background:var(--surface-6);border-radius:var(--radius-full);overflow:visible;margin-bottom:4px}
.ks-range-fill{position:absolute;left:0;top:0;height:100%;background:rgba(var(--purple-rgb),0.7);border-radius:var(--radius-full);pointer-events:none}
.ks-range-dot{position:absolute;top:50%;width:12px;height:12px;background:var(--text-primary);border:2px solid rgba(var(--purple-rgb),0.85);border-radius:var(--radius-full);transform:translate(-50%,-50%);transition:left 0.6s ease}
.ks-range-values{display:flex;justify-content:space-between;font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}

/* Simple stat rows (value left, label right) */
.ks-stat-list{display:flex;flex-direction:column;gap:0;margin-bottom:var(--space-12)}
.ks-stat{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid var(--border-subtle)}
.ks-stat:last-child{border-bottom:none}
.ks-stat-value{font-size:var(--text-xs);color:var(--text-primary);font-weight:300}
.ks-stat-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300;text-align:right}

/* Piotroski F-Score dots */
.ks-score-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-top:1px solid var(--border-subtle)}
.ks-score-label{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}
.ks-dots{display:flex;gap:4px;align-items:center}
.ks-score{font-size:var(--text-xs);font-weight:300;margin-right:2px}
.ks-dot{width:9px;height:9px;border-radius:var(--radius-full);background:var(--surface-6);flex-shrink:0}
.ks-dot--filled{/* color set inline by JS */}
.ks-label{font-size:var(--text-2xs);color:var(--text-subtle);margin-left:4px}

/* Altman Z-Score zone bar */
.ks-zone-wrap{padding:var(--space-8) 0 0}
.ks-zone-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.ks-zone-bar{position:relative;display:flex;height:8px;border-radius:var(--radius-full);overflow:hidden;gap:1px}
.ks-zone{flex:1;height:100%}
.ks-zone--distress{background:rgba(239,68,68,0.45);border-radius:var(--radius-full) 0 0 var(--radius-full)}
.ks-zone--grey{background:rgba(var(--gold-rgb),0.45)}
.ks-zone--safe{background:rgba(34,197,94,0.45);border-radius:0 var(--radius-full) var(--radius-full) 0}
.ks-zone-marker{position:absolute;top:-3px;width:3px;height:14px;background:var(--text-primary);border-radius:var(--radius-micro);transform:translateX(-50%);transition:left 0.6s ease;pointer-events:none}
.ks-zone-labels{display:flex;justify-content:space-between;margin-top:3px;font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}

/* News section */
.stock-news-list{display:flex;flex-direction:column;gap:0}
.news-item{display:block;padding:var(--space-12) 0;border-bottom:1px solid var(--border-subtle);text-decoration:none;color:inherit;transition:background var(--transition-fast)}
.news-item:last-child{border-bottom:none}
.news-item:hover{opacity:0.85}
.news-title{font-size:var(--text-sm);color:var(--text-primary);font-weight:300;line-height:var(--lh-snug,1.4);margin-bottom:var(--space-3)}
.news-meta{font-size:var(--text-2xs);color:var(--text-subtle);font-weight:300}
.news-snippet{font-size:var(--text-2xs);color:var(--text-tertiary);font-weight:300;margin-top:var(--space-3);line-height:var(--lh-normal,1.5)}

/* ── Chart controls row (replaces inline style) ── */
.chart-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Hero responsive ── */
@media (max-width: 640px) {
    /* Row 1: stack name above price */
    .stock-hero-row1 {
        flex-direction: column;
        gap: var(--space-8);
    }
    .stock-hero-price-block {
        text-align: left;
        width: 100%;
    }
    .stock-price-row {
        justify-content: flex-start;
    }
    .stock-hero h1 {
        font-size: var(--text-lg, var(--text-base));
        max-width: 100%;
        white-space: normal;
    }

    /* Stance strip: bigger font + better tap targets on mobile */
    .stock-stance-strip {
        font-size: var(--text-xs);
    }
    .ss-chip {
        font-size: var(--text-xs);
        padding: 4px 12px;
    }

    /* Row 3: metrics grid — hide duplicates already in stance strip */
    .hm-cell[data-metric="quality"],
    .hm-cell[data-metric="rsi"],
    .hm-cell[data-metric="dcf-upside"] {
        display: none;
    }
    .hm-row {
        display: contents;
    }
    .hero-metrics-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        background: none;
    }
    .hero-metrics-grid .hm-cell {
        flex: 1 1 calc(50% - 4px);
        min-width: 80px;
    }

    /* Row 2: stance bar + action line — hidden (covered by stance strip + today narrative) */
    .hero-stance-bar,
    .hero-action-line {
        display: none;
    }
    .hero-stance-divider {
        display: none;
    }

    /* Today narrative: line-clamp on mobile */
    .today-text {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        position: relative;
        cursor: pointer;
    }
    .today-text.expanded {
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    /* Technical section: collapsed by default on mobile — trading-oriented, skip for investors */
    .stock-technical-section {
        display: none !important;
    }
    .stock-technical-section.mobile-shown {
        display: block !important;
    }

    /* Financial statements: collapsed by default on mobile — 800px+ of tables */
    #financials-statements-section {
        display: none !important;
    }
    #financials-statements-section.mobile-shown {
        display: block !important;
    }

    /* Row 4: quick nav — horizontal scroll, no wrap, sticky */
    .hero-quick-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: var(--space-4) var(--space-10);
        margin-bottom: 0;
        gap: var(--space-6);
        top: 48px;
    }
    .hero-quick-nav::-webkit-scrollbar { display: none; }
    .hero-quick-nav::-webkit-scrollbar { display: none; }
    .hero-nav-pill {
        flex-shrink: 0;
        min-height: 44px;
        padding: 0 16px;
        white-space: nowrap;
    }

}

/* ── Chart controls mobile ── */
@media (max-width: 768px) {
    /* Chart header: controls row scrolls horizontally */
    .chart-controls-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        width: 100%;
        gap: 8px;
    }
    .chart-controls-row::-webkit-scrollbar { display: none; }
    .chart-controls-row > * { flex-shrink: 0; }

    /* Range buttons: scroll instead of wrap */
    .stock-range-btns {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        width: 100%;
    }
    .stock-range-btns::-webkit-scrollbar { display: none; }
    .stock-range-btn {
        flex-shrink: 0;
        min-height: 44px;
    }

    /* Chart type buttons: min touch target */
    .chart-type-btn {
        min-height: 36px;
        padding: 6px 14px;
    }
    .chart-overlay-btn {
        min-height: 36px;
        padding: 6px 12px;
        flex-shrink: 0;
    }

    /* Compare input: full width */
    .chart-compare-input {
        width: 120px;
    }

    /* Peers table: ensure wrapper is full width */
    .peers-compare-wrap {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Similar stocks table: already has overflow-x: auto wrapper */
    .similar-table-wrap {
        width: 100%;
    }

    /* News items: ensure text wraps */
    .news-title {
        font-size: var(--text-xs);
        line-height: var(--lh-relaxed);
    }

    /* Research two-col already goes 1-col at 768px */

    /* Fundamentals: already 2-col at 768px, ensure no overflow */
    .stock-metrics-grid {
        overflow: hidden;
    }
}

/* ── Small mobile refinements (390px target) ── */
@media (max-width: 480px) {
    /* Hero: compact price display */
    .stock-price { font-size: var(--text-xl); }
    .stock-hero h1 { font-size: var(--text-base); }
    .live-badge { font-size: var(--text-2xs); padding: 2px 6px; }

    /* Metrics grid: .capital style at tablet */
    .hm-cell { padding: 14px 6px 12px; }
    .hm-val { font-size: 22px; }
    .hm-label { font-size: 9px; }

    /* Stance bar: hidden at 640px, no-op here */

    /* Peers: tighter columns */
    .stock-peers-table th,
    .stock-peers-table td { padding: 5px 6px; font-size: var(--text-2xs); }
    .peers-compare-table th,
    .peers-compare-table td { padding: 5px 6px; font-size: var(--text-2xs); }

    /* News: readable */
    .news-title { font-size: var(--text-2xs); }
    .news-meta, .news-snippet { font-size: var(--text-2xs); }

    /* Research targets: stay 2-col but tighter */
    .stock-target-price { font-size: var(--text-xs); }
    .stock-target-label { font-size: 12px; }

    /* Sidebar single-col already set */
    /* Earnings Recap: single column */
    .er-metrics-row { grid-template-columns: 1fr 1fr; }
}

/* ── Earnings Recap Section ── */
.stock-earnings-recap-section { padding: 0; overflow: hidden; }

.er-details { width: 100%; }
.er-details[open] > .er-body { display: block; }

.er-summary {
    display: block;
    padding: 18px 24px;
    cursor: pointer;
    list-style: none;
    outline: none;
    user-select: none;
}
.er-summary::-webkit-details-marker { display: none; }
.er-summary::marker { display: none; }

.er-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.er-title {
    font-size: var(--text-sm);
    font-weight: var(--fw-body);
    color: var(--text-primary);
    flex: none;
}
.er-quarter {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex: none;
}
.er-badge {
    display: inline-block;
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    flex: none;
}
.er-badge--beat {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-positive);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.er-badge--miss {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-negative);
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.er-badge--inline {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.er-meta {
    font-size: var(--text-2xs);
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

/* Chevron indicator via CSS */
.er-summary::after {
    content: '›';
    float: right;
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
    display: inline-block;
    transition: transform var(--transition-fast);
    margin-top: -2px;
}
.er-details[open] .er-summary::after {
    transform: rotate(-90deg);
}

.er-body {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.er-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
    margin-bottom: 14px;
    padding-top: 14px;
}
.er-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.er-metric-label {
    font-size: var(--text-2xs);
    color: var(--text-subtle);
    letter-spacing: var(--ls-wide);
}
.er-metric-val {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-primary);
}
.er-metric-est {
    font-size: var(--text-2xs);
    color: rgba(255, 255, 255, 0.5);
}
.er-metric-surp {
    font-size: var(--text-2xs);
    font-weight: 300;
}
.er-metric-surp.positive { color: var(--accent-positive); }
.er-metric-surp.negative { color: var(--accent-negative); }
.er-metric-val.positive { color: var(--accent-positive); }
.er-metric-val.negative { color: var(--accent-negative); }

.er-ai-summary {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 2px solid rgba(var(--gold-rgb), 0.4);
    font-size: var(--text-xs);
    line-height: var(--lh-relaxed);
    color: rgba(255, 255, 255, 0.80);
}
.er-ai-summary .ai-widget-badge {
    margin-right: 8px;
    vertical-align: middle;
}
.er-ai-text { display: inline; }

@media (max-width: 600px) {
    .er-metrics-row { grid-template-columns: 1fr 1fr; }
    .er-summary { padding: 14px 16px; }
    .er-body { padding: 0 16px 16px; }
}

/* ═══ WHY IS IT MOVING? BANNER ═══ */
.why-moving-banner {
    margin: 12px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.why-moving--up {
    border-left: 3px solid var(--accent-positive);
    background: rgba(34, 197, 94, 0.07);
}

.why-moving--down {
    border-left: 3px solid var(--accent-negative);
    background: rgba(239, 68, 68, 0.07);
}

.why-moving-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.why-moving-move {
    font-size: var(--text-xs);
    font-weight: 300;
    white-space: nowrap;
    flex-shrink: 0;
}

.why-moving--up .why-moving-move { color: var(--accent-positive); }
.why-moving--down .why-moving-move { color: var(--accent-negative); }

.why-moving-text {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}

.why-moving-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-subtle);
    font-size: var(--text-sm);
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--transition-fast);
    margin-left: auto;
}

.why-moving-close:hover { color: var(--text-primary); }
.why-moving-close:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.7); outline-offset: 2px; border-radius: 2px; }

@media (max-width: 480px) {
    .why-moving-inner { gap: 8px; padding: 8px 12px; }
    .why-moving-text { font-size: var(--text-2xs); }
}

/* Hide in print */
@media print {
    .why-moving-banner { display: none !important; }
}

/* ═══ PRINT / PDF REPORT ═══ */
@media print {
    @page {
        margin: 2cm;
        size: A4;
    }

    /* Report header and footer via page margin boxes */
    @page {
        @top-center {
            content: attr(data-print-title);
            font-family: 'DM Sans', sans-serif;
            font-size: 9pt;
            color: #555;
        }
        @bottom-center {
            content: "Generated from atlabs.app" attr(data-print-ticker) " | Not investment advice | Antitrend Labs";
            font-family: 'DM Sans', sans-serif;
            font-size: 8pt;
            color: #888;
        }
    }

    /* Reset backgrounds for print */
    *,
    *::before,
    *::after {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        color: #111 !important;
        border-color: #ccc !important;
    }

    body {
        background: #fff !important;
        color: #111 !important;
        font-family: 'DM Sans', sans-serif !important;
        font-size: 11pt !important;
    }

    /* Print report title banner */
    .stock-hero::before {
        content: attr(data-print-title);
        display: block;
        font-size: 14pt;
        font-weight: 300;
        color: #111 !important;
        border-bottom: 1.5pt solid #111;
        padding-bottom: 6pt;
        margin-bottom: 14pt;
        letter-spacing: 0.02em;
    }

    /* Hide non-content elements */
    header,
    #nav-placeholder,
    footer,
    .copilot-fab,
    #copilot-panel,
    .back-to-top,
    .hero-quick-nav,
    .ask-ai-btn,
    #onboarding-banner,
    .omnisearch-bar,
    .upgrade-modal,
    .skip-link,
    .chart-compare-wrap,
    .chart-type-toggle,
    .chart-overlay-btn,
    .stock-range-btns,
    .earnings-upcoming,
    .live-badge,
    .hero-stance-bar,
    .why-moving-banner,
    #reportPrintBtn { display: none !important; }

    /* Layout: single column, full width */
    .stock-container,
    .page-layout,
    .stock-page-layout,
    .page-main,
    .page-aside { all: unset; display: block !important; width: 100% !important; }

    /* Glass cards: flat white */
    .stock-glass {
        border: 1pt solid #ddd !important;
        border-radius: 4pt !important;
        padding: 12pt !important;
        margin-bottom: 14pt !important;
        page-break-inside: avoid;
    }

    /* Typography */
    h1 { font-size: 18pt !important; font-weight: 300 !important; margin: 0 0 4pt !important; }
    h2 { font-size: 13pt !important; font-weight: 300 !important; color: #333 !important; border-bottom: 0.5pt solid #ddd; padding-bottom: 4pt; margin-bottom: 8pt; }
    h3 { font-size: 11pt !important; font-weight: 300 !important; }

    /* Hero: minimal */
    .stock-hero {
        padding: 0 0 10pt !important;
        margin-bottom: 14pt !important;
        border-bottom: 1pt solid #ddd !important;
    }
    .stock-hero-row1 { display: flex !important; justify-content: space-between !important; align-items: flex-start !important; }
    .stock-ticker-badge { background: #111 !important; color: #fff !important; padding: 2pt 6pt !important; border-radius: 3pt !important; font-size: 9pt !important; }
    .stock-price { font-size: 20pt !important; font-weight: 300 !important; }
    .stock-change { font-size: 12pt !important; margin-left: 8pt !important; }

    /* Hero metrics grid */
    .hero-metrics-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 8pt !important; margin-top: 10pt !important; }
    .hm-cell { border: 0.5pt solid #ddd !important; border-radius: 3pt !important; padding: 6pt 8pt !important; }
    .hm-label { font-size: 8pt !important; color: #666 !important; }
    .hm-val { font-size: 12pt !important; font-weight: 300 !important; }

    /* Tables */
    table { width: 100% !important; border-collapse: collapse !important; page-break-inside: avoid; }
    th, td { border: 0.5pt solid #ddd !important; padding: 4pt 6pt !important; font-size: 9pt !important; text-align: left !important; }
    th { background: #f5f5f5 !important; font-weight: 300 !important; color: #444 !important; }

    /* Charts: show canvas at reasonable size, avoid page breaks */
    canvas { max-width: 100% !important; height: auto !important; page-break-inside: avoid; }
    .stock-chart-section { page-break-inside: avoid; }

    /* Collapsible sections: expand all for print */
    .section-collapsible.section-collapsed .section-body {
        grid-template-rows: 1fr !important;
        opacity: 1 !important;
    }
    .section-collapsible h2::after { display: none !important; }
    .section-count { display: none !important; }

    /* Details/summary: show all content open */
    details { display: block !important; }
    details[open] > summary,
    details > summary { display: none !important; }
    details > *:not(summary) { display: block !important; }

    /* Color overrides: keep positive/negative meaning */
    .text-pos, .text-green, [class*="positive"] { color: #15803d !important; }
    .text-neg, .text-red, [class*="negative"] { color: #b91c1c !important; }

    /* Stance badges */
    .stance-badge,
    .key-issue-stance { background: #eee !important; color: #333 !important; border: 0.5pt solid #ccc !important; }

    /* AI cards: gold accent becomes a left border */
    .ai-card,
    .ai-widget {
        border-left: 2pt solid #999 !important;
        padding-left: 8pt !important;
    }
    .ai-widget-badge { display: none !important; }

    /* Page breaks */
    .stock-glass,
    .stock-targets,
    .stock-research-section,
    .fundamentals-section,
    .peers-section { page-break-before: auto; page-break-after: auto; page-break-inside: avoid; }

    /* Peers: limit columns for print */
    .peers-grid { grid-template-columns: 1fr 1fr !important; }

    /* Footer on print page */
    .print-report-footer {
        display: block !important;
        margin-top: 20pt;
        padding-top: 8pt;
        border-top: 0.5pt solid #ccc;
        font-size: 8pt;
        color: #888 !important;
        text-align: center;
    }
}

/* Soft CTA for logged-out visitors */
.stock-cta-bar {
    max-width: 1200px;
    margin: var(--space-12) auto;
    padding: var(--space-6) var(--space-12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.06), rgba(var(--purple-rgb), 0.04));
    border: 1px solid rgba(var(--gold-rgb), 0.15);
    border-radius: var(--radius-lg);
}
.stock-cta-bar.cta-done { background: rgba(var(--green-rgb), 0.06); border-color: rgba(var(--green-rgb), 0.15); }
.stock-cta-text {
    font-size: var(--text-xs);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
    min-width: 200px;
}
.stock-cta-text strong { color: var(--accent-gold); font-weight: var(--fw-body); }
.stock-cta-form {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}
.stock-cta-input {
    padding: 6px 12px;
    border: 1px solid rgba(var(--gold-rgb), 0.25);
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.3);
    color: var(--text-primary);
    font-size: var(--text-2xs);
    font-family: var(--font-body);
    width: 200px;
    outline: none;
    transition: border-color var(--transition-fast);
}
.stock-cta-input:focus { border-color: var(--accent-gold); }
.stock-cta-input::placeholder { color: var(--text-subtle); }
.stock-cta-btn {
    padding: 6px 18px;
    border: 1px solid rgba(var(--gold-rgb), 0.4);
    border-radius: var(--radius-md);
    background: rgba(var(--gold-rgb), 0.12);
    color: var(--accent-gold);
    font-size: var(--text-2xs);
    font-weight: 300;
    font-family: var(--font-body);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.stock-cta-btn:hover { background: rgba(var(--gold-rgb), 0.2); }
.stock-cta-btn:disabled { opacity: 0.5; cursor: default; }
.stock-cta-status {
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
}
.stock-cta-status.text-pos { color: var(--accent-positive); }
.stock-cta-status.text-neg { color: var(--accent-negative); }
@media (max-width: 640px) {
    .stock-cta-bar { flex-direction: column; gap: var(--space-4); padding: var(--space-6); text-align: center; }
    .stock-cta-form { width: 100%; }
    .stock-cta-input { flex: 1; }
}

/* SEO: Research content (SSR-injected for Googlebot, visible to all) */
.seo-research-content { max-width: 1200px; margin: var(--space-12) auto 0; padding: 0 var(--space-8); }
.seo-research-content:empty { display: none; }
.seo-research-content h2 { font-size: var(--text-sm); font-weight: 300; color: var(--text-secondary); margin-bottom: var(--space-4); }
.seo-research-content h3 { font-size: var(--text-xs); font-weight: var(--fw-body); color: var(--text-subtle); margin: var(--space-6) 0 var(--space-2); }
.seo-research-content p { font-size: var(--text-2xs); font-weight: 300; color: var(--text-tertiary); line-height: var(--lh-relaxed); margin-bottom: var(--space-2); }
.seo-research-content ul { list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.seo-research-content li { font-size: var(--text-2xs); font-weight: 300; color: var(--text-tertiary); padding: var(--space-1) 0; padding-left: var(--space-4); position: relative; }
.seo-research-content li::before { content: '▸'; position: absolute; left: 0; color: var(--text-subtle); }
.seo-research-content .ssr-catalysts li::before { content: '▲'; color: var(--accent-positive); font-size: 8px; top: 2px; }
.seo-research-content .ssr-risks li::before { content: '▼'; color: var(--accent-negative); font-size: 8px; top: 2px; }
.seo-research-content time { color: var(--text-subtle); }
.seo-research-content strong { font-weight: var(--fw-body); color: var(--text-secondary); }

/* Price Scenario Range Chart */
.price-scenario-chart {
    padding: var(--space-4) 0 var(--space-10);
    max-width: 700px;
}
.ps-track {
    position: relative;
    height: 6px;
    background: var(--surface-4);
    border-radius: var(--radius-full);
    margin: 40px 0 32px;
}
.ps-range {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-negative), rgba(var(--yellow-rgb),0.5), var(--accent-positive));
    border-radius: var(--radius-full);
    opacity: 0.35;
}
.ps-marker {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
.ps-bear { background: var(--accent-negative); }
.ps-base { background: rgba(var(--yellow-rgb), 0.8); }
.ps-bull { background: var(--accent-positive); }
.ps-label {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: var(--text-2xs);
    font-weight: var(--fw-body);
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: nowrap;
}
.ps-prob {
    font-size: 9px;
    color: var(--text-subtle);
    font-weight: 300;
}
.ps-current {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 2px solid var(--surface-1);
    transform: translate(-50%, -50%);
    z-index: 3;
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}
.ps-cur-label {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    font-weight: 400;
    color: var(--text-primary);
    white-space: nowrap;
}

/* SEO: Related stocks internal links */
.seo-stock-links { max-width: 1200px; margin: var(--space-16) auto 0; padding: 0 var(--space-8); }
.seo-stock-title { font-size: var(--text-xs); font-weight: var(--fw-body); color: var(--text-subtle); margin-bottom: var(--space-6); }
.seo-stock-grid { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.seo-stock-grid a { font-size: var(--text-2xs); font-weight: 300; color: var(--text-tertiary); text-decoration: none; padding: var(--space-1) var(--space-3); border: 1px solid var(--b2); border-radius: var(--radius-full); transition: var(--transition-fast); }
.seo-stock-grid a:hover { color: var(--accent-gold); border-color: rgba(var(--gold-rgb), 0.3); }
.seo-stock-more { display: inline-block; margin-top: var(--space-6); font-size: var(--text-2xs); font-weight: 300; color: var(--accent-gold); text-decoration: none; }

/* Discover more — cross-linking section */
.discover-more {
    max-width: 800px;
    margin: var(--space-12) auto;
    padding: 0 var(--space-4);
}
.discover-title {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-subtle);
    margin-bottom: var(--space-4);
}
.discover-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.discover-link {
    font-size: var(--text-2xs);
    color: var(--text-tertiary);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}
.discover-link:hover {
    color: var(--accent-gold);
    border-color: rgba(var(--gold-rgb),0.3);
}
.discover-link:focus-visible {
    outline: 2px solid rgba(var(--gold-rgb), 0.7);
    outline-offset: 2px;
}

/* ============================================
   CONTEXTUAL PRO UPSELL BANNER
   ============================================ */
.contextual-upsell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0.75rem 1.25rem;
    background: linear-gradient(90deg, rgba(var(--gold-rgb),0.06), rgba(var(--gold-rgb),0.03));
    border: 1px solid rgba(var(--gold-rgb),0.18);
    border-radius: var(--radius-md);
    margin: var(--space-3) 0 0;
    opacity: 1;
    transition: opacity 0.2s ease;
}
.upsell-text {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}
.upsell-text strong {
    color: var(--accent-gold);
    font-weight: 300;
}
.upsell-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}
.upsell-cta {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--accent-gold);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(var(--gold-rgb),0.35);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.upsell-cta:hover {
    background: rgba(var(--gold-rgb),0.1);
    border-color: rgba(var(--gold-rgb),0.6);
}
.upsell-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--text-md);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}
.upsell-dismiss:hover {
    color: var(--text-secondary);
}
@media (max-width: 600px) {
    .contextual-upsell {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }
    .upsell-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* ═�