:root{--theme-bg:#000;--theme-panel:#111113;--theme-raised:#1b1b1d;--theme-text:#f5f5f7;--theme-muted:#a1a1a6;--theme-border:#303033;--theme-link:#9bbcf0;color-scheme:dark}
:root[data-theme=light]{--theme-bg:#fff;--theme-panel:#f5f5f7;--theme-raised:#e9e9ed;--theme-text:#1d1d1f;--theme-muted:#63636a;--theme-border:#dedee2;--theme-link:#0066cc;color-scheme:light}
html,body{background:var(--theme-bg);color:var(--theme-text)}
:root[data-theme=light] body{--bg:#fff;--panel:#f5f5f7;--sub:#eeeef0;--line:#dedee2;--muted:#63636a;--text:#1d1d1f;--green:#0066cc;--sa-bg:#fff;--sa-surface:#f5f5f7;--sa-raised:#eeeef0;--sa-border:#dedee2;--sa-text:#1d1d1f;--sa-muted:#63636a;--sa-accent:#0066cc;--ink:#1d1d1f;--base:#fff;--surface:#f5f5f7;--edge:#dedee2;--light:#1d1d1f;--accent:#0066cc;--border:#dedee2;background:#fff!important;color:#1d1d1f!important}
:root[data-theme=light] :is(header,.site-header,.top,.sidebar,.nav,.product-nav){background:#fff!important;color:#1d1d1f!important;border-color:#e2e2e5!important}
:root[data-theme=light] :is(.brand,.brand strong,.brand span:not(.brand-mark),.product-brand,.brand-mark,.primary-nav a:hover,.product-links a:hover,.primary-nav a[aria-current],.product-links a[aria-current],h1,h2,h3,h4,strong){color:#1d1d1f!important}
:root[data-theme=light] :is(.account-state,.primary-nav a,.product-links a,.secondary-top-nav a,.back-link,.section-intro p,.eyebrow,.hero-lead,.hero-footnote,.visual-label,.journey-list p,.principle-grid p,.muted,.panel-help,.intro p,.note,.desc,.footnote,.hint,.status,.notice p,.warning p,.small-tag,.tag,.badge){color:#63636a!important}
:root[data-theme=light] :is(.principle-grid article,.source-panel,.input-panel,.result-card,.review-card,.report-actions,.hardware-callout,.compute-detail,.tile,.panel,.card,.metric,.box,.category,.login-card,.key-tile,.notice,.warning,.map-card,.result-banner,.field,.sample,.icon){background:#f5f5f7!important;color:#1d1d1f!important;border-color:#dedee2!important;box-shadow:none}
:root[data-theme=light] :is(.sample:hover,.sample.selected){background:#e7e7eb!important;border-color:#9a9a9e!important}
:root[data-theme=light] :is(input:not([type=checkbox]):not([type=file]),textarea,select,.search,pre){background:#fff!important;color:#1d1d1f!important;border-color:#d1d1d6!important}
:root[data-theme=light] :is(.button,.btn,button:not(.marker),.upload-box,.risk-banner,.mode-controls,.review-buttons){background:#eeeef0;color:#1d1d1f;border-color:#d1d1d6}
:root[data-theme=light] :is(.button.primary,.btn.primary,button[aria-pressed=true],.tabs button.selected){background:#1d1d1f!important;color:#fff!important;border-color:#1d1d1f!important}
:root[data-theme=light] :is(.button.secondary,.account-button,.account-link){background:transparent;color:#1d1d1f;border-color:#bcbcc1}
:root[data-theme=light] :is(.text-link,.principle-grid a,.hardware-callout a,.account-dialog-body a){color:#0066cc}
:root[data-theme=light] :is(.privacy-note,.site-footer,.journey,.principles,.result-view,.result-tabs,.full-report,.detail,.history-row){border-color:#dedee2}
:root[data-theme=light] :is(.account-dialog,dialog){background:#fff;color:#1d1d1f;border-color:#d1d1d6}
:root[data-theme=light] :is(.account-dialog-body p,.report,.result-tab-panel){color:#424245}
:root[data-theme=light] :is(.visual-glow){background:radial-gradient(circle,#d0d0d5 0,#f1f1f3 38%,transparent 70%)}
:root[data-theme=light] :is(.visual-ring){border-color:#c7c7cc}
:root[data-theme=light] .visual-core strong{color:#fff!important}
:root[data-theme=light] .map-window{background:#171719!important}
:root[data-theme=light] :is(.map-label,.map-note span:last-child,.legend i){color:#a1a1a6}
:root[data-theme=light] :is(.feed-table th,.feed-table td,.event,.detail-copy,.placeholder){color:#424245;border-color:#d1d1d6}
:root[data-theme=light] :is(p,li,dd,dt,th,td){color:#424245}
:root[data-theme=light] .map-window strong{color:#eee!important}
/* Maintain contrast on the intentionally dark surfaces in the light theme. */
:root[data-theme=light] :is(.visual-core,.chip,.map-window){color:#f5f5f7}
:root[data-theme=light] :is(.visual-core,.chip,.map-window) :is(h1,h2,h3,h4,strong){color:#f5f5f7!important}
:root[data-theme=light] :is(.visual-core,.chip,.map-window) :is(p,li,dd,dt,th,td){color:#d2d2d7}
:root[data-theme=light] :is(.visual-core,.chip,.map-window) :is(.muted,.hint,.status,.notice p){color:#c5c5ca!important}
/* A selected control changes surface colour, so its label must change with it. */
:root[data-theme=light] :is(.button.primary,.btn.primary,button[aria-pressed=true],.tabs button.selected) :is(strong,span){color:#fff!important}
:root[data-theme=light] :is(.tile .big,.flow span,.status-row,.manual){color:#424245}
:root[data-theme=light] .manual:hover{color:#1d1d1f}
:root[data-theme=light] :is(.badge,.runtime-pill,.key-tag){background:#e9e9ed;border-color:#c7c7cc;color:#424245!important}
:root[data-theme=light] :is(input,textarea)::placeholder{color:#6b6b70;opacity:1}
:root[data-theme=light] :is(a,button,input,select,textarea,summary):focus-visible{outline-color:#1d1d1f}
:root[data-theme=light] .account-dialog-body .identity-status{background:#edf2ee;color:#1d1d1f;border-color:#c7d4ca}
:root[data-theme=light] .account-dialog-body .identity-status :is(p,span,strong){color:#1d1d1f!important}
/* The default dark theme uses light primary controls. */
:root:not([data-theme=light]) :is(.primary,.btn.primary,.action,.tabs button.selected,button[aria-pressed=true]) :is(strong,span){color:#111}
/* Reading sizes for the supporting tools, including compact status and help text. */
main :is(.card,.panel,.tile,.box,.category,.result-card,.review-card) :is(p,label,.hint,.footnote,.notice,.warning,.status,.empty){font-size:max(15px,1em);line-height:1.6}
main :is(.eyebrow,.section-label,.badge,.small-tag,.tag,.runtime-pill,.key-tag,.count){font-size:max(13px,1em);line-height:1.4}
main :is(.button,.btn,button,input,select,textarea){font-size:max(14px,1em)}
main :is(.feed-table,.table-wrap){max-width:100%;overflow-x:auto}
@media(max-width:700px){main :is(.card,.panel,.tile,.box,.category,.result-card,.review-card) :is(p,label,.hint,.footnote,.notice,.warning,.status,.empty){font-size:max(15px,1em)}main :is(button,input,select,textarea){font-size:max(16px,1em)}}
@media(prefers-reduced-motion:no-preference){body,header,main,.card,.panel,.tile,.source-panel,.input-panel,.result-card,.review-card,.report-actions{transition:background-color .22s,color .22s,border-color .22s}}
:root[data-theme=light] .hero h1 span{color:#59595f}
:root[data-theme=light] :is(.text-link,.principle-grid a,.hardware-callout a,.account-dialog-body a){color:#28282c}
