/* Independent visual preferences. Never changes study state or private book theme. */
html[data-theme="dark"]{color-scheme:dark}html[data-theme="light"]{color-scheme:light}
.topbar-tools{display:flex;gap:22px;align-items:center}.theme-control{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:10px;color:var(--muted)}.theme-control select{font-size:11px;padding:7px 24px 7px 10px;min-height:34px;width:auto;border-radius:8px}.topbar .theme-control select{background:var(--paper);color:var(--ink);border:1px solid var(--line)}
html[data-theme="light"]{--navy:#174a32;--navy2:#256443;--teal:#17653e;--teal-light:#e1f1e5;--ivory:#f5f8f3;--paper:#fff;--ink:#20372a;--muted:#516956;--line:#cedbd0;--red:#a63424;--red-light:#fff0e9;--gold:#77591e;background:var(--ivory);color:var(--ink)}
html[data-theme="light"] body:not(.pbr, .pbr *){background:radial-gradient(ellipse at 85% 0,#e2f1dd,transparent 48%),var(--ivory);color:var(--ink)}
html[data-theme="light"] a:not(.pbr, .pbr *){color:#17653e}html[data-theme="light"] .sidebar:not(.pbr, .pbr *){background:#fff;border-color:#d5e0d5;scrollbar-color:#a4b8a8 transparent}html[data-theme="light"] .brand:not(.pbr, .pbr *){color:#174a32}html[data-theme="light"] .brand-mark:not(.pbr, .pbr *){background:#246440;color:#f1fae8}html[data-theme="light"] .brand-name small:not(.pbr, .pbr *),html[data-theme="light"] .nav-label:not(.pbr, .pbr *){color:#556c5c}html[data-theme="light"] .nav-link:not(.pbr, .pbr *){color:#486652}html[data-theme="light"] .nav-link:hover:not(.pbr, .pbr *){background:#edf5eb}html[data-theme="light"] .nav-link.active:not(.pbr, .pbr *){background:#e0f0df;border-color:#aac9af;color:#175333}html[data-theme="light"] .nav-link.active .icon:not(.pbr, .pbr *){color:#1b643a}html[data-theme="light"] .sidebar-note:not(.pbr, .pbr *){background:#f0f6e9;border-color:#d2dfc6;color:#52664b}html[data-theme="light"] .sidebar-note strong:not(.pbr, .pbr *){color:#284930}html[data-theme="light"] .sidebar-note>.icon:not(.pbr, .pbr *){color:#397849}html[data-theme="light"] .topbar:not(.pbr, .pbr *){background:#f9fcf5ed;border-color:#d5e0d5}html[data-theme="light"] .breadcrumb:not(.pbr, .pbr *),html[data-theme="light"] .local-status:not(.pbr, .pbr *){color:#526c5b}html[data-theme="light"] .breadcrumb strong:not(.pbr, .pbr *){color:#284930}html[data-theme="light"] .status-dot:not(.pbr, .pbr *){background:#38794a}
html[data-theme="light"] .btn.primary:not(.pbr, .pbr *){background:#22633d;border-color:#22633d;color:#fff}html[data-theme="light"] .btn.primary:hover:not(.pbr, .pbr *){background:#174b2c;color:#fff}html[data-theme="light"] .btn.secondary:not(.pbr, .pbr *){background:#edf5eb;border-color:#b8cdbb;color:#234d30}html[data-theme="light"] .btn.secondary:hover:not(.pbr, .pbr *){background:#dcecd9;border-color:#98b99e}html[data-theme="light"] .btn.cream:not(.pbr, .pbr *){background:#f1f7d9;color:#29461f;border-color:#c8d7a9}html[data-theme="light"] .btn.cream:hover:not(.pbr, .pbr *){background:#e1edbd}html[data-theme="light"] .icon-btn:not(.pbr, .pbr *){background:#edf5eb;border-color:#c9d8cb;color:#365e40}
html[data-theme="light"] .panel:not(.pbr, .pbr *),html[data-theme="light"] .stat-card:not(.pbr, .pbr *),html[data-theme="light"] .filter-panel:not(.pbr, .pbr *),html[data-theme="light"] .feature-card:not(.pbr, .pbr *),html[data-theme="light"] .question-tile:not(.pbr, .pbr *),html[data-theme="light"] .question-card:not(.pbr, .pbr *),html[data-theme="light"] .syllabus-subject:not(.pbr, .pbr *),html[data-theme="light"] .article-body:not(.pbr, .pbr *),html[data-theme="light"] .mock-card:not(.pbr, .pbr *),html[data-theme="light"] .mock-card.featured:not(.pbr, .pbr *),html[data-theme="light"] .video-card:not(.pbr, .pbr *),html[data-theme="light"] .backup-panel:not(.pbr, .pbr *),html[data-theme="light"] .routine-block:not(.pbr, .pbr *),html[data-theme="light"] .review-item:not(.pbr, .pbr *),html[data-theme="light"] .alert-card:not(.pbr, .pbr *),html[data-theme="light"] .literature-card:not(.pbr, .pbr *),html[data-theme="light"] .reader-panel:not(.pbr, .pbr *),html[data-theme="light"] .reader-privacy:not(.pbr, .pbr *),html[data-theme="light"] dialog:not(.pbr, .pbr *){background:#fff;color:#20372a;border-color:#cedbd0}
html[data-theme="light"] :is(.page-heading .eyebrow,.eyebrow,.goal-line>span,.feature-foot,.notice-cta,.track-status,.sources summary,details>summary,.book-essentials h3,.literature-analysis>.eyebrow):not(.pbr, .pbr *){color:#20633d}
html[data-theme="light"] :is(.question-tile h3,.feature-card h3,.lesson-card h3,.routine-block-head h3,.step-check strong,.rotation-grid h4,.option-feedback strong,.review-evidence strong,.literature-card-body h2,.reading-guide-step h3,.pdf-empty h3,.track-step h3,.article-body h2,.article-body h3):not(.pbr, .pbr *){color:#203f2a}
html[data-theme="light"] :is(.question-tile p,.feature-card p,.lesson-card p,.source,.question-meta p,.option-feedback p,.mock-card p,.mock-card.featured p,.sources p,details p,.review-evidence p,.review-evidence ul,.backup-panel p,.install-info,dialog p,dialog ul,.literature-card-body p,.reader-privacy p,.reader-file,.book-study p,.check-card p,.step-check small,.block-content ul,.plain-list,.review-item p,.alert-card p,.alert-sources small,.plan-lesson,.block-footer small,.calendar-day p,.track-step small,.track-step.locked .track-status,.assessment-note,.mastery-panel>p,.mastery-feedback p,.recent-video-check,.recent-video-check small,.stat-detail,.stat-label,.date-pill,.feature-foot,.tiny.muted,.muted):not(.pbr, .pbr *){color:#516956}
html[data-theme="light"] .article-body p:not(.pbr, .pbr *),html[data-theme="light"] .article-body li:not(.pbr, .pbr *){color:#334f3c}
html[data-theme="light"] input:not(.pbr, .pbr *),html[data-theme="light"] select:not(.pbr, .pbr *),html[data-theme="light"] textarea:not(.pbr, .pbr *){background:#fff;color:#20372a;border-color:#b8cdbb;accent-color:#286b40}html[data-theme="light"] input:not(.pbr, .pbr *)::placeholder,html[data-theme="light"] textarea:not(.pbr, .pbr *)::placeholder{color:#697e6c}
html[data-theme="light"] :is(.badge,.badge.neutral,.evidence-status,.round-icon,.stat-icon,.feature-icon,.stat-card:nth-child(n) .stat-icon,.feature-card:nth-child(n) .feature-icon):not(.pbr, .pbr *){background:#e7f2e5;color:#2d613b;border-color:#bed5be}html[data-theme="light"] .segmented button:not(.pbr, .pbr *),html[data-theme="light"] .subject-tabs button:not(.pbr, .pbr *){background:#fff;color:#486652;border-color:#c4d7c8}html[data-theme="light"] .segmented button.active:not(.pbr, .pbr *),html[data-theme="light"] .subject-tabs button.active:not(.pbr, .pbr *){background:#286c41;border-color:#286c41;color:#fff}
html[data-theme="light"] .callout:not(.pbr, .pbr *){background:#eef6e9;color:#456246;border-color:#bbd3b4}html[data-theme="light"] .callout strong:not(.pbr, .pbr *),html[data-theme="light"] .callout .icon:not(.pbr, .pbr *){color:#285e36}html[data-theme="light"] .callout.warning:not(.pbr, .pbr *){background:#fff4dc;color:#76531a;border-color:#ddc48b}html[data-theme="light"] .callout.warning strong:not(.pbr, .pbr *){color:#65400e}
html[data-theme="light"] :is(.notice-strip,.weekly-panel,.today-focus,.review-intro,.review-evidence,.lesson-outcomes,.worked-example,.memory-cards section,.check-card,.routine-block.is-done,.alert-card.is-read,.calendar-day.today,.track-step.available):not(.pbr, .pbr *){background:#eaf4e7;border-color:#bfd5bd;color:#284e30}html[data-theme="light"] :is(.today-focus p,.notice-strip .tiny,.review-intro p,.review-evidence summary,.alert-card.is-read h2):not(.pbr, .pbr *){color:#3c6548}html[data-theme="light"] .week-plan-day:not(.pbr, .pbr *){background:#f2f7ee;color:#45604d;border-color:#d0decc}html[data-theme="light"] .week-plan-day>strong:not(.pbr, .pbr *),html[data-theme="light"] .week-plan-day.is-today>span:not(.pbr, .pbr *){color:#2a5236}html[data-theme="light"] .week-plan-day.selected:not(.pbr, .pbr *){background:#d9ecd4;color:#224c2b;border-color:#8ab58e}html[data-theme="light"] .review-cycle>span:not(.pbr, .pbr *){background:#dbeed6;color:#2c603b}html[data-theme="light"] .review-cycle i:not(.pbr, .pbr *){color:#537b59}html[data-theme="light"] .step-check:has(input:checked) strong:not(.pbr, .pbr *){color:#4c7354}
html[data-theme="light"] .track-number:not(.pbr, .pbr *){background:#e3efdf;border-color:#b9d0b8;color:#3c6543}html[data-theme="light"] .track-step.mastered .track-number:not(.pbr, .pbr *){background:#347647;border-color:#347647;color:#fff}html[data-theme="light"] .track-step.locked .track-number:not(.pbr, .pbr *){background:#edf1e9;border-color:#d0dacb;color:#61735f}html[data-theme="light"] .article-body .example:not(.pbr, .pbr *){background:#edf5e7;color:#355c3d;border-color:#7da36c}html[data-theme="light"] .article-body .example strong:not(.pbr, .pbr *){color:#315b36}html[data-theme="light"] .remember-box:not(.pbr, .pbr *){border-color:#b4cdae}
html[data-theme="light"] .gate-stages span:not(.pbr, .pbr *){background:#eff5eb;border-color:#c6d7c0;color:#4c684b}html[data-theme="light"] .gate-stages .passed:not(.pbr, .pbr *){background:#deefd7;color:#2b5b32;border-color:#99bc91}html[data-theme="light"] .mastery-option:not(.pbr, .pbr *){background:#fff;border-color:#b9cfb9;color:#20372a}html[data-theme="light"] .mastery-option:has(input:checked):not(.pbr, .pbr *){background:#e3f2dc;border-color:#4a7c42;box-shadow:0 0 0 1px #4a7c42}html[data-theme="light"] .mastery-option .option-letter:not(.pbr, .pbr *){border-color:#aec6a7;color:#385b36}html[data-theme="light"] .mastery-feedback:not(.pbr, .pbr *){background:#eff7e9;border-color:#a3c296}html[data-theme="light"] .mastery-feedback.wrong:not(.pbr, .pbr *){background:#fff5e7;border-color:#d5ae7b}html[data-theme="light"] .mastery-feedback details p:not(.pbr, .pbr *){border-color:#d1deca}
html[data-theme="light"] :is(.stimulus,.analogy,.step,.question-map,.answer-btn,.option-letter,.map-btn,.video-cover):not(.pbr, .pbr *){background:#f1f7ed;color:#304e35;border-color:#c7d8bf}html[data-theme="light"] .option:not(.pbr, .pbr *){background:#fff;border-color:#bdd1b6}html[data-theme="light"] .option.selected:not(.pbr, .pbr *),html[data-theme="light"] .option.selected .answer-btn:not(.pbr, .pbr *){background:#deeed6;color:#23492b;border-color:#6d9e61}html[data-theme="light"] .option.correct:not(.pbr, .pbr *),html[data-theme="light"] .option.correct .answer-btn:not(.pbr, .pbr *),html[data-theme="light"] .feedback-banner.correct:not(.pbr, .pbr *){background:#e2f3dc;color:#285e30;border-color:#87b57e}html[data-theme="light"] .option.wrong:not(.pbr, .pbr *),html[data-theme="light"] .option.wrong .answer-btn:not(.pbr, .pbr *),html[data-theme="light"] .feedback-banner.wrong:not(.pbr, .pbr *){background:#fff0e3;color:#8b3d22;border-color:#d6a583}html[data-theme="light"] .cross-btn:hover:not(.pbr, .pbr *),html[data-theme="light"] .cross-btn.active:not(.pbr, .pbr *){background:#dfebd9;color:#325b35}html[data-theme="light"] .map-btn.current:not(.pbr, .pbr *){background:#2d6b3e;color:#fff;border-color:#2d6b3e}html[data-theme="light"] .map-btn.answered:not(.pbr, .pbr *){background:#deeed6;color:#2c5833}html[data-theme="light"] .timer:not(.pbr, .pbr *){color:#285a36}html[data-theme="light"] .timer.danger:not(.pbr, .pbr *){color:#ad3e28}
html[data-theme="light"] .video-cover:not(.pbr, .pbr *),html[data-theme="light"] .video-card:nth-child(3n+2) .video-cover:not(.pbr, .pbr *),html[data-theme="light"] .video-card:nth-child(3n) .video-cover:not(.pbr, .pbr *){background:linear-gradient(130deg,#e3efdc,#cedfc6);color:#3e7343}html[data-theme="light"] .reading-guide-step>span:not(.pbr, .pbr *){background:#deecd5;color:#386d39}html[data-theme="light"] .reading-guide-step small:not(.pbr, .pbr *){color:#577653}html[data-theme="light"] .literature-card-body .feature-foot:not(.pbr, .pbr *){color:#326d3b}html[data-theme="light"] .literature-card:hover:not(.pbr, .pbr *){border-color:#7aab7c}html[data-theme="light"] .pdf-empty:not(.pbr, .pbr *){background:#f3f8ef;color:#46693f}html[data-theme="light"] .pdf-empty p:not(.pbr, .pbr *),html[data-theme="light"] .pdf-empty small:not(.pbr, .pbr *){color:#5b7854}
html[data-theme="light"] .empty:not(.pbr, .pbr *){color:#516956}html[data-theme="light"] .empty h3:not(.pbr, .pbr *){color:#284930}html[data-theme="light"] .toast:not(.pbr, .pbr *){background:#254c30;color:#fff;border-color:#4d7756}html[data-theme="light"] .storage-warning:not(.pbr, .pbr *){background:#fff3d8;color:#79511c;border-color:#d7b975}html[data-theme="light"] .footer:not(.pbr, .pbr *){border-color:#d0dec9;color:#5b7255}
/* Main hero and book covers intentionally remain deep green in either mode. */
html[data-theme="light"] .hero .eyebrow:not(.pbr, .pbr *),html[data-theme="light"] .focus-hero .eyebrow:not(.pbr, .pbr *){color:#c7edc6}html[data-theme="light"] .hero p:not(.pbr, .pbr *){color:#e1eee0}html[data-theme="light"] .hero .btn:not(.pbr, .pbr *){color:#17351c;background:#e2f4d2;border-color:#e2f4d2}
/* Macetes content follows the main theme; the private reader has its own palette. */
html[data-theme="light"] .mac-tabs button.active:not(.pbr, .pbr *){background:#286c41;color:#fff;border-color:#286c41}html[data-theme="light"] .mac-action:not(.pbr, .pbr *){background:#eaf5e4;border-color:#bed6b3}html[data-theme="light"] .mac-action li:not(.pbr, .pbr *){color:#345a39}html[data-theme="light"] .mac-pattern summary:not(.pbr, .pbr *){color:#285e36}html[data-theme="light"] .mac-example:not(.pbr, .pbr *){background:#f0f6e9;border-color:#6f9c63}html[data-theme="light"] .mac-example.counter:not(.pbr, .pbr *){background:#faf5e8;border-color:#b59a58}html[data-theme="light"] .mac-example-meta:not(.pbr, .pbr *){color:#4d6b46}html[data-theme="light"] .mac-caution:not(.pbr, .pbr *),html[data-theme="light"] .mac-pattern .mac-caution:not(.pbr, .pbr *){background:#fff5df;color:#79551b;border-color:#dbc189}html[data-theme="light"] .mac-practice-feedback:not(.pbr, .pbr *){background:#e5f3dc;border-color:#9cbf8d}html[data-theme="light"] .mac-practice-feedback.incorrect:not(.pbr, .pbr *){background:#fff4df;border-color:#d2b679}
@media(max-width:700px){.topbar-tools{gap:8px}.theme-control>span{display:none}.theme-control select{font-size:10px;padding:6px;max-width:95px}.topbar .local-status{display:none}.topbar{gap:9px}.breadcrumb{flex:1}.topbar-tools{flex-shrink:0}}
html[data-theme="light"] :is(.field label,.panel .subtitle,.results-meta,.mock-meta,.result-summary p,.result-detail,.history-item p,.map-legend):not(.pbr, .pbr *){color:#516956}html[data-theme="light"] .question-prompt:not(.pbr, .pbr *){color:#20372a}html[data-theme="light"] .number-box:not(.pbr, .pbr *){background:#e4f0df;color:#3e6640}html[data-theme="light"] .empty:not(.pbr, .pbr *){background:#f1f6ec;border-color:#c0d4b8}html[data-theme="light"] .sidebar-bottom>a:not(.pbr, .pbr *){color:#356c43}
html[data-theme="light"] .badge.gold:not(.pbr, .pbr *){background:#fbf2dd;color:#79591e;border-color:#dbc58e}html[data-theme="light"] .badge.red:not(.pbr, .pbr *){background:#fff0e9;color:#913c29;border-color:#dfb5a8}html[data-theme="light"] .mock-card.featured .badge:not(.pbr, .pbr *){background:#e4f2dc;color:#38683a;border-color:#accb9e}
html[data-theme="light"] .option.selected .option-letter:not(.pbr, .pbr *){background:#417b43;color:#fff;border-color:#417b43}html[data-theme="light"] .option.correct .option-letter:not(.pbr, .pbr *){background:#286c38;color:#fff;border-color:#286c38}html[data-theme="light"] .option.wrong .option-letter:not(.pbr, .pbr *){background:#a14a31;color:#fff;border-color:#a14a31}html[data-theme="light"] .option.crossed .option-text:not(.pbr, .pbr *){color:#677c64}html[data-theme="light"] .option.selected:not(.pbr, .pbr *){box-shadow:0 0 0 1px #6d9e61}html[data-theme="light"] .map-btn.current:not(.pbr, .pbr *){outline-color:#436c39}html[data-theme="light"] .map-btn.correct:not(.pbr, .pbr *){background:#dcefd4;color:#306137;border-color:#8fb782}html[data-theme="light"] .map-btn.wrong:not(.pbr, .pbr *){background:#ffede3;color:#8c402b;border-color:#d9a38d}html[data-theme="light"] .feedback-banner:not(.pbr, .pbr *){background:#e5f3de;color:#325e38;border-color:#a7c69b}html[data-theme="light"] .feedback-banner.wrong:not(.pbr, .pbr *){background:#fff0e3;color:#8b3d22;border-color:#d6a583}html[data-theme="light"] .result-ring:not(.pbr, .pbr *){background:conic-gradient(#4e8b4d calc(var(--score) * 1%),#dbe7d5 0)}html[data-theme="light"] .result-ring:not(.pbr, .pbr *):before{background:#fff}
/* Contrast audit: text-only buttons, secondary copy and selected controls. */
html[data-theme="light"] .page-heading p:not(.pbr, .pbr *),html[data-theme="light"] .article-header>p:not(.pbr, .pbr *){color:#516956}html[data-theme="light"] .date-pill:not(.pbr, .pbr *){background:#edf4e8;color:#486342;border-color:#c4d6ba}html[data-theme="light"] .btn.text:not(.pbr, .pbr *),html[data-theme="light"] .btn:not(.primary,.secondary,.cream,.danger,.pbr,.pbr *){color:#28643a}html[data-theme="light"] :is(.stat-value small,.goal-tip,.week-day,.recurrence-card p,.syllabus-heading span,.video-body p):not(.pbr, .pbr *){color:#516956}html[data-theme="light"] .recurrence-number:not(.pbr, .pbr *),html[data-theme="light"] .video-body h3:not(.pbr, .pbr *){color:#285a36}html[data-theme="light"] .track-step.locked .track-number:not(.pbr, .pbr *){color:#566c54}html[data-theme="light"] .review-cycle i:not(.pbr, .pbr *){color:#496e4b}
html[data-theme="dark"] .subject-tabs button.active,html[data-theme="dark"] .segmented button.active{color:#103a24}html[data-theme="dark"] .subject-tabs button.active span,html[data-theme="dark"] .segmented button.active span{color:#103a24}html[data-theme="dark"] .breadcrumb span{color:#91a99a}
.download-original{color:#bfd1c7}html[data-theme="light"] .download-original{color:#28643a}html[data-theme="light"] .syllabus-subject>summary>span:not(.pbr, .pbr *),html[data-theme="light"] .video-content p:not(.pbr, .pbr *){color:#516956}html[data-theme="light"] .video-content h3:not(.pbr, .pbr *){color:#285a36}html[data-theme="light"] .btn.subtle:not(.pbr, .pbr *){background:#e2efdc;color:#32663a;border-color:#b4cfa9}
