.theme-switch{display:inline-grid;place-items:center;flex:0 0 auto;width:38px;height:38px;padding:9px;border:1px solid #dfe5e8;border-radius:7px;background:#fff;color:#58696f;cursor:pointer}.theme-switch svg{width:18px;height:18px}.theme-switch:hover{background:#edf1f3}.theme-switch:focus-visible{outline:3px solid #92b45b;outline-offset:3px}
:root[data-ui-theme=dark]{color-scheme:dark;--canvas:#181c20;--surface:#22272c;--ink:#e5e9ed;--muted:#a2adb7;--line:#363e45;--sidebar:#14191c}
:root[data-ui-theme=dark] body:has(.site-frame){background:#181c20;color:#e5e9ed}
:root[data-ui-theme=dark] :is(.topbar,.edu-header,.tool-shell-topbar){background:#20262bef!important;color:#e5e9ed!important;border-color:#363e45!important}
:root[data-ui-theme=dark] :is(.search-control,.view-controls){background:#2b333a;border-color:#3e4850}
:root[data-ui-theme=dark] .search-control input{color:#edf1f3}
:root[data-ui-theme=dark] .search-control input::placeholder{color:#a5afb7}
:root[data-ui-theme=dark] :is(.topbar-label,.page-intro p,.collection-count,.section-heading p,.result-count,.about-section p,.site-footer,.tool-group-head span:last-child){color:#a5b0b8}
:root[data-ui-theme=dark] :is(.topbar-label strong,.tool-card h3,.quick-copy strong,.about-section h2,.mobile-brand){color:#e4e9ed}
:root[data-ui-theme=dark] :is(.tool-card,.quick-tool){background:#242b30;border-color:#394248;box-shadow:none}
:root[data-ui-theme=dark] :is(.tool-card,.quick-tool):hover{border-color:#789060;background:#293237}
:root[data-ui-theme=dark] :is(.tool-card p,.quick-copy small,.tool-tags,.empty-state){color:#b1bbc3}
:root[data-ui-theme=dark] .tool-tags span{background:#323c43;color:#bdc8cf}
:root[data-ui-theme=dark] .view-controls button[aria-pressed=true]{background:#48545b;color:#fff}
:root[data-ui-theme=dark] .theme-switch{background:#2b353b;color:#e3ebd8;border-color:#47545c}
:root[data-ui-theme=dark] .theme-switch:hover{background:#3e4b52}
:root[data-ui-theme=dark] .icon-button{color:#bac5cc}
:root[data-ui-theme=dark] .icon-button:hover{background:#38434a;color:white}
:root[data-ui-theme=dark] .empty-state h3{color:#e3e9ed}
:root[data-ui-theme=dark] body.tool-shell-page{background:#181e22!important;color:#e4e9ed;--paper:#181e22!important;--paper-strong:#263038!important;--card:#242c32!important;--ink:#e4eaef!important;--muted:#adb9c1!important;--line:#44515a!important;--line-strong:#63727c!important;--shadow:0 3px 16px #0002!important}
:root[data-ui-theme=dark] body.tool-shell-page>:is(.app,.tool-app,.md-app,.page)>:is(.workspace,.layout)>:is(.panel,.pane,.preview-panel){background:#242c32!important;border-color:#414e57!important;color:#e4e9ed}
:root[data-ui-theme=dark] .md-app>.toolbar{background:#242c32!important;border-color:#414e57!important}
:root[data-ui-theme=dark] .tool-shell-page :is(.panel-head,.pane-head){background:#283139!important;color:#d9e1e6}
:root[data-ui-theme=dark] :is(.tool-shell-title span,.tool-shell-page .field,.tool-shell-page .fine,.tool-shell-page .status){color:#b4bfc6}
:root[data-ui-theme=dark] body.tool-shell-page>:is(.app,.tool-app,.md-app,.page)>:is(.hero,.md-header) :is(.lede,.hero-lede,.eyebrow){color:#aebfc7}
:root[data-ui-theme=dark] .tool-shell-page :is(.panel,.pane)>:is(input,textarea,select),:root[data-ui-theme=dark] .tool-shell-page :is(.panel-body,.field,.stack,.control-group) :is(input,textarea,select){background:#20282f;color:#e7edf1;border-color:#4a5862}
:root[data-ui-theme=dark] .tool-shell-page .btn.primary{background:#d9f58b!important;border-color:#d9f58b!important;color:#26351b!important}
:root[data-ui-theme=dark] .tool-shell-back,:root[data-ui-theme=dark] .tool-shell-language{background:#2d383f!important;color:#e1e9ee!important;border-color:#4b5962!important}
:root[data-ui-theme=dark] .tool-shell-language a{color:#d4dfe6!important}
:root[data-ui-theme=dark] body[data-education]{background:#181e22!important;color:#e4e9ed}
:root[data-ui-theme=dark] :is(.edu-brand,.edu-intro h1,.edu-related h2){color:#e3e9ed}
:root[data-ui-theme=dark] :is(.edu-intro p,.edu-badge,.edu-toolbar span,.edu-hint,.edu-settings label,.edu-header>a:last-child,.edu-links a){color:#afbdc6}
:root[data-ui-theme=dark] .edu-settings{background:#242c32;border-color:#414e57;color:#e4e9ed}
:root[data-ui-theme=dark] .edu-settings :is(input,textarea,select),:root[data-ui-theme=dark] .edu-actions :is(button,select),:root[data-ui-theme=dark] #clear-image{background:#202930;color:#e1e9ee;border-color:#53636e}
:root[data-ui-theme=dark] .edu-actions .primary{background:#d9f58b;color:#26351b;border-color:#d9f58b}
:root[data-ui-theme=dark] .edu-preview{background:#11191e}
:root[data-ui-theme=dark] .edu-paper{background:white;color:#263238;color-scheme:light}
:root[data-ui-theme=dark] .edu-error{color:#ff9b9b}
@media(max-width:760px){.topbar>.theme-switch{grid-column:3;grid-row:1;width:34px;height:34px}.edu-header{gap:9px}.edu-header>.theme-switch{width:34px;height:34px}.tool-shell-actions{gap:6px}}
@media print{.theme-switch{display:none!important}:root[data-ui-theme=dark] body[data-education],:root[data-ui-theme=dark] .edu-preview{background:white!important;color:#263238!important}}
:root[data-ui-theme=dark] .tool-shell-page :is(.panel,.controls,.settings-panel,.sidebar) label{color:#becbd2}
:root[data-ui-theme=dark] .tool-shell-page :is(.group-title,.control-title,.panel-title){color:#b8d59e}
:root[data-ui-theme=dark] .tool-shell-page :is(input,textarea)::placeholder{color:#9caeb9;opacity:1}
