/* Shared main-page visual language; layout and scroll ownership stay local. */
:is(.speed-math-overlay,.book100-overlay,.ability-overlay,.ability-diagnosis){
  background:var(--bg);color:var(--text);font-family:inherit;
}
:is(.speed-math-head,.book100-head){
  background:linear-gradient(120deg,#f9eac7,#eed29d);color:var(--text);
  border-bottom:1px solid var(--line);box-shadow:var(--shadow);
}
:is(.speed-math-head h2,.book100-head h2,.ability-head h1){font-size:clamp(24px,2.5vw,30px);letter-spacing:-.04em}
:is(.speed-math-head p,.book100-head p){color:var(--muted);font-size:14px;line-height:1.7}
.speed-math-eyebrow{color:var(--green);letter-spacing:.12em}
:is(.speed-math-head .close-exam,.book100-head button){background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:8px;min-height:44px;font:inherit}
:is(.speed-math-sidebar,.speed-math-main,.book100-paper,.book100-question-pane,.ability-stat,.ability-card){background:var(--panel);border-color:var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.book100-list-pane{background:var(--panel2);border-color:var(--line)}
:is(.book100-set,.book100-filters button,.speed-math-groups button,.speed-math-grid button,.speed-math-clear,.speed-math-actions .ghost,.book100-option,.book100-sheet-cell,.book100-nav button,.ability-overlay button,.ability-diagnosis button,.ability-inline button){background:var(--panel);color:var(--text);border-color:var(--line);border-radius:8px;font-family:inherit}
:is(.book100-set:hover,.book100-set.active,.speed-math-groups button.active,.book100-option.selected,.ability-choice:has(input:checked)){background:#fff1d5;border-color:#a7622d;color:var(--text)}
:is(.book100-filters button.active,.ability-filters button.active,.ability-actions button.active,.ability-primary,.book100-submit){background:var(--red)!important;color:#fffefa!important;border-color:var(--red)!important}
.book100-submit:hover{background:#8b2828}
.speed-math-grid button.current{border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}
.book100-sheet-cell.current{outline-color:var(--red)}
:is(.speed-math-clock,.book100-topline>div:last-child,.book100-option b,.ability-inline,.ability-diagnosis .ability-stem){background:var(--panel2);color:var(--text);border-color:var(--line)}
:is(.speed-math-stat,.speed-math-instruction,.speed-math-answer label span,.speed-math-answer p,.speed-math-kicker span:last-child,.book100-intro,.book100-topline span,.book100-set-top,.book100-set small,.book100-material-head span,.book100-question-head span,.book100-original summary,.book100-note,.book100-image-note,.ability-muted,.ability-status){color:var(--muted)}
:is(.speed-math-stat b,.speed-math-clock strong,.speed-math-kicker,.speed-math-expression,.book100-intro h3,.book100-material-text,.book100-question-pane>p#book100Stem,#book100Feedback,.speed-math-feedback .speed-math-key,.speed-math-feedback .speed-math-method){color:var(--text)}
:is(.book100-list-pane input,.speed-math-answer input,.ability-diagnosis select,.ability-diagnosis textarea){background:var(--panel);color:var(--text);border-color:#bba78e;font-family:inherit}
.speed-math-answer input:focus{outline-color:#e6c48e}
:is(.speed-math-overlay,.book100-overlay,.ability-overlay,.ability-diagnosis,.ability-inline) :focus-visible{outline:3px solid #a7622d;outline-offset:3px}
.ability-bar-track{background:#eadbc3}.ability-bar-track i{background:#9b5a3c}
.ability-diagnosis input[type=radio]{accent-color:var(--red)}
.ability-record,.book100-original,.book100-sheet,.ability-choice{border-color:var(--line)}
:is(.speed-math-feedback,.book100-option.correct,.speed-math-grid button.correct,.book100-sheet-cell.right){background:#f3f4df;border-color:#a0a06c;color:#596127}
:is(.speed-math-feedback.wrong,.book100-option.incorrect,.speed-math-grid button.wrong,.book100-sheet-cell.wrong){background:#fff0e8;border-color:#c88a75;color:#8e392f}
.book100-sheet-cell.answered{background:#f4e5c8}
.ability-status.error{color:var(--red)}
.book100-set-top,.book100-set small,.book100-set strong,.book100-question-head span,.book100-original summary{font-size:14px}
.speed-math-feedback,#book100Feedback{font-size:16px;line-height:1.8}
.ability-head{border-bottom:1px solid var(--line);padding-bottom:14px}
@media(max-width:650px){.book100-head h2{font-size:20px}.book100-head p{font-size:14px}.book100-head{gap:12px}}
