/* Shared layout and fallback palette. Parent and Study brand sheets load after this. */
:root { color-scheme: dark; background:#28104f!important; color:#ffffff!important }
body { background:#28104f!important; color:#ffffff!important }
body :is(h1,h2,h3,h4,p,li,label,small,summary,span,strong,div,a,button) { text-shadow:none }
:is(.brand,.brand span,.brand b,.eyebrow,.skill-label,.card-kicker,.math-lesson-meta,.mission-subtitle,.points-badge,.parent-shell .eyebrow,.parent-shell .brand span) { color:#d89e00!important }
:is(.topbar,.bar,.lesson-nav) { background:#28104f!important; border-color:#d89e00!important }
:is(.hero,.question-card,.progress-head,.lesson-card,.math-card,.math-schedule details,.math-lesson-item,.progress-card,.review-card,.result-panel,.panel,.winds-game .card,.parent-hero,.empty-state,.metric,.data-section,.parent-help,.share-section,.math-recommendation,.round-row.partial-practice) { background:#35116e!important; border:1px solid #d89e00!important; color:#ffffff!important; box-shadow:none!important }
:is(.hero h1,.progress-head h1,.review-head h1,.question-card h1,.section h2,.parent-hero h1,.panel h2,.math-card h2,.progress-card h2,.lesson-card strong,.metric strong) { color:#ffffff!important }
:is(.hero p,.progress-head p,.review-head p,.math-card p,.math-schedule p,.progress-card p,.review-card p,.result-panel p,.parent-hero p,.metric small,.metric span,.report-strip p,.sample-note,.chart-note,.skill-sub,.round-label small,.muted-empty,.parent-help p,.word-chip small,.share-section small,.history-section details p,.focus-panel small,.privacy-note,.continue-caption,.small,.muted,.footer,footer,.progress-row,.mission-summary span,.card-meta,.card-best,.card-arrow,.math-lesson-item>span:last-child,.math-schedule li,.progress-card .muted-note) { color:#e5d9f5!important }
:is(.top-chip,.count,.chip,.coming-soon,.winds-game .pill,.pills span,.tags span) { background:#35116e!important; color:#d89e00!important; border:1px solid #d89e00!important }
:is(.continue-button,.home-link,.primary,.progress-primary,.lesson-home,.math-launch,.math-continue,.parent-launch,.view-switch,.progress-secondary,.file-label,.minus-button,.numeric-wrap button,.action,.action-main,.share-actions button,.share-actions button+button,.history-section button,.archive-label,.parent-help button,.winds-game .start button,.winds-game .restart,.winds-game .next) { background:#d89e00!important; color:#28104f!important; border:2px solid #d89e00!important; box-shadow:0 4px 0 #5d4190!important }
:is(.continue-button,.home-link,.primary,.progress-primary,.lesson-home,.math-launch,.math-continue,.parent-launch,.view-switch,.progress-secondary,.file-label,.minus-button,.numeric-wrap button,.action,.action-main,.share-actions button,.archive-label,.parent-help button):hover { background:#efbd32!important }
.lesson-card.featured { background:#f1e7ff!important; color:#28104f!important; border-color:#d89e00!important }
.lesson-card.featured :is(.card-kicker,.card-meta,.card-best,.card-arrow,strong) { color:#28104f!important }
:is(.choice,.numeric,.secondary,.progress-card textarea,.parent-help textarea,.share-section textarea,.device-label select) { background:#ffffff!important; color:#28104f!important; border:2px solid #d89e00!important }
:is(.choice.selected,.unsure.selected) { background:#d89e00!important; color:#28104f!important; border-color:#d89e00!important; outline:3px solid #ffffff!important; outline-offset:1px }
:is(.unsure,.hint-button,.pause-button) { background:#35116e!important; color:#d89e00!important; border:2px solid #d89e00!important }
:is(.hint,.worked-line,.mission-feedback,.mission-feedback.missed) { background:#35116e!important; color:#ffffff!important; border-left:5px solid #d89e00!important }
.mission-feedback.missed { border-left-style:dashed!important }
:is(.mission-feedback strong,.mission-feedback.missed strong,.mission-summary strong,.math-recommendation a,.history-section li strong,.parent-shell .metric strong,.round-row.partial-practice .round-value) { color:#d89e00!important }
:is(.progress-dots span,.track i,.trend-track,.bar-track,.winds-game .bar) { background:#5d4190!important; border-color:#d89e00!important }
:is(.progress-dots span.done,.track i.done,.trend-fill,.bar-fill,.winds-game .bar>div) { background:#d89e00!important }
:is(.progress-dots span.current,.track i.now) { background:#ffffff!important; outline:1px solid #d89e00!important }
:is(.answer,.winds-game .a) { background:#35116e!important; color:#ffffff!important; border:2px solid #d89e00!important; box-shadow:none!important }
:is(.answer .symbol) { background:#d89e00!important; color:#28104f!important }
:is(.answer.correct,.winds-game .a.correct) { background:#d89e00!important; color:#28104f!important; outline:4px solid #ffffff!important; outline-offset:-5px!important; opacity:1!important }
:is(.answer.wrong,.winds-game .a.wrong) { background:#28104f!important; color:#ffffff!important; border-style:dashed!important; outline:3px dashed #d89e00!important; outline-offset:-5px!important }
:is(.answer.dim,.winds-game .a:disabled:not(.correct):not(.wrong)) { opacity:.75!important }
:is(.feedback,.feedback.good,.feedback.bad,.summary div,.word-chip) { background:#35116e!important; color:#ffffff!important; border:2px solid #d89e00!important }
.feedback.bad { border-style:dashed!important }
:is(.focus-panel) { background:#f1e7ff!important; color:#28104f!important; border-color:#d89e00!important }
.focus-panel :is(h2,p,small,.eyebrow) { color:#28104f!important }
:is(.parent-shell .top-chip,.parent-shell .device-label select) { border-color:#d89e00!important }
:is(.word-chip,.round-row.partial-practice,.math-recommendation) { border-color:#d89e00!important }
:is(.bar-track,.trend-track) { background:#28104f!important; border:1px solid #d89e00!important }
:is(button,a,input,textarea,summary,select):focus-visible, #progress-file:focus-visible+.action { outline:3px solid #d89e00!important; outline-offset:3px!important }
/* Keep decorative icons in their natural colors. */
:is(.card-icon,.hero .icon,.medal,.empty-illustration,.focus-icon,.math-icon) { filter:none!important }
/* Only the three Science card illustrations use natural weather colors. */
.lesson-card .card-icon.science-icon { background:#28104f!important; filter:none!important }
.lesson-card .science-icon-art { display:block; width:48px; height:48px; filter:none!important }
.lesson-card .card-progress { display:block; margin-top:5px; color:#e5d9f5!important; font-size:13px; font-weight:850 }
.lesson-card.featured .card-progress { color:#28104f!important }
/* Math uses the same current-card hierarchy as the Science library. */
.math-featured { padding:24px; border:2px solid #d89e00; border-radius:22px; background:#f1e7ff; color:#28104f; }
.math-featured-kicker { display:block; font-size:12px; font-weight:950; letter-spacing:.1em; }
.math-featured h3 { margin:9px 0; font-size:clamp(23px,4.5vw,35px); line-height:1.15; letter-spacing:-.04em; }
.math-featured p { margin:5px 0; font-size:15px; font-weight:750; color:#28104f!important; }
.math-featured-action { display:inline-flex; min-height:52px; align-items:center; margin-top:16px; padding:12px 18px; border-radius:12px; background:#28104f; color:#d89e00; font-size:16px; font-weight:950; }
.math-featured-action:hover { background:#5d4190; color:#ffffff; }
.math-featured-action:focus-visible { outline:3px solid #28104f!important; outline-offset:4px!important; }
.math-other-heading { margin:20px 0 0; color:#d89e00; font-size:12px; font-weight:950; letter-spacing:.1em; }
.math-section .math-lesson-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.math-assessment-row { display:grid; gap:4px; margin-top:16px; padding:14px 2px; border-top:1px solid #d89e00; }
.math-assessment-row a { width:fit-content; color:#d89e00; font-size:15px; font-weight:850; text-decoration:underline; text-underline-offset:3px; }
.math-assessment-row small { color:#e5d9f5; font-size:12px; line-height:1.35; }
.math-assessment-row a { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:56px; padding:13px 18px; background:#d89e00; color:#28104f; border:2px solid #d89e00; border-radius:13px; font-size:18px; font-weight:950; text-decoration:none; box-shadow:0 4px 0 #5d4190; }
.math-assessment-row a:hover { background:#efbd32 }
.math-assessment-row a:focus-visible { outline:3px solid #ffffff!important; outline-offset:4px!important }
.math-assessment-row a span { color:#28104f!important; flex:none; font-size:23px; line-height:1 }
.math-assessment-row small { display:block; margin-top:4px; font-size:13px; font-weight:750 }
@media(max-width:690px){.math-section .math-lesson-list{grid-template-columns:1fr}.math-featured{padding:20px}.math-featured-action{width:100%;justify-content:center}}
@media print { :root,body { background:#fff!important; color:#111!important; color-scheme:light } .parent-shell :is(.parent-hero,.focus-panel,.metric,.data-section,.share-section,.word-chip,.math-recommendation,.round-row.partial-practice) { background:#fff!important; color:#111!important; border-color:#555!important; box-shadow:none!important } .parent-shell :is(h1,h2,h3,p,small,strong,.eyebrow,.brand span,.metric strong,.word-chip small,.chart-note,.skill-sub,.round-label small,.share-section small,.focus-panel small) { color:#111!important } .bar-track,.trend-track{background:#eee!important;border-color:#777!important}.bar-fill,.trend-fill{background:#555!important} }

:is(.winds-game .q,.winds-game .big,.panel .question,.mission-prompt,.part-prompt,.summary strong,.scorebig,.stats,.parent-shell .device-label,.parent-shell .skill-name,.parent-shell .skill-value,.parent-shell .round-value) { color:#ffffff!important }
/* Override each inherited four-choice color, including the old !important nth-child rules. */
body .answers .answer:nth-child(n),body.winds-game .answers .a:nth-child(n) { background:#35116e!important; color:#ffffff!important; border:2px solid #d89e00!important; box-shadow:none!important }
body .answers .answer.correct:nth-child(n),body.winds-game .answers .a.correct:nth-child(n) { background:#d89e00!important; color:#28104f!important; outline:4px solid #ffffff!important; outline-offset:-5px!important }
body .answers .answer.wrong:nth-child(n),body.winds-game .answers .a.wrong:nth-child(n) { background:#28104f!important; color:#ffffff!important; border-style:dashed!important; outline:3px dashed #d89e00!important; outline-offset:-5px!important }
/* Export summary appears only after Save progress is used. */
.device-card { background:#35116e!important; color:#ffffff!important; border:1px solid #d89e00!important }
.device-card h4 { color:#d89e00!important }
.device-card .meta { color:#e5d9f5!important }
@media print {
  body .shell .progress-head,body .shell .progress-card,body .shell .device-card { background:#fff!important; color:#111!important; border:0!important; box-shadow:none!important }
  body .shell :is(.progress-head h1,.progress-head h1 em,.progress-head p,.progress-card h2,.progress-card p,.device-card h3,.device-card h4,.device-card p,.device-card li,.device-card .meta) { color:#111!important }
  body .shell .device-card { border-top:1px solid #555!important }
}
::selection { background:#d89e00; color:#28104f }
input,textarea,select { accent-color:#d89e00 }
.unsure.monthly-action-selected { background:#d89e00!important; color:#28104f!important; border-color:#d89e00!important; outline:2px solid #ffffff!important; outline-offset:1px!important }
.monthly-choices button.selected { background:#d89e00!important; color:#28104f!important; border-color:#ffffff!important }
.monthly-choices button:focus-visible,.unsure.monthly-action-selected:focus-visible { outline:3px solid #ffffff!important; outline-offset:3px!important }
.scoreboard{margin:22px 0 26px;padding:18px 20px;border:2px solid #d89e00;border-radius:22px;background:#35116e;color:#ffffff}
.scoreboard-head,.scoreboard-week{display:flex;align-items:center;gap:9px}.scoreboard-head{justify-content:space-between}.scoreboard-head h2{margin:0;font-size:23px;color:#ffffff}.scoreboard-head button{min-height:42px;padding:7px 11px;background:#35116e;color:#d89e00;border:1px solid #d89e00;border-radius:9px;font:inherit;font-size:13px;font-weight:850}.scoreboard-week{margin-top:15px;flex-wrap:wrap}.scoreboard-week>span{font-size:15px;font-weight:850}.scoreboard-week strong{margin-left:auto;font-size:40px;line-height:1;color:#d89e00}.scoreboard-week small{font-size:13px}.scoreboard-goal-track{height:12px;margin-top:10px;border-radius:20px;background:#5d4190;overflow:hidden}.scoreboard-goal-track[hidden]{display:none}.scoreboard-goal-track span{display:block;height:100%;width:0;background:#d89e00}.scoreboard-bottom{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #555;margin-top:16px;padding-top:13px}.scoreboard-bottom>div+div{border-left:1px solid #555;padding-left:17px}.scoreboard-bottom span{display:block;font-size:13px;color:#e5d9f5}.scoreboard-bottom strong{display:block;margin-top:4px;font-size:26px;line-height:1.2;color:#ffffff}.scoreboard-note{margin:11px 0 0;font-size:11px;color:#e5d9f5}.scoreboard-goal-form{margin-top:14px;padding-top:12px;border-top:1px solid #555}.scoreboard-goal-form[hidden]{display:none}.scoreboard-goal-form label{display:block;font-size:13px;font-weight:800;margin-bottom:7px}.scoreboard-goal-form>div{display:flex;gap:7px;flex-wrap:wrap}.scoreboard-goal-form input{min-width:90px;max-width:130px;flex:1;padding:8px;border-radius:8px;background:#ffffff;color:#28104f;border:2px solid #d89e00;font:inherit}.scoreboard-goal-form button{min-height:43px;padding:8px 11px;border-radius:8px;background:#d89e00;color:#28104f;border:2px solid #d89e00;font:inherit;font-weight:850}.scoreboard-goal-form small{display:block;margin-top:6px;color:#e5d9f5}@media(max-width:560px){.scoreboard{margin:15px 0 21px;padding:16px}.scoreboard-week strong{font-size:35px}.scoreboard-bottom strong{font-size:23px}}

/* Contrast-safe ink on the pale-yellow parent focus card. */
body .parent-shell .focus-panel :is(.eyebrow,small,p,h2,span,strong) { color:#28104f!important }
body .parent-shell .focus-panel .focus-icon { filter:grayscale(1) brightness(0)!important; color:#28104f!important }

/* Parent report: short answer first, then dated visual comparisons. */
body.has-report .parent-hero{padding:16px 20px!important;margin:4px 0 12px!important;border-radius:16px!important}
body.has-report .parent-hero h1{font-size:clamp(26px,6vw,34px)!important;margin:3px 0!important}
body.has-report .parent-hero p,body.has-report .parent-hero-mark{display:none!important}
.report-picker{display:flex;align-items:center;gap:8px;margin:10px 2px 4px;color:#e5d9f5;font-size:12px;font-weight:850}
.report-picker label{white-space:nowrap}
.report-picker select{max-width:min(100%,300px);min-width:0;padding:8px 9px;background:#35116e;color:#ffffff;border:1px solid #d89e00;border-radius:9px;font:inherit}
.parent-shell .focus-panel{align-items:start!important;margin:12px 0 8px!important}
.parent-shell .focus-panel>div:last-child{width:100%}
.parent-shell .focus-panel h2{font-size:clamp(25px,6vw,31px)!important;margin:4px 0 10px!important}
.parent-shell .focus-panel .focus-line{padding:10px 0;border-top:1px solid #5d4190}
.parent-shell .focus-panel .focus-line strong,.parent-shell .focus-panel .focus-lesson strong{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#28104f!important}
.parent-shell .focus-panel .focus-line p,.parent-shell .focus-panel .focus-lesson p{font-size:15px!important;line-height:1.35!important;margin:4px 0 0!important;color:#28104f!important}
.parent-shell .focus-panel .focus-lesson{background:#28104f;border-radius:12px;padding:12px 14px;margin:9px 0}
.parent-shell .focus-panel .focus-lesson strong{color:#d89e00!important}
.parent-shell .focus-panel .focus-lesson p{color:#ffffff!important;font-weight:850!important}
.parent-shell .focus-panel small{display:block;margin-top:7px!important;color:#28104f!important}
.report-source{margin:0 2px 9px;color:#e5d9f5}
.report-source summary{cursor:pointer;list-style:revert;font-size:12px;font-weight:800}
.report-source .report-strip{margin:5px 0 11px;padding:9px 12px;background:#35116e;border:1px solid #d89e00;border-radius:12px;align-items:center}
.report-source .report-strip h2{font-size:15px;margin:0;color:#ffffff!important}
.report-source .report-strip p{font-size:11px;color:#e5d9f5!important}
.report-source .device-label select{max-width:150px!important}
.parent-shell .compare-section{margin-top:12px!important}
.compare-controls{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.compare-controls label{font-size:12px;font-weight:800;color:#e5d9f5}
.compare-controls select{display:block;width:100%;padding:11px 8px;margin-top:5px;background:#ffffff;color:#28104f;border:2px solid #d89e00;border-radius:10px;font:inherit}
.compare-controls select:disabled{opacity:.65}
.compare-chart{display:grid;gap:15px;margin-top:12px}
.compare-group{border-top:1px solid #d89e00;padding-top:10px}
.compare-group h3{font-size:14px;margin:0 0 8px;color:#ffffff}
.compare-bar-row{display:grid;grid-template-columns:minmax(112px,1.4fr) minmax(65px,2fr) minmax(56px,.7fr);gap:8px;align-items:center;margin:7px 0;font-size:12px}
.compare-bar-row>span:first-child{line-height:1.3;color:#e5d9f5}
.compare-bar-row strong{text-align:right;color:#ffffff;white-space:nowrap}
.compare-bar-track{display:block;height:17px;border:1px solid #d89e00;background:#28104f;border-radius:30px;overflow:hidden}
.compare-bar-fill{display:block;height:100%;background:#d89e00}
@media(max-width:690px){.parent-shell .focus-panel{padding:14px!important;gap:9px!important}.parent-shell .focus-panel .focus-icon{font-size:21px}.parent-shell .metric-grid{margin:9px 0 13px}.compare-controls{grid-template-columns:1fr 1fr}.compare-bar-row{grid-template-columns:minmax(90px,1.4fr) minmax(45px,1.3fr) minmax(82px,.8fr);gap:5px;font-size:11px}}
@media print{body.has-report .parent-hero{display:none!important}.report-source,.report-picker,.compare-controls{display:none!important}.parent-shell .focus-panel .focus-lesson{background:#fff!important;border:1px solid #555!important}.parent-shell .focus-panel .focus-lesson :is(strong,p){color:#111!important}.compare-bar-track{background:#eee!important;border-color:#777!important}.compare-bar-fill{background:#555!important}.compare-bar-row>span:first-child,.compare-bar-row strong,.compare-group h3{color:#111!important}}
.parent-shell .attempt-row{display:grid;gap:3px;padding:9px 10px;border:1px solid #d89e00;border-radius:10px;background:#35116e;font-size:12px;color:#ffffff}
.parent-shell .attempt-row strong{color:#d89e00}
.parent-shell .attempt-row small{color:#e5d9f5}
@media print{.parent-shell .attempt-row{background:#fff!important;color:#111!important;border-color:#555!important}.parent-shell .attempt-row :is(strong,small,span){color:#111!important}}

.save-failure-banner{position:sticky;top:0;z-index:9999;display:flex;gap:10px;align-items:center;justify-content:center;padding:12px;background:#d89e00;color:#28104f;border-bottom:3px solid #28104f;font-size:14px;font-weight:850;line-height:1.3}.save-failure-banner[hidden]{display:none!important}.save-failure-banner button{flex:none;min-height:40px;padding:8px 11px;background:#28104f;color:#d89e00;border:2px solid #28104f;border-radius:8px;font:inherit;cursor:pointer}.save-failure-banner button:focus-visible{outline:3px solid #28104f;outline-offset:3px}@media(max-width:550px){.save-failure-banner{flex-direction:column;text-align:center}}@media print{.save-failure-banner{display:none!important}}
.study-home .topbar .parent-return{margin-left:auto;display:inline-flex;align-items:center;min-height:44px;padding:8px 11px;border:2px solid #d89e00;border-radius:10px;color:#d89e00;background:#28104f;font-size:13px;font-weight:850;text-decoration:none}.study-home .topbar .parent-return[hidden]{display:none!important}.study-home .topbar .parent-return:focus-visible{outline:3px solid #ffffff;outline-offset:3px}@media(max-width:390px){.study-home .topbar .parent-return{font-size:12px;padding:7px}}
.parent-shell .topbar .parent-study-preview{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:2px solid #d89e00;border-radius:10px;background:#28104f;color:#d89e00;font-size:13px;font-weight:850;text-decoration:none}.parent-shell .topbar .parent-study-preview:focus-visible{outline:3px solid #ffffff;outline-offset:3px}.parent-shell .focus-panel #focus-summary{font-size:17px!important;line-height:1.45!important;font-weight:700!important;margin:0!important}@media(max-width:390px){.parent-shell .topbar .parent-study-preview{font-size:12px;padding:7px}}
.scoreboard-xp-history{margin-top:15px;padding-top:12px;border-top:1px solid #555}.scoreboard-xp-history summary{cursor:pointer;font-size:13px;font-weight:850;color:#ffffff}.scoreboard-xp-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:11px}.scoreboard-xp-row>span{font-size:12px;color:#e5d9f5}.scoreboard-xp-row strong{display:block;font-size:19px;color:#ffffff}.scoreboard-xp-goal{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-top:12px}.scoreboard-xp-goal small{color:#e5d9f5}.scoreboard-xp-goal button{min-height:42px;padding:7px 11px;background:#35116e;color:#d89e00;border:1px solid #d89e00;border-radius:9px;font:inherit;font-size:13px;font-weight:850}
