/* v8 colour layer. Fixed-canvas layout lives in player.css. No scroll suppression on mobile. */
:root{--plot-a:#b9a6ff;--plot-b:#62dcc8;--plot-c:#ffd08a;--plot-text:#bfd1e4;--plot-grid:#304861;--plot-bg:#10243a}
html[data-theme=dark]{--accent:#82e5d0;--accent2:#a697ff;--ink:#eef5ff;--muted:#b4c8da}
html[data-theme=dark] .slide{background:radial-gradient(ellipse at 95% 2%,#5041834f,transparent 42%),radial-gradient(ellipse at 2% 95%,#13605a45,transparent 40%),linear-gradient(125deg,#101d34,#0c2134)}
html[data-theme=dark] .content-card{background:linear-gradient(120deg,#22374ed9,#182941ed);border-color:#3c4e69;box-shadow:0 8px 20px #02081810}
html[data-theme=dark] .content-card:nth-child(2){border-top-color:#7272ac}
html[data-theme=dark] .content-card .formula{background:#091b2e;border-color:#416779}
html[data-theme=dark] .content-card .card-no{color:#b9a6ff}
html[data-theme=dark] .cover-art img{box-shadow:0 28px 65px #0005}
html[data-theme=light]{--ink:#192d4d;--muted:#4e637e;--accent:#19756d;--accent2:#7454cd;--line:#cfdced;--plot-a:#714fc5;--plot-b:#087e73;--plot-c:#b86613;--plot-text:#455d78;--plot-grid:#d4dfed;--plot-bg:#f8fbff;color:var(--ink);color-scheme:light}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=light] .slide{background:radial-gradient(ellipse at 96% 0%,#ece3ff,transparent 38%),radial-gradient(ellipse at 0% 100%,#d6f6ef,transparent 43%),linear-gradient(140deg,#fffdfb,#f6f9ff)}
html[data-theme=light] .slide:before{opacity:.32}
html[data-theme=light] .slide h1,html[data-theme=light] .cover-copy h1{color:#172f4d}
html[data-theme=light] .content-card{background:linear-gradient(135deg,#fff,#f8f6ff);border-color:#d8d4ed;box-shadow:0 8px 25px #233b6210;border-top:3px solid #a18be2}
html[data-theme=light] .content-card:nth-child(2){background:linear-gradient(140deg,#fff,#f0faf7);border-color:#c7e5dc;border-top-color:#58baab}
html[data-theme=light] .content-card:nth-child(3){background:linear-gradient(140deg,#fff,#fff7ec);border-color:#eed9b8;border-top-color:#dfb062}
html[data-theme=light] .content-card:nth-child(4){background:linear-gradient(140deg,#fff,#f2f8ff);border-color:#cbdced;border-top-color:#78a5da}
html[data-theme=light] .content-card p,html[data-theme=light] .question-aside p,html[data-theme=light] .reflection-form p,html[data-theme=light] .result-banner p{color:#4c627a}
html[data-theme=light] .content-card .card-no{color:#7754be}
html[data-theme=light] .content-card .formula{color:#1e6166;border-color:#bcddd8;background:#eaf7f4}
html[data-theme=light] .goal,html[data-theme=light] .route-map,html[data-theme=light] .question-aside{background:linear-gradient(145deg,#fff,#f1f4ff);border-color:#cedbef}
html[data-theme=light] .goal b{background:#e6def8;color:#6944b0}
html[data-theme=light] .route-map div{color:#3f5872}
html[data-theme=light] .route-map i:after{background:#bdd7d3}
html[data-theme=light] .hook-question{background:#eaf7f1;border-color:#b1d8ca;color:#24463f}
html[data-theme=light] .hook-note,html[data-theme=light] .slide-credit,html[data-theme=light] .cover-hint,html[data-theme=light] .cover-code{color:#59738b}
html[data-theme=light] .cover-tags{color:#536580}
html[data-theme=light] .cover-tags span{background:#ffffffb0;border-color:#cad6e7}
html[data-theme=light] .cover-art:before{border-color:#b9c9e5}
html[data-theme=light] .btn{background:#257f79;color:#fff}
html[data-theme=light] .btn.secondary{background:#fff;border-color:#b6cce2;color:#355570}
html[data-theme=light] .btn:hover{filter:brightness(.97)}
html[data-theme=light] .visual-panel,html[data-theme=light] .table-panel,html[data-theme=light] .table-under,html[data-theme=light] .lab-display{background:#f8fbff;border-color:#c6d7e8}
html[data-theme=light] .data-table{color:#263f5d}
html[data-theme=light] .data-table th,html[data-theme=light] .data-table td{border-color:#d4e0ed}
html[data-theme=light] .data-table th{background:#eaf3fa;color:#22575d}
html[data-theme=light] .answer{background:#fff;color:#263e5b;border-color:#c7d6e8}
html[data-theme=light] .answer b{background:#e8e3f8;color:#694aa6}
html[data-theme=light] .answer.selected{background:#e8f7f1;border-color:#308d7c}
html[data-theme=light] .answer.selected b{background:#257f79;color:#fff}
html[data-theme=light] .answer.correct{border-color:#208c66}
html[data-theme=light] .answer.wrong{border-color:#ba6d31}
html[data-theme=light] .question-aside small,html[data-theme=light] .question-help,html[data-theme=light] .reflection-form small{color:#526b86}
html[data-theme=light] .question-dots button{background:#fff;border-color:#bed0e1;color:#3c526b}
html[data-theme=light] .question-dots button.answered{background:#247e70;color:#fff}
html[data-theme=light] .question-input,html[data-theme=light] .matching-row select,html[data-theme=light] .reflection-form textarea,html[data-theme=light] .lab-control select,html[data-theme=light] .lab-control input[type=number],html[data-theme=light] .lab-control textarea,html[data-theme=light] .lab-note-tab textarea{background:#fff;color:#203d5c;border-color:#b7cce0}
html[data-theme=light] input::placeholder,html[data-theme=light] textarea::placeholder{color:#788aa0}
html[data-theme=light] .order-item{background:#eff4fc;border-color:#bacee3;color:#24405e}
html[data-theme=light] .order-item button{background:#fff;border-color:#bacee3;color:#24405e}
html[data-theme=light] .feedback{background:#e3f6ec;border-color:#9fcdba;color:#23604b}
html[data-theme=light] .feedback.bad{background:#fff2dc;border-color:#e0bf86;color:#775015}
html[data-theme=light] .feedback strong{color:inherit}
html[data-theme=light] .result-banner{background:linear-gradient(140deg,#e1f6ec,#eef9f8);border-color:#afd7c9;color:#285343}
html[data-theme=light] .result-banner.fail{background:#fff3e4;border-color:#e1c899;color:#765223}
html[data-theme=light] .quiz-count small{color:#637d90}
html[data-theme=light] .lab-tabs button{border-color:#b9cde0;color:#355c79}
html[data-theme=light] .lab-tabs button.active{background:#257f79;color:white;border-color:#257f79}
html[data-theme=light] .lab-metrics div{background:#e9f1fb}
html[data-theme=light] .lab-metrics b{color:#204d6b}
html[data-theme=light] .lab-metrics span,html[data-theme=light] .lab-caption,html[data-theme=light] .lab-control small,html[data-theme=light] .table-pagination{color:#4d6680}
html[data-theme=light] .lab-control label,html[data-theme=light] .lab-note-tab p{color:#31516b}
html[data-theme=light] .lab-error{color:#9a5921}
html[data-theme=light] .contents-grid button{background:#edf3fb;border-color:#c4d6e7;color:#314c67}
html[data-theme=light] .contents-grid button.current{background:#e1f4eb;border-color:#308877}
.theme-toggle{flex-shrink:0;min-height:34px}
.player-brand{min-width:0}.player-brand b{max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-brand span{flex-shrink:0}
@media (min-width:701px) and (pointer:fine){
 [data-module=F05] .cover-copy h1,[data-module=F12] .cover-copy h1{font-size:55px}
 [data-phase=F] .lab-table-page .data-table td,[data-phase=F] .lab-table-page .data-table th{font-size:16px;padding:10px 8px}
}
@media(max-width:1024px){.player-brand span{display:none}.player-brand b{max-width:260px}}
@media(max-width:700px),(pointer:coarse) and (max-width:1024px){.player-brand b{white-space:normal;max-width:none}.theme-toggle{padding:7px 9px}.player-theme [data-theme-label]{display:none}.lab-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.lab-metrics div{min-width:0}.table-pagination{gap:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(min-width:701px) and (pointer:fine){[data-phase=F] .reflection-form textarea{height:180px}}
@media(max-width:700px),(pointer:coarse) and (max-width:1024px){
 .cover-art:before{transform:none;inset:-6px}
 .table-under{min-width:0;max-width:100%;overflow-x:auto}
 .table-under .data-table{table-layout:fixed;width:100%}
 .content-grid{min-width:0}.content-grid>*{min-width:0}
 .slide-content{min-width:0}.cover-art{max-width:calc(100% - 12px)}
}
@media(min-width:701px) and (pointer:fine){.lab-controls{gap:12px}}
sub{font-size:.68em;line-height:0}
@media(max-width:700px),(pointer:coarse) and (max-width:1024px){
 .content-card p,.slide-lead,.formative-question,.answer span,.feedback,.hook-question{overflow-wrap:anywhere}
}

/* XII accent labels stay legible in both palettes. */
:root{--plot-on-accent:#102338}html[data-theme='light']{--plot-on-accent:#ffffff}
