/* Shared appearance tokens; chart canvases use the matching preferences palette. */
:root{--ui-bg:var(--bg);--ui-panel:var(--panel);--ui-text:var(--text);--ui-muted:var(--muted);--ui-border:var(--line);--ui-accent:var(--accent);--ui-selected:#241934;--ui-hover:#15121f;--candle-up:#e5e0ef;--candle-down:#9060d2}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=light]{color-scheme:light;--bg:#f7f5fa;--panel:#fff;--line:#ddd5e7;--text:#262033;--muted:#71667f;--accent:#7951b2;--short:#167c8d;--amber:#926019;--ui-selected:#eee7f8;--ui-hover:#f0eaf6;--candle-up:#087f8c;--candle-down:#7952b3}
html[data-theme=light] body{background:var(--bg);color:var(--text)}
html[data-theme=light] :is(header,.rail,.market-panel,.insights,.review-dock,.trade-explorer,.trade-editor,.chartbox,.stats,.card,.login,.replaybar,.analytics-metrics article){background:var(--panel);border-color:var(--line)}
html[data-theme=light] :is(button,.button){background:#f0ebf6;color:#514160;border-color:#dbd1e6}
html[data-theme=light] :is(button,.button):hover{background:#e7dcf3;border-color:var(--accent)}
html[data-theme=light] :is(button,.button).primary{color:#fff;background:linear-gradient(135deg,#8a4ee3,#6834bb);border-color:#8050c0}
html[data-theme=light] :is(input,select,textarea){color-scheme:light}
html[data-theme=light] .station :is(select,input:not([type=range]):not([type=checkbox]):not([type=radio]),textarea),html[data-theme=light] :is(input[type=email],input[type=password]){background:#fff;border-color:var(--line);color:var(--text)}
html[data-theme=light] input::placeholder,html[data-theme=light] textarea::placeholder{color:#968ba2}
html[data-theme=light] :is(.station-header,.station-message,.market-toolbar,.chart-tools,.insight-block,.preview-tabs,.preview-grid aside,.preview-grid aside p,.preview-replay,.tag-stats li,.service-strip){border-color:var(--line)}
html[data-theme=light] :is(.rail-item,.station-message,.station-header .eyebrow,.exchange-label,.chart-subbar,.hint,.chart-credit,.dock-title,.history-controls label,.plan-card p,.plan-card li,.plan-status,.hero-copy>p,.release-note,.hero-caption,.trade-row small,.empty-records,.chart-empty small){color:var(--muted)}
html[data-theme=light] .rail-item:hover{background:var(--ui-hover);color:#644182}
html[data-theme=light] :is(.rail-item.active,.station-tabs a.active,.timeframes button.active,.tabs button.active,.trade-row.active){background:var(--ui-selected);border-color:#a48bbf;color:#65428d}
html[data-theme=light] .rail-divider{background:var(--line)}
html[data-theme=light] .station-tabs a{border-color:var(--line);color:var(--muted)}
html[data-theme=light] .station-badge{border-color:#cabadd;color:#795298}
html[data-theme=light] .timeframes button{background:transparent;border-color:transparent;color:var(--muted)}
html[data-theme=light] .timeframes button.active{border-color:#bda5d7;background:var(--ui-selected);color:#644184}
html[data-theme=light] :is(.insight-block h2,.dock-head h2,.insight-block ol,.trade-result i,.analytics-metrics span){color:#6f5e81}
html[data-theme=light] :is(.insight-block a,.dock-head a,.feature-number,.hero-caption strong,.eyebrow,.tag-stats b,.plan-price,h1 em){color:#7951b2}
html[data-theme=light] :is(.replay-controls,.trade-pnl){background:#f1eaf8;border-color:#d7c7e6}
html[data-theme=light] .replay-controls .play-button{background:#7346ad;color:white;border-color:#7346ad}
html[data-theme=light] :is(.replay-controls #cursor-time,.trade-pnl span){color:#70548d}
html[data-theme=light] .trade-pnl small{color:#82708f}
html[data-theme=light] .trade-row{background:#faf8fd;border-color:#ded6e7}
html[data-theme=light] .trade-row.active{background:#eee5f8;border-color:#aa8bcb}
html[data-theme=light] .positive{color:#087c70}html[data-theme=light] .negative{color:#ba455f}
html[data-theme=light] :is(.error,.station-message.error){color:#b9424e}
html[data-theme=light] .chart-empty{color:#71627f;background:radial-gradient(ellipse at 50% 50%,#eee5f85c,transparent 66%)}
html[data-theme=light] .chart-empty h2{color:#453353}
html[data-theme=light] .station .history-controls input[type=date]{color-scheme:light}
html[data-theme=light] .badge{color:#775196;border-color:#c2aad8}
html[data-theme=light] .badge.amber{color:#94601d;border-color:#d9bf91}
html[data-theme=light] .wordmark img{filter:grayscale(1) invert(1)}
html[data-theme=light] .product-preview-real{border-color:#d5c7e4;background:#fff;box-shadow:0 22px 70px #634b8814}
html[data-theme=light] .product-preview-real .preview-title{background:#f0eaf7;color:#665176}
html[data-theme=light] .product-preview-real .preview-title span{color:#897394}
html[data-theme=light] .product-preview-real figcaption{border-color:var(--line);color:#80708c}
html[data-theme=light] .product-preview-real figcaption b{color:#624971}

/* The map keeps a distinct heat scale while matching surrounding surfaces. */
html[data-theme=light] .liquidation-page{background:var(--bg);color:var(--text)}
html[data-theme=light] .liquidation-page>header{background:#fff;border-color:var(--line)}
html[data-theme=light] :is(.liq-toolbar,.liq-market-strip,.liq-workspace,.liq-underbar,.liq-pressure-group h3){background:#fff;border-color:var(--line)}
html[data-theme=light] :is(.liq-chart-top,.liq-chart-footer,.liq-profile-wrap,.liq-inspector,.liq-detail-grid,.liq-detail-grid th,.liq-detail-grid td,.liq-line){border-color:#e2daeb}
html[data-theme=light] .liq-shell button{background:transparent;color:#726480;border-color:transparent}
html[data-theme=light] .liq-shell button:hover{background:#f0e8f8;color:#654184}
html[data-theme=light] .liq-shell button.active{background:#eee4f8;color:#70489c}
html[data-theme=light] .liq-filters select{background:#f9f6fc;color:#61516e;border-color:#ddd1e6}
html[data-theme=light] :is(.liq-title>span,.liq-preview-label,.liq-return,.liq-market-strip span,.liq-market-strip small,.liq-legend,.liq-scale,.liq-scale b,.liq-profile-wrap>span,.liq-chart-footer,.liq-chart-footer b,.liq-inspector time,.liq-lines h3 span,.liq-line small,.liq-inspector-foot,.liq-inspector>p,.liq-underbar,.liq-underbar>span:nth-child(2),.liq-details,.liq-details summary,.liq-detail-grid #liq-versions,.liq-empty-group){color:#817189}
html[data-theme=light] :is(.liq-market-strip strong,.liq-main-price>span,.liq-line strong,.liq-detail-grid h2,.liq-detail-grid th){color:#4e3b5f}
html[data-theme=light] .liq-main-price strong{color:#7951aa}
html[data-theme=light] .liq-title .liq-model-tag{background:#f8f0df;border-color:#dec994;color:#906523}
html[data-theme=light] .liq-data-status #liq-quality{color:#297c6e}html[data-theme=light] .liq-data-status #liq-quality.warning{color:#94651f}
html[data-theme=light] .long{color:#7a48aa}html[data-theme=light] .short{color:#167f90}
html[data-theme=light] .liq-legend .long i{background:linear-gradient(90deg,#efe4f9,#945bbf)}
html[data-theme=light] .liq-legend .short i{background:linear-gradient(90deg,#e1f2f5,#268d9d)}
html[data-theme=light] .liq-price-key{color:#5b4370}
html[data-theme=light] .liq-center-price{background:#f1e8fa;border-color:#c4abd9}
html[data-theme=light] .liq-center-price>span{color:#775685}html[data-theme=light] .liq-center-price small{color:#856f93}html[data-theme=light] .liq-center-price strong{color:#704398}
html[data-theme=light] .liq-tooltip{background:#fffffff7;border-color:#c4a8df;color:#695678;box-shadow:0 4px 24px #63517720}
html[data-theme=light] :is(.liq-tooltip>strong,.liq-candle-values b){color:#493454}
html[data-theme=light] :is(.liq-tooltip>span,.liq-tooltip strong small,.liq-tooltip div small){color:#80678e}
html[data-theme=light] .liq-tooltip>div{border-color:#e2d4ed}
html[data-theme=light] .liq-error{background:#fbf3e7;border-color:#e9d5b8;color:#966a32}

html[data-density=compact] .rail{gap:4px;padding-top:12px}
html[data-density=compact] .rail-item{padding-top:7px;padding-bottom:7px}
html[data-density=compact] .station-header{padding-top:11px;padding-bottom:11px}
html[data-density=compact] .market-toolbar{padding-top:8px;padding-bottom:8px}
html[data-density=compact] .station-message{padding-top:5px;padding-bottom:5px;min-height:28px}
html[data-density=compact] .history-controls{padding-top:8px;padding-bottom:8px}
html[data-density=compact] .trade-row{padding-top:8px;padding-bottom:8px;margin-top:6px}
html[data-density=compact] .liq-market-strip{min-height:64px;padding-top:9px;padding-bottom:9px}
html[data-density=compact] .liq-toolbar{padding-top:5px;padding-bottom:5px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:0s!important}}
