/* Display preferences and the side-by-side mathematics desk. */
[data-theme-toggle]{white-space:nowrap;font-size:12px;padding:9px 12px;min-height:38px}
[data-theme-toggle][aria-pressed=true]{border-color:#779d88;background:#243a30;color:#d5e9dd}
.header-actions{flex-wrap:wrap;gap:10px}
.auth-theme-toggle{position:fixed;right:22px;top:18px;z-index:10}
.math-reading.math-split{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);align-items:start;gap:24px;max-width:none;padding:0;border:0;background:transparent}
.math-lesson-column,.math-split>.math-inline-practice{min-width:0;border:1px solid #e1e7df;border-radius:14px;background:#fff;padding:24px}
.math-lesson-column{position:sticky;top:20px;max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:auto;scrollbar-width:thin;scrollbar-color:#b7c9bc transparent}
.math-split>.math-inline-practice{margin:0;scroll-margin-top:20px}
.math-split .reading-section-head{gap:10px;align-items:baseline}
.math-split h2{font-size:20px;line-height:1.6}
.math-split p{font-size:16px;line-height:1.95}
.math-split .reading-number-example{padding:14px 16px}
.math-split .reading-number-example p{font-size:18px}
.math-split .reading-problem{font-size:19px}
.reading-lesson-block+.reading-lesson-block{border-top:1px solid #e1e7df;padding-top:22px;margin-top:22px}
.reading-lesson-block>summary{cursor:pointer;list-style:none;margin:0}
.reading-lesson-block>summary::-webkit-details-marker{display:none}
.reading-lesson-block>summary:after{content:'⌄';margin-left:auto;color:#6c8674;font-size:18px;transform:rotate(-90deg)}
.reading-lesson-block[open]>summary:after{transform:none}
.reading-lesson-block[open]>summary{margin-bottom:20px}
.math-split .reading-working{margin:20px 0}
.math-split .inline-question-title h3{font-size:17px}
.math-split [data-math-inline]{flex-wrap:wrap}
.math-split [data-math-inline] .field{flex:1 1 190px;min-width:0}
.math-split [data-math-inline] button{align-self:flex-start;font-size:13px}
.math-split .reading-section-head p{font-size:13px}
.math-split .reading-section-head small{font-size:12px}
.reading-course-picker{max-width:none}
@media(max-width:1000px){.math-reading.math-split{grid-template-columns:1fr;gap:20px}.math-lesson-column{position:static;max-height:none;overflow:visible}.math-lesson-column,.math-split>.math-inline-practice{padding:22px}}
@media(max-width:650px){[data-theme-toggle]{font-size:11px;padding:7px 9px}.header-actions{gap:6px}header{height:auto;min-height:86px;gap:10px;padding:12px 0}.header-actions .local-badge{max-width:160px}.math-lesson-column,.math-split>.math-inline-practice{padding:20px 16px}.auth-theme-toggle{right:12px;top:12px}}

html[data-theme=dark]{--bg:#101816;--ink:#dce9e2;--muted:#a3b7aa;--green:#9fc6ac;--line:#34483d;--surface:#18241e;--wash:#213329;--accent:#efa17f}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] aside{background:#111d17;border-color:var(--line)}
html[data-theme=dark] main,html[data-theme=dark] header,html[data-theme=dark] footer{background:transparent;border-color:var(--line);color:var(--muted)}
html[data-theme=dark] .brand,html[data-theme=dark] header .avatar{color:var(--ink)}
html[data-theme=dark] nav button{color:var(--muted)}
html[data-theme=dark] nav button.active{color:#dbede0;background:#2b4033}
html[data-theme=dark] button{background:#203128;color:var(--ink);border-color:#435c4b}
html[data-theme=dark] button:hover{background:#2a4033;color:#eff9f1;border-color:#83ad90}
html[data-theme=dark] button.primary{background:#efa17f;color:#251b16;border-color:#efa17f}
html[data-theme=dark] button.primary:hover{background:#f6b294;color:#251b16}
html[data-theme=dark] .text-button{background:transparent;color:#b7d5bd}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:#111d17;color:var(--ink);border-color:#4b6453}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#9caf9f}
html[data-theme=dark] input:disabled{background:#1b2b21;color:#b9d3bf;opacity:1}
html[data-theme=dark] :is(input[type=checkbox],input[type=radio]){accent-color:#a4caad}
html[data-theme=dark] :is(.panel,.stat,.math-course-picker,.math-lesson-column,.math-split>.math-inline-practice,dialog,.auth-card){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .math-reading.math-split{background:transparent}
html[data-theme=dark] #content :where(h1,h2,h3,h4,b,strong,dt,td,label){color:var(--ink)}
html[data-theme=dark] #content :where(p,li,dd,small,summary){color:#bdcec1}
html[data-theme=dark] #content :is(.muted,.reading-section-head p,.stat-label,.reading-course-picker>summary span){color:#a4b9aa}
html[data-theme=dark] #content :is(.reading-number-example,.reading-problem,.inline-math-choices label,.worked-prompt,.math-symbols,.math-hint,.math-check,.math-diagram,.guide-pattern,.worked-example,.grammar-glossary,.sentence-examples>div,.audio-controls,.notice,.week-focus,.word-answer,.word-bank button,.quiz-options label,.walk-example,.math-walkthrough li){background:var(--wash);border-color:#3c5745;color:#d6e8da}
html[data-theme=dark] #content .reading-number-example p{color:#def1e3}
html[data-theme=dark] #content :is(.reading-bridge,.reading-lesson-block,.inline-math-question,.inline-practice-footer,.reading-result,.guide-section,.topic-route,.result-list,.section-head,.lesson-item){border-color:var(--line)}
html[data-theme=dark] #content :is(.inline-math-feedback.is-correct,.quiz-feedback.correct,.guide-right){background:#203d2b;border-color:#446e50;color:#c5e9cd}
html[data-theme=dark] #content :is(.inline-math-feedback.is-wrong,.quiz-feedback.incorrect,.guide-wrong,.math-pitfall){background:#3c2d21;border-color:#79573b;color:#f2cfaa}
html[data-theme=dark] #content :is(.is-correct,.correct,.is-wrong,.incorrect) :is(p,strong,li,small){color:inherit}
html[data-theme=dark] #content :is(.selected,.quiz-options label:has(input:checked),.inline-math-choices label:has(input:checked)){background:#2a4633;color:#dbeedf;border-color:#7aab87}
html[data-theme=dark] #content :is(.pill,.local-badge,.avatar,.week-number,.day-cell,.funnel>div,.learning-level-card,.stage-navigation button){background:#243a2c;color:#c4decc;border-color:var(--line)}
html[data-theme=dark] #content :is(.episode-full>summary,.reading-help,.quiz-explanation){background:var(--surface);color:#bed9c6;border-color:var(--line)}
html[data-theme=dark] :is(th,.sentence-breakdown th){background:#213329;color:#b9cfbf}
html[data-theme=dark] :is(th,td){border-color:var(--line)}
html[data-theme=dark] a{color:#b4d8bf}
html[data-theme=dark] .math-diagram g{fill:#2a4432;stroke:#a0c6ac}
html[data-theme=dark] .math-diagram text{fill:#d4e9da}
html[data-theme=dark] .auth-page,html[data-theme=dark] .auth-main{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .auth-art{background:#13251a;color:#d8eadd}
html[data-theme=dark] .auth-card :is(h1,label,p){color:var(--ink)}
html[data-theme=dark] .auth-card .muted,html[data-theme=dark] .auth-note{color:var(--muted)}
html[data-theme=dark] #toast{background:#c5dfcd;color:#15231a;box-shadow:0 5px 24px #0005}
html[data-theme=dark] dialog::backdrop{background:#000a}
html[data-theme=dark] aside nav button{background:transparent}
html[data-theme=dark] aside nav button:hover{background:#22382a}
html[data-theme=dark] aside nav button.active{background:#2b4033}
html[data-theme=dark] header :is(.avatar,.local-badge){background:#243a2c;border-color:var(--line);color:#d7eade}
html[data-theme=dark] .auth-art :is(h1,p,.eyebrow,.auth-wordmark,.auth-foot){color:#c7d9ba}

/* Let wheel input pass to the page at either edge of the teaching pane. */
.english-split .english-inline-practice{margin:0}.english-split .guide-sentence{display:block}.english-split .guide-sentence b,.english-split .guide-sentence>span{display:block}.english-split .guide-sentence button{margin-top:10px}.english-split .guide-pattern{font-size:15px;line-height:1.9}.english-split .sentence-breakdown{font-size:13px}.english-split .quiz-panel{min-width:0}.english-split .quiz-panel h2{font-size:19px}.english-split .quiz-options label{white-space:normal;overflow-wrap:anywhere}.math-reading [data-english-inline]{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap}.math-reading [data-english-inline] .field{flex:1 1 190px;min-width:0;margin:0}.math-reading [data-english-inline] button[type=submit]{white-space:nowrap;font-size:13px}.english-inline-order{flex-basis:100%;min-width:0}.english-inline-order .word-answer{overflow-wrap:anywhere;margin:8px 0}.english-inline-order .word-bank button{font-size:16px}.english-split .reading-passage{overflow-wrap:anywhere}.english-split .inline-math-feedback button{font-size:13px}.english-split .inline-math-feedback p{font-size:14px}.math-lesson-column:focus-visible{outline:2px solid #79a78a;outline-offset:3px}@media(max-width:650px){.math-reading [data-english-inline]{flex-direction:column}.math-reading [data-english-inline] .field,.math-reading [data-english-inline] .inline-math-choices{width:100%;flex-basis:auto}}


.practice-page-navigation{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}.practice-page-navigation button:disabled,.inline-practice-footer button:disabled{opacity:.4;cursor:default}
