/* Dark workspace: neutral canvas, quiet panels and BitcoinHoje accents. */
html[data-theme=dark]{--desk-bg:#101114;--desk-panel:#181a1f;--desk-raised:#22252b;--desk-line:#343840;--desk-field:#666e7b;--desk-text:#f1f3f5;--desk-muted:#b0b7c2;--desk-accent:#dfff19;--desk-up:#62d4a0;--desk-down:#ff8294;--paper:var(--desk-bg);--ink:var(--desk-text);--muted:var(--desk-muted);--surface:var(--desk-panel);--bg:var(--desk-bg);--text:var(--desk-text);--border:var(--desk-line);--app-accent:var(--desk-accent)}
html[data-theme=dark] body,html[data-theme=dark] body main{background:var(--desk-bg);color:var(--desk-text);font-variant-numeric:tabular-nums}
html[data-theme=dark] body :is(header,.app-tabs,.bottom-nav,.site-footer,footer){background:var(--desk-bg);border-color:var(--desk-line);color:var(--desk-text)}
html[data-theme=dark] body header :is(.search-trigger,.nav-toggle,.menu-toggle){background:var(--desk-raised)!important;border-color:var(--desk-line)!important;border-radius:10px;box-shadow:none}
html[data-theme=dark] body header :is(.search-trigger,.nav-toggle)::before{background:transparent;border:0;box-shadow:none}
html[data-theme=dark] body .header-quotes{background:var(--desk-bg);border-color:var(--desk-line);color:var(--desk-muted);font-size:12px}
html[data-theme=dark] body :is(.chart-panel,.quote-card,.data-section,.calculator,.finance-card,.finance-output,.token-panel,.token-converter,.explore-card,.exchange-card,.news-card,.coins-section,.institutional-content,.pro-panel,.fx-card,.summary,.report-card,.quick-converter,.home-news-card,.article-body,.favorites-panel,.token-pro-card){background:var(--desk-panel);color:var(--desk-text);border:1px solid var(--desk-line);border-radius:12px;box-shadow:none}
html[data-theme=dark] body :is(.chart-panel,.data-section,.pro-panel){padding:24px;margin-top:20px}
html[data-theme=dark] body :is(.data-section,.pro-panel) h2{font-size:clamp(20px,2vw,26px);line-height:1.3;letter-spacing:-.5px;margin-bottom:12px}
html[data-theme=dark] body :is(main p,main small,main dt,.data-note,.chart-note,.live-caption,.token-status,.chart-readout,.range-info,.metric span,.metric small,.chart-stats span,.grid-lines span,.chart-times span){color:var(--desk-muted)}
/* Keep foreground and surface paired on the educational and legal templates. */
html[data-theme=dark] body :is(.edu-cover-route,.legal-index){background:#181a20;border-color:#3d4652;color:#eaecef}
html[data-theme=dark] body .edu-cover-route :is(h2,li,li>span,.edu-cover-facts strong){color:#eaecef}
html[data-theme=dark] body .edu-cover-route :is(.edu-cover-label,.edu-cover-facts,.edu-cover-facts>span){color:#b7bdc6}
html[data-theme=dark] body .edu-cover-route li{border-color:#3d4652}
/* Illustrations have a light artwork palette: preserve it with dark captions. */
html[data-theme=dark] body .edu-illustration{background:#fafcf5;color:#17241c;border-color:#cbd7c0}
html[data-theme=dark] body :is(.article-body,.edu-page,.edu-reading) .edu-illustration :is(figcaption,figcaption strong){color:#344638;background:transparent;border-color:#cbd7c0}
html[data-theme=dark] body .legal-index a{color:#eaecef}
html[data-theme=dark] body .fx-open-hint{color:#eaecef}
html[data-theme=dark] body .edu-flow .edu-concept-icon,html[data-theme=dark] body .edu-flow li::after{color:#b7dfc0}
html[data-theme=dark] body :is(input,select,textarea){background:var(--desk-bg);color:var(--desk-text);border:1px solid var(--desk-field);border-radius:8px;min-height:44px;font-size:14px}
html[data-theme=dark] body :is(button,.detail-nav a,.token-nav a,.pro-nav a){background:var(--desk-raised);color:var(--desk-text);border:1px solid var(--desk-field);border-radius:8px;min-height:40px;padding:9px 14px;font-size:13px;line-height:1.4;box-shadow:none}
html[data-theme=dark] body :is(button,.detail-nav a,.token-nav a):hover:not(:disabled){background:#30343b}
html[data-theme=dark] body :is(button,input,select):disabled{background:var(--desk-panel);color:#9da6b3;border-color:var(--desk-line);opacity:1}
html[data-theme=dark] body :is(.button,.full-bitcoin,.quick-pro,.token-pro-link,button[aria-pressed=true],.periods button.active,.edu-button){background:var(--desk-accent);color:#101114!important;border-color:var(--desk-accent);font-weight:650}
html[data-theme=dark] body :is(.button,.full-bitcoin,.quick-pro,.token-pro-link,button[aria-pressed=true],.periods button.active,.edu-button):hover{background:#e7ff62}
/* Chart links are secondary controls, not lime-filled primary actions. */
html[data-theme=dark] body .token-pro-card a.token-pro-link{background:#22252b!important;color:#f1f3f5!important;border-color:#666e7b}
html[data-theme=dark] body .token-pro-card a.token-pro-link:hover{background:#30343b!important;color:#fff!important}
html[data-theme=dark] body :is(.periods,.pro-chart-periods){background:var(--desk-bg);border:1px solid var(--desk-line);border-radius:9px;padding:4px;gap:4px}
html[data-theme=dark] body .periods button:not(.active){border:0;min-height:36px;padding:7px 12px;background:transparent;color:var(--desk-muted)}
html[data-theme=dark] body :is(.chart-header,.range-info,.overview-strip,.chart-stats,.data-heading,.chart-toolbar){border-color:var(--desk-line);box-shadow:none}
html[data-theme=dark] body .range-info{padding:14px 0;margin:0;gap:12px;border-bottom:1px solid var(--desk-line);font-size:13px}
html[data-theme=dark] body .overview-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:18px 0 0;margin:0;border:0}
html[data-theme=dark] body .overview-strip>div{display:flex!important;flex-direction:column;gap:6px;align-items:flex-start;background:transparent;border:0;border-radius:0;padding:0;min-width:0;box-shadow:none}
html[data-theme=dark] body .overview-strip span{font-size:11px;letter-spacing:.04em;color:var(--desk-muted)!important}
html[data-theme=dark] body .overview-strip strong{font-size:clamp(16px,2vw,22px);line-height:1.35;color:var(--desk-text)}
html[data-theme=dark] body :is(.metric,.token-stats>div,.pro-chart-stats>div,.finance-explainer,.finance-formula,.token-contract,.pro-learning-grid article,.pro-reading-example){background:var(--desk-bg);border:1px solid var(--desk-line);border-radius:8px;color:var(--desk-text)}
html[data-theme=dark] body .metric{padding:16px}
html[data-theme=dark] body :is(.table-scroll,.token-table-wrap,.dex-table-wrap){border:1px solid var(--desk-line);border-radius:8px}
html[data-theme=dark] body :is(th,td,.pro-table th:first-child,.pro-table td:first-child){background:var(--desk-panel);border-color:var(--desk-line);color:var(--desk-text);padding:12px 14px}
html[data-theme=dark] body :is(thead th,.table-scroll caption,tr:hover td){background:var(--desk-raised);color:var(--desk-muted)}
html[data-theme=dark] body :is(.financial-chart,.pro-chart-frame,.professional-chart.chart-expanded,.professional-chart:fullscreen){background:var(--desk-panel);border-color:var(--desk-line)}
html[data-theme=dark] body .financial-chart text{fill:var(--desk-muted)}
html[data-theme=dark] body stop[data-direction=up]{stop-color:var(--desk-up)}
html[data-theme=dark] body stop[data-direction=down]{stop-color:var(--desk-down)}
html[data-theme=dark] body .trend-baseline{stroke:#717986}
html[data-theme=dark] body :is(.chart-area,.grid-lines>div){border-color:var(--desk-line)}
html[data-theme=dark] body .chart-area svg{border-color:var(--desk-line);background:transparent}
html[data-theme=dark] body .chart-panel #market-chart{border-color:var(--desk-line);background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(33.333% - 1px),var(--desk-line) calc(33.333% - 1px),var(--desk-line) 33.333%)}
html[data-theme=dark] body .grid-lines span{background:var(--desk-line)}
html[data-theme=dark] body .grid-lines span::before,html[data-theme=dark] body .grid-lines span::after{background:var(--desk-line);border-color:var(--desk-line)}
html[data-theme=dark] body :is(#history-health,#reference-status,#markets-status,#network-status){color:var(--desk-muted)}
html[data-theme=dark] body .skip-link{background:var(--desk-accent);color:#101114}
html[data-theme=dark] body :is(.chart-readout,.chart-tooltip,[role=tooltip]){background:var(--desk-raised);color:var(--desk-text);border:1px solid var(--desk-field);border-radius:8px;padding:10px 12px;box-shadow:0 8px 24px #0005;font-size:12px}
html[data-theme=dark] body :is(.up,.token-up,.metric-positive){color:var(--desk-up)!important}
html[data-theme=dark] body :is(.down,.token-down,.metric-negative){color:var(--desk-down)!important}
html[data-theme=dark] body .negative{background:#341d25!important;color:var(--desk-down)!important}
html[data-theme=dark] body #arbitrage-list .arbitrage-card{background:var(--desk-panel);border-color:var(--desk-line);border-radius:12px}
html[data-theme=dark] body #arbitrage-list .arbitrage-card.is-best{background:var(--desk-panel);border-color:#7f8a44}
html[data-theme=dark] body #arbitrage-list :is(.arbitrage-identity,.arbitrage-estimate,.arbitrage-stats){border-color:var(--desk-line)}
html[data-theme=dark] body #arbitrage-list summary{background:var(--desk-raised);color:var(--desk-text);border-color:var(--desk-field);border-radius:8px}
html[data-theme=dark] body #arbitrage-list .is-best summary{background:var(--desk-accent);color:#101114;border-color:var(--desk-accent)}
html[data-theme=dark] body #navigation-drawer{background:var(--desk-panel);color:var(--desk-text);border-color:var(--desk-line)}
html[data-theme=dark] body #navigation-drawer :is(.drawer-heading,.theme-picker,.product-nav,.product-nav a,.drawer-search input,.language-picker select){background:var(--desk-panel);color:var(--desk-text);border-color:var(--desk-line)}
html[data-theme=dark] body #navigation-drawer :is(.drawer-close,.theme-toggle){background:var(--desk-raised);color:var(--desk-text);border-color:var(--desk-field)}
html[data-theme=dark] body #navigation-drawer .product-nav a[aria-current],html[data-theme=dark] body :is(.app-tabs a[aria-current],.bottom-nav a.active,.bottom-nav a[aria-current]){background:var(--desk-accent);color:#101114;box-shadow:none;border:0;border-radius:9px}
html[data-theme=dark] body .faq{--faq-bg:var(--desk-panel);--faq-text:var(--desk-text);--faq-muted:var(--desk-muted);--faq-border:var(--desk-line);--faq-hover:var(--desk-raised)}
html[data-theme=dark] body :is(.ad-placeholder,.topic-shortcuts,.edu-home,.fx-row,.pro-learning){background:var(--desk-panel);border-color:var(--desk-line);color:var(--desk-text)}
html[data-theme=dark] body.dex-screen{--dex-bg:var(--desk-bg);--dex-surface:var(--desk-panel);--dex-soft:var(--desk-raised);--dex-text:var(--desk-text);--dex-muted:var(--desk-muted);--dex-border:var(--desk-line)}
@media(max-width:700px){
 html[data-theme=dark] body :is(.chart-panel,.data-section,.pro-panel){padding:18px 16px;margin-top:16px;border-radius:10px}
 html[data-theme=dark] body .detail-page .chart-area{height:260px}
 html[data-theme=dark] body .range-info{flex-direction:row;align-items:center;font-size:12px}
 html[data-theme=dark] body .range-info span{max-width:60%;overflow-wrap:anywhere;text-align:right}
 html[data-theme=dark] body .overview-strip{gap:12px;padding-top:16px}
 html[data-theme=dark] body .metric{padding:12px}
 html[data-theme=dark] body .metric>strong{font-size:17px}
 html[data-theme=dark] body .periods button{padding:8px 5px;font-size:12px}
}

html[data-theme=dark] body .token-detail .token-panel{padding:16px;margin-bottom:20px}

/* Preço médio no tema escuro: o campo é a moldura (.input-row); o input interno fica transparente, sem caixa dupla. */
html[data-theme=dark] body .calculator .input-row{background:#101114;border-color:#666e7b}
html[data-theme=dark] body .calculator .input-row input{background:transparent!important;border:0!important;padding:1px 2px}
