/* Theme layer is intentionally separate, so the original layout stays intact. */
body{background:radial-gradient(ellipse at 45% 0%,var(--theme-glow,#fff8e3) 0%,var(--theme-page,#fcf2d2) 72%);color:var(--ink)}
.site-header{border-bottom-color:var(--theme-border,#e7ddb9)}
.header-actions{gap:10px}
.card,.search-form{background:var(--theme-card,#fff);color:var(--ink)}
.metric-strip{background:var(--theme-metric,#fff7dc)}
.visual-metrics{background:var(--theme-soft,#f7f9fb)}
.margin-ring:before{background:var(--theme-soft,#f7f9fb)}
.range-track,.cap-track,.momentum-track,.growth-rail,.analyst-bar{background:var(--theme-rail,#e5f1f7)}
.intro p,.company-name,.sector-card p,.research-copy,.compare-form>p,.analyst-intro p,.footer,.chart-caption,.risk-list li,.observation-list li,.range-foot,.range-labels,.cap-labels,.card-label,.metric-strip span,.metric-strip .info-circle,.light-tag,.chart-empty,.analyst-foot,.quote-footnote,.feature-detail,.research-method,.observation-title,.subhead,.analyst-item span,.small-feature>span,.growth-block>span,.ring-block>span,.section-kicker,.search-footer .quick-links>span{color:var(--theme-muted,#82909b)}
.search-form input,.peer-inputs input{color:var(--ink)}
.research-title h3,.chart-head h3,.section-header h2,.analyst-intro h2{color:var(--ink)}
.research-title span:not(.research-icon){color:var(--theme-muted,#a3adb4)}
.theme-control{position:relative;display:flex;align-items:center}
.theme-toggle{height:38px;width:38px;display:grid;place-items:center;border-radius:11px;background:var(--theme-card,#fff);border:1px solid var(--theme-border,#e8dcbc);color:var(--ink);transition:transform .15s,border-color .15s;box-shadow:0 4px 12px rgba(0,0,0,.035)}
.theme-toggle:hover{transform:rotate(20deg);border-color:var(--sky)}
.theme-toggle svg{width:19px;height:19px}
.theme-panel{position:absolute;top:calc(100% + 13px);right:0;z-index:100;width:364px;max-width:calc(100vw - 30px);border:1px solid var(--theme-border,#e8dcbc);background:var(--theme-card,#fff);color:var(--ink);border-radius:15px;box-shadow:0 22px 65px rgba(25,29,38,.22);padding:16px;max-height:min(560px,80vh);overflow:auto}
.theme-panel-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.theme-panel-header strong{font-family:var(--serif);font-size:22px;display:block;font-weight:500}
.theme-panel-header span{color:var(--theme-muted,#82909b);font-size:11px;display:block;margin-top:4px}
.theme-close{background:transparent;border:0;font-size:26px;line-height:1;color:var(--theme-muted,#82909b);padding:0 5px}
.theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.theme-choice{min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;border:1px solid var(--theme-border,#eae7e2);background:transparent;border-radius:9px;padding:9px 6px 8px;color:var(--ink);font-size:10px;line-height:1.15;min-height:74px}
.theme-choice:hover{border-color:var(--sky)}
.theme-choice.chosen{border-color:var(--sky);box-shadow:0 0 0 2px color-mix(in srgb,var(--sky) 17%,transparent)}
.theme-swatch{width:48px;height:31px;border-radius:6px;border:1px solid rgba(70,80,90,.17);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.theme-panel-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:15px;padding-top:12px;border-top:1px solid var(--theme-border,#eae7e2)}
.theme-panel-footer>span{font-size:10px;color:var(--theme-muted,#87949d)}
.theme-panel-footer button{border:0;background:var(--sky-pale);color:var(--sky-dark);border-radius:6px;padding:8px 10px;font-size:11px;font-weight:750}
html[data-theme-mode="dark"] .local-pill,html[data-theme-mode="dark"] .source-badge,html[data-theme-mode="dark"] .ticker-pills button{background:var(--theme-card);color:var(--ink);border-color:var(--theme-border)}
html[data-theme-mode="dark"] .ticker-pills button.active{border-color:var(--sky);color:var(--sky)}
html[data-theme-mode="dark"] .search-form input{background:transparent}
html[data-theme-mode="dark"] .search-form input::placeholder{color:var(--muted)}
html[data-theme-mode="dark"] .peer-inputs input{background:var(--theme-card);border-color:var(--theme-border)}
html[data-theme-mode="dark"] .quote-footnote,html[data-theme-mode="dark"] .chart-caption{color:var(--muted)}
html[data-theme-mode="dark"] .card{border-color:var(--theme-border)}
html[data-theme-mode="dark"] .light-tag,html[data-theme-mode="dark"] .currency-chip{background:var(--theme-soft);color:var(--sky)}
html[data-theme-mode="dark"] .analyst-card .target-card,html[data-theme-mode="dark"] .outline-button{background:var(--theme-soft);color:var(--ink);border-color:var(--theme-border)}
html[data-theme-mode="dark"] .small-feature,html[data-theme-mode="dark"] .analyst-foot,html[data-theme-mode="dark"] .compare-form{border-color:var(--theme-border)}
html[data-theme-mode="dark"] .comparison-table th,html[data-theme-mode="dark"] .comparison-table td{border-color:var(--theme-border);color:var(--ink)}
html[data-theme-mode="dark"] .metric-strip strong{color:var(--ink)}
html[data-theme-mode="dark"] .ring-block .margin-ring strong{color:var(--ink)}
html[data-theme-mode="dark"] .price-change{color:var(--ink);background:var(--theme-soft)}
html[data-theme-mode="dark"] .price-change.up{color:#77dfb6}
html[data-theme-mode="dark"] .price-change.down{color:#ffa39b}
html[data-theme-mode="dark"] .analyst-item strong,html[data-theme-mode="dark"] .target-card strong{color:var(--ink)}
@media(max-width:520px){.header-actions{gap:5px}.theme-toggle{width:34px;height:34px;border-radius:9px}.theme-toggle svg{width:18px}.theme-panel{width:330px}.theme-choices{gap:6px}.theme-choice{font-size:9px;padding:7px 4px}.theme-swatch{width:43px}.version{display:none}}
