html[data-color-mode='dark'] { --background:#171a20; --surface:#22262e; --surface-secondary:#2b3039; --default:#303640; --foreground:#e4e7ee; --muted:#a8b0c0; --separator:#3b4350; --accent:#65a9ff; --bg-primary:#171a20; --bg-secondary:#22262e; --text-primary:#e4e7ee; --text-secondary:#a8b0c0; color-scheme:dark; }
html[data-color-mode='dark'] body,
html[data-color-mode='dark'] :is(.course-home,.workspace,.course-body,#lab-workbench,.component-workbench) { background:#171a20 !important; color:#e4e7ee !important; }
html[data-color-mode='dark'] :is(.course-header,.course-card,.task-sidebar,.experiment,.ai-panel,.dialog,.course-toast,.workbench-inspector,.parameter-inspector,.sidebar,.left-panel,.right-panel,.panel,.card,.section,.info-section,.tab-content,.app-select-popover,.lab-select-menu) { background:#22262e !important; color:#e4e7ee !important; border-color:#3b4350 !important; }
html[data-color-mode='dark'] :is(h1,h2,h3,h4,p,label,small,footer,.info-label,.info-value,.badge,.formula-title,.formula-text,.part-desc,.part-name,.hint,.brand,.rail-title,.section-title,.param-label,.task-progress,.observation-heading) { color:#cbd2df !important; }
html[data-color-mode='dark'] :is(button:where(:not(.course-video-action)),input,select,.select__trigger,.tabs__list,.course-link,.formula-box,.formula-step,.principle-note,.context,.info-panel,.calc-box,.readout,.stat-box) { background:#303640 !important; color:#e0e7f3 !important; border-color:#465164 !important; }
html[data-color-mode='dark'] :is(button.primary,.hero-actions button,.lab-button[data-variant='primary'],.selected,.tabs__indicator) { background:#235c9e !important; color:#fff !important; }
html[data-color-mode='dark'] #lab-workbench > :is(.center-area,.right-area,.viewport-area,.canvas-area),html[data-color-mode='dark'] :is(.anatomy-viewport,.observation,.scene-area,.scene-wrap,.three-container,.iso) { background:#1b2028 !important; }
html[data-color-mode='dark'] :is(.charts-area,.waveform-area,.chart-wrap) { background:#22262e !important; }
html[data-color-mode='dark'] :is(.anatomy-toolbar button,.observation-controls button) { background:#303640 !important; color:#e0e7f3 !important; }
html[data-color-mode='dark'] .anatomy-stage svg text { fill:#cbd2df; }
html[data-color-mode='dark'] .ai-panel iframe { background:white; }
html[data-color-mode='dark'] #lab-workbench:has(.dc-stage) .info-panel :is(.info-label,.info-value,.badge) { color:#cbd2df !important; background:transparent !important; }
html[data-color-mode='dark'] .scene-linkage-status { background:#303640 !important; color:#cbd2df !important; }

/* The experiment workbench has its own high-specificity layout skin. */
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench { background:#171a20 !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench > :is(.center-area,.right-area,.viewport-area,.canvas-area) { background:#1b2028 !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .workbench-inspector { background:#22262e !important; border-color:#3b4350 !important; color:#cbd2df !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench :is(.rail-title,.card-title,.section-title,.info-section-title,.panel-title,.status-value,.status-pill,.part-hint,.part-info,.legend-item,.hint,.tab-btn,.tabs__tab) { color:#cbd2df !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .workbench-inspector :is(label,.param-label,.slider-label,.label) { color:#b1bbcc !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .workbench-inspector :is(.principle-box,.knowledge-box,.formula-box,.data-card,.status-card,.resistance-display) { background:#2b3039 !important; color:#cbd2df !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench :is(.part-info,.calc-section,.formula-step,.principle-note,.chart-wrap,.charts-area,.scene-linkage-status,.chart-label .tag) { background:#2b3039 !important; color:#cbd2df !important; border-color:#465164 !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .anatomy-toolbar button { background:#303640 !important; color:#e0e7f3 !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .tabs__tab[data-selected] { color:#fff !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench:has(.dc-stage) .info-panel :is(.info-label,.info-value,.badge) { color:#cbd2df !important; }

html[data-color-mode='dark'] :is(table,thead,tbody,tr,th,td) { background:#252b34 !important; color:#cbd2df !important; border-color:#465164 !important; }
html[data-color-mode='dark'] th { background:#303845 !important; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .legend-item { background:transparent !important; }

html[data-color-mode='dark'] .dc-stage svg > rect { fill:#22262e; }
html[data-color-mode='dark'] .dc-stage svg text { fill:#cbd2df; }
html[data-color-mode='dark'] :is(.simulator-workbench,.simulator-workbench > .header) { background:#22262e !important; color:#cbd2df !important; }
html[data-color-mode='dark'] { --bg:#171a20;--bg-card:#22262e;--bg-surface:#2b3039;--text:#cbd2df;--text-muted:#aab4c4;--border:#404957;--orange:#65a9ff;--cyan:#72c9ed;--success:#5ed5b1;--warning:#eac56a; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .workbench-inspector :is(.value,.metric-value,.data-value,.result-label,.param-unit,.result-unit,.label,.led-label) { color:#cbd2df !important;-webkit-text-fill-color:#cbd2df; }
html.lab-workbench-page[data-color-mode='dark'] #lab-workbench .workbench-inspector :is(.result-value,.tau-value,.fc-value,.highlight) { color:#78b6ff !important;-webkit-text-fill-color:#78b6ff; }
