/* Black is the default; the reader can keep a light appearance instead. */
.top{flex-wrap:wrap;gap:18px}.top nav{flex:1;justify-content:center}
.theme-toggle{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border:1px solid var(--line);background:#eaf4ee;color:#145f53;font-size:12px;padding:9px 13px;min-height:42px}.theme-toggle span{font-size:19px;line-height:1}
.site-status:empty{display:none}.site-status{padding:16px 5%;color:var(--accent)}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark;--ink:#eef4f0;--muted:#b0bdb5;--accent:#a0dfbf;--line:#35423a;--mint:#3d725b;--paper:#050505;--soft:#141a17}
[data-theme=dark] body{background:var(--paper);color:var(--ink)}
[data-theme=dark] .top{background:#080b09f5}
[data-theme=dark] :is(.panel,.lesson,.exam-page){background:#101412}
[data-theme=dark] :is(.term,.term:nth-child(2n),details,.topic-links a,.options button,.example-notes section){background:#191f1b;color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.key,.feedback,.tool-controls output){background:#15291e;color:#e2f1e7}
[data-theme=dark] :is(input,select,textarea){background:#090d0a;color:var(--ink);border-color:#53675b}
[data-theme=dark] :is(button,.button){background:#a0dfbf;color:#0b2116}
[data-theme=dark] :is(.quiet,.theme-toggle,.file-button){background:#1c2721;color:#b6edce;border:1px solid #3d5547}
[data-theme=dark] .options button{background:#1a211c;color:var(--ink);border:1px solid #455c4e}
[data-theme=dark] .flash{background:linear-gradient(130deg,#19291f,#102019);color:#edf8f0;border-color:#466453}
[data-theme=dark] .answer{color:#d1e4d9}
[data-theme=dark] .badge{background:#244533;color:#c3efd4}
[data-theme=dark] :is(.hero-art,.canvas-wrap,.bars){background:#0b1410;border-color:var(--line)}
[data-theme=dark] .hero-art svg path:nth-of-type(2){stroke:#f6ce83}
[data-theme=dark] .hero-art svg path:nth-of-type(3){stroke:#a0dfbf}
[data-theme=dark] .hero-art svg path:nth-of-type(4){stroke:#9dc3fb}
[data-theme=dark] .hero-art svg text:nth-of-type(1){fill:#f6ce83}
[data-theme=dark] .hero-art svg text:nth-of-type(2){fill:#a0dfbf}
[data-theme=dark] .hero-art svg text:nth-of-type(3){fill:#9dc3fb}
[data-theme=dark] .bar{background:#67c8a3;color:#062719}
[data-theme=dark] .bar.active{background:#f6c26c;color:#332106}
[data-theme=dark] :is(.cell,.dot){background:#2b3830;color:#dfebe3}
[data-theme=dark] :is(.cell.active,.dot.on){background:#a0dfbf;color:#10281b}
[data-theme=dark] .cell.off{opacity:.6}
[data-theme=dark] .trace{background:#14261c;border-color:#405d4c}
[data-theme=dark] .trace-count{color:#b8d7c6}
[data-theme=dark] .trace-track span{background:#3a4e42}
[data-theme=dark] .trace-track .reached{background:var(--accent)}
[data-theme=dark] .pitfall{background:#2c2414;color:#f1dcad}
[data-theme=dark] pre{background:#080d0b;color:#e1eee7;border:1px solid #354b3d}
[data-theme=dark] .code-label{background:#1c3227;color:#b9edcf}
[data-theme=dark] .syntax-comment{color:#afc4b8}
[data-theme=dark] .syntax-key{color:#a8e9d1}
[data-theme=dark] .syntax-number{color:#f6ce83}
[data-theme=dark] .concept-explanation strong{color:#a0dfbf}
[data-theme=dark] .concept-example{border-color:var(--line)}
[data-theme=dark] .skip{background:#102019;color:#c2efd6}
:is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #ce9a45;outline-offset:4px}
@media(max-width:1100px){.top{flex-direction:row;align-items:center;justify-content:space-between}.top nav{order:3;flex-basis:100%;justify-content:flex-start}.top .brand small{display:none}.theme-toggle{margin-left:auto}}
@media(max-width:600px){.theme-toggle{padding:8px 10px;font-size:11px}.top .brand{font-size:21px}.brand img{width:30px;height:30px}}
@media print{.theme-toggle{display:none!important}html[data-theme=dark]{color-scheme:light;--ink:#000;--muted:#333;--paper:#fff;--line:#ccc;--accent:#000}html[data-theme=dark] :is(body,main,.exam-page,pre){background:#fff!important;color:#000!important}}
