html{color-scheme:light}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.language-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;padding:7px;border:1px solid #dfe8f4;border-radius:5px;background:#fff;color:#496690;cursor:pointer}
.theme-toggle:hover{background:#edf5ff;color:#116cff;border-color:#a6c8ff}
.theme-toggle[hidden]{display:none}
.theme-toggle svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="light"] .theme-icon-sun,html[data-theme="dark"] .theme-icon-moon{display:none}
@media(max-width:1250px){.header-actions{grid-column:3;grid-row:1}}
@media(max-width:600px){.header-actions{grid-column:2;grid-row:1;gap:6px}.header-actions .language-switch summary{max-width:112px}.theme-toggle{width:32px;height:32px;flex-basis:32px;padding:6px}}
@media(max-width:380px){.header{gap:8px}.header .brand{font-size:16px}.header .brand-sub{max-width:145px;letter-spacing:.5px}.header-actions .language-switch summary{max-width:94px;padding-left:6px;padding-right:6px}}

html[data-theme="dark"]{color-scheme:dark;--ink:#e2eaf5;--muted:#a2b3cc;--line:#2b3b53;--paper:#0c1524;--green:#4cd4a2;--red:#ff8698;--blue:#8bb9ff;--surface:#131f32;--surface-soft:#1b2a41}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
html[data-theme="dark"] :is(.quote-card,.overview-chart,.category-panel,.board,.chart-panel,.gold-card,.history-panel,.prose,.related-grid a,.commodity-guide,.market-guide,.core-price-panel,.detail-stats,.language-switch summary,.language-menu,.search-suggestions){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.header .search,.source-panel,.core-price-filters,.contact-channel,.product-analysis,.commodity-figure,.price-table thead th,.board-foot){background:var(--surface-soft);border-color:var(--line);color:var(--muted)}
html[data-theme="dark"] :is(.brand-sub,.primary-nav a,.market-hero p,.hero-metrics>div>span,.hero-update time,.quote-unit,.quote-caption,.basket-foot,.category-count,.category-changes,.index-change span,.section-top>span,.price-table small,.unit-cell,.footer-line,.footer-links,.footer-links .hourly,.breadcrumbs,.detail-heading p,.eyebrow,.detail-stats>div>span,.detail-stats small,.chart-foot,.chart-foot>span,.source-panel dt,.source-panel dd,.source-panel p,.pagination span,.related-grid small,.guide-body p,.market-guide p,.commodity-faq p,.guide-references,.commodity-figure figcaption,.contact-channel span,.contact-channel small,.search-suggestions small,.empty,.chart-empty){color:var(--muted)}
html[data-theme="dark"] :is(.detail-heading h1,.detail-stats strong,.gold-value,.footer-brand,.product-analysis strong,.search-suggestions strong,.information-page h2,.core-coverage strong,.search input){color:var(--ink)}
html[data-theme="dark"] :is(.primary-nav a.active,.text-link,.guide-references a,.contact-channel a,.category-panel .overview-heading>a,.basket-foot a,.core-series-detail summary){color:var(--blue)}
html[data-theme="dark"] :is(.tabs a,.ranges a,.pagination a,.gold-links a){background:var(--surface-soft);border-color:var(--line);color:#afc9ef}
html[data-theme="dark"] :is(.tabs a.active,.ranges a.active,.language-menu a[aria-current="true"]){background:#223d63;border-color:#345a87;color:#b9d4ff}
html[data-theme="dark"] :is(.category-row:hover,.price-table tbody tr:hover,.tabs a:hover,.ranges a:hover,.language-menu a:hover,.search-suggestions a:hover,.search-suggestions a.active){background:#203149}
html[data-theme="dark"] :is(.category-row,.price-table tbody th,.price-table td,.board-toggle,.board-foot,.commodity-faq,.commodity-faq details,.core-live-section,.core-history-section){border-color:var(--line)}
html[data-theme="dark"] :is(.price-table tbody th,.price-table tbody td){background:var(--surface)}
html[data-theme="dark"] .price-table tbody tr:hover :is(th,td){background:#203149}
html[data-theme="dark"] .coverage-summary{border-color:var(--line);color:var(--muted)}
html[data-theme="dark"] .coverage-summary strong{color:var(--ink)}
html[data-theme="dark"] .button.outline{background:var(--surface);border-color:#45638a;color:var(--blue)}
html[data-theme="dark"] :is(.core-price-filters select,.theme-toggle){background:var(--surface);border-color:#45638a;color:var(--ink)}
html[data-theme="dark"] .theme-toggle:hover{background:#223d63;color:var(--blue)}
html[data-theme="dark"] .search input::placeholder{color:#9aacca}
html[data-theme="dark"] :is(.search img,.language-switch summary img,.globe-icon){filter:brightness(0) invert(.8)}
html[data-theme="dark"] .price-table .pill{background:#223d63;color:#b9d4ff}
html[data-theme="dark"] .price-table .pill.monthly{background:#382f54;color:#d2bfff}
html[data-theme="dark"] .price-table .status{color:#9bc8e4}
html[data-theme="dark"] .status.warn{color:#edc077}
html[data-theme="dark"] .notice{background:#352a1a;border-color:#685332;color:#f0d49e}
html[data-theme="dark"] .change.up{color:var(--green);background:transparent}
html[data-theme="dark"] .change.down{color:var(--red);background:transparent}
html[data-theme="dark"] .price-chart text{fill:var(--muted)}
html[data-theme="dark"] .price-chart line:not(.chart-crosshair-line){stroke:var(--line)}
html[data-theme="dark"] .basket-chart polygon{fill:#18314f}
html[data-theme="dark"] .chart-crosshair-point{fill:var(--surface);stroke:var(--blue)}
html[data-theme="dark"] .chart-latest-dot{stroke:var(--surface)}
html[data-theme="dark"] .chart-tooltip{background:#08111e;color:var(--ink);border:1px solid var(--line)}
html[data-theme="dark"] .table-scroll{scrollbar-color:#49648a transparent}
