:root{color-scheme:light;--theme-surface:#fff;--theme-soft:#eaf2fc;--theme-text:#142f55;--theme-border:#dce5f0}
html[data-theme=dark]{color-scheme:dark;--ink:#e0eaf8;--muted:#a9bbcf;--paper:#0e1724;--line:#34475e;--lime:#a8d7ff;--navy:#142f55;--theme-surface:#192638;--theme-soft:#22354c;--theme-text:#e0eaf8;--theme-border:#34475e;background:#0e1724;color:#e0eaf8}
.theme-control{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;color:var(--muted,#536778);margin:0}
.theme-control select{font:inherit;min-width:0;max-width:145px;padding:7px 9px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface);color:var(--theme-text);cursor:pointer}
.top,.welcome-nav,main>header{flex-wrap:wrap;gap:14px}.theme-control select:focus-visible{outline:3px solid #65aaf0;outline-offset:3px}
html[data-theme=dark] body{background:var(--paper);color:var(--ink)}
html[data-theme=dark] :is(.stat,.card,.library-group,.guide-steps li,.guide-route,.track-selector,.metric,.panel,dialog,.leadership-demo,.price-free,.demo-options button,.sos-tile,.conversation-entry){background:var(--theme-surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea,select,#tester-form input,.track-choice select){background:#101d2d;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(button,.signin-link){background:#a8d7ff;color:#10233c}
html[data-theme=dark] :is(button.secondary,.secondary,.textbtn,.demo-reset,.demo-roles button,nav button,.welcome-languages button,.lang button){background:transparent;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(nav button.active,.lang,.lang button.selected,.welcome-languages,.welcome-languages button[aria-pressed=true],.lesson-tabs button,.lesson-tabs button.active,.options button,.options button.chosen,.demo-roles button[aria-pressed=true],.conversation-steps button,.conversation-steps button[aria-current=step],.conversation-types button,.conversation-types button[aria-pressed=true]){background:var(--theme-soft);color:var(--ink);border-color:#6996c3}
html[data-theme=dark] :is(.tag,.notice,.num,.feedback,.close,.assessment-banner,.compass-card,.profile-tip,.scorecard-anchors,.guide-time,.guide-step-number,.guide-panel,.guided-test-progress,.guide-result-next,.manifesto-zero,.manifesto-toc a,.manifesto-module-note,.sos-panel,.sos-phrase,.coach-result,.sos-user,.sos-ai,.lesson-case,.lesson-case.weak,.data-preview,.conversation-hint,.conversation-plan-summary,.conversation-steps button span,.demo-top,.demo-your-reply,.demo-continuation,.welcome-bridge,.bridge-icon,.bridge-modules span){background:var(--theme-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(aside,.bar){background:#142236;border-color:var(--line)}
html[data-theme=dark] :is(.hero,.welcome-hero,.price-premium,.manifesto-main){background:#142f55;color:#f4f9ff}
html[data-theme=dark] :is(.hero button,.welcome-cta,.manifesto-main button){background:#a8d7ff;color:#142f55}
html[data-theme=dark] :is(.toast,.mark,.step-complete .guide-step-number,.demo-next){background:#a8d7ff;color:#142f55}
html[data-theme=dark] :is(.muted,.intro,.intro p,.metric span,th,.assessment-banner p,.sos-welcome,.sos-bubble summary,.track-selector summary,.demo-top small,.demo-scene,.demo-speaker,.demo-prompt p,.demo-letter,.demo-arrow,.demo-disclosure,.demo-your-reply>span,.demo-continuation>span,.demo-lens p,.demo-lens>span,.payment-notice,.section-intro .eyebrow,.welcome-principle .eyebrow,.welcome-bridge .eyebrow,.welcome-number,.feature-premium,footer){color:var(--muted)}
html[data-theme=dark] :is(.coach-result h3,.done,.sos-tile>span,.footer-name,a){color:#b4d9ff}
html[data-theme=dark] :is(table th,table td){border-color:var(--line)}
html[data-theme=dark] .brand .pep-brand-icon{background:white}
html[data-theme=dark] :is(#usage-consent,#usage-notice,.usage-settings){background:var(--theme-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] .usage-actions button.secondary{background:var(--theme-soft);color:var(--ink)}
html[data-theme=dark] .theme-control select{background:var(--theme-surface);color:var(--ink)}
@media(max-width:600px){.theme-control{font-size:11px}.theme-control select{max-width:130px}.welcome-nav .theme-control{margin-left:auto}}

html[data-theme=dark] :is(a.welcome-cta,a.signin-link){color:#142f55}

html[data-theme=dark] .radar-chart text{fill:var(--ink)}

html[data-theme=dark] #account-sync{background:var(--theme-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}html[data-theme=dark] #account-sync a{color:#b4d9ff!important}
/* Keep the landing language/theme controls readable on small screens. */
.welcome-nav .theme-control{font-size:12px}
