/* Light mode changes surrounding UI, not PDF/slide images, scripts or game rules. */
.theme-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-height:36px!important;padding:8px 11px!important;font:600 12px/1.3 system-ui,sans-serif!important;background:#ffffff07!important;color:#dce8f7!important;border:1px solid #ffffff30!important;border-radius:10px!important;white-space:nowrap;flex:0 0 auto;cursor:pointer}
.theme-toggle svg{width:17px;height:17px;flex:0 0 17px}.theme-toggle:focus-visible{outline:3px solid #a5b8ff;outline-offset:3px}
html[data-theme=light]{color-scheme:light;--bg:#f3f6fa;--panel:#fff;--text:#1e3048;--muted:#52657b;--accent:#426c1c;--border:#c4cfdd}
html[data-theme=light] body{background:#f3f6fa!important;color:#1e3048!important}
html[data-theme=light] body:before{background:radial-gradient(ellipse at 10% 0%,#d9e4f5aa,transparent 55%)!important}
html[data-theme=light] :is(header,footer,.sibling-games,.profile-bar){border-color:#cbd5e3!important;color:#334b67}
html[data-theme=light] :is(h1,h2,h3,h4,strong,b,label,legend){color:#1e3048}
html[data-theme=light] :is(p,.muted,.hint,.small,.offline,.subtle,.save-status,.test-meta,.round-meta,.game-progress span,.game-bottom span,.assignment-meta,.section-heading>span,.profile-bar span,.feedback-state){color:#52657b}
html[data-theme=light] a{color:#315a7c}
html[data-theme=light] :is(.eyebrow,.step,.tag,.course,.question-marks){color:#426c1c}
html[data-theme=light] h1 span{color:#426c1c}
html[data-theme=light] :is(.panel,.card,.game-card,.level-card,.setup-card,.mode,.join-card,.dashboard-join,.my-assignment-card,.profile-note,#cloud-panel,.spy-entry,.roster-section,.library-card,.scenario,.revision-summary,.feedback-publish,.response,.ticket,.question-editor,.feedback-review>nav,.test-clockbar,.author-savebar,.stat-grid,.choice-label,.table-scroll,.my-assignments,.lesson-card,.journey-path,.lesson-info,.result-stats,.session-command,.join-code-card,.game-shell,.flow-panel,.question-card,.question,.round-panel,.survival-summary,.recall-card,.end-session){background:#fff!important;border-color:#c6d2df!important;color:#1e3048;box-shadow:0 6px 18px #17345406}
html[data-theme=light] #hub :is(.game-card,.game-card.dash,.dashboard-party-grid .spy-entry,.dashboard-party-grid .game-card,#my-assignments){background:#fff!important;border-color:#c6d2df!important}
html[data-theme=light] :is(.game-progress,.game-bottom,.dashboard-together,.my-assignments-heading,.completed-homework,.account-note,.feedback-review details,td,th,.review-row,.section-block){border-color:#d4dde8!important}
html[data-theme=light] :is(input,select,textarea){background:#f8fafc!important;color:#1e3048!important;border-color:#a9bacf!important;caret-color:#1e3048}
html[data-theme=light] :is(input,textarea)::placeholder{color:#667b93}
html[data-theme=light] input[type=checkbox],html[data-theme=light] input[type=radio]{accent-color:#4f7526}
html[data-theme=light] button{color:#203019;background-color:#d3f88c;border-color:#bacb9d}
html[data-theme=light] :is(button.secondary,button.small.secondary,.feedback-tools a,.feedback-tabs button,.test-nav a,.assignment-feedback-link a,.kognity-link,.annotation-comment,.feedback-review>nav button){background:#f0f4f9!important;color:#304e70!important;border-color:#bbcbdc!important}
html[data-theme=light] .theme-toggle{color:#304e70!important;background:#fff!important;border-color:#b5c5d8!important}
html[data-theme=light] :is(.choice,.option,.answer-option,.choice-label,.mode){background:#f8fafc!important;color:#223c59!important;border-color:#bccbdd!important}
html[data-theme=light] :is(.choice:hover,.choice-label:hover,.mode:hover,.game-card:hover){border-color:#557d31!important;background:#eff6e7!important}
html[data-theme=light] :is(.selected,.mode.selected,.feedback-tabs button[aria-pressed=true],.feedback-review>nav button[aria-pressed=true]){background:#e0edc9!important;color:#26420e!important;border-color:#709447!important}
html[data-theme=light] :is(.key,.flow-number,.game-icon,.library-icon,.lobby-symbol){background:#eaf1f8!important;color:#395d7e!important;border-color:#bfcddd!important}
html[data-theme=light] :is(.flow-step,.target,.feedback-target,.complete,.learn-box,.lesson-circle,.unit-check){background:#eaf2df!important;color:#304b19!important;border-color:#a9c18e!important}
html[data-theme=light] :is(.flow-step strong,.flow-step span,.target strong,.target label,.target p,.complete h2){color:#304b19}
html[data-theme=light] :is(.feedback,.notice,.feedback-error,.lock-panel){background:#fff2df!important;color:#754c12!important;border-color:#c6a06d!important}
html[data-theme=light] :is(.feedback.good,.feedback-notice,.status-submitted,.correct-feedback){background:#e5f3e7!important;color:#245c34!important;border-color:#91bd9b!important}
html[data-theme=light] :is(.feedback p,.notice p,.feedback-error p){color:inherit}
html[data-theme=light] :is(.status-badge,.review-status,.review-steps li){background:#eaf0f8!important;color:#355574!important;border-color:#c3d1e1!important}
html[data-theme=light] :is(.secret,.timer,.score-banner strong,.question-marks,.ao-mark){color:#426c1c}
html[data-theme=light] :is(.score-banner,.stats,.exam-example,.guide,.board-table,.modal,.dialog,.row-menu>div,.annotation-edit-card){background:#f8fafc!important;color:#1e3048!important;border-color:#bbcbdc!important}
html[data-theme=light] :is(.dialog-overlay,.annotation-edit-panel){background:#1b2c446b}
html[data-theme=light] :is(.response,.annotated-script,.annotation-comment blockquote){color:#263f5d}
html[data-theme=light] .AO1{background:#dcecff!important;color:#174a80!important;border-color:#3372aa!important}
html[data-theme=light] .AO2{background:#d9f1e6!important;color:#155b46!important;border-color:#328d72!important}
html[data-theme=light] .AO3{background:#faebc9!important;color:#6f4b0a!important;border-color:#b08126!important}
html[data-theme=light] .AO4{background:#eddff9!important;color:#61358a!important;border-color:#9462bb!important}
html[data-theme=light] :is(.neutral,.script-highlight.status-unassessed){background:#e7edf4!important;color:#43586e!important;border-color:#6e8298!important}
html[data-theme=light] .script-highlight.selected,html[data-theme=light] .script-highlight:focus-visible{outline-color:#1e3048}
html[data-theme=light] :is(.my-assignment-card .assignment-course,.assignment-list>p:only-child:before){background:#e6f0d8!important;color:#426c1c!important}
html[data-theme=light] .assignment-help{color:#63788e!important}
html[data-theme=light] :is(.live-student-tools,.live-toolbar,.activity-dock,.live-activity,.activity-panel,.poll-panel,.fired-panel,.live-join,.student-controls){background:#f6f9fd!important;color:#223d5a!important;border-color:#b9cada!important}
/* The invigilation blackout and visibility reminder stay opaque in either theme. */
html[data-theme=light] .test-blackout,html[data-theme=light] .test-lock-screen{background:#05080e!important;color:#fff!important}
html[data-theme=light] .test-lock-screen :is(h1,h2,p,strong){color:#fff!important}
@media(max-width:650px){.theme-toggle{min-height:38px!important;padding:9px!important}.theme-toggle span{display:none}header{flex-wrap:wrap}}
@media print{.theme-toggle{display:none!important}html[data-theme] body{background:#fff!important;color:#172638!important}html[data-theme] body:before{display:none!important}}
/* Game and lesson panels use the same palette; feedback states retain their meaning. */
html[data-theme=light] :is(.dash-panel,.dash-prompt,.dash-word,.dash-filebar,.dash-stats,.dash-review,.journey-overview,.journey-path-card,.journey-session-bar,.journey-result,.profile-card,.profile-drawer,.student-activity,.student-review-controls,.slide-navigation,.slide-toolbar,.room-card,.file-guide,.share-panel){background:#fff!important;color:#263e5b!important;border-color:#c5d1df!important}
html[data-theme=light] :is(.dash-muted,.dash-notice,.file-status,.lesson-description){color:#536c85!important}
html[data-theme=light] .dash-choices .is-correct,html[data-theme=light] .dash-feedback.correct{background:#d9efdf!important;color:#1e5d32!important;border-color:#548965!important}
html[data-theme=light] .dash-choices .is-wrong,html[data-theme=light] .dash-feedback.incorrect{background:#f8e0e5!important;color:#7a2b3d!important;border-color:#bf7183!important}
html[data-theme=light] :is(.dash-feedback p,.dash-feedback strong){color:inherit}
html[data-theme=light] :is(.dash-timer,.activity-clock){color:#76590e!important}
html[data-theme=light] .timer-low{color:#a6263b!important}
html[data-theme=light] :is(.fired-tile-board,.fired-letter-tile,.fired-strike-block,.letter-keyboard button){background:#e7eef5!important;color:#284c65!important;border-color:#aebfd2!important}
html[data-theme=light] :is(.fired-letter-cell.revealed .fired-letter-tile,.fired-letter-tile.filled){background:#dcebbf!important;color:#35531a!important}
html[data-theme=light] .fired-strike-block.is-fired{background:#f3dce2!important;color:#862a40!important}
html[data-theme=light] .test-blackout :is(h1,h2,p,strong){color:#fff!important}
html[data-theme=light] .lesson-circle.locked{background:#edf1f6!important;color:#748399!important;border-color:#ccd5e1!important}
html[data-theme=light] .lesson-circle.gold{background:#f5e9bd!important;color:#73551b!important;border-color:#bf9c4b!important}
html[data-theme=light] .lesson-circle.silver{background:#e2e9f1!important;color:#4f6379!important;border-color:#9bafc3!important}
html[data-theme=light] .lesson-circle.bronze{background:#f4dfce!important;color:#7b5030!important;border-color:#be8e66!important}
/* Day mode contrast audit: dialogs must not retain dark-theme white table text. */
html[data-theme=light] :is(.leaderboard-modal,.lesson-finish-popup,.result-leaderboard,.board-table,.leaderboard,.board-scroll){background:#fff!important;color:#18314d!important;border-color:#9fb1c6!important}
html[data-theme=light] :is(.leaderboard-modal,.lesson-finish-popup,.result-leaderboard,.board-table,.leaderboard) :is(h1,h2,h3,td,th,label,strong,b,span,summary){color:#18314d!important}
html[data-theme=light] :is(.leaderboard-modal,.lesson-finish-popup,.result-leaderboard,.leaderboard) :is(p,li,small,.board-note){color:#344f6c!important}
html[data-theme=light] :is(.leaderboard-modal,.lesson-finish-popup,.result-leaderboard) :is(th,td){border-color:#cad5e2!important}
html[data-theme=light] :is(.leaderboard-modal,.lesson-finish-popup,.result-leaderboard) th{background:#eaf0f7!important;font-weight:750}
html[data-theme=light] .board-self{background:#e1edcf!important;color:#244411!important}
html[data-theme=light] .board-self :is(td,strong,span){color:#244411!important;font-weight:650}
html[data-theme=light] .board-tabs button,html[data-theme=light] [data-result-scope]{background:#edf2f8!important;color:#263f5c!important;border:1px solid #a9bad0!important}
html[data-theme=light] .board-tabs button[aria-pressed=true],html[data-theme=light] [data-result-scope][aria-pressed=true]{background:#cee49e!important;color:#263d13!important;border-color:#597a32!important}
html[data-theme=light] :is(.board-heading button,.finish-heading button,.leaderboard-modal .secondary){color:#263f5c!important;background:#edf2f8!important;border-color:#a9bad0!important}
html[data-theme=light] :is(.board-scoring,.board-note){background:#f2f6fb!important;color:#344f6c!important;border-color:#c5d2e2!important}
html[data-theme=light] :is(.leaderboard-modal,.lesson-finish-popup)::backdrop{background:#192c4266}
/* Raise subdued text contrast throughout the student interface. */
html[data-theme=light] :is(p,.muted,.hint,.small,.offline,.subtle,.save-status,.test-meta,.round-meta,.dash-muted,.dash-notice,.file-status,.lesson-description,.assignment-meta,.section-heading>span,.game-progress span,.game-bottom span,.profile-bar span,.feedback-state,.assignment-help){color:#3d5570!important}
html[data-theme=light] :is(.eyebrow,.step,.tag,.course,.question-marks){color:#365b17!important}
html[data-theme=light] :is(.dash-panel,.dash-stats,.dash-playtop,.journey-overview,.journey-path-card,.profile-card,.join-card,.student-test-heading,.answer-card,.question-answer-pane,.game-card,.my-assignment-card,.student-activity) :is(span,label,strong){color:#223d59}
html[data-theme=light] .q-number{background:#edf2f8!important;color:#29425f!important;border-color:#acbdd1!important}
html[data-theme=light] .q-number.current{background:#cfe7a2!important;color:#203a0f!important;border-color:#6d8d43!important}
html[data-theme=light] .option-letter{background:#dde7f1!important;color:#234563!important}
html[data-theme=light] :is(.muted,.hint,.board-note,.board-scoring,.feedback-state){opacity:1!important}
html[data-theme=light] .annotation-comment>strong:first-child{color:#24435f!important}
