/* The hero's monochrome cinematic palette, scoped only to the study pages. */
.study-theme-toggle{flex:none;min-height:34px;padding:7px 12px;border:1px solid #c5c5ce;border-radius:9px;background:var(--droplet-surface);box-shadow:var(--droplet-edge);color:#233652;font:650 12px/1.3 'Segoe UI',sans-serif;cursor:pointer;white-space:nowrap}
.nav>div .study-theme-toggle{margin-left:16px}
.study-theme-toggle:focus-visible{outline:2px solid currentColor;outline-offset:3px}
html[data-theme=dark]{color-scheme:dark;background:#030304}
html[data-theme=dark] body{color:#eeeef3;background-color:#030304;--droplet-surface:linear-gradient(140deg,#25252ccf,#111116ed 60%,#08080ce8);--droplet-edge:inset 0 1px 0 #ffffff24,inset 0 -1px 0 #ffffff08,0 8px 22px #0005;--difficulty-challenge-gradient:linear-gradient(145deg,#483459,#211728);--difficulty-challenge-text:#e8dcf8;--difficulty-hard-gradient:linear-gradient(145deg,#593137,#281719);--difficulty-hard-text:#f8dce1;--difficulty-medium-gradient:linear-gradient(145deg,#574229,#2c2116);--difficulty-medium-text:#f8e6c9;--difficulty-easy-gradient:linear-gradient(145deg,#2e4f42,#152a22);--difficulty-easy-text:#d6eee3}
html[data-theme=dark] .study-glass-motion::before{background-image:radial-gradient(ellipse at 79% 28%,#35353b5c,transparent 38%),radial-gradient(ellipse at 45% 100%,#1c1c2355,transparent 55%),linear-gradient(125deg,#030304,#0c0c10 57%,#040405)}
html[data-theme=dark] .study-glass-motion::after{background:radial-gradient(ellipse at 32% 40%,#ffffff12,transparent 42%),linear-gradient(112deg,transparent 32%,#ffffff00 40%,#ffffff12 48%,#ffffff02 54%,transparent 65%);opacity:.6}
html[data-theme=dark] body:not(.glass-motion-enabled){background:radial-gradient(ellipse at 79% 28%,#35353b5c,transparent 38%),linear-gradient(125deg,#030304,#0c0c10 57%,#040405)}
html[data-theme=dark] body .nav,html[data-theme=dark] .question-header-toolbar{background:linear-gradient(140deg,#111116c9,#08080ce0);color:#eeeef3;box-shadow:inset 0 -1px #ffffff14}
html[data-theme=dark] .cards.detail-mode>.card,html[data-theme=dark] .workspace-docked .cards.detail-mode>.card{background:radial-gradient(ellipse at 45% 34%,#ffffff04,transparent 75%);color:#eeeef3}
html[data-theme=dark] body.index-mode .domain-row,html[data-theme=dark] body.index-mode .difficulty-controls,html[data-theme=dark] body.index-mode .coming-soon-bank .domain-row{background:linear-gradient(140deg,#ffffff12,#ffffff06 42%,#08080ce8);border-color:#ffffff26;box-shadow:0 25px 65px #0007,inset 0 1px #ffffff24}
html[data-theme=dark] body.index-mode :is(h1,h2,.brand,.mark,.difficulty-key-label){color:#eeeef3}
html[data-theme=dark] body.index-mode :is(.home,.domain-row p,.difficulty-controls-label,.difficulty-key,.difficulty-key span,.domain-count){color:#b9b9c3}
html[data-theme=dark] .cards.detail-mode :is(p,.question-summary,.question-summary b,.question-summary strong,.context-nav strong,.numeric-response label,.question-content-scroll,.question-content-scroll p):not(.controlled-desmos *, .question-workspace-calculator-host *){color:#eeeef3}
html[data-theme=dark] .cards.detail-mode :is(.keyboard-hint,.practice-status span){color:#a7a7b0}
html[data-theme=dark] :is(.workspace-panel,.workspace-panel-header,.workspace-panel-body,.workspace-panel .video-explanation-panel,.workspace-panel .question-drawer aside){background:var(--droplet-surface);border-color:#ffffff26;color:#eeeef3;box-shadow:var(--droplet-edge)}
html[data-theme=dark] :is(.workspace-feature>.explanation,.workspace-panel .primary-learning,.workspace-panel .primary-learning.explanation-player){background:var(--droplet-surface)!important;color:#eeeef3}
html[data-theme=dark] .workspace-panel :is(h2,h3,h4,p,b,strong,code,summary,li,.formal-fact,.formal-takeaway,.hand-equations,.hand-step,.hand-step>p,.hand-step h4):not(.controlled-desmos *, .question-workspace-calculator-host *){color:#eeeef3!important}
html[data-theme=dark] .workspace-panel :is(.player-header>div small,.mode-intro span,.video-explanation-head small,.module-number,.module-kicker,.hand-step-number,.desmos-full-entry>span,.desmos-current-copy>span,.desmos-notation>div>span,.visual-step-copy>span){color:#b9b9c3}
html[data-theme=dark] .workspace-panel :is(.formal-equations code,.solution-steps code,.desmos-full-entry code,.desmos-notation code,.visual-step-copy>code,.solution-steps li>span,.cone-equation){background:#ffffff0d;color:#eeeef3;border-color:#ffffff24}
html[data-theme=dark] :is(.study-theme-toggle,.workspace-panel-actions button,.workspace-panel-actions select,.workspace-restore,.cards.detail-mode .question-header-toolbar button,.cards.detail-mode .always-answer-actions>button,.cards.detail-mode .practice-actions button,.cards.detail-mode .numeric-response input,.cards.detail-mode [role=radio][aria-checked=false],.workspace-panel .view-question,.workspace-panel .restore-step,.workspace-panel .desmos-controls button,.workspace-panel .desmos-step-nav button,.workspace-panel .video-tools button,.workspace-panel .video-tools select,.workspace-panel .question-drawer aside button,body.index-mode .explanation-filter-chip,body.index-mode .difficulty-filter-chip:not(.active)){background:var(--droplet-surface);border-color:#ffffff26;color:#eeeef3;box-shadow:var(--droplet-edge)}
html[data-theme=dark] :is(.cards.detail-mode .check,.workspace-panel .player-tabs button.active,.workspace-panel .desmos-controls button:last-child,.workspace-panel .desmos-step-nav button.active,.workspace-panel .video-tools button[aria-pressed=true],body.index-mode .start-practice,body.index-mode .explanation-filter-chip.active){background:linear-gradient(145deg,#fff,#dddde5);border-color:#ffffff70;color:#111115;box-shadow:0 5px 18px #0006}
html[data-theme=dark] .cards.detail-mode [role=radio][aria-checked=true]{background:#ffffff19;border-color:#ffffffaa;color:#fff}
html[data-theme=dark] .workspace-panel .player-tabs button:not(.active){color:#b9b9c3}
html[data-theme=dark] :is(.cards.detail-mode .dataset,.cards.detail-mode .question-figure,.cards.detail-mode .question-data-table,.cards.detail-mode .question-data-table td,.cards.detail-mode .question-data-table th,.cards.detail-mode .domain-tags span,.cards.detail-mode .top .tag,.cards.detail-mode .practice-status span,body.index-mode .domain-tags span){background:var(--droplet-surface);border-color:#ffffff24;color:#d7d7df}
html[data-theme=dark] .workspace-panel :is(.circle-cinema text,.tangent-cinema text,.cone-cinema text){fill:#eeeef3!important;stroke:none}
html[data-theme=dark] .workspace-panel :is(.circle-cinema [data-circle-layer=function] rect,.hand-visual svg rect){fill:#17171e;stroke:#b9b9c3}
html[data-theme=dark] .workspace-panel .hand-visual svg{stroke:#d7d7df}
html[data-theme=dark] .workspace-panel :is(.circle-ring,.symmetry-axis,.diameter-line,.inscribed-square,.square-diagonal){stroke:#dddde5}
html[data-theme=dark] .workspace-panel :is(.center-dot,.diameter-dot){fill:#fff}
html[data-theme=dark] :is(.workspace-panel-body,.workspace-panel .desmos-step-copy,.hand-work){scrollbar-color:#62626e #111116}
@media(max-width:760px){.study-theme-toggle{padding:7px 9px;font-size:11px}.nav>div .study-theme-toggle{margin-left:10px}}
html[data-theme=dark] body.index-mode .problem-bubble.difficulty-challenge{color:#e8dcf8}
html[data-theme=dark] body.index-mode .problem-bubble.difficulty-hard{color:#f8dce1}
html[data-theme=dark] body.index-mode .problem-bubble.difficulty-medium{color:#f8e6c9}
html[data-theme=dark] body.index-mode .problem-bubble.difficulty-easy{color:#d6eee3}
html[data-theme=dark] .cards.detail-mode :is(.top .topic,.top .level){background:#ffffff0b;color:#d7d7df}
html[data-theme=dark] .cards.detail-mode .options button:hover:not(:disabled){background:#ffffff15;border-color:#ffffff8c}
html[data-theme=dark] .cards.detail-mode .options button.tried{background:#41212b;color:#ffdce3;border-color:#945268}
html[data-theme=dark] .cards.detail-mode .practice-feedback.correct{background:#17362a;color:#d6f8e3}
html[data-theme=dark] .cards.detail-mode .practice-feedback.incorrect{background:#41212b;color:#ffdce3}
html[data-theme=dark] .cards.detail-mode .check:disabled{opacity:.4}
html[data-theme=dark] .cards.detail-mode>.question-header-toolbar{background:linear-gradient(140deg,#111116c9,#08080ce0);box-shadow:inset 0 -1px #ffffff14}
html[data-theme=dark] .cards.detail-mode :is(.numeric-response,.numeric-response>span,.question-status span,.question-header-toolbar>span){color:#b9b9c3}
html[data-theme=dark] .cards.detail-mode .question-status span{background:#ffffff0b}
html[data-theme=dark] body.index-mode .difficulty-filter-chip.active.difficulty-challenge{background:var(--difficulty-challenge-gradient);color:#e8dcf8}
html[data-theme=dark] body.index-mode .difficulty-filter-chip.active.difficulty-hard{background:var(--difficulty-hard-gradient);color:#f8dce1}
html[data-theme=dark] body.index-mode .difficulty-filter-chip.active.difficulty-medium{background:var(--difficulty-medium-gradient);color:#f8e6c9}
html[data-theme=dark] body.index-mode .difficulty-filter-chip.active.difficulty-easy{background:var(--difficulty-easy-gradient);color:#d6eee3}
html[data-theme=dark] .study-glass-motion::after{background-image:radial-gradient(circle at 12% 24%,#ffffffa6 0 1.3px,transparent 2.6px),radial-gradient(circle at 29% 74%,#ffffff80 0 1px,transparent 2px),radial-gradient(circle at 41% 16%,#ffffff73 0 1.3px,transparent 2.5px),radial-gradient(circle at 68% 40%,#ffffffb3 0 1.4px,transparent 3px),radial-gradient(circle at 82% 78%,#ffffff66 0 1px,transparent 2px),radial-gradient(circle at 91% 19%,#ffffffa6 0 1.3px,transparent 3px),radial-gradient(ellipse at 32% 40%,#ffffff12,transparent 42%),linear-gradient(112deg,transparent 32%,#ffffff00 40%,#ffffff12 48%,#ffffff02 54%,transparent 65%);animation:study-dark-drift 16s ease-in-out infinite alternate}
@keyframes study-dark-drift{from{opacity:.45;transform:translate3d(calc(var(--glass-x,0)*30px - 8px),calc(var(--glass-y,0)*22px + 14px),0)}to{opacity:.85;transform:translate3d(calc(var(--glass-x,0)*30px + 12px),calc(var(--glass-y,0)*22px - 18px),0)}}
@media(prefers-reduced-motion:reduce){html[data-theme=dark] .study-glass-motion::after{animation:none;transform:none}}
html[data-theme=dark] .nav .mark{background:linear-gradient(145deg,#ffffff0e,#ffffff02);border-color:#ffffff26;color:#f3f3f5}
.nav>div .home{margin-left:auto}
html[data-theme=dark] .intro :is(.eyebrow,small,.kicker){color:#b9b9c3}
html[data-theme=dark] .cards.detail-mode .options button[aria-checked=true]>span:first-child{background:#eeeef3;color:#111115}
html[data-theme=dark] .cards.detail-mode .options button[data-clear]{background:var(--droplet-surface);border-color:#ffffff26;color:#eeeef3}
html[data-theme=dark] .workspace-panel .desmos-step-nav button.active,html[data-theme=dark] .workspace-panel .desmos-controls button:last-child{background:linear-gradient(145deg,#fff,#dddde5)!important;color:#111115!important;border-color:#ffffff70!important}
html[data-theme=dark] .workspace-panel :is(.desmos-controls span,.video-tools,.video-help){color:#b9b9c3}
html[data-theme=dark] .cards.detail-mode .options button[aria-checked=true]>b{background:#eeeef3;color:#111115}
html[data-theme=dark] .cards.detail-mode .options button:not([aria-checked=true])>b{background:#ffffff0e;border-color:#ffffff40;color:#eeeef3}
html[data-theme=dark] body.index-mode .intro>span{color:#b9b9c3}
html[data-theme=dark] body.index-mode .intro .label{color:#b9b9c3}
html[data-theme=dark] :is(.workspace-panel button,.workspace-panel select,.cards.detail-mode button,.cards.detail-mode input,.problem-bubble,.study-theme-toggle):focus-visible{outline-color:#eeeef3}
html[data-theme=dark] .workspace-panel .hand-visual svg text{fill:#eeeef3;stroke:none}
html[data-theme=dark] .workspace-panel .hand-player .hand-step.current{background:var(--droplet-surface);border-color:#ffffff40;color:#eeeef3;box-shadow:var(--droplet-edge)}
/* Compact domain groups keep the cinematic background visible. */
body.index-mode .domain-row,body.index-mode .coming-soon-bank .domain-row{padding:12px 14px;gap:18px;border-radius:10px;background:linear-gradient(140deg,#ffffff45,#ffffff20);border-color:#ffffff70;box-shadow:inset 0 1px #ffffff70;backdrop-filter:blur(5px)}
html[data-theme=dark] body.index-mode .domain-row,html[data-theme=dark] body.index-mode .coming-soon-bank .domain-row{background:linear-gradient(140deg,#ffffff05,#ffffff01);border-color:#ffffff14;box-shadow:inset 0 1px #ffffff06;backdrop-filter:none}
body.index-mode .domain-meta{gap:7px;margin:0}
body.index-mode .domain-count{font-size:9px;letter-spacing:.1em}
body.index-mode .domain-row h2{font-size:15px;margin:4px 0}
body.index-mode .domain-meta p{font-size:11px;line-height:1.4}
body.index-mode .domain-tags{gap:5px;margin-top:8px}
body.index-mode .domain-tags span{padding:3px 5px;font-size:8px;border-radius:5px}
body.index-mode .question-grid{grid-template-columns:repeat(auto-fill,56px);gap:8px;align-content:center}
body.index-mode .problem-bubble{width:56px;height:56px;min-width:0;border-radius:8px;font-size:17px;box-shadow:inset 0 1px #ffffff26}
body.index-mode .problem-bubble .tile-difficulty{top:5px;left:4px;font-size:6.5px;max-width:calc(100% - 12px)}
body.index-mode .problem-bubble small{bottom:5px;font-size:8px}
body.index-mode .problem-bubble .bubble-tool{bottom:4px;font-size:8px}
body.index-mode .problem-bubble .tile-status{top:6px;right:4px;width:4px;height:4px}
@media(max-width:780px){body.index-mode .domain-row,body.index-mode .coming-soon-bank .domain-row{padding:11px 12px;gap:12px}body.index-mode .question-grid{grid-template-columns:repeat(auto-fill,56px);gap:7px}}
.study-particles{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
html[data-theme=light] .study-particles{display:none}
/* A compact default bank scale, independent of browser zoom. */
body.index-mode .nav>div{height:52px;font-size:12px}
body.index-mode .mark{width:28px;height:28px}
body.index-mode .intro{padding:22px 0 15px}
body.index-mode .intro .label{font-size:10px}
body.index-mode .intro h1{font-size:clamp(28px,3.2vw,42px);margin:8px 0 0}
body.index-mode .difficulty-controls{padding:12px 15px;gap:16px;margin-top:16px;margin-bottom:16px}
body.index-mode .difficulty-controls-label{font-size:9px}
body.index-mode .difficulty-key-item{font-size:11px}
body.index-mode .difficulty-filter-chip,body.index-mode .explanation-filter-chip{min-height:31px;padding:6px 10px;font-size:11px}
body.index-mode .start-practice{min-height:35px;padding:9px 15px;font-size:12px}
body.index-mode .study-theme-toggle{min-height:31px;padding:6px 10px;font-size:11px}
body.index-mode .domain-list{gap:14px}
@media(max-width:520px){body.index-mode .intro{padding-top:17px}body.index-mode .difficulty-controls{gap:12px}body.index-mode .difficulty-filter-chip,body.index-mode .explanation-filter-chip{min-height:34px}}

/* Embedded native Desmos stays light, including its tables and menus. */
.controlled-desmos,.question-workspace-calculator-host{color-scheme:light;color:#000}
/* Bank sections use spacing rather than decorative separator rules. */
body.index-mode .intro{border-bottom:0}
body.index-mode .nav{border-bottom:0;box-shadow:none}
html[data-theme=dark] body.index-mode .nav{box-shadow:none}
body.index-mode .coming-soon-bank{border-top:0;padding-top:12px}
