/* Math Lab "Paper & Ink" light theme (Nov 2026).
   Loaded last on every page, so it overrides the older Chalk light colors.
   Screen only: printed worksheets are unchanged. Graph and figure cards stay navy in both themes.
   To undo: remove mathlab-light.css from guideAssets in dist/server/typography-entry.mjs. */
@media screen{

/* ---------- Old site pages (html[data-ml-theme=chalk]) ---------- */
html[data-ml-theme=chalk]:root{
  --ink:#0F1E3A;--muted:#475569;--paper:#F4F7FB;--line:#B8C4D4;
  --green:#0B6E77;--lime:#D9F99D;--blue:#2563EB;
  --surface:#FFFFFF;--surface-raised:#EEF3F9;--learning-border:#B8C4D4;
  --vp-correct-bg:#DCFCE7;--vp-wrong-bg:#FEE2E2;--vp-correct-border:#15803D;--vp-wrong-border:#B91C1C;
  color-scheme:light
}
html[data-ml-theme=chalk]:root body{background:#F4F7FB!important;color:#0F1E3A!important}
html[data-ml-theme=chalk]:root body :is(.panel,.note,.topic,.unit-index a,.vp-home-card,.vp-gate,.ml-role-panel,.ml-role-dialog,.sat-q,.sat-panel,.em-panel,.ml-search-box,.ma-panel,.ma-card,.ma-stat,.ma-course,.ml-account-dialog,.ml-role-option,.ml-account-tabs,.ml-search-results a,.ml-account-menu,.ml-preview-card,.ml-preview-stat,.ml-role-info){border-color:#E2E8F0!important}
html[data-ml-theme=chalk]:root body :is(input,select,textarea){border-color:#94A3B8}
html[data-ml-theme=chalk]:root body .pick-role{--pick-teal:#0B6E77;--pick-lime:#D9F99D}

/* answers */
html[data-ml-theme=chalk]:root body :is(.choice.correct,.idea-choices button.correct,.em-correct,.em-choices button.em-correct,.eg-opt.ok,.vp-correct,.vp-options button.vp-correct,.mq-match button:disabled){background:#DCFCE7!important;color:#14532D!important;border-color:#15803D!important}
html[data-ml-theme=chalk]:root body :is(.choice.wrong,.idea-choices button.wrong,.em-incorrect,.em-choices button.em-incorrect,.eg-opt.no,.vp-incorrect,.vp-options button.vp-incorrect){background:#FEE2E2!important;color:#7F1D1D!important;border-color:#B91C1C!important}
html[data-ml-theme=chalk]:root body :is(.feedback,.idea-feedback,.vp-status){background:#EEF3F9;color:#0F1E3A}
html[data-ml-theme=chalk]:root body .ml-role-table .heat.good{background:#DCFCE7!important;color:#14532D!important}
html[data-ml-theme=chalk]:root body .ml-role-table .heat.mid{background:#FEF3C7!important;color:#78350F!important}
html[data-ml-theme=chalk]:root body .ml-role-table .heat.low{background:#FEE2E2!important;color:#7F1D1D!important}
html[data-ml-theme=chalk]:root body :is(.ml-account-menu [data-menu-signout],.ml-role-error,.eg-hearts,.ml-contact-status[data-error=true],.rt-timer.rt-out,.rt-low-t,.rt-review .rt-res.rt-wrongc,.mla-admin-remove){color:#B91C1C!important}
html[data-ml-theme=chalk]:root body :is(.eg-msg,.rt-warn,.rt-timer.rt-low,.rt-mid,.sat-timer.low){color:#92400E!important}
html[data-ml-theme=chalk]:root body :is(.sat-flag.on,.rt-flag.rt-on){background:#FEF3C7!important;color:#78350F!important;border-color:#B45309!important}
html[data-ml-theme=chalk]:root body :is(.ml-search-overlay,.ml-account-backdrop){background:#0F1E3A66}
html[data-ml-theme=chalk]:root body :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid #2563EB!important;outline-offset:3px}
html[data-ml-theme=chalk]:root body .ml-call{background:#F7FEE7;border-left-color:#65A30D}
html[data-ml-theme=chalk]:root body .ml-call-label{color:#3F6212}
html[data-ml-theme=chalk]:root body .ml-call-label::before{background:#65A30D}
html[data-ml-theme=chalk]:root body #app .ml-call-btn:hover{background:rgba(11,110,119,.08)!important}
html[data-ml-theme=chalk]:root .ml-landing-art line{stroke:rgba(15,30,58,.3)!important}
html[data-ml-theme=chalk]:root .ml-landing-art path{stroke:#0B6E77!important}
html[data-ml-theme=chalk]:root .ml-landing-art circle{fill:#A3E635!important;stroke:#3F6212}
html[data-ml-theme=chalk]:root .ml-landing-art text{fill:#334155!important}

/* Tabs and toggles: outlined, the chosen one in teal (not every button filled) */
html[data-ml-theme=chalk]:root body :is(.mla-tabs,[role=tablist],.tabs,.sat-tabs,.rt-tabs,.ml-account-tabs) button,
html[data-ml-theme=chalk]:root body :is(button[role=tab],button.sat-tab,button.rt-tab){background:#FFFFFF!important;color:#0F1E3A!important;border:1px solid #CBD5E1!important;box-shadow:none!important}
html[data-ml-theme=chalk]:root body :is(.mla-tabs,[role=tablist],.tabs,.sat-tabs,.rt-tabs,.ml-account-tabs) button:is([aria-selected=true],[aria-pressed=true],.on,.active),
html[data-ml-theme=chalk]:root body :is(button[role=tab],button.sat-tab,button.rt-tab):is([aria-selected=true],.on,.active){background:#0B6E77!important;color:#FFFFFF!important;border-color:#0B6E77!important}
html[data-ml-theme=chalk]:root body :is(.mla-tabs,[role=tablist],.tabs,.sat-tabs,.rt-tabs,.ml-account-tabs) button:not([aria-selected=true]):hover{background:#EEF3F9!important}
/* Sort buttons in table headers: plain text */
html[data-ml-theme=chalk]:root body :is(th button,button.mla-sort){background:transparent!important;color:#0F1E3A!important;border:0!important;box-shadow:none!important;padding:0!important;font-weight:600}
html[data-ml-theme=chalk]:root body :is(th button,button.mla-sort):hover{color:#0B6E77!important;text-decoration:underline}
html[data-ml-theme=chalk]:root body :is(thead th,th){color:#0F1E3A!important}
html[data-ml-theme=chalk]:root body :is(.mla-student-table,.mla-table,.ml-role-table,.sat-table,.rt-table,.pro-table,.vp-table) thead{background:#EEF3F9!important}
html[data-ml-theme=chalk]:root body :is(.mla-student-table,.mla-table,.ml-role-table,.sat-table,.rt-table,.pro-table,.vp-table) :is(td,th){border-color:#E2E8F0!important}

/* SAT Math Course: readable level chips and warnings on white */
html[data-ml-theme=chalk]:root .mlc{--mlc-lime:#84CC16;--mlc-warn:#B45309;--mlc-bad:#B91C1C}

/* ---------- Graph and figure cards: navy in both themes ---------- */
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-course-graph,svg.ml-topic-art,svg[data-tb-sketch],.graph-example svg,.em-topic-diagram svg,.ml-art svg,.ml-math-figure),
html[data-ml-theme=chalk]:root body :is(svg.sat-fig,svg.calc-graph,.ml-math-figure,.alg-poly-graph){background:#101E33!important;color:#EEF5FF!important;border-color:#2C405B!important}
html[data-ml-theme=chalk]:root body #app .em-topic-diagram svg.ml-topic-art{background:#101E33!important;border-color:#2C405B!important}
html[data-ml-theme=chalk]:root body :is(.alg-poly-axis-x,.alg-poly-axis-y){color:#EEF5FF!important}
html[data-ml-theme=chalk]:root body :is(svg.sat-fig,svg.calc-graph,.ml-math-figure,.ml-art svg) :is(.ml-figure-label,text),
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,svg.ml-course-graph,.ml-math-figure,.ml-coordinate-figure,.ml-art svg,.em-topic-diagram svg.ml-topic-art) :is(.ml-figure-label,text){fill:#EEF5FF!important;color:#EEF5FF!important;stroke:none!important;fill-opacity:1!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure,.em-topic-diagram svg.ml-topic-art) .ml-figure-key{fill:#C6F432!important}
html[data-ml-theme=chalk]:root body #app svg.sat-fig :is(path,line,polyline,polygon,ellipse):not(defs *,clipPath *,mask *,marker *){stroke:#3DD3C4!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure,.em-topic-diagram svg.ml-topic-art) :is(.ml-figure-line,.curve,.f){stroke:#3DD3C4!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure,.ml-coordinate-figure) :is(.ml-figure-grid,.major,.minor,.g){stroke:#2C405B!important;fill:none!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure) :is(.ml-figure-axis,.axis,.a,.fig-arrow,.fig-asym,.asym){stroke:#9FB3CF!important;fill:none!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure,.em-topic-diagram svg.ml-topic-art) :is(.ml-figure-point,.point,.p){fill:#C6F432!important;stroke:#C6F432!important;stroke-width:1px!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure) :is(.ml-figure-filled,.ml-figure-arrow-head){fill:#3DD3C4!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure) .ml-figure-angle{stroke:#C6F432!important;fill:none!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure) :is(.ml-figure-hole,.hole){fill:#101E33!important;stroke:#C6F432!important}
html[data-ml-theme=chalk]:root body #app :is(svg.sat-fig,svg.calc-graph,svg.ml-topic-art,.ml-math-figure) .ml-figure-background,
html[data-ml-theme=chalk]:root body #app svg.sat-fig :is(rect[fill=white],rect[fill="#fff"],rect[fill="#ffffff"]){fill:#101E33!important}
html[data-ml-theme=chalk]:root body #app .ml-math-figure .ml-figure-unfilled{fill:none!important}
html[data-ml-theme=chalk]:root body #app .ml-math-figure .ml-figure-muted{fill:#60718D!important;stroke:#60718D!important}

/* ---------- Rebuilt lessons, practice and Graph Lab (data-theme) ---------- */
:root[data-theme="light"]{
  --bg:#F4F7FB;--surface:#FFFFFF;--ink:#0F1E3A;--muted:#475569;--line:#E2E8F0;
  --teal:#0B6E77;--teal-soft:#DFF3F4;--lime:#4D7C0F;--lime-soft:#ECFCCB;
  --warn:#B45309;--warn-soft:#FEF3C7;--good:#15803D;--bad:#B91C1C
}
:root[data-theme]{
  --fig-bg:#101E33;--fig-grid:#22344F;--fig-axis:#5B7391;--fig-label:#A9BCD6;
  --fig-teal:#3DD3C4;--fig-lime:#C6F432;--fig-parent:#60718D;
  --fig-key:#172A45;--fig-key-2:#1E3555;--fig-ink:#EEF5FF
}

/* Practice and course index pages: teal numbers and links in the darker teal */
:root[data-theme="light"] :is(.pr-sum b,.ch-pct,.ch li b){color:#0B6E77!important}
:root[data-theme="light"] .linkbtn{color:#0A5C63!important}
:root[data-theme="light"] .pr-sum .bar i{background:#0B6E77!important}
:root[data-theme="light"] .lv4{background:#D9F99D!important;color:#1A2E05!important}
/* Inline bright-teal or lime text written into older pages */
html[data-ml-theme=chalk]:root body :is([style*="color:#2EC4B6"],[style*="color: #2EC4B6"],[style*="color:#3DD3C4"],[style*="color: #3DD3C4"],[style*="color:#2ec4b6"],[style*="color:#3dd3c4"],[style*="color: rgb(61, 211, 196)"],[style*="color: rgb(46, 196, 182)"]):not(svg *){color:#0B6E77!important}
html[data-ml-theme=chalk]:root body :is([style*="color:#C6F432"],[style*="color: #C6F432"],[style*="color:#c6f432"],[style*="color: rgb(198, 244, 50)"]):not(svg *){color:#3F6212!important}
/* Lesson breadcrumb and next-lesson links: solid dark teal in every link state */
:root[data-theme="light"] :is(.crumbs a,.nextbar a,.crumbs a:link,.crumbs a:visited,.nextbar a:visited,.crumbs a:hover,.crumbs a:focus,.crumbs a:active){color:#0B6E77!important;opacity:1!important}
html[data-ml-theme=chalk]:root body :is(a:visited){opacity:1}
/* Sign-in / sign-up dialog and account pages on rebuilt lessons (they use --teal, not --green) */
:root[data-theme]{--green:var(--teal);--surface-raised:var(--surface-raised-v2,#1d2e4a)}
:root[data-theme] :is(.ml-account-tabs button[aria-selected=true],.ma-button:not(.secondary)){background:var(--teal)!important;border-color:var(--teal)!important}
:root[data-theme="light"]{--surface-raised-v2:#F4F7FB}
:root[data-theme="light"] .ml-account-dialog{background:#FFFFFF!important;border-color:#CBD5E1!important;box-shadow:0 18px 50px rgba(15,30,58,.18)}
:root[data-theme="light"] .ml-account-dialog input{border-color:#94A3B8!important}
:root[data-theme="light"] :is(.ml-account-tabs button[aria-selected=true],.ma-button:not(.secondary)){color:#FFFFFF!important}
:root[data-theme="light"] .ml-account-tabs button:not([aria-selected=true]){color:#475569}
/* Teacher code boxes (ml-referral): own colors in each theme */
html body .ml-ref{background:#16233A!important;color:#EEF5FF!important;border-color:#2C405B!important}
html body .ml-ref :is(p,h2,b,small,label,span){color:inherit}
html body .ml-ref .ml-ref-code{color:#3DD3C4!important}
html body .ml-ref input{background:#0F1A2C!important;color:#EEF5FF!important;border:1px solid #6F85A0!important}
html body .ml-ref input::placeholder{color:#93A4BC;opacity:1}
html body .ml-ref button{background:transparent!important;color:#3DD3C4!important;border:1px solid #3DD3C4!important;box-shadow:none!important}
html body .ml-ref button:hover{background:rgba(61,211,196,.12)!important}
:is(html[data-ml-theme=chalk],html[data-theme="light"]) body .ml-ref{background:#FFFFFF!important;color:#0F1E3A!important;border-color:#E2E8F0!important}
:is(html[data-ml-theme=chalk],html[data-theme="light"]) body .ml-ref .ml-ref-code{color:#0B6E77!important}
:is(html[data-ml-theme=chalk],html[data-theme="light"]) body .ml-ref input{background:#FFFFFF!important;color:#0F1E3A!important;border-color:#94A3B8!important}
:is(html[data-ml-theme=chalk],html[data-theme="light"]) body .ml-ref input::placeholder{color:#64748B}
:is(html[data-ml-theme=chalk],html[data-theme="light"]) body .ml-ref button{color:#0B6E77!important;border-color:#0B6E77!important}
:is(html[data-ml-theme=chalk],html[data-theme="light"]) body .ml-ref button:hover{background:#DFF3F4!important}
/* Header search button */
html[data-ml-theme=chalk]:root body .ml-search-btn,html[data-ml-theme=chalk]:root body .ml-search-btn *{color:#0F1E3A!important}
html[data-ml-theme=chalk]:root body .ml-search-btn{background:#FFFFFF!important;border-color:#CBD5E1!important}
/* Skip link */
html[data-ml-theme=chalk]:root .skip-link{color:#0F1E3A!important}
}
