/* Theme-only overrides: light mode retains every original layout and color. */
.header-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.theme-switch{display:inline-flex;align-items:center;position:relative;flex-shrink:0;box-sizing:border-box;width:64px;height:34px;padding:3px;border:1px solid #c3cfe1;border-radius:999px;background:#e6edf7;cursor:pointer;transition:background .18s,border-color .18s}
.theme-switch-thumb{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#fff;color:#c78916;box-shadow:0 2px 5px #14234826;transform:translateX(0);transition:transform .18s,background .18s,color .18s}.theme-switch svg{width:18px;height:18px}.theme-switch-moon{display:none}
.theme-switch:hover{border-color:#8398b6}.theme-switch:focus-visible{outline:3px solid #8398d3;outline-offset:3px}
html[data-theme=dark] .theme-switch{background:#111c31;border-color:#526584}html[data-theme=dark] .theme-switch-thumb{transform:translateX(30px);background:#344c70;color:#f4dc91}html[data-theme=dark] .theme-switch-sun{display:none}html[data-theme=dark] .theme-switch-moon{display:block}
@media(max-width:600px){.header-actions{gap:8px}.campus-brand-title{display:none}}
@media(prefers-reduced-motion:reduce){.theme-switch,.theme-switch-thumb{transition:none}}
html[data-theme=dark]{color-scheme:dark;--blue:#aec8ff;--navy:#101d36;--bg:#0e1626;--text:#e3eaf5;--muted:#a8b5cb;--line:#34425b;--white:#18243a;--light:#243550}
html[data-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-theme=dark] header{background:#172239;color:#b4c3dc;border-color:#34425b}
html[data-theme=dark] .sidebar{background:#101d36}
html[data-theme=dark] :is(.panel,.card,.stats article,.route-card,.login-card){background:#19263c;border-color:#34425b;color:#e3eaf5}
html[data-theme=dark] :is(a,header b,.stats strong,.card-link,.tech-icon,.back){color:#aec8ff}
html[data-theme=dark] .sidebar a{color:#d2dff6}
html[data-theme=dark] :is(.btn,.design-lab .lab-button){background:#355b9e;border-color:#527ab6;color:#fff}
html[data-theme=dark] :is(.btn.light,.btn.secondary){background:#243852;border-color:#465c7b;color:#d9e6ff}
html[data-theme=dark] .btn:hover{background:#436fb4;color:#fff}
html[data-theme=dark] :is(.badge,.week-number,.point-number,.term-chapters a){background:#2a3c59;color:#d5e3fd}
html[data-theme=dark] .badge.good{background:#1c433d;color:#a3e2c4}
html[data-theme=dark] :is(th){background:#202f46;color:#b5c2d8}
html[data-theme=dark] :is(td,.list-row,.review,hr){border-color:#34425b}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:#111d30;color:#e6edf9;border-color:#4a5b76}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#94a5bf;opacity:1}
html[data-theme=dark] .notice{background:#223751;color:#cedfff;border-color:#7298db}
html[data-theme=dark] .notice.success{background:#193b33;color:#b4e4cd;border-color:#72ad8e}
html[data-theme=dark] :is(.notice.error,.errorlist,.demo-banner){background:#402934;color:#ffc3cc;border-color:#df7587}
html[data-theme=dark] :is(.answer,.case,.scenario,.glossary-example,.chapter-glossary dd small,.case-evidence-sheet){background:#21314b;color:#d1ddf0}
html[data-theme=dark] :is(.lesson-intro,.chapter-glossary dd,.lesson-points p,.study-aside p,.case-link p,.muted,dd){color:#b4c2d8}
html[data-theme=dark] :is(.lesson-sources summary,.case-context summary,.place-concept,.exercise-result){color:#bad0ff}
html[data-theme=dark] .concept-bank{background:#21324b}
html[data-theme=dark] .concept-token{background:#18263e;color:#dbe7ff;border-color:#506989}
html[data-theme=dark] .concept-token[aria-pressed=true]{background:#3a609c;color:white}
html[data-theme=dark] .match-target{background:#17263c;border-color:#536986}
html[data-theme=dark] .match-target.drag-over{background:#263f60;border-color:#aac4f3}
html[data-theme=dark] .match-target.match-correct{background:#193e34;border-color:#76b298}
html[data-theme=dark] .match-target.match-wrong{background:#432e27;border-color:#df9d77}
html[data-theme=dark] .case-link{background:#1d2f49;border-color:#405573;color:#d5e3fc}
html[data-theme=dark] .case-link:hover{background:#29405f;border-color:#7695c8}
html[data-theme=dark] .alphabet a{color:#d5e3fc;border-color:#445875}
html[data-theme=dark] .alphabet a[aria-current]{background:#3c5c92;color:#fff}
html[data-theme=dark] progress,html[data-theme=dark] progress::-webkit-progress-bar{background:#33425b}
html[data-theme=dark] progress::-webkit-progress-value{background:#94b6ff}
html[data-theme=dark] progress::-moz-progress-bar{background:#94b6ff}
html[data-theme=dark] :is(.design-lab,.library-campus){--ink:#e0e9fa;--blue:#abc6fa;--red:#ff8698;--line:#3b4a65;--soft:#22334d;--muted:#abbad1;color:#e0e9fa}
html[data-theme=dark] :is(.campus-hero,.module-masthead){background:linear-gradient(115deg,#1c2b43,#18273f);border-color:#3a4d6e}
html[data-theme=dark] .campus-hero em,html[data-theme=dark] .module-masthead em{color:#b2caff}
html[data-theme=dark] :is(.campus-hero-copy>p,.hero-greeting,.hero-foot,.campus-live .hero-greeting,.catalog-heading>p){color:#b0bfd7}
html[data-theme=dark] .campus-hero .kicker{color:#ff8b9e}
html[data-theme=dark] :is(.learning-pulse,.campus-live .daily-card,.design-course,.catalog-person,.campus-live .catalog-person,.learning-sheet,.module-compass){background:#19283f;border-color:#3b4a65;color:#e0e9fa}
html[data-theme=dark] :is(.learning-pulse small,.course-body>p,.campus-live .course-score,.campus-live .course-body .course-score,.campus-live .course-body .course-scope,.course-meta,.catalog-filter>span,.design-progress-label,.daily-copy p,.daily-note,.daily-caption){color:#afbed5}
html[data-theme=dark] .campus-live .daily-copy p{color:#b6c5dd}
html[data-theme=dark] :is(.pulse-icon,.module-chips span,.pitch-path,.library-note,.library-search,.library-resource,.library-empty){background:#23344e;border-color:#405573;color:#dbe7ff}
html[data-theme=dark] :is(.daily-symbol,.campus-live .daily-symbol,.daily-orb){background:#442c3d;color:#ff91a2}
html[data-theme=dark] :is(.course-action,.course-certificate,.design-progress-label b,.course-meta span:last-child,.lab-section-title>a,.course-body h2){color:#d7e4ff}
html[data-theme=dark] .course-action{border-color:#394a66}
html[data-theme=dark] .design-progress{background:#354660}
html[data-theme=dark] .design-progress>span{background:#98b8fb}
html[data-theme=dark] .red-progress>span{background:#f56a85}
html[data-theme=dark] :is(.catalog-person,.lab-tabs,.module-stage-nav){background:#253650;border-color:#465a79}
html[data-theme=dark] :is(.lab-tabs a[aria-current],.lab-tabs a:hover,.module-stage-nav .selected,.module-stage-nav a:hover){background:#3a537a;color:#fff}
html[data-theme=dark] :is(.future-campus,.future-grid>span,.daily-design,.design-case,.case-building,.library-future,.library-future-grid a){background:#20314a;border-color:#415572;color:#dbe6fb}
html[data-theme=dark] :is(.library-hero){background:linear-gradient(115deg,#1c2b43,#18273f);border-color:#405573}
html[data-theme=dark] :is(.library-hero em,.library-hero p,.library-add,.library-search label,.resource-description,.library-results-heading p,.resource-byline,.library-section-title>span,.library-future summary small,.library-future-grid small,.library-future>p,.library-note p,.library-note a,.library-empty p){color:#b8c9e4}
html[data-theme=dark] .library-hero .library-kicker{color:#ff8b9e}
html[data-theme=dark] .library-filters>a{background:#20324d;border-color:#465b7b;color:#cad9ef}
html[data-theme=dark] .library-filters>a[aria-current]{background:#3b5f98;border-color:#7496c6;color:#fff}
html[data-theme=dark] .library-filters a>span{background:#334c70;color:#ddeaff}
html[data-theme=dark] :is(.resource-technology,.library-resource-actions>a,.resource-byline>small,.library-kind){color:#b5c9e9}
html[data-theme=dark] .resource-byline{border-color:#455976}
html[data-theme=dark] .resource-symbol{background:#344b6d;color:#d3e3ff}
html[data-theme=dark] .resource-symbol-red{background:#493247;color:#ff8da0}
html[data-theme=dark] .library-glossary{background:#233c69;color:#fff}
html[data-theme=dark] .library-empty>span{background:#344b6d;color:#d2e2ff}
html[data-theme=dark] .library-future-grid b{color:#d5e3f9}
html[data-theme=dark] :is(.learning-sheet>p,.learning-sheet blockquote,.module-compass li,.module-compass>small,.evaluation-split p,.learning-sheet details p){color:#b7c8e2}
html[data-theme=dark] :is(.pitch-path div>span,.learning-sheet .sheet-tip){background:#2d4261;color:#dce9ff;border-color:#4a6287}
html[data-theme=dark] .login-story{background:#101d36}
html[data-theme=dark] .login-grid{background:#19263c}
html[data-theme=dark] :is(.eyebrow,.library-kicker){color:#ff9aaa}
html[data-theme=dark] .wireless-cover{color:#192e66!important}
html[data-theme=dark] .mini-avatars i{color:#203c79}
html[data-theme=dark] .mini-avatars i:last-child{color:#fff}
html[data-theme=dark] :is(.campus-live .daily-copy .eyebrow,.case-link .case-index){color:#ff9aaa}
@media(max-width:850px){.side-bottom{flex-wrap:wrap}.theme-toggle{margin:0;font-size:11px;padding:6px 9px}.side-bottom form{margin-left:auto}}
