:root{color-scheme:dark;--bg:#101c25;--panel:#12212b;--line:#2c3e48;--muted:#b0c2ca;--text:#e9f0f2;--gold:#f0c17e;--cyan:#85ced0;--radius:12px;--font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-family:var(--font);font-size:15px;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,select{color:var(--text)}button{cursor:pointer;border:1px solid transparent;background:transparent;border-radius:7px;min-height:40px;padding:9px 12px;font-weight:500;touch-action:manipulation;transition:background .15s,border-color .15s}button:hover{background:#ffffff0c}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,canvas:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}p,h1,h2,h3{margin:0}button,input,select,summary{-webkit-tap-highlight-color:transparent}input[type=range]{width:100%;height:30px;accent-color:var(--gold);cursor:pointer;margin:0;background:transparent}input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:var(--line)}input[type=range]::-webkit-slider-thumb{margin-top:-6px}input[type=checkbox]{width:17px;height:17px;margin:0;accent-color:var(--gold);flex-shrink:0}select{border:1px solid var(--line);background:#172a36;border-radius:6px;min-height:38px;padding:5px 7px}button.quiet{color:var(--muted)}button.outline{border-color:var(--line);background:#182b37}.primary{background:var(--gold);color:#17232b}.primary:hover{background:#ffcf8e}.text-button{color:var(--gold);padding:4px 0;font-size:.86rem;min-height:32px;text-align:left}.icon-button{width:38px;min-height:38px;padding:8px;display:inline-flex;align-items:center;justify-content:center;font-size:23px}.header{height:86px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 28px;border-bottom:1px solid var(--line);background:#101c25}.brand{display:flex;gap:13px;align-items:center}.brand h1{font-size:27px;font-weight:580;letter-spacing:-.8px;line-height:1.05}.brand p{font-size:12px;margin-top:5px;color:var(--muted);letter-spacing:.15px}.element{width:42px;height:47px;border:1px solid #58747b;border-radius:5px;display:flex;align-items:center;justify-content:center;padding-top:9px;font-size:24px;position:relative;letter-spacing:-1px;color:#b9d4d8}.element small{position:absolute;top:2px;left:5px;font-size:9px;letter-spacing:0}.header-actions{display:flex;align-items:center;gap:12px}.header-actions .outline{display:flex;align-items:center;gap:8px}.prototype{font-size:12px;color:#a9bfc9;margin-right:14px}.prototype span{color:#6f929e;margin-left:6px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;height:calc(100dvh - 86px);min-height:650px;max-height:1600px}.stage{position:relative;min-width:0;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 38% 44%,#1b3541 0%,#13252f 45%,#101b24 86%)}#scene,#overlay{position:absolute;inset:0;display:block}#scene{touch-action:none;cursor:grab;z-index:0}#scene:active{cursor:grabbing}#overlay{pointer-events:none;z-index:1}.scene-heading{position:absolute;top:25px;left:28px;right:25px;display:flex;align-items:start;justify-content:space-between;gap:10px;pointer-events:none;z-index:2}.scene-heading h2{font-size:20px;font-weight:550;letter-spacing:-.4px}.scene-heading p{color:var(--muted);font-size:12px;margin-top:5px}.status{display:inline-flex;gap:7px;align-items:center;color:#b9dbd6;font-size:12px;padding:7px 10px;border:1px solid #48646466;background:#10222aaa;border-radius:30px;white-space:nowrap}.status i{width:6px;height:6px;background:#a3d7c0;border-radius:50%}.status.paused{color:#d2cbb8}.status.paused i{background:#d6c094}.scale-tabs{position:absolute;top:88px;left:28px;display:flex;gap:3px;background:#12222ddd;border:1px solid #32464f;border-radius:9px;padding:3px;z-index:3}.scale-tabs button{font-size:12px;min-height:35px;padding:7px 12px;color:#bfd0d7}.scale-tabs button[aria-pressed=true]{background:#2c444e;color:#fff}.scene-caption{position:absolute;left:28px;right:28px;bottom:192px;z-index:2;pointer-events:none;max-width:680px}.scene-caption p{font-size:clamp(17px,1.6vw,24px);font-weight:510;letter-spacing:-.45px;color:#e5eef1;text-shadow:0 2px 12px #0e1b24}.scene-caption span{display:block;color:var(--muted);font-size:13px;margin-top:7px;text-shadow:0 2px 7px #0e1b24}.scene-metrics{position:absolute;left:28px;right:28px;bottom:122px;display:flex;gap:48px;pointer-events:none;z-index:2}.scene-metrics>div{min-width:100px}.scene-metrics span{font-size:11px;color:var(--muted);display:block;margin-bottom:3px}.scene-metrics strong{font-size:25px;font-weight:460;letter-spacing:-.6px;font-variant-numeric:tabular-nums}.scene-metrics small{font-size:14px;letter-spacing:0;color:var(--muted);font-weight:400}.scene-toolbar{position:absolute;left:22px;right:22px;bottom:23px;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:8px;border:1px solid #354851;border-radius:11px;background:#10212bd9;z-index:4}.transport{display:flex;gap:3px;align-items:center}.play-button{display:flex;align-items:center;gap:9px;background:#233d48;border:1px solid #43616b;min-width:95px}.play-button svg{width:18px}.speed-label{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);margin-left:8px}.speed-label select{font-size:12px;min-height:33px}.zoom-controls{display:flex;gap:0;align-items:center}.zoom-controls input{width:88px;accent-color:#a7cbd1}.zoom-controls .icon-button{width:32px;min-height:36px;font-size:21px}.graphics-label{position:absolute;right:30px;bottom:6px;color:#8ba4af;font-size:10px}.cloud-caption{position:absolute;left:28px;top:139px;border-radius:6px;display:flex;align-items:center;gap:10px;background:#10222ddd;padding:6px 10px;z-index:3;font-size:11px;color:var(--muted)}.cloud-caption button:not(.icon-button){font-size:11px;min-height:30px;color:var(--gold);padding:3px 7px}.cloud-caption button[aria-pressed=true]{background:#314450}.cloud-caption .icon-button{width:28px;min-height:28px;padding:3px;font-size:16px}.small-dot{width:5px;height:5px;background:var(--gold);border-radius:50%}.slice-caption{position:absolute;top:140px;left:28px;font-size:11px;border:1px solid #52646a;color:#c7d8df;border-radius:6px;padding:7px 10px;background:#162832}.controls{background:var(--panel);border-left:1px solid var(--line);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#47616d #12212b}.control-section{padding:20px 22px;border-bottom:1px solid var(--line)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:9px}.section-heading h2,.control-section>h2,.section-heading label{font-size:13px;font-weight:600}.section-heading>span{font-size:10px;white-space:nowrap;color:var(--muted)}.preset-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:14px 0 9px}.preset-grid button{display:flex;align-items:center;gap:9px;padding:8px 11px;border:1px solid var(--line);background:#182b36;font-size:12px;min-height:41px}.preset-grid button svg{width:20px;height:20px;color:#9fbbc4}.preset-grid button[aria-pressed=true]{border-color:#b68e58;background:#3b352a;color:#f9d59b}.preset-grid button[aria-pressed=true] svg{color:#f0c17e}.fine-print{font-size:11px;line-height:1.5;color:var(--muted)}.temperature-section{padding-top:20px;padding-bottom:17px}.temperature-value{display:flex;gap:8px;align-items:baseline;margin:8px 0 2px}.temperature-value output{font-size:44px;font-weight:450;line-height:1.1;letter-spacing:-1.8px;font-variant-numeric:tabular-nums}.temperature-value>span:first-of-type{font-size:23px;color:#bfcbd0;font-weight:400}.temperature-change{font-size:11px;color:var(--gold);margin-left:auto}.range-ends{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:-2px;margin-bottom:10px}.graph-section{padding-bottom:15px}.info-button{width:24px;min-height:24px;display:flex;align-items:center;justify-content:center;padding:0;font:italic 13px Georgia,serif;border:1px solid #4d6570;border-radius:50%;color:#bacdd6}.graph-axis-label{font-size:10px;color:var(--muted);margin-top:10px}#potential-graph{display:block;width:100%;height:173px;touch-action:none}.pair-readings{display:flex;gap:22px;align-items:center;margin:3px 0 9px}.pair-readings span:not(.force-kind){display:block;font-size:10px;color:var(--muted);margin-bottom:2px}.pair-readings strong{font-size:15px;font-weight:500;font-variant-numeric:tabular-nums}.force-kind{margin-left:auto;color:var(--cyan);font-size:10px;border:1px solid #406164;border-radius:4px;padding:4px 6px;white-space:nowrap}.force-kind.repulsive{color:var(--gold);border-color:#78633f}.sandbox-link{width:100%;display:flex;align-items:center;justify-content:space-between;font-size:11px;border-top:1px solid #2c3e48;padding-top:9px;border-radius:0}.view-options h2{margin-bottom:14px}.switch-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 12px}.switch-grid label,.setting-check{display:flex;align-items:center;gap:8px;font-size:11px;cursor:pointer;line-height:1.3;min-height:23px}.settings{padding-top:15px;padding-bottom:15px}.settings summary{font-size:12px;color:#c4d7dd;cursor:pointer;min-height:25px}.setting-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin:14px 0 8px}.setting-row select{font-size:12px}.setting-check{margin-top:14px}.settings .fine-print{margin-top:8px}.diagnostics{font:11px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;color:#b7cdd6;margin-top:14px;padding:10px;border:1px solid #3d515a;border-radius:7px;white-space:pre-line;overflow-wrap:anywhere}.panel-footer{display:flex;justify-content:space-between;padding:15px 22px;gap:8px;font-size:10px;color:#8fa9b6}.slider-heading{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin-top:18px}.slider-heading output{color:var(--gold)}.pair-actions{display:flex;gap:7px;margin:8px 0}.pair-actions button{font-size:11px;padding:7px 8px;min-height:37px}.loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#132630;z-index:5}.loading h3{font-size:18px;font-weight:500}.loading p{font-size:12px;color:var(--muted);text-align:center;padding:0 20px}.loader-ring{height:36px;width:36px;border:2px solid #4b6570;border-right-color:#f0c17e;border-radius:50%;animation:spin 1.1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-panel{position:absolute;left:15%;right:15%;top:30%;background:#222d33;border:1px solid #c29562;border-radius:14px;padding:25px;z-index:10}.error-panel h3{font-size:18px;margin-bottom:10px}.error-panel p{font-size:13px;line-height:1.6;margin-bottom:15px}.error-panel button{background:#e7bd85;color:#11222b}.toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%);max-width:min(540px,90vw);padding:12px 18px;background:#30474f;border:1px solid #769191;border-radius:10px;font-size:13px;z-index:40;box-shadow:0 5px 20px #0004}.no-js{position:fixed;top:40%;left:20%;right:20%;padding:30px;background:#203944;z-index:20}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.skip{position:fixed;left:15px;top:-60px;z-index:50;color:#13222b;background:var(--gold);padding:10px}.skip:focus{top:15px}[hidden]{display:none!important}#histogram-panel{margin-top:18px}#histogram-panel h3{font-size:12px;font-weight:500}#speed-graph{display:block;width:100%;height:155px}dialog{width:min(700px,calc(100vw - 30px));max-height:90dvh;background:#152933;color:var(--text);border:1px solid #58727e;border-radius:16px;padding:28px;box-shadow:0 25px 80px #0009}dialog::backdrop{background:#06121bc9;backdrop-filter:blur(3px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.eyebrow{color:var(--gold);font-size:12px}dialog h2{font-size:27px;font-weight:550;letter-spacing:-.8px;margin:12px 0 18px}dialog h3{font-size:17px;font-weight:600;margin:25px 0 9px}dialog p{font-size:14px;color:#c6d5db;line-height:1.75;margin:11px 0}dialog strong{color:#edf4f4;font-weight:580}dialog code{font-size:12px;color:#d8caac}.equation{padding:15px;background:#203742;border:1px solid #3f535d;border-radius:8px;text-align:center;font-size:20px;margin:18px 0}.dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.projector{}.projector .stage{background:radial-gradient(ellipse at 40% 45%,#263f4c,#182b35 80%)}.projector .workspace{grid-template-columns:minmax(0,1fr) 365px}.projector .section-heading h2,.projector .section-heading label,.projector .control-section>h2{font-size:15px}.projector .fine-print,.projector .switch-grid label{font-size:13px}.projector .preset-grid button,.projector .scale-tabs button{font-size:14px}.projector .scene-heading h2{font-size:25px}.projector .scene-heading p,.projector .scene-caption span{font-size:15px}.projector .scene-metrics span{font-size:14px}.projector .scene-metrics strong{font-size:30px}.projector .graph-axis-label,.projector .pair-readings span:not(.force-kind){font-size:12px}.projector #potential-graph{height:188px}.projector .scene-caption p{font-size:27px}.projector .scene-caption{bottom:205px}.projector .scene-metrics{bottom:128px}
@media(min-width:1550px){.workspace{grid-template-columns:minmax(0,1fr) 370px}.control-section{padding:23px 26px}.section-heading h2,.control-section>h2,.section-heading label{font-size:14px}.fine-print{font-size:12px}.preset-grid button{font-size:13px}.switch-grid label{font-size:12px}#potential-graph{height:196px}.scene-caption{bottom:205px}.scene-metrics{bottom:130px;gap:60px}.scene-metrics strong{font-size:30px}.scene-metrics span{font-size:13px}.scene-heading{top:32px;left:35px}.scene-heading h2{font-size:24px}.scene-heading p{font-size:14px}.scale-tabs{left:35px;top:105px}.scale-tabs button{font-size:14px;min-height:38px}.cloud-caption{top:163px;left:35px;font-size:13px}.cloud-caption button:not(.icon-button){font-size:13px}.scene-caption,.scene-metrics{left:35px}.scene-toolbar{left:29px;right:29px}.scene-toolbar button{min-height:42px}.zoom-controls input{width:150px}.speed-label{font-size:13px}.prototype{font-size:13px}.graphics-label{right:38px}}
@media(max-width:1100px){.header{padding:0 20px;height:78px}.workspace{grid-template-columns:minmax(0,1fr) 300px;height:calc(100dvh - 78px);min-height:590px}.controls .control-section{padding:17px 18px}.prototype{display:none}.scene-heading{left:20px;top:22px;right:18px}.scene-heading h2{font-size:18px}.scene-heading p{font-size:11px}.scale-tabs{left:20px;top:80px}.scale-tabs button{padding:7px 9px;font-size:11px}.scene-caption,.scene-metrics{left:20px;right:20px}.scene-metrics{gap:25px}.scene-toolbar{left:15px;right:15px}.speed-label{font-size:0;margin-left:1px;gap:0}.zoom-controls input{width:65px}.transport{gap:0}.play-button{min-width:80px;gap:5px;padding:8px;font-size:12px}.transport .icon-button{width:32px}.scene-toolbar{gap:1px;padding:6px}.cloud-caption{left:20px;top:130px;gap:6px}.scene-caption{bottom:185px}.scene-metrics strong{font-size:23px}.scene-metrics>div{min-width:80px}.scene-caption p{font-size:18px}.scene-caption span{font-size:12px}.projector .workspace{grid-template-columns:minmax(0,1fr) 335px}}
@media(max-width:760px){.header{height:72px;padding:0 15px}.brand h1{font-size:23px}.brand p{font-size:10px}.brand{gap:9px}.element{width:34px;height:40px;font-size:21px}.header-actions{gap:3px}.header-actions button{font-size:11px;padding:6px 9px}.header-actions button svg{width:16px;height:16px}.header-actions .outline{gap:5px}.workspace,.projector .workspace{display:flex;flex-direction:column;height:auto;min-height:0;max-height:none}.stage{width:100%;height:570px;min-height:470px}.controls{border-left:0;border-top:1px solid var(--line);overflow:visible;display:grid;grid-template-columns:1fr 1fr;align-items:start}.control-section{align-self:stretch}.control-section:nth-child(odd){border-right:1px solid var(--line)}.graph-section{grid-column:1/-1;border-right:0!important}#potential-graph{height:192px}.controls .settings{grid-column:1/-1;border-right:0}.panel-footer{grid-column:1/-1}.controls .view-options{grid-column:1/-1;border-right:0}.switch-grid{grid-template-columns:repeat(4,1fr)}.scene-heading{top:20px}.scene-caption{bottom:166px}.scene-caption p{font-size:18px}.scene-metrics{bottom:106px;gap:35px}.scene-toolbar{bottom:20px}.graphics-label{bottom:5px}.scale-tabs{top:76px}.cloud-caption{top:125px}.scene-metrics strong{font-size:24px}.scene-metrics span{font-size:11px}.scene-toolbar{padding:7px}.zoom-controls input{width:86px}.control-section .fine-print{font-size:11px}.temperature-value output{font-size:43px}.temperature-section .section-heading{align-items:start;flex-direction:column;gap:3px}.section-heading h2,.section-heading label{font-size:12px}.preset-grid{gap:5px}.preset-grid button{padding:7px 8px;font-size:11px;gap:5px}.preset-grid button svg{width:16px}.scene-toolbar .speed-label{margin-left:2px}.view-options h2{font-size:13px}.scene-caption span{font-size:12px}.projector .stage{height:640px}.projector .controls{display:block}.projector .controls .fine-print{font-size:13px}}
@media(max-width:440px){.header-actions #present-button{width:32px;padding:5px}.header-actions #present-button span{display:none}.header-actions .quiet{padding:6px}.stage{height:min(620px,calc(100svh - 72px));min-height:510px}.scene-heading{left:17px;right:15px;top:18px}.scene-heading h2{font-size:18px}.scene-heading p{font-size:10px}.status{font-size:10px;padding:6px 8px}.scale-tabs{left:15px;right:15px;top:77px}.scale-tabs button{flex:1;font-size:10px;padding:7px 4px}.cloud-caption{left:15px;right:15px;top:125px;gap:5px;padding:5px 7px;font-size:10px}.cloud-caption button:not(.icon-button){font-size:10px;padding:3px 5px}.cloud-caption .small-dot{display:none}.scene-caption{left:18px;right:17px;bottom:161px}.scene-caption p{font-size:16px;max-width:310px}.scene-caption span{font-size:11px;max-width:290px}.scene-metrics{left:18px;right:15px;bottom:108px;gap:17px}.scene-metrics span{font-size:9px}.scene-metrics strong{font-size:20px}.scene-metrics small{font-size:11px}.scene-metrics>div{min-width:80px}.scene-toolbar{left:12px;right:12px;bottom:26px;padding:5px;gap:1px}.transport .play-button{min-width:36px;width:36px;padding:7px}.play-button span{display:none}.play-button svg{width:18px}.transport .icon-button{width:30px}.speed-label select{min-width:43px;padding:4px 5px;min-height:34px;font-size:10px}.zoom-controls .icon-button{width:28px;padding:6px;font-size:21px}.zoom-controls input{width:52px}.zoom-controls #home{display:none}.graphics-label{bottom:11px;right:17px;font-size:9px}.controls .control-section{padding:17px 15px}.controls{grid-template-columns:1fr 1fr}.section-heading{flex-wrap:wrap;gap:4px}.section-heading>span{font-size:9px}.preset-grid{grid-template-columns:1fr 1fr;margin-top:10px}.preset-grid button{font-size:10px;padding:6px;gap:3px}.preset-grid button svg{display:none}.temperature-value{margin-top:13px}.temperature-value output{font-size:38px}.temperature-value>span:first-of-type{font-size:20px}.temperature-change{display:none}.switch-grid{grid-template-columns:1fr 1fr;gap:15px}.switch-grid label{font-size:12px;min-height:28px}.graph-section .section-heading{flex-wrap:nowrap}.pair-readings{gap:28px}.pair-readings strong{font-size:16px}.sandbox-link{font-size:12px}#sandbox-panel{grid-column:1/-1}.pair-actions button{font-size:12px}.slice-caption{top:123px;left:15px;font-size:10px}.error-panel{left:8%;right:8%}dialog{padding:22px}dialog h2{font-size:24px}.dialog-top{margin-bottom:0}.dialog-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Touch controls keep their desktop grouping but enlarge the hit areas. */
@media(max-width:760px){
 .scale-tabs button,.preset-grid button,.pair-actions button,.sandbox-link{min-height:44px}
 .cloud-caption button{min-height:36px}
 .controls label:has(input[type="checkbox"]){min-height:38px}
 .scene-toolbar button,.scene-toolbar select{min-height:44px}
 .transport .icon-button{width:34px}.zoom-controls .icon-button{width:30px}
 .header-actions #present-button{min-width:40px;min-height:40px}
 .scale-tabs{top:76px}.cloud-caption{top:132px}
}

@media(min-width:761px){
 .projector .workspace{grid-template-columns:minmax(0,1fr) 385px}
 .projector .graph-axis-label,.projector .pair-readings span:not(.force-kind){font-size:14px}
 .projector .pair-readings strong{font-size:20px}
 .projector .status{font-size:13px}
 .projector .scene-toolbar button{font-size:16px}
}

/* v0.2: teaching controls, live explanations and classroom palettes. */
:root{--surface:#182b37;--raised:#2c444e;--graph-grid:#3e5561;--graph-curve:#e8be7b;--graph-mark:#ffe3ac;--scene-bg:#101f29;--scene-text:#fff;--label-scale:1}
.models-link{color:var(--muted);font-size:13px;text-underline-offset:4px}.prototype{margin-right:0}
.learning-toolbar{min-height:52px;display:flex;align-items:center;gap:14px;padding:5px 28px;background:var(--panel);border-bottom:1px solid var(--line)}
.learning-toolbar label{display:flex;gap:9px;align-items:center;font-size:13px;color:var(--muted)}
.learning-toolbar select{min-width:143px;font-size:13px}.learning-toolbar button{min-height:38px;font-size:13px;border:1px solid var(--line)}
.learning-toolbar #explain-toggle[aria-pressed=true]{background:var(--raised)}
#explain-state{font-weight:650;margin-left:4px}.workspace{height:calc(100dvh - 138px)}
.stage,.projector .stage{background:var(--scene-bg);color:var(--scene-text)}
:root[data-palette=default] .stage{background:radial-gradient(ellipse at 38% 44%,#1b3541 0%,#13252f 45%,#101b24 86%)}
button.outline,select,.preset-grid button{background:var(--surface)}
.preset-grid .phase-preset{grid-column:1/-1;justify-content:space-between}.preset-grid button[aria-pressed=true]{background:var(--raised);color:var(--text);border-color:var(--gold)}
#temperature{touch-action:pan-y;position:relative;z-index:1;height:38px;min-height:38px}
#temperature:focus-visible{outline-offset:1px}.temperature-value output{color:var(--text)}
#apply-bath{margin-top:5px}.explanation{border-left:3px solid var(--gold)}
.explanation p{font-size:14px;line-height:1.65;margin-top:10px;color:var(--text)}
.explanation #explanation-hint{color:var(--muted);font-size:12px;line-height:1.55}
.scene-caption{display:none}.scene-caption p{color:var(--scene-text)}
.cloud-caption{flex-wrap:wrap;max-width:calc(100% - 48px);row-gap:4px}
.cloud-speed-label{display:flex;align-items:center;gap:5px;font-size:11px}.cloud-speed-label select{font-size:11px;padding:3px 5px;min-height:30px}
#arrow-key{margin-top:15px;line-height:1.55}.phase-actions{display:flex;gap:7px;margin:13px 0}.phase-actions button{flex:1;font-size:12px;padding:8px}
.phase-section .setting-check{font-size:12px}.phase-section .setting-check>span{margin-left:auto;color:var(--gold)}
#phase-rate-note{margin-top:7px}.phase-measures{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:17px}
.phase-measures span{display:block;color:var(--muted);font-size:11px}.phase-measures strong{font-size:24px;font-weight:500;display:block;font-variant-numeric:tabular-nums;margin-top:4px}
#phase-graph{display:block;width:100%;height:115px;margin:6px 0}#phase-observation{min-height:32px}.phase-method{margin-top:8px}
.phase-method summary{font-size:11px;color:var(--muted);cursor:pointer;min-height:32px;display:list-item}.phase-method p{margin:9px 0}
.notes-level{display:flex;align-items:center;gap:12px;color:var(--muted);margin-bottom:20px}.notes-level select{min-width:155px}
#model-content h3:first-child{margin-top:12px}#model-content a{color:var(--gold);text-underline-offset:3px}
#display-dialog{width:min(680px,calc(100vw - 28px));padding-bottom:24px}#display-dialog>p{font-size:13px}
.colour-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px;margin:15px 0}.colour-grid label{display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:42px;font-size:13px}
input[type=color]{width:46px;height:36px;padding:2px;border:1px solid var(--line);border-radius:5px;cursor:pointer;background:var(--surface)}
input[type=color]:disabled{opacity:.4;cursor:default}.palette-preview{padding:20px;background:var(--scene-bg);display:flex;gap:32px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:9px;margin:15px 0}
.preview-atom{width:48px;height:48px;display:flex;align-items:center;justify-content:center;font-weight:750;border:3px solid currentColor}.preview-a{background:var(--atom-a);border-radius:50%}.preview-b{background:var(--atom-b);border-radius:8px}.preview-arrow{font-size:26px;color:var(--scene-text)}
#colour-warning{font-size:12px;color:var(--gold);min-height:17px}#display-dialog .dialog-actions{position:sticky;bottom:-24px;background:var(--panel);padding:12px 0}
#display-dialog .setting-check{font-size:13px}.control-section .fine-print{overflow-wrap:anywhere}
.projector .learning-toolbar{min-height:48px}.projector .explanation p{font-size:16px}.projector .explanation #explanation-hint{font-size:14px}
.projector .phase-actions button{font-size:14px}.projector .phase-measures span{font-size:13px}.projector .phase-measures strong{font-size:28px}
.projector .graph-section{padding-top:18px}.projector #temperature{height:44px}.projector .temperature-value output{font-size:52px}
.projector .cloud-caption,.projector .cloud-caption button:not(.icon-button){font-size:14px}.projector .cloud-speed-label,.projector .cloud-speed-label select{font-size:13px}
.projector .graphics-label{font-size:12px}
:root[data-light=true] .header{background:var(--bg)}
:root[data-light=true] .element{color:#244e5e;border-color:#7a9ba5}
:root[data-light=true] .controls,:root[data-light=true] dialog{background:var(--panel)}
:root[data-light=true] .scene-heading p,:root[data-light=true] .scene-metrics span,:root[data-light=true] .scene-metrics small,:root[data-light=true] .graphics-label{color:#3f5965}
:root[data-light=true] .scene-toolbar,:root[data-light=true] .cloud-caption,:root[data-light=true] .scale-tabs{background:#fffef5ed;border-color:#a7bac2;color:#263d48}
:root[data-light=true] .scale-tabs button{color:#213c48}:root[data-light=true] .scale-tabs button[aria-pressed=true]{background:#cadbde;color:#102c3a}
:root[data-light=true] .play-button{background:#dce8e9;border-color:#7196a2;color:#173d4c}
:root[data-light=true] .status{color:#285943;background:#f8fff5;border-color:#8eae9e}:root[data-light=true] .status.paused{color:#6b4b19;background:#fff9e9}
:root[data-light=true] .settings summary,:root[data-light=true] dialog p,:root[data-light=true] dialog strong,:root[data-light=true] .temperature-value>span:first-of-type{color:var(--text)}
:root[data-light=true] .preset-grid button svg,:root[data-light=true] .force-kind,:root[data-light=true] .cloud-caption button:not(.icon-button){color:var(--cyan)}
:root[data-light=true] .cloud-caption button[aria-pressed=true]{background:var(--raised)}
:root[data-light=true] .scene-metrics strong{color:#142d38}:root[data-light=true] .primary{background:#874215;color:#fff}
:root[data-light=true] .slice-caption{background:#fffef9;color:#243c48}:root[data-light=true] .toast{background:#fffef9;color:#172a35;border-color:#516f7c}
:root[data-light=true] .loading{color:#172a35}:root[data-light=true] .loading p{color:#3f5965}
@media(min-width:1550px){.learning-toolbar{padding-left:35px}.explanation p{font-size:15px}.explanation #explanation-hint{font-size:13px}}
@media(max-width:1100px){.learning-toolbar{padding:5px 20px}.workspace{height:calc(100dvh - 130px)}.explanation p{font-size:13px}.explanation #explanation-hint{font-size:12px}.models-link{display:none}}
@media(max-width:760px){
 .learning-toolbar{padding:6px 15px;gap:7px;min-height:52px}.learning-toolbar label{font-size:0;gap:0}.learning-toolbar select{min-width:130px;max-width:145px;font-size:12px;min-height:40px}
 .learning-toolbar button{font-size:12px;padding:7px 9px;min-height:40px}.workspace,.projector .workspace{height:auto}
 .controls .explanation,.controls .phase-section{grid-column:1/-1;border-right:0}.controls .phase-section{order:0}
 .explanation p{font-size:14px}.explanation #explanation-hint{font-size:12px}.phase-section .phase-actions button{min-height:44px;font-size:13px}
 #phase-graph{height:135px}.cloud-caption{max-width:calc(100% - 30px);top:132px}.cloud-kind{display:none}.cloud-speed-label{font-size:10px}
 .cloud-speed-label select{min-height:36px}.cloud-caption .icon-button{min-height:36px;min-width:32px}
 .scene-heading h2{font-size:18px}.controls .control-section{border-right:0}.controls #temperature-panel{grid-column:2}.controls #preparation-panel{grid-column:1}
 .phase-measures span{font-size:12px}.phase-method summary{min-height:40px}
}
@media(max-width:440px){
 .learning-toolbar{gap:5px;padding:5px 12px}.learning-toolbar select{min-width:120px;max-width:137px;font-size:11px}.learning-toolbar button{font-size:11px;padding:7px}
 .stage{height:min(620px,calc(100svh - 124px));min-height:500px}.cloud-caption{padding:5px 7px}.cloud-caption button:not(.icon-button){font-size:11px}
 .colour-grid{gap:5px 14px}.colour-grid label{font-size:12px}.palette-preview{padding:15px}.colour-grid input{width:38px}
 #display-dialog .dialog-actions{position:static;padding-bottom:0}.projector .cloud-caption{font-size:11px}.projector .cloud-caption button:not(.icon-button){font-size:11px}
 .projector .cloud-speed-label,.projector .cloud-speed-label select{font-size:11px}.projector .stage{height:590px}
}
