#theme-toggle{display:flex;align-items:center;justify-content:center;gap:7px;background:#edf2fa;color:#3d527b;flex-shrink:0;padding:9px 12px;min-width:40px}
#theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.theme-moon{display:none}
html[data-theme=dark]{color-scheme:dark;--bg:#101725;--surface:#172133;--text:#e5edf9;--muted:#a8b6cc;--line:#2b3a52;--accent:#9bb4ff;--mint:#96d9c0;--shadow:0 8px 30px #0002}
html[data-theme=dark] .theme-sun{display:none}html[data-theme=dark] .theme-moon{display:block}
html[data-theme=dark] :is(header,.toolbar,.app-footer,.question-row,.source-stat,#reading-pane,#file-panel,#details,.panel-title,dialog,#tooltip,.code-hit){background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme=dark] button{background:#26344d;color:#d6e2fa}
html[data-theme=dark] button:hover{background:#354968;color:#fff}
html[data-theme=dark] :is(button.primary,#practice,#reveal-practice){background:#416df2;color:#fff}
html[data-theme=dark] :is(button.primary,#practice,#reveal-practice):hover{background:#547efb}
html[data-theme=dark] :is(.version-control,.toolbar nav){background:#101a2b}
html[data-theme=dark] :is(.version-control button,.toolbar nav button){background:transparent;color:#aebed8}
html[data-theme=dark] :is(.version-control button.active,.toolbar nav button.active){background:#2a3e61;color:#e1eaff;box-shadow:none}
html[data-theme=dark] :is(.search-wrap,#explanation pre,dialog pre){background:#101a2b;border-color:#31425f;color:#d5e2fa}
html[data-theme=dark] :is(.header-end button,.study-tools button,.question-open,.question-row>button:last-child,.sidebar-note button,.reading-nav:first-child button,.panel-title button,#files button,#outline button,.text-action,.mobile-changes){background:transparent;color:#afc2e4}
html[data-theme=dark] :is(.question-open:hover,#files button:hover,#outline button:hover){background:#202f49;color:#f0f5ff}
html[data-theme=dark] :is(.question-open strong,.sidebar-note strong){color:#e5edf9}
html[data-theme=dark] :is(.question-open small,.question-open>span:last-child,.row-number,.reading-nav span,.location,#files summary,#outline button small,.panel-title,.app-footer,.brand small){color:#a2b3cd!important}
html[data-theme=dark] :is(.eyebrow,.source-stat b,#outline button span,.guide-detail dt){color:#a8bfff}
html[data-theme=dark] :is(#categories button){background:transparent;color:#b2c0d7}
html[data-theme=dark] :is(#categories button.active,#files button.active){background:#293d60;color:#d6e3ff}
html[data-theme=dark] #categories button:hover{background:#24334c}
html[data-theme=dark] #categories button span{color:#a5b5cf}
html[data-theme=dark] :is(.spoken-answer,.guide-summary){background:#213452;border-color:#35527c}
html[data-theme=dark] :is(.spoken-answer p,.guide-summary p){color:#e0eaff!important}
html[data-theme=dark] :is(.spoken-answer .eyebrow,.guide-summary h3){color:#b6caff!important}
html[data-theme=dark] :is(.answer-detail summary,.guide-detail summary,#explanation h3){color:#cedcf4}
html[data-theme=dark] :is(.answer-detail p,.guide-detail p,#explanation p,.guide-steps,.guide-detail dd){color:#b9c8df}
html[data-theme=dark] :is(.follow-link,#explanation>button){background:#1c2b43;border-color:#344965;color:#c2d4fb}
html[data-theme=dark] .follow-link:hover{background:#293f62;border-color:#6a89c2}
html[data-theme=dark] .follow-link small{color:#a7bad9}
html[data-theme=dark] .example-box{background:#19382f;border-color:#355a4d}
html[data-theme=dark] .example-box h3{color:#b7e7ce!important}
html[data-theme=dark] .example-box p{color:#cae7d8!important}
html[data-theme=dark] :is(.warning,.answer-verification,#notice:not(:empty)){background:#3a3020;color:#f4d8a1;border-color:#c39852}
html[data-theme=dark] .answer-verification p{color:#f4d8a1}
html[data-theme=dark] .empty{background:#172133;border-color:#486084;color:#b8c9e2}
html[data-theme=dark] .comparison-table thead{background:#233752}
html[data-theme=dark] :is(.pill,.status){background:#2a3e60;color:#bed0f5}
html[data-theme=dark] .status.good{background:#21483b;color:#b4e4ce}
html[data-theme=dark] .local{color:#9cdac4}
html[data-theme=dark] a{color:#abc2ff}
html[data-theme=dark] #theme-toggle{background:#293c59;color:#d8e5ff}
html[data-theme=dark] input::placeholder{color:#99abc7}
html[data-theme=dark] kbd{color:#abc0e0;border-color:#415676}
@media(max-width:750px){#theme-toggle{padding:8px;width:36px;min-width:36px;min-height:36px}.theme-label{display:none}header{gap:10px}.brand{font-size:18px}.brand-logo{width:34px;height:34px}.version-control button{padding:6px 9px}header .version-control{margin-left:auto}}
html[data-theme=dark] .guide-steps li::marker{color:#aec4ff}
