.display-preferences{padding:10px 32px;border-bottom:1px solid var(--line);background:var(--paper)}
.preferences-form{max-width:1396px;margin:auto;display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap}
.preferences-form label{font-size:12px;margin:0}.preferences-form select{width:auto;margin:0;padding:5px 9px;min-height:34px;font-size:12px}.preferences-form .button{min-height:34px}
html[data-theme=dark]{color-scheme:dark;--paper:#101010;--white:#191919;--ink:#f5f5f5;--muted:#b0b0b0;--line:#363636;--deep:#080808}
html[data-theme=light]{color-scheme:light;--paper:#fafafa;--white:#fff;--ink:#181818;--muted:#575757;--line:#d4d4d4;--deep:#f0f0f0;--accent:#202020}
html[data-theme] body{background:var(--paper);color:var(--ink)}
html[data-theme] :is(.sidebar,.topbar,.public-topbar,.panel,.course-card,.empty,.question-builder,.grade-box,.answer-toolbar,.activity-access,.teacher-note,.search,.global-search){background:var(--white);border-color:var(--line);color:var(--ink)}
html[data-theme] :is(h1,h2,h3,label,summary,.public-nav a,.sidebar nav a,.course-state,.course-teacher,.catalog-heading p:last-child,.card-body>p,.auth-intro p,.course-intro .lead,.course-instructor,.course-details-line,.course-tabs a,.welcome-about p,.welcome-gallery figcaption,.header-account>a:not(.button)){color:var(--ink)}
html[data-theme] :is(.eyebrow,.tiny-label,.section-label,.course-category,.enrollment-label,.question-note,.save-state,.catalog-toolbar,footer,footer a,.welcome-about a,.welcome-courses .section-heading>a,.auth-links){color:var(--muted)}
html[data-theme] :is(input:not([type=checkbox]):not([type=radio]),textarea,select,option){color-scheme:inherit;background:var(--white);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(input,textarea)::placeholder{color:var(--muted)}
html[data-theme] :is(.button,.course-card-action){background:var(--ink);border-color:var(--ink);color:var(--paper)}
html[data-theme] .button.secondary{background:transparent;color:var(--ink);border-color:var(--muted)}
html[data-theme] :is(.button,.course-card-action):hover{opacity:.8;color:var(--paper)}
html[data-theme] .button.secondary:hover{background:var(--deep);color:var(--ink)}
html[data-theme] .button:disabled{background:var(--deep);color:var(--muted);border-color:var(--line)}
html[data-theme] :is(.badge,.outline-tag,.activity-icon,.step-number,.avatar){background:var(--deep);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.sidebar nav a.selected,.sidebar nav a:hover,.course-tabs a:hover){background:var(--deep);color:var(--ink);border-color:var(--ink)}
html[data-theme] :is(.notice,th){background:var(--deep);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(table,td,td a,.export-answer>b,.remove-question,.icon-button){color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.question-panel,.lesson-row,.card-bottom,.course-information,.course-tabs,.course-details-line,.welcome-about,.public-nav){border-color:var(--line)}
html[data-theme] .global-search :is(input,button){color:var(--ink)}
html[data-theme] a:hover{color:var(--ink)}
html[data-theme=light] .public-brand img{filter:none}
html[data-theme=dark] .public-brand img{filter:brightness(0) invert(1)}
html[data-theme] .welcome-hero .button{background:#171717;color:#fff;border-color:#171717}
html[data-theme] .welcome-hero .button.secondary{background:#fff;color:#171717;border-color:#171717}
html[data-theme] .welcome-hero-copy :is(h1,h2,.welcome-eyebrow){color:#151d38}
html[data-theme] .welcome-hero-copy p{color:#222d46}
@media(max-width:700px){html[data-theme] .welcome-hero{background:var(--paper)}html[data-theme] .welcome-hero-copy :is(h1,h2,p,.welcome-eyebrow){color:var(--ink)}}
@media(max-width:600px){.display-preferences{padding:10px 17px}.preferences-form{justify-content:flex-start;gap:6px}.preferences-form label{font-size:11px}.preferences-form select{font-size:11px;padding:5px}.preferences-form .button{font-size:11px;padding:5px 9px}}
@media print{.display-preferences{display:none!important}html[data-theme] body,html[data-theme] .panel{background:#fff;color:#111}html[data-theme] :is(h1,h2,h3){color:#111}}

.theme-switch{position:relative;display:inline-flex;align-items:center;justify-content:space-between;width:58px;height:30px;flex:0 0 58px;padding:4px 6px;border:1px solid var(--muted);border-radius:20px;background:var(--deep);color:var(--ink);cursor:pointer;isolation:isolate}.theme-switch svg{width:16px;height:16px;z-index:1;pointer-events:none}.theme-switch .theme-thumb{position:absolute;left:3px;top:3px;width:22px;height:22px;border-radius:50%;background:var(--ink);transition:transform .18s ease;pointer-events:none}.theme-switch .theme-sun{color:var(--paper)}.theme-switch .theme-moon{color:var(--ink)}html[data-theme=dark] .theme-switch .theme-thumb{transform:translateX(28px)}html[data-theme=dark] .theme-switch .theme-sun{color:var(--ink)}html[data-theme=dark] .theme-switch .theme-moon{color:var(--paper)}.theme-switch:focus-visible{outline:2px solid var(--ink);outline-offset:4px}.header-account .theme-switch{margin-right:6px}@media(max-width:600px){.public-layout .public-topbar .header-account{gap:9px}.public-brand img{width:112px}.theme-switch{width:50px;flex-basis:50px}.theme-switch .theme-thumb{width:22px}html[data-theme=dark] .theme-switch .theme-thumb{transform:translateX(20px)}.header-account .theme-switch{margin-right:0}.public-topbar-inner{column-gap:8px}}@media(prefers-reduced-motion:reduce){.theme-switch .theme-thumb{transition:none}}@media print{.theme-switch{display:none!important}}
html[data-theme] .card-bottom strong{color:var(--ink)}html[data-theme] .course-category{background:var(--deep);color:var(--ink)}
