/* Appearance overrides follow the current UI; layout and data behavior stay intact. */
#appearanceSettings label{margin-top:0}#appearanceSettings select{max-width:320px}#appearanceStatus{margin:10px 0 0}
:root[data-theme="dark"]{
 color-scheme:dark;--ink:#E8EEE9;--moire-green:#3D6D4E;--moire-green-hover:#345F44;
 --surface-soft:#263C2E;--canvas:#131A16;--surface:#1D2721;--ai-accent:#B2ABFF;
 --success:#8FD2A8;--warning:#F0C37B;--danger:#FFB4AA;
 --line:#3B4A40;--muted:#B5C2B8;--muted-light:#A7B6AC;
 --shadow:none;--theme-link:#B4D9BF;
}
html[data-theme="dark"] body{color:var(--ink)}
html[data-theme="dark"] :is(.app-sidebar,.mobile-nav,#cloudPanel.cloud-panel,.box,.summary-card,.dashboard-panel,.course-tile,.home-focus,.flash,.ai-coach-result,.reference,.example-choice,.candidate,.source-text,.source,.ai-settings,.ai-coach,.dropzone-lite,.dashboard-hero.minimal-focus,.course-overview-card.minimal-course-overview,.menu>div,.skip-link){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.course-overview-stats>div,.course-note,.product-reality,.consent,.upcoming-date,.course-mark,.summary-icon,.empty-graphic,.composer-plus,.source-kind,.state-chip,.beta-pin,.future-capabilities>span:not(.state-chip)){background:var(--surface-soft);border-color:var(--line);color:var(--theme-link)}
html[data-theme="dark"] :is(.brand,.primary-nav a.active,.settings-nav a.active,.mobile-nav a.active,.course-heading .crumb,.eyebrow,.minimal-focus .eyebrow,.hero-text-link,.section-title a,.text-link,.reference b,.reference p,.ai-coach-result h4,.product-reality b,.product-reality a,.course-overview-stats strong,.summary-card strong,.source-card-title b,.tabs button.selected,.course-subnav button.selected,#cloudPanel>summary,#cloudBadge,.minimal-release-note a,.steps b,.benefit-list b){color:var(--theme-link)}
html[data-theme="dark"] :is(.primary-nav a,.settings-nav a,.nav-icon,.sidebar-label,.sidebar-footnote,.sidebar-footnote a,.brand-text small,.mobile-nav a,.course-arrow,.source-chevron,.upcoming-item small,.upcoming-item>span:last-child,.assignment-tile>span>span,.assignment-tile>span:last-child,.course-overview-stats small,.source-card-title small,.summary-label,.summary-card strong small,.summary-card a,.empty-state p,.minimal-release-note summary,.tabs button,.course-subnav button,.example-no,.example-choice small,.example-arrow,.tag,.steps,.quiet-note,.section a,.section h2,.test-row,.review-pager){color:var(--muted)}
html[data-theme="dark"] .minimalist-stats .summary-label{color:var(--muted)}
html[data-theme="dark"] :is(input,textarea,select){background:#152019;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#98AB9E;opacity:1}
html[data-theme="dark"] label{color:var(--ink)}
html[data-theme="dark"] :is(input,textarea,select):focus{border-color:#8EBD9D;outline-color:#668A72}
html[data-theme="dark"] :is(button,a,summary):focus-visible{outline-color:#A9D7B7}
html[data-theme="dark"] :is(button.secondary,.button.secondary,.secondary){background:var(--surface-soft);color:var(--theme-link)}
html[data-theme="dark"] :is(.primary-nav a,.settings-nav a,.course-tile,.summary-card,.example-choice,button.secondary,.button.secondary,.course-subnav button):hover{background:#2B4133;color:var(--ink)}
html[data-theme="dark"] .week-chip{background:#1D2A22;border-color:var(--line);color:var(--muted)}
html[data-theme="dark"] .week-chip.has-data{background:var(--surface-soft);color:var(--theme-link);border-color:#526C59}
html[data-theme="dark"] .week-chip.selected{background:var(--moire-green);border-color:#84AD91;color:#fff}
html[data-theme="dark"] .week-chip b{background:#385941;color:#D9EDE0}
html[data-theme="dark"] .week-chip.selected b{background:#DBEEDF;color:#24422D}
html[data-theme="dark"] .week-expand,html[data-theme="dark"] .text-button{color:var(--theme-link)!important}
html[data-theme="dark"] .course-subnav button.selected{border-bottom-color:#9ECDAA}
html[data-theme="dark"] .tabs button.selected{border-bottom-color:#9ECDAA}
html[data-theme="dark"] .state-chip.planned,html[data-theme="dark"] .ai-warning{background:#3C3322;color:#F0D69B;border-color:#66563A}
html[data-theme="dark"] button.danger{background:#482D29;color:#FFBEB3}
html[data-theme="dark"] button.danger:hover{background:#59352F}
html[data-theme="dark"] .bar{background:var(--surface-soft)}
html[data-theme="dark"] :is(.section,.deck,.tabs,.quiet-note,.source-panel[open],.benefit-list p,.test-row,.example-choice,.course-subnav,.dropzone-lite){border-color:var(--line)}
html[data-theme="dark"] #toast{background:#DAE9DF;color:#14271C}
html[data-theme="dark"] #storageConflict{background:#3C3322!important;color:#F0D69B!important;border-color:#A58A54!important}
html[data-theme="dark"] .ratings button{color:#fff}
html[data-theme="dark"] .minimal-release-note{background:transparent;border:0}
