/* Dark surfaces preserve semantic data colors and the existing page geometry. */
[data-theme-toggle]{white-space:nowrap;flex-shrink:0;cursor:pointer}
.quality-page .topbar>[data-theme-toggle]{margin-inline-start:auto}
html[data-theme=dark]{color-scheme:dark;--canvas:#101923;--ink:#dce6ef;--muted:#9aacbd;--teal:#68c6df;--border:#304252;--surface:#182532;--raised:#203140;--hover:#263c4d;background:var(--canvas);color:var(--ink)}
html[data-theme=dark] body{background:var(--canvas);color:var(--ink)}
html[data-theme=dark] :is(button,.button,input,select,textarea,option){background-color:var(--surface);color:var(--ink);border-color:var(--border)}
html[data-theme=dark] :is(button,.button):hover{background-color:var(--hover);color:#eaf7ff;border-color:#6390a7}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#8fa4b6}
html[data-theme=dark] :is(input,button,a,summary,select):focus-visible{outline:2px solid #78d6ed;outline-offset:3px}
html[data-theme=dark] :is(.panel,.board,.stats article,.home-market,.daily-board,.filter-card,.metric-panel,.report-actions,.report-tabs,.watch-tabs,.chart-tabs,.home-tabs,.report-chart-disclosure,.rate-group,.analytics-chart,.chart-side,.loading,.mini-popover,.picker-body,.nav-menu>div,#globalResults,#watchResults,dialog,.quality section,.quality .notice,.report-context article,.coverage-grid article,.pro-chart,.pro-chart.pro-expanded){background:var(--surface)!important;color:var(--ink);border-color:var(--border)!important;box-shadow:none}
html[data-theme=dark] :is(.topbar,.market-rail,.ticker-strip){background:#142532!important;border-color:var(--border);color:var(--ink)}
html[data-theme=dark] .topbar :is(.nav,button,summary,.toplinks>a,.nav-account>a){color:#dce8f1;background:transparent}
html[data-theme=dark] .topbar :is(.nav:hover,button:hover,.nav.active){background:var(--hover);color:#8eddf0}
html[data-theme=dark] .global-search>input{background:#203747;border-color:#405d70;color:var(--ink)}
html[data-theme=dark] .market-rail .nav.active{background:#285e75!important;color:white!important}
html[data-theme=dark] :is(.panel-head,.board-top,.home-market h2,.facet-heading,.fact,.board-foot,.chart-tooltip,.pro-tooltip,.data-empty,.product-monogram,.selected-context span,.stats .history-stat){background:var(--raised)!important;color:var(--ink)!important;border-color:var(--border)!important}
html[data-theme=dark] :is(.home-caption,.ticker-item,.metric-panel>summary,.floating-field>.field-label,#globalResults button,#watchResults button){background:var(--surface)!important;color:var(--ink)!important}
html[data-theme=dark] :is(th,.metric-panel thead th,.metric-panel thead th:nth-child(-n+5),.summary-row th){background:var(--raised)!important;color:#c5d9e7!important;border-color:var(--border)}
html[data-theme=dark] :is(td,.metric-panel table td,.metric-panel table td:first-child){background:var(--surface);color:var(--ink);border-color:var(--border)}
html[data-theme=dark] :is(tbody tr:nth-child(even),tbody tr:nth-child(even) td,.metric-panel tbody tr:nth-child(even) td,#modalFilterOptions label:nth-child(even)){background:#1b2b3a!important}
html[data-theme=dark] :is(tbody tr:hover td,.metric-panel tbody tr:hover td,.pick-options>label:hover,#globalResults button:hover,#watchResults button:hover){background:var(--hover)!important}
html[data-theme=dark] :is(.summary-row td,.summary-row th,.metric-panel .summary-row td,.metric-panel .summary-row th){background:#2b4052!important;color:#e3edf6!important}
html[data-theme=dark] :is(.text-link,.cell-link,.metric-panel .text-link,.metric-panel .cell-link,.product,.report-context b,.pro-title,.mini-popover>b,h2){color:var(--ink)}
html[data-theme=dark] :is(a,.text-link:hover,.intro h1,.dialog-top h2,.quality h1,.help-text h3,.help-text a,.eyebrow){color:var(--teal)}
html[data-theme=dark] :is(.muted,.method,.secondary,.filter-note,.intro p,.filter-main>label,.reference-filters>label,.picker summary,.picker summary span,.stats article>span,.stats small,td small,th small,.rate-group td small,.rate-group h2 small,.home-rates td small,.ticker-item small:last-child,.report-context span,.report-context small,.pro-title small,.pro-hint,.pro-foot,.pro-foot a,.connection,.auto,.coverage-grid p,.chart-legend label,.workspace-crumb,.workspace-crumb a,.quality .muted){color:var(--muted)!important}
html[data-theme=dark] .fact span{color:var(--muted)!important}
html[data-theme=dark] .ticker-item b{color:#bad0df}
html[data-theme=dark] :is(.positive,.passed,.ratio,.quality .passed){color:#63d5ac!important}
html[data-theme=dark] :is(.negative,.quality .error){color:#ff879d!important}
html[data-theme=dark] :is(.change-pill,.pill.matched,.badge,.ticker-item small:nth-child(3)){background:#193f38;color:#78dfbc}
html[data-theme=dark] :is(.change-pill.negative,.ticker-item small.negative){background:#482a38;color:#ff9caf}
html[data-theme=dark] :is(.badge.warn,.quality .warning,#notice){background:#463c23;color:#f3cf86}
html[data-theme=dark] :is(.error,#loadError){background:#422b32!important;color:#ffb5bd!important}
html[data-theme=dark] :is(.info,.pill,.pill.matching){background:#243e55;color:#b1d6f4}
html[data-theme=dark] :is(.selected,.market.selected,.market.active,.picker[open] summary,button[aria-pressed=true]){background:#254658!important;color:#95e0ef!important;border-color:#527e92!important}
html[data-theme=dark] .primary{background:#246b80;color:#fff;border-color:#3e889e}
html[data-theme=dark] :is(.text-link,.cell-link,th button){background:transparent!important}
html[data-theme=dark] .chart-icon{color:#a7c3d5}
html[data-theme=dark] dialog::backdrop{background:#050b13b8}
html[data-theme=dark] #toast{background:#285265;color:#fff}
html[data-theme=dark] body[data-route=watch] #pane{background:var(--surface)}
html[data-theme=dark] :is(.pro-toolbar,.pro-properties,.pro-objects,.pro-tooltip,.pro-draw-tools,.chart-settings,.advanced,.panel-head){border-color:var(--border)}
html[data-theme=dark] :is(.pro-actions button,.pro-draw-tools button,.pro-properties>button){background:var(--surface);color:#a9c4d8}
html[data-theme=dark] .plot svg text{fill:#b8cbdc}
html[data-theme=dark] .pro-canvas :is(table,td,th){background:transparent!important}
html[data-theme=dark] .site-footer{color:var(--muted)}
@media(max-width:800px){.topbar>[data-theme-toggle]{padding:5px;font-size:11px}}

/* Shared glass finish. Blur only floating surfaces: chart fullscreen must keep
   the viewport as its containing block, and large tables must scroll cheaply. */
:root{--glass-fill:linear-gradient(130deg,#ffffffed,#f2f8fcd9);--glass-edge:#ffffffd9;--glass-shadow:0 6px 22px #264b6810,inset 0 1px 0 #ffffffed;--glass-control:linear-gradient(135deg,#fffffff0,#eaf3f9c9);--glass-soft:#ffffff45;--glass-popover:#f8fbfff2}
html[data-theme=dark]{--glass-fill:linear-gradient(130deg,#253b4de8,#162532e0);--glass-edge:#b5deff29;--glass-shadow:0 7px 24px #020b1629,inset 0 1px 0 #c4e7ff1c;--glass-control:linear-gradient(135deg,#365166b8,#20313ec9);--glass-soft:#c2e8ff09;--glass-popover:#1a2c3cf5}
html:root body{background-image:radial-gradient(ellipse at 92% 8%,#58bad723,transparent 48%),radial-gradient(ellipse at 8% 55%,#8889e619,transparent 48%);background-attachment:fixed}
html:root :is(.intro,.panel,.board,.stats article,.home-market,.daily-board,.filter-card,.metric-panel,.report-actions,.report-tabs,.watch-tabs,.chart-tabs,.home-tabs,.report-chart-disclosure,.rate-group,.analytics-chart,.chart-side,.loading,.mini-popover,.picker-body,.nav-menu>div,#globalResults,#watchResults,dialog,.quality section,.quality .notice,.report-context article,.coverage-grid article,.pro-chart,.lab-controls,.data-notes,#pro){background:var(--glass-fill)!important;border:1px solid var(--glass-edge)!important;box-shadow:var(--glass-shadow)!important;border-radius:16px}
html:root :is(.report-tabs,.watch-tabs,.chart-tabs){border-radius:16px 12px 0 0}
html:root .filter-card{border-radius:0 0 16px 16px}
html:root :is(.panel-head,.board-top,.home-market h2,.facet-heading,.fact,.board-foot,.metric-panel>summary,.product-monogram,.selected-context span,.stats .history-stat){background:var(--glass-soft)!important;border-color:var(--glass-edge)!important}
html:root :is(.metric-panel>summary,.home-market h2,.panel-head){border-radius:15px 15px 0 0}
html:root :is(.picker-body,.nav-menu>div,#globalResults,#watchResults,dialog,.mini-popover){background:var(--glass-popover)!important;-webkit-backdrop-filter:blur(16px) saturate(125%);backdrop-filter:blur(16px) saturate(125%)}
html:root :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea,.picker summary,.reference-filters button,.lab-controls button,.quality .controls button){background:var(--glass-control)!important;border:1px solid var(--glass-edge);border-radius:10px;box-shadow:inset 0 1px 0 var(--glass-soft)}
html:root .topbar,html:root body>header:has(+.lab-controls){background:linear-gradient(110deg,#07516cdb,#146981ed)!important;border-bottom:1px solid #d5f1ff40;box-shadow:0 3px 18px #103e5521;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
html[data-theme=dark] .topbar,html[data-theme=dark] body>header:has(+.lab-controls){background:linear-gradient(110deg,#142c3ce8,#19445ae0)!important}
html:root .market-rail,html:root .ticker-strip{background:var(--glass-popover)!important;border-color:var(--glass-edge);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
html:root .ticker-item{background:transparent!important;border-color:var(--glass-edge)}
html:root .global-search>input{background:#ffffff1a!important;border-color:#c3e6f34d!important;color:#fff}
html:root :is(#globalResults,#watchResults) button{background:transparent!important}
html:root :is(.lab-controls,.data-notes){padding:12px 16px;margin:12px 16px}
html:root :is(.pro-chart.pro-expanded,.pro-chart:fullscreen){border-radius:0;background:var(--surface,#fff)!important}
html:root dialog:has(.pro-expanded){-webkit-backdrop-filter:none;backdrop-filter:none}
@media(prefers-reduced-transparency:reduce){html:root :is(.picker-body,.nav-menu>div,#globalResults,#watchResults,dialog,.mini-popover,.topbar,.market-rail,.ticker-strip){-webkit-backdrop-filter:none;backdrop-filter:none}html{--glass-fill:var(--surface,#fff);--glass-popover:var(--surface,#fff)}}
/* A single radius scale for controls, nested cards and their outer frames. */
html:root :is(button,.button,input:not([type=checkbox]):not([type=radio]),select,textarea,.picker summary,.floating-field,.global-search>input,.nav-menu>div){border-radius:10px}
html:root :is(.fact,.product-monogram,.selected-context span,.stats .history-stat,.chart-tooltip,.pro-tooltip,.chart-settings,.pro-properties,.pro-objects,.data-empty,.help-text,.watch-top,.mini-popover){border-radius:12px}
html:root :is(.intro,.panel,.board,.stats article,.home-market,.daily-board,.filter-card,.metric-panel,.report-actions,.report-tabs,.watch-tabs,.chart-tabs,.home-tabs,.report-chart-disclosure,.rate-group,.analytics-chart,.chart-side,.loading,.picker-body,#globalResults,#watchResults,dialog,.quality section,.quality .notice,.report-context article,.coverage-grid article,.pro-chart,.lab-controls,.data-notes,#pro){border-radius:16px}
html:root :is(.table-wrap,.metric-panel .table-wrap){border-radius:0 0 15px 15px}
html:root :is(.pro-chart.pro-expanded,.pro-chart:fullscreen,#pro:fullscreen){border-radius:0}
/* A quote is neutral. Only its change indicator carries a gain/loss color. */
html:root #archiveBadge{background:transparent!important;color:var(--ink)!important;border:0!important;box-shadow:none!important;max-width:100%;overflow-wrap:anywhere;line-height:1.6}
html:root #archiveBadge small{font-weight:400;font-size:11px}
html:root .badge{border-radius:12px}
html:root #appDialog:has(.pro-expanded){position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;overflow:visible;border-radius:0;-webkit-backdrop-filter:none;backdrop-filter:none}
html:root #globalSearch{background:#ffffff1a!important;border-color:#c3e6f34d!important;color:#fff}
html:root :is(#rateChart,.pro-chart).pro-expanded,html:root :is(#rateChart,.pro-chart):fullscreen{background:var(--surface,#fff)!important;border-radius:0!important}
html:root #heatmap.range-map{position:relative;display:block;height:600px;min-height:0;direction:ltr;overflow:hidden}
html:root #heatmap.range-map .heat-cell{position:absolute;min-height:0;min-width:0;margin:0;padding:0;overflow:hidden;gap:2px;box-shadow:inset 0 0 0 1px #ffffff65;border:0;border-radius:3px;direction:rtl}
html:root #heatmap.range-map .heat-cell strong{font-size:clamp(10px,1vw,15px);line-height:1.35;max-height:2.7em;overflow:hidden}
html:root #heatmap.range-map .heat-cell span{font-size:12px}
html:root #heatmap.range-map .heat-cell small{font-size:10px;overflow:hidden;max-height:2.8em}
html:root #heatmap.range-map .heat-tiny>*{visibility:hidden}
body[data-route=map] .reference-filters{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
body[data-route=map] .reference-filters input[name=start],body[data-route=map] .reference-filters input[name=end]{max-width:none;direction:ltr}

/* All producer rows remain reachable; header and portfolio totals stay in view. */
html:root .metric-panel .report-scroll{max-height:var(--report-height,660px);overflow:auto;overscroll-behavior:contain;position:relative;scrollbar-gutter:stable}
html:root .metric-panel .report-scroll thead th{position:sticky;top:0;z-index:5}
html:root .metric-panel .report-scroll thead th:nth-child(-n+5){z-index:9}
html:root .metric-panel .report-scroll tfoot{position:sticky;bottom:0;z-index:7}
html:root .metric-panel .report-scroll tfoot :is(td,th){top:auto;background:var(--raised,#e7ecf2)!important;box-shadow:0 -1px var(--border,#d9e2e8)}
html:root .metric-panel .report-scroll tfoot :is(td,th):nth-child(-n+5){z-index:8}
html:root [data-cement-packaging][hidden]{display:none}
/* Pointer-transparent callout also works inside compact row previews. */
html:root .pro-callout{position:absolute;z-index:20;pointer-events:none;direction:rtl;text-align:right;max-width:min(360px,calc(100% - 12px));max-height:calc(100% - 12px);overflow:hidden;background:var(--surface,#fff);color:var(--ink,#203445);border:1px solid var(--border,#d9e2e8);border-radius:10px;padding:8px 10px;box-shadow:0 6px 24px #0003;font-size:11px;line-height:1.6}
html:root .pro-callout[hidden]{display:none}
.pro-callout>b{display:block;padding-bottom:4px;border-bottom:1px solid var(--border,#d9e2e8);margin-bottom:4px}
.pro-callout>div{display:grid;grid-template-columns:6px minmax(0,1fr) auto;gap:6px;align-items:center}
.pro-callout i{width:6px;height:6px;border-radius:50%}
.pro-callout strong{font-variant-numeric:tabular-nums;max-width:230px;white-space:normal}

/* One explicit layout overrides the older compact ticker grid at every breakpoint. */
.rate-source-time>span{display:block;direction:rtl;text-align:right;white-space:nowrap}
.ticker-strip{height:92px;min-height:92px}
.ticker-strip #tickerItems{display:flex;align-items:stretch;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.ticker-strip #tickerItems .ticker-item{flex:1 0 250px;min-width:250px;height:90px;min-height:90px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:20px 20px 32px;grid-template-areas:"title title" "price change" "updated updated";gap:2px 8px;padding:6px 12px;align-items:center;align-content:start;box-sizing:border-box}
.ticker-strip .ticker-item>b{grid-area:title;min-width:0;font-size:12px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.ticker-strip .ticker-item>span{grid-area:price;direction:rtl;text-align:right;font-size:13px;line-height:20px;white-space:nowrap}
.ticker-strip .ticker-item>small:nth-child(3){grid-area:change;justify-self:end;font-size:11px;line-height:18px;white-space:nowrap}
.ticker-strip .ticker-item>small.rate-source-time{grid-area:updated;display:block;align-self:start;min-width:0;height:32px;white-space:normal;overflow:visible;font-size:10px;line-height:16px;text-align:right}
.ticker-strip .ticker-item .ticker-unit{font-size:10px;font-style:normal;font-weight:400}
body>main{padding-bottom:112px}
.market-rail{bottom:92px}
