
:root[data-theme]{--bg:var(--catchie-page-bg);--paper:var(--catchie-surface-solid);--white:var(--catchie-surface-solid);--ink:var(--catchie-theme-readable-text);--muted:var(--catchie-theme-readable-muted);--line:var(--catchie-stroke);--green:var(--catchie-theme-link-text);--lime:var(--catchie-primary-soft);--gold:var(--catchie-amber);--orange:var(--catchie-amber);--rose:var(--catchie-bad);--danger:var(--catchie-theme-bad-text);--shadow:var(--catchie-shadow);background:var(--bg);color:var(--ink)}
:root[data-theme] body{background:var(--bg);color:var(--ink)}
:root[data-theme] :is(.sidebar,.panel,.control-card,.report-card,.concept,.unit-card,.stat,.guide-card,.callout,.quiz-card,.example-card,.formula-card,.home-note,.modal-head,.dialog-head,dialog,.choice,.tab-strip button,.lab-tabs button,.teacher-answer,.home-note,.controls-row,.panel-head,.panel-foot){background:var(--paper);color:var(--ink);border-color:var(--line)}
:root[data-theme] :is(h1,h2,h3,h4,.brand,.nav-heading,.nav-button,.nav-unit,.nav-item,.breadcrumb,.measure strong,.control label,.unit-card h3){color:var(--ink)}
:root[data-theme] :is(p,.eyebrow,.micro-label,.scene-description,.page-heading p,.control-card p,.concept p,.footer,.side-bottom small,.version,.stat span,.guide-card p,.lab-heading p){color:var(--muted)}
:root[data-theme] :is(input,select,textarea,.secondary,.quiet,.text-button,.icon-button,.toolbar button,.segmented button,.preset,.step-button){background:var(--paper);color:var(--ink);border-color:var(--line)}
:root[data-theme] :is(.primary,.button:not(.secondary),.nav-button.active,.nav-item.active,.lab-tabs button.active,.tab-strip button.active){background:var(--catchie-theme-button-start);color:var(--theme-on-primary);border-color:transparent}
:root[data-theme] :is(.button.secondary,.secondary){background:var(--paper);color:var(--green);border-color:var(--line)}
:root[data-theme] :is(.nav-button.active span,.nav-item.active span){color:inherit}
:root[data-theme] :is(.feedback,.callout,.guide-card,.chip,.pill,.badge,.measure,.formula){background:var(--catchie-primary-soft);color:var(--ink)}
:root[data-theme] :is(.feedback.success,.feedback.good,.choice.correct){background:var(--catchie-good-soft);color:var(--theme-status-good)}
:root[data-theme] :is(.feedback.try,.feedback.bad,.choice.incorrect){background:var(--catchie-bad-soft);color:var(--theme-status-bad)}
:root[data-theme] :is(th,td,.modal-head,.dialog-head,.controls-row){border-color:var(--line)}th{background:var(--catchie-surface-muted);color:var(--ink)}
:root[data-theme] dialog::backdrop{background:var(--catchie-overlay)}
/* Keep scientific colour keys and labels on their original light diagram canvas. */
:root[data-theme] :is(.scene,.stage,.hero-illustration,.orbital-box){color-scheme:light;color:#193d38;background:#f1f3e9}
:root[data-theme] .stage-caption,.scene-description{color:var(--muted)}
:root[data-theme] .element-tile{color:#284e3d}.element-symbol{color:inherit}
[data-theme-group="dark"] :is(.control-card,.panel,.guide-card,.unit-card,.stat) [style*="color:#"]{color:var(--muted)!important}
[data-theme="pride"] .topbar{border-image:linear-gradient(90deg,#ef4444,#f97316,#eab308,#22c55e,#3b82f6,#8b5cf6) 1}

.catchie-theme-control{display:inline-flex;align-items:center;gap:5px;max-width:100%;border:1px solid var(--line,var(--catchie-stroke));border-radius:6px;padding:5px 7px;color:var(--ink,var(--catchie-text));background:var(--paper,var(--catchie-surface-solid))}
.catchie-theme-control select{font:inherit;font-size:12px;max-width:142px;min-width:0;background:transparent;color:inherit;border:0;padding:4px;cursor:pointer}.catchie-theme-control option{background:var(--catchie-surface-solid);color:var(--catchie-text)}
.catchie-home-link{color:var(--green,var(--theme-link));font-size:12px;text-decoration:none;white-space:nowrap}.catchie-home-link:hover{text-decoration:underline}
.topbar .top-actions{flex-wrap:wrap;gap:8px}.topbar{height:auto;min-height:74px;padding-top:10px;padding-bottom:10px}.topbar .course-tag{flex-shrink:0}.top-actions button{min-height:34px}
@media(max-width:1100px){.topbar .course-tag{display:none}.topbar{gap:10px;flex-wrap:wrap}.topbar .top-actions{margin-left:auto}.topbar .breadcrumb{font-size:12px}}
@media(max-width:600px){.topbar .top-actions{width:100%;margin:0;justify-content:flex-start}.topbar{height:auto;min-height:74px}.catchie-theme-control select{max-width:126px}}

.projector .sidebar,.projector .main-nav,.projector .lesson-menu{display:none}
.projector .workspace{margin-left:0}.projector .learn-layout{grid-template-columns:minmax(0,1fr)}
.projector main{max-width:1660px;margin-left:auto;margin-right:auto}.projector .topbar{position:sticky;top:0;z-index:30;background:var(--paper);min-height:62px}
.projector main :is(p,label,.detail,.lesson-link,.active-task,.control-card p,.concept p,.stage-caption,.question-heading,.small-note){font-size:1.12rem;line-height:1.55}
.projector main :is(button,input,select){font-size:1rem;min-height:42px}.projector main h1{font-size:clamp(2rem,4vw,3rem)}
.projector .lesson-copy :is(h2,h3){font-size:1.6rem}.projector .lesson-art{min-height:400px}.projector .stage{min-height:380px}
.projector .site-footer,.projector .footer{display:none}
@media(max-width:700px){.projector .lesson-art,.projector .stage{min-height:260px}.projector main :is(p,label,.detail){font-size:1rem}.projector .topbar{position:static}}

:root[data-theme] :is(.segment,.stepper,.stage-legend,.challenge,.balance-grid,.observation,.question-chip,.level-chips button,.answer,.preset-grid button){background:var(--catchie-surface-muted);color:var(--ink);border-color:var(--line)}
:root[data-theme] :is(.segment button,.stepper button,.stepper input){background:var(--paper);color:var(--ink)}
:root[data-theme] :is(.segment button.active,.preset.active,.question-chip.active,.level-chips button.active){background:var(--catchie-theme-button-start);color:var(--theme-on-primary)}
:root[data-theme] :is(.challenge .eyebrow,.challenge h3,.challenge p,.stage-legend span,.hero h1 em){color:var(--green)}
:root[data-theme] .stage :is(.stage-corner,.stage-note,.micro-label){color:#526349}
:root[data-theme] .element-symbol{color:#284e3d}
:root[data-theme] #toast{background:var(--catchie-theme-button-start);color:var(--theme-on-primary)}

:root[data-theme] .stage .pill{background:#eef3df;color:#315737;border-color:#cbd9b9}:root[data-theme] .stage .stage-caption{color:#526349}
