/* Shared reader interface. Mathematical figures are never inverted. */
.openmaths-bar{display:flex;align-items:center;gap:18px;flex-wrap:wrap;position:relative;z-index:10;padding:12px 20px;border-bottom:1px solid #52645a;background:#17241e;color:#e8ece3;font:13px/1.5 system-ui,sans-serif;max-width:none;margin:0 0 18px}
.openmaths-bar a{color:#d5e6ad!important;text-decoration:none}.openmaths-bar button{margin-left:auto;border:1px solid #697f70;border-radius:24px;background:transparent;color:#e8ece3;padding:6px 13px;font:inherit;cursor:pointer}.openmaths-bar :focus-visible{outline:3px solid #d5e6ad;outline-offset:3px}
html[data-theme=dark]{color-scheme:dark;--bg:#111a19;--page-bg:#111a19;--paper:#182320;--card:#182320;--panel:#182320;--text:#e8ece3;--ink:#e8ece3;--muted:#b6c3b9;--line:#42554a;--border:#42554a;--accent:#c4d49b;--link:#c4d49b}
html[data-theme=dark] body{background:#111a19!important;color:#e8ece3!important}
html[data-theme=dark] :is(main,article,section,header,footer,aside,nav,.card,.lesson,.content,.container,.sidebar,.toc,.course-card){background-color:transparent!important;color:inherit}
html[data-theme=dark] :is(h1,h2,h3,h4,h5,h6,p,li,summary,label,caption,td,th){color:inherit}
html[data-theme=dark] a{color:#c4d49b}
html[data-theme=dark] :is(pre,code,blockquote,details,.note,.theorem,.proof,.example,.exercise){background-color:#182820!important;color:#e8ece3;border-color:#42554a}
html[data-theme=dark] :is(input,select,button){background-color:#182820;color:#e8ece3;border-color:#52645a}
html[data-theme=dark] table{background:#182820;color:#e8ece3}
html[data-theme=dark] :is(.muted,.meta,.subject-note,.nav-count,.n,.to-menu){color:#b6c3b9!important}
html[data-theme=dark] .nav-subjects a{background:#21382b!important;color:#d5e6ad!important;border-color:#52645a!important}
.course-scope{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:.7rem 0;font:14px/1.5 system-ui,sans-serif}
.course-scope select{font:inherit;padding:8px;border:1px solid #789381;border-radius:6px}
html[data-theme=dark] :is(tr,td,th){background-color:transparent;border-color:#42554a}
html[data-theme=dark] :is(img,svg,canvas){color-scheme:light}
html[data-theme=dark] img{background:#fff;border-radius:2px}
@media print{.openmaths-bar{display:none!important}html[data-theme=dark] body{background:#fff!important;color:#111!important}}
