/* Additive appearance rules. The existing SKZ layout, type and light palette remain. */
[hidden]{display:none!important}html{color-scheme:light}html[data-theme=dark]{color-scheme:dark;--ink:#edf0ff;--muted:#adb8d1;--blue:#a5b4ff;--blue-dark:#bcc7ff;--line:#36415d;--paper:#1b2438;--bg:#101725;--mint:#163b32;--lilac:#302c4e;--peach:#403023;--shadow:0 18px 50px #0005}
.appearance-control{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:var(--muted);flex-shrink:0;margin-left:14px}.appearance-control select{font:inherit;min-height:40px;max-width:100px;border:1px solid var(--line);border-radius:10px;padding:7px;background:var(--paper);color:var(--ink)}.appearance-control select:focus-visible{outline:3px solid #f5b942;outline-offset:3px}.mobile-navigation .appearance-control{display:flex;justify-content:space-between;margin:6px 0;padding:10px 14px;border-top:1px solid var(--line)}.mobile-navigation .appearance-control select{max-width:140px}
.parent-auth-card{max-width:560px;margin:28px auto}.parent-auth-tabs{display:flex;gap:6px;padding:5px;border:1px solid var(--line);border-radius:13px;background:var(--bg);margin-bottom:24px}.parent-auth-tabs button{flex:1;border:0;border-radius:9px;background:transparent;color:var(--muted);padding:12px;font:700 15px 'DM Sans',sans-serif;cursor:pointer}.parent-auth-tabs button[aria-selected=true]{background:linear-gradient(120deg,#5d70ed,#795de5);color:white}.parent-auth-card .parent-auth-form h2{font-size:23px}.parent-auth-card .parent-auth-form{margin:0}.parent-auth-card .auth-subpanel{margin:0;padding:0;border:0;box-shadow:none;background:transparent}.parent-auth-card .google-choice{margin:0 0 20px}.parent-auth-card .google-signin{width:100%}.parent-auth-card .parent-auth-form>button{width:100%}.parent-auth-tabs button:focus-visible{outline:3px solid #f5b942;outline-offset:3px}
.admin-question-review{border-top:1px solid var(--line);padding-block:18px}.question-reference{color:var(--muted);font-size:12px;overflow-wrap:anywhere}.admin-answer-list{list-style:none;padding:0;display:grid;gap:8px}.admin-answer-list li{display:flex;align-items:flex-start;gap:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}.admin-answer-list li.is-correct{background:#eef8f3;border-color:#53aa84}.admin-answer-letter{font-weight:800;min-width:24px}.admin-question-correct{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-weight:700;padding:12px;background:#eef8f3;color:#20553e;border-radius:10px}.admin-answer-list .option-diagram,.admin-question-correct .option-diagram{max-width:180px}
html[data-theme=dark] .site-header{background:#121b2eee;border-color:var(--line)}
html[data-theme=dark] :is(.account-card,.step-card,.math-board,.float-card,.feature-strip,.course-card,.lesson-row,.sidebar-card,.progress-preview,.difficulty-card,.tutorial-panel,.lesson-card,.quiz-panel,.panel,.directory-panel,.admin-stat,.expansion-child,.tutorial-example,.challenge-stats>div){background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] :is(.lesson-thumb,.course-graphic,.sun-shape,.course-section){background:linear-gradient(130deg,#292b49,#17362f)}
html[data-theme=dark] :is(.primary-topic,.tutorial-step,.leaderboard-mini,.challenge-setup,.leaderboard-result,.test-panel,.lesson-panel,.fraction-breakdown,#account-editor){background:#202a42;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] :is(.button-outline,.button-muted,.tutorial-option,.answer-option,.option-letter,.mobile-menu-toggle,.mobile-navigation,.mobile-navigation a,.mobile-navigation button,.mobile-navigation summary,.signed-in-banner button){background:#202b43;border-color:#485675;color:var(--ink)}
html[data-theme=dark] :is(input,select,textarea){background:#111b2c!important;color:var(--ink)!important;border-color:#53617e!important}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#a3aec5;opacity:1}
html[data-theme=dark] :is(.main-nav,.trust-row,.check-list,.lesson-meta,.board-caption,.feature small,.float-card small,.board-label,.lesson-count,.footer-inner p,.footer-inner>span,.back-link,.lesson-info>p,.lesson-sidebar p,.lesson-sidebar li,.tutorial-header p,.tutorial-step p,.tutorial-step ul,.tutorial-reminder,.quiz-hint,.quiz-progress,.challenge-stats span,.difficulty-audience,.challenge-setup small,.directory-filters label,.date-cell,.expansion-child p,.directory-pagination,.editor-meta,.admin-heading p){color:var(--muted)}
html[data-theme=dark] :is(.eyebrow,.text-link,.tutorial-step .worked-solution){color:#bac5ff}
html[data-theme=dark] .text-gradient{background-image:linear-gradient(100deg,#b2c1ff,#d2adff)}
html[data-theme=dark] :is(.site-footer,.directory-title,.directory-filters,.directory-table th){background:#172136;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] :is(.directory-table tbody>tr:not(.family-expansion):hover,.family-expansion>td,.mobile-navigation a:hover,.mobile-navigation button:hover,.mobile-navigation summary:hover){background:#253149}
html[data-theme=dark] :is(.notice,.feedback-correct,.answer-option.correct,.tutorial-option.correct,.review-item.correct,.admin-answer-list li.is-correct,.admin-question-correct,.tutorial-check-feedback,.tutorial-rule,.tip-box,.encouragement,.sidebar-help){background:#173b31;border-color:#62b99a;color:#b7f1d7}
html[data-theme=dark] :is(.notice.error,.answer-option.incorrect,.tutorial-option.wrong,.review-item.incorrect,.deletion-warning,.account-state.deletion_overdue){background:#442830;border-color:#e88f9e;color:#ffd0d8}
html[data-theme=dark] :is(.feedback-try,.tutorial-check-feedback.needs-work,.account-state.on_hold,.account-state.deletion_pending){background:#443622;border-color:#b79559;color:#ffe0a0}
html[data-theme=dark] :is(.answer-option.selected,.tutorial-option.selected,.signed-in-banner,.row-toggle[aria-expanded=true],.level-pill,.subject-symbol,.subject-pill,.topic-count,.level-tag,.membership-badge,.profile-badge.free,.coming-soon-pill){background:#302e50;color:#d2cdff;border-color:#7872b3}
html[data-theme=dark] :is(.free-tag,.profile-badge,.access-pill.free,.account-state.active){background:#183e33;color:#b7f1d7}
html[data-theme=dark] :is(.premium-tag,.access-pill.premium){background:#443622;color:#ffe0a0}
html[data-theme=dark] :is(.membership-badge.premium,.membership-badge.family){background:#333255;color:#d3ceff}
html[data-theme=dark] .admin-navigation button[aria-pressed=true]{background:#5268e8;color:white}
html[data-theme=dark] :is(.answer-option.correct .option-letter,.answer-option.selected .option-letter){color:white}
html[data-theme=dark] :is(.question-diagram,.option-diagram,.map-scroll){background:white;border-radius:8px;color:#202747}
html[data-theme=dark] .skip-link{background:var(--paper);color:var(--ink)}
html[data-theme=dark] :is(.progress-track,.result-score){background:#35405c}
html[data-theme=dark] :is(.tip-box p,.encouragement p,.sidebar-help p){color:#b7e1ce}
html[data-theme=dark] .expired-label{color:#f2c88b}
@media(max-width:700px){.has-mobile-menu>.appearance-control{display:none}.appearance-control{margin-left:5px}.site-header:not(.has-mobile-menu) .appearance-control>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.parent-auth-card{padding:22px}.parent-auth-tabs button{font-size:14px;padding:11px 8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button{transition:none}}
.parent-auth-card .parent-auth-form+.parent-auth-form{border:0;margin:0;padding:0}
html[data-theme=dark] :is(.review-correct){background:#173b31;border-color:#62b99a;color:#b7f1d7}
html[data-theme=dark] :is(.review-incorrect){background:#442830;border-color:#e88f9e;color:#ffd0d8}
html[data-theme=dark] :is(.avatar-picker,.avatar-choice,.row-toggle,.password-reveal){background:#202b43;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .deletion-warning h3{color:#ffd0d8}
html[data-theme=dark] :is(.learning-card,.subject-block,.upgrade-review){background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .answer-option:disabled{opacity:1}
html[data-theme=dark] #difficulty-links [aria-current=page]{background:#302e50;border-color:#8d82c5;color:#e3ddff}
html[data-theme=dark] #quiz .quiz-progress{background:#35405c}
html[data-theme=dark] .answer-option.correct{background:#173b31;border-color:#62b99a;color:#b7f1d7}
html[data-theme=dark] .answer-option.incorrect{background:#442830;border-color:#e88f9e;color:#ffd0d8}
html[data-theme=dark] .subject-topic{background:#202a42;border-color:var(--line);color:var(--ink)}
@media(max-width:650px){body:has(.learning-nav) .site-header.has-mobile-menu{flex-direction:row;align-items:center}}
html[data-theme=dark] .answer-option.correct .option-letter{background:#26745b;color:#fff}
html[data-theme=dark] .answer-option.incorrect .option-letter{background:#9b495a;color:#fff}

/* Light learning diagrams retain dark text even when the surrounding page is dark. */
html[data-theme=dark] :is(.question-diagram,.option-diagram,.map-scroll,.tutorial-diagram,[data-light-surface],[style*="background: white"],[style*="background:white"],[style*="background: #fff"],[style*="background:#fff"]){--ink:#202747;--muted:#59627a;--blue:#4253ba;color:#202747;color-scheme:light}
html[data-theme=dark] :is(.question-diagram,.option-diagram,.map-scroll,.tutorial-diagram,[data-light-surface]) :is(p,h1,h2,h3,h4,span,label,li,td,th){color:#202747}
html[data-theme=dark] :is(.question-diagram,.option-diagram,.map-scroll,.tutorial-diagram,[data-light-surface]) svg{color:#202747}
html[data-theme=dark] select option{background:#1b2438;color:#edf0ff}
