:root{--prototype:#0868d8;--mean:#ba167a;--line:#dce0e6;--muted:#60656e}
body{color:#171717;background:#fff}
button,input{font:inherit}
button,a,input,summary{-webkit-tap-highlight-color:transparent}
button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--color-focus);outline-offset:4px}
[hidden]{display:none!important}
.lesson-shell{max-width:1220px;margin:auto;padding:0 32px}
.lesson-header{border-bottom:1px solid #ebebeb}
.header-inner{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:70px}
.back-link{font-size:.875rem;color:#60656e}
.lesson-label{font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:14px}
.step{font-family:var(--font-mono);color:var(--prototype);background:#eef5fe;padding:5px 9px;border-radius:4px;font-size:.8125rem}
.intro{padding:34px 0 25px}
.intro .eyebrow{font-size:.875rem;color:var(--prototype);font-weight:600;margin-bottom:9px}
h1{font-size:clamp(1.55rem,2.65vw,2.2rem);font-weight:600;line-height:1.45;letter-spacing:-.04em;margin-bottom:12px}
.wide-break{display:none}
.intro p{font-size:1rem;line-height:1.9;margin:0}
strong{font-weight:600;color:#171717}
.panel{box-shadow:var(--shadow-card);border-radius:12px;background:white}
.experiment{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr);gap:24px;align-items:start;scroll-margin-top:20px}
.plot-panel{padding:23px 22px 18px;min-width:0}
.plot-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.plot-heading h2,.readout h2{font-size:1rem;letter-spacing:0;margin:0;line-height:1.6}
.data-count{font-size:.875rem;color:var(--muted);font-variant-numeric:tabular-nums}
.legend{display:flex;flex-wrap:wrap;gap:20px;font-size:.875rem;color:var(--muted);margin-top:12px;min-height:25px}
.legend>span{display:inline-flex;align-items:center;gap:7px}
.symbol{display:inline-block;width:9px;height:9px;flex-shrink:0;border-radius:50%}
.data-symbol{background:#575f6c}.prototype-symbol{background:var(--prototype);box-shadow:0 0 0 3px #e0edff}
.mean-symbol{background:white;border:2px solid var(--mean);border-radius:0;transform:rotate(45deg)}
#plot{display:block;width:100%;height:auto;aspect-ratio:1;touch-action:none;user-select:none;overflow:visible}
.plot-background{fill:#fcfcfd;stroke:#dce0e6;stroke-width:1}
.grid-line{stroke:#e9ecf0;stroke-width:1;vector-effect:non-scaling-stroke}
.grid-label{fill:#757b85;font-size:14px;font-family:var(--font-mono)}
.axis-label{fill:#4d4d4d;font-family:var(--font-mono);font-style:italic;font-size:17px}
.connection{stroke:#65788f;stroke-opacity:.23;stroke-width:1;vector-effect:non-scaling-stroke}
.data-point{fill:#575f6c;stroke:white;stroke-width:1.2}
#prototype{cursor:grab;outline:none}
#plot.is-dragging,#plot.is-dragging #prototype{cursor:grabbing}
.prototype-hit{fill:transparent}.prototype-halo{fill:#0868d8;fill-opacity:.12}
.prototype-core{fill:var(--prototype);stroke:#fff;stroke-width:3;vector-effect:non-scaling-stroke}
.prototype-center{fill:white}
#prototype:focus-visible .prototype-halo{stroke:#171717;stroke-width:2;stroke-dasharray:3 3;fill-opacity:.18}
.prototype-label,.mean-label{font-size:15px;font-weight:600;paint-order:stroke;stroke:white;stroke-width:5;stroke-linejoin:round;pointer-events:none}
.prototype-label{fill:var(--prototype)}.mean-label{fill:var(--mean)}
.mean-guide{stroke:var(--mean);stroke-width:1;stroke-opacity:.4;stroke-dasharray:4 5;vector-effect:non-scaling-stroke}
.mean-diamond{fill:white;stroke:var(--mean);stroke-width:2.2;vector-effect:non-scaling-stroke}
.plot-help{font-size:.875rem;color:var(--muted);line-height:1.7;margin:0 0 14px}
.plot-actions{border-top:1px solid #ebebeb;padding-top:15px;display:flex;flex-wrap:wrap;gap:8px}
.button{min-height:42px;padding:9px 13px;border:0;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s}
.secondary{background:#fff;box-shadow:var(--shadow-border);color:#333}.secondary:hover{background:#f5f5f5}
.text-button{background:transparent;color:var(--muted)}.text-button:hover{background:#f5f5f5;color:#171717}
.primary{background:#171717;color:white;width:100%}.primary:hover{background:#353535}
.readout{overflow:hidden;min-width:0}
.objective-block{background:#fafbfc;padding:23px 24px 20px;border-bottom:1px solid #ebebeb}
.readout-label{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.small-tag{font-size:.8125rem;color:#60656e}
.score{display:flex;flex-wrap:wrap;align-items:baseline;gap:16px;margin:14px 0 5px}
.score-symbol{font-family:Georgia,"Times New Roman",serif;font-size:1.25rem;color:#636871;white-space:nowrap}
.score output{font-family:var(--font-mono);font-size:clamp(2.1rem,3.5vw,3rem);font-weight:500;line-height:1.2;letter-spacing:-.065em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.score-note{font-size:.875rem;color:var(--muted);line-height:1.7;margin:10px 0 16px}
.tex-display{max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;padding:10px 2px 15px;font-size:1rem;color:#25282d}
.tex-display .katex-display{margin:0;text-align:left}
.tex-display .katex-display>.katex{text-align:left}
.objective-formula{font-size:1rem;padding-top:3px;padding-bottom:7px}
[data-tex]{letter-spacing:0}
.history-block{padding:15px 20px 17px;border-bottom:1px solid #ebebeb;min-width:0}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.history-heading .button{min-height:36px;padding:6px 0 6px 10px;font-size:.8125rem}
.history-legend{display:flex;align-items:center;flex-wrap:wrap;gap:5px 14px;font-size:.8125rem;color:var(--muted);margin-top:6px}
.history-legend>span{display:inline-flex;align-items:center;gap:6px}
.history-line-key,.history-min-key{display:inline-block;width:17px;height:0;border-top:2px solid var(--prototype)}
.history-min-key{border-top:2px dashed var(--mean)}
.history-surface{position:relative;margin-top:8px}
#history-chart{display:block;width:100%;height:auto;overflow:visible}
.history-grid line{stroke:#e7ebf0;stroke-width:1;vector-effect:non-scaling-stroke}
.history-ticks{font-family:var(--font-mono);font-size:16px;fill:#686d76;font-variant-numeric:tabular-nums}
#history-line{stroke:var(--prototype);stroke-width:2;fill:none;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
#history-current{fill:var(--prototype);stroke:white;stroke-width:1.5;vector-effect:non-scaling-stroke}
#history-minimum{stroke:var(--mean);stroke-width:1.5;stroke-dasharray:5 4;vector-effect:non-scaling-stroke}
.history-empty{position:absolute;top:25%;left:22%;right:5%;text-align:center;font-size:.875rem;line-height:1.9;color:#686d76;pointer-events:none}
.history-axis-caption{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;font-size:.8125rem;color:#60656e}
.history-axis-caption output{font-variant-numeric:tabular-nums}
.history-note{font-size:.8125rem;color:#686d76;line-height:1.75;margin-top:8px}
.position-block{padding:20px 24px 18px;border-bottom:1px solid #ebebeb}
.readout h3{font-size:.9375rem;font-weight:600;letter-spacing:0;margin:0 0 13px}
.coordinate-control{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px;margin-bottom:12px;font-size:.875rem}
.coordinate-control output{color:var(--prototype);font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:.9375rem}
input[type=range]{grid-column:1/-1;width:100%;height:24px;accent-color:var(--prototype);cursor:pointer}
.keyboard-help{font-size:.8125rem;color:#686d76;line-height:1.7;margin-top:6px}
.answer-controls{padding:18px 24px 20px}
.checkbox-label{display:flex;align-items:center;gap:9px;font-size:.9375rem;cursor:pointer;min-height:32px;margin-bottom:12px}
input[type=checkbox]{width:18px;height:18px;accent-color:var(--mean);cursor:pointer}
.discovery{font-size:.875rem;color:var(--muted);line-height:1.8;margin-top:12px}
.mean-result{margin:0 24px 22px;background:#fcf6fa;border-radius:6px;padding:14px 15px;font-size:.875rem}
.mean-result>div{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0}
.mean-result output{font-family:var(--font-mono);font-variant-numeric:tabular-nums;color:#9d1267}
.excess-row{border-top:1px solid #ebdce5;padding-top:9px;margin-top:10px!important}
.mean-result p{font-size:.875rem;color:#874669;margin-top:12px;line-height:1.7}
.data-note{font-size:.8125rem;color:#686d76;margin:15px 0 0;line-height:1.8}
.explanation{margin:42px 0 22px}
.explanation-heading{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.section-number{font-family:var(--font-mono);font-size:.875rem;color:#767b84;font-weight:400;margin-right:1px}
.explanation h2{font-size:1.25rem;letter-spacing:-.025em;margin:0;line-height:1.6}
.equation-cards{display:grid;grid-template-columns:1fr 1fr;gap:30px}
.equation-card{padding:23px 0 16px;border-top:1px solid #dedfe3;min-width:0}
.card-label{font-size:.8125rem;color:#646a73}
.equation-card h3{font-size:1rem;letter-spacing:0;margin:7px 0 15px}
.equation-card .tex-display{margin-bottom:16px}
.equation-card p,.proof-content p{font-size:1rem;line-height:1.95}
.proof{margin:0 0 45px;overflow:hidden}
.proof>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:21px 24px;cursor:pointer;font-size:1.125rem;font-weight:500}
.proof>summary::-webkit-details-marker{display:none}
.proof>summary .section-number{margin-right:16px}
.expand-icon{font-size:1.4rem;color:#767b84;font-weight:400}
.proof[open] .expand-icon{transform:rotate(45deg)}
.proof-content{padding:7px 24px 26px}.proof-content h3{font-size:1.125rem;letter-spacing:0;margin-bottom:20px}
.mean-formula{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 32px;margin-bottom:22px}
.identity{background:#f8f9fb;border-radius:8px;padding:23px;display:flex;align-items:center;justify-content:center;gap:22px;flex-wrap:wrap;margin:23px 0}
.identity>div{display:flex;flex-direction:column;text-align:center;gap:8px}.identity>div>span:last-child{font-size:.875rem;color:var(--muted)}
.identity [data-tex]{font-size:1.25rem}.identity .operator{font-size:1.5rem;color:#747982}.identity .extra-term>span{color:#a3186f!important}
.derivation{border-top:1px solid #ebebeb;margin-top:24px;padding-top:18px}
.derivation summary{font-size:.9375rem;cursor:pointer;margin-bottom:14px}.derivation-formula{font-size:1rem;margin:18px 0}
.lesson-footer{display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap;font-size:.875rem;color:var(--muted);border-top:1px solid #ebebeb;padding-top:24px;padding-bottom:30px}
.lesson-footer a{font-size:.875rem;color:var(--muted)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:16px;top:-80px;background:#171717;color:white;padding:10px;z-index:10}.skip-link:focus{top:10px}
.notice{padding:18px;box-shadow:var(--shadow-border);margin-bottom:20px}
@media(min-width:921px) and (max-width:1150px){.formula-break{display:block}.objective-formula{font-size:1rem}.objective-block,.position-block,.answer-controls{padding-left:20px;padding-right:20px}}
@media(max-width:920px){.lesson-shell{padding-left:24px;padding-right:24px}.experiment{grid-template-columns:minmax(0,1fr) minmax(280px,.9fr);gap:18px}.plot-panel{padding:18px 14px}.plot-heading h2{font-size:.9375rem}.objective-block,.position-block,.answer-controls{padding-left:18px;padding-right:18px}.objective-formula{font-size:.98rem}.formula-break{display:block}.legend{gap:12px}.mean-result{margin-left:18px;margin-right:18px}.plot-help{font-size:.875rem}}
@media(max-width:740px){.experiment{grid-template-columns:1fr;gap:18px}.lesson-shell{padding-left:18px;padding-right:18px}.header-inner{min-height:64px}.lesson-label{gap:8px;font-size:.8125rem}.back-link{font-size:.8125rem}.step{font-size:.75rem}.intro{padding-top:25px}.wide-break{display:block}.plot-panel{padding:18px 14px}.score output{font-size:2.6rem}.objective-formula{font-size:1.1rem}.formula-break{display:none}.readout{display:grid;grid-template-columns:1fr 1fr}.objective-block{grid-column:1/-1}.position-block{border-bottom:0;border-right:1px solid #ebebeb}.answer-controls{align-self:center}.mean-result{grid-column:1/-1;margin-top:12px}.equation-cards{grid-template-columns:1fr;gap:8px}.explanation{margin-top:32px}.proof>summary{font-size:1rem;padding:20px 17px}.proof-content{padding-left:18px;padding-right:18px}.identity{gap:14px}.identity .formula{font-size:1.13rem}.identity>div>span:last-child{font-size:.8125rem}.lesson-footer{font-size:.8125rem}}
@media(max-width:460px){.header-inner{flex-wrap:wrap;gap:6px;padding-top:12px;padding-bottom:12px}.legend{gap:14px}.readout{display:block}.position-block{border-right:0;border-bottom:1px solid #ebebeb}.formula{font-size:1.04rem}.mean-result{margin-top:0}.plot-actions{gap:9px}.text-button{padding-left:0}.plot-heading{gap:5px}.proof>summary .section-number{margin-right:10px}.identity{padding:18px 12px;gap:10px}.identity>div{flex:1 1 100%}.identity .operator{line-height:1}.mean-formula{font-size:1rem}.step{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:920px){.objective-formula{font-size:.95rem}.history-block{padding-left:14px;padding-right:14px}}
@media(max-width:740px){.history-block{grid-column:1/-1;padding-left:18px;padding-right:18px}.history-surface{max-width:480px;margin-left:auto;margin-right:auto}.objective-formula{font-size:1.04rem}.mean-formula{grid-template-columns:minmax(0,1fr)}}
@media(max-width:460px){.tex-display{font-size:.9375rem}.objective-formula{font-size:1rem}.identity [data-tex]{font-size:1.125rem}}

/* The same coordinate space, followed through two new experiments. */
.next-lesson{border-top:1px solid #dfe3e9;padding-top:44px;margin-top:54px;scroll-margin-top:24px}
.lesson-intro{max-width:820px;margin-bottom:27px}
.lesson-intro .step{display:inline-block;margin-bottom:18px;font-family:var(--font-sans);font-size:.875rem}
.lesson-intro h2{font-size:clamp(1.6rem,3vw,2.3rem);font-weight:600;line-height:1.5;letter-spacing:-.04em;margin-bottom:16px}
.lesson-intro p{font-size:1.0625rem;line-height:1.95}
.next-lesson .plot-heading h3,.lesson-readout h3{font-size:1rem;line-height:1.7;letter-spacing:0;margin:0}
.lesson-plot{display:block;width:100%;height:auto;aspect-ratio:1;touch-action:none;user-select:none;overflow:visible}
.lesson-handle{cursor:grab;outline:none}
.lesson-plot.is-dragging,.lesson-plot.is-dragging .lesson-handle{cursor:grabbing}
.handle-number{fill:white;stroke:none;font-family:var(--font-mono);font-size:14px;font-weight:600;pointer-events:none}
.representative-2 .prototype-core{fill:#7638ba}
.representative-2 .prototype-halo{fill:#7638ba}
.lesson-handle.is-selected .prototype-halo{stroke:#0868d8;stroke-width:1;stroke-opacity:.5}
.representative-2.is-selected .prototype-halo{stroke:#7638ba}
.lesson-handle:focus-visible .prototype-halo{stroke:#171717;stroke-width:2;stroke-dasharray:3 3;stroke-opacity:1}
.empty-gap{fill:#f2f3f7;stroke:#c7cbd4;stroke-width:1;stroke-dasharray:5 6}
.gap-caption{font-family:var(--font-sans);fill:#777b86;font-size:15px}
.data-point.assigned-1{fill:#0868d8}.data-point.assigned-2{fill:#7638ba}
.connection.assigned-1{stroke:#0868d8;stroke-opacity:.27}.connection.assigned-2{stroke:#7638ba;stroke-opacity:.27}
.second-symbol{background:#7638ba;border-radius:2px;transform:rotate(45deg)}
.mini-history-chart{display:block;width:100%;height:auto;overflow:visible;margin-top:10px}
.mini-history-line{stroke:#0868d8;stroke-width:2;fill:none;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.mini-history-dot{fill:#0868d8;stroke:white;stroke-width:1;vector-effect:non-scaling-stroke}
.mini-history-reference{stroke:var(--mean);stroke-width:1.5;stroke-dasharray:5 4;vector-effect:non-scaling-stroke}
.mini-history-chart .grid-label{font-size:16px}
.lesson-readout .mean-result{margin-top:0}
.lesson-readout .coordinate-control:last-child{margin-bottom:0}
.lesson-readout .mean-result>div{margin:9px 0}
.learning-insight{margin:28px 0 6px;padding:28px 30px 30px;border-left:3px solid #ba167a;background:#fcf8fb;border-radius:0 8px 8px 0}
.insight-label{display:block;font-size:.875rem;font-weight:500;color:#981667;margin-bottom:9px}
.learning-insight h3{font-size:1.25rem;font-weight:600;line-height:1.75;letter-spacing:-.025em;margin-bottom:12px}
.learning-insight p{max-width:940px;font-size:1rem;line-height:2}
.lesson-next-link{display:inline-block;font-size:1rem;font-weight:600;margin-top:4px;padding:10px 0;color:#0868d8}
.comparison-baseline{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;border-top:1px solid #e2e6ec;padding-top:14px;font-size:.875rem}
.comparison-baseline output{font-family:var(--font-mono);font-variant-numeric:tabular-nums}
.comparison-baseline strong{flex-basis:100%;color:#0868d8;font-size:.9375rem}
.comparison-baseline strong[data-lower=false]{color:#7d4a22}
.prototype-selector{display:flex;gap:10px;margin-bottom:18px}
.representative-choice{flex:1;background:white;box-shadow:var(--shadow-border);color:#0868d8;white-space:nowrap}
.representative-choice[aria-pressed=true]{background:#eaf3ff;box-shadow:0 0 0 1px #0868d8}
.second-choice{color:#7638ba}.second-choice[aria-pressed=true]{background:#f3edfb;box-shadow:0 0 0 1px #7638ba}
.assignment-counts{display:flex;flex-wrap:wrap;gap:8px 16px;justify-content:space-between;margin-top:17px;font-size:.875rem;color:#636b76}
.assignment-counts output{font-family:var(--font-mono);color:#171717}
.pair-insight{border-left-color:#0868d8;background:#f7faff;margin-bottom:48px}
.pair-insight .insight-label{color:#0868d8}
.kmeans-steps{display:grid;grid-template-columns:1fr 1fr;gap:15px 38px;padding:10px 0 14px 22px;margin-bottom:8px;font-size:1rem;font-weight:500}
.learning-insight .method-note{font-size:.875rem;line-height:1.9;color:#656d79}
@media(min-width:741px) and (min-height:650px){.next-lesson .plot-panel{position:sticky;top:18px}.next-lesson .lesson-plot{max-height:calc(100dvh - 250px)}}
@media(max-width:740px){.next-lesson{padding-top:32px;margin-top:38px}.lesson-intro p{font-size:1rem}.learning-insight{padding:21px 20px}.kmeans-steps{grid-template-columns:1fr;gap:12px}.lesson-readout .mini-history{max-width:480px;margin:auto}.lesson-readout .objective-block{grid-column:1/-1}.lesson-readout .history-block{grid-column:1/-1}.learning-insight h3{font-size:1.125rem}}

/* A consistent sequence: read the question, try the experiment, then reflect. */
.intro{max-width:940px;padding-bottom:22px}
.lesson-roadmap{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 38px}
.lesson-roadmap a{display:flex;align-items:center;gap:12px;padding:15px 17px;background:#fafbfc;box-shadow:var(--shadow-border);border-radius:8px;font-size:.9375rem;line-height:1.6;color:#333}
.lesson-roadmap a:hover{background:#eef5fe;color:var(--prototype)}
.lesson-roadmap a>span{font-family:var(--font-mono);font-size:.875rem;color:var(--prototype)}
.first-lesson{scroll-margin-top:24px}
.lesson-intro{max-width:900px}
.lesson-intro p+p{margin-top:12px}
.experiment-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;list-style:none;padding:20px 23px;margin:0 0 25px;background:#f6f9fd;border:1px solid #e2eaf5;border-radius:10px;counter-reset:try-step}
.experiment-guide li{counter-increment:try-step;min-width:0;font-size:.9375rem;line-height:1.8}
.experiment-guide strong{display:block;margin-bottom:4px;color:#175baf;font-size:.875rem;font-weight:600}
.experiment-guide strong::before{content:counter(try-step) ". ";font-family:var(--font-mono)}
.experiment-guide li>span{display:block;color:#414853}
.plot-heading h3{font-size:1rem;letter-spacing:0;margin:0;line-height:1.6}
.readout .readout-label h3,.readout .history-heading h3{margin-bottom:0}
.readout .position-block h3,.readout .answer-controls h3{margin-bottom:12px;font-size:.9375rem;line-height:1.8}
.control-intro{font-size:.875rem;line-height:1.85;margin:0 0 14px;color:#555e6b}
.formula-key{margin:10px 0 16px;font-size:.8125rem;color:#59616c}
.formula-key>summary{cursor:pointer;line-height:1.8;min-height:30px;color:#38638a}
.formula-key p{font-size:.875rem;line-height:1.95;margin:10px 0}
.formula-key .katex{font-size:1.08em}
.first-insight{margin-bottom:23px;border-left-color:#0868d8;background:#f7faff}
.first-insight .insight-label{color:#0868d8}
.math-supplement{margin:0 0 13px;overflow:hidden}
.math-supplement>summary{font-size:1rem;line-height:1.7;padding:20px 24px;cursor:pointer;font-weight:500}
.math-supplement .explanation{margin:0;padding:6px 24px 12px}
.math-supplement .explanation>p{font-size:1rem;line-height:1.9;margin-bottom:22px}
.proof{margin-bottom:0}
.proof>summary{font-size:1rem;line-height:1.7}
.lesson-bridge{font-size:1.0625rem;line-height:2;margin:29px 0 0;max-width:900px}
.data-details{font-size:.8125rem;color:#686d76;margin-top:17px;line-height:1.85}
.data-details>summary{cursor:pointer;min-height:30px}
.data-details p{font-size:.875rem;max-width:950px;margin-top:8px}
.learning-insight p:last-child{margin-bottom:0}
.learning-insight .closing-heading{margin-top:26px}
.kmeans-steps{list-style-position:outside;margin-top:20px;padding-top:0}
.kmeans-steps li>span{display:block;font-weight:400;font-size:.9375rem;line-height:1.9;margin-top:6px}
.method-details{border-top:1px solid #dbe4ef;margin-top:22px;padding-top:18px;font-size:.9375rem;color:#59616c}
.method-details>summary{cursor:pointer;line-height:1.8;min-height:32px}
.method-details p{font-size:.9375rem;line-height:1.95;margin-top:13px}
.update-count{font-size:.8125rem;color:#656d79;margin:10px 0 0;font-variant-numeric:tabular-nums}
.button:disabled{opacity:.65;cursor:wait}
@media(min-width:741px) and (min-height:650px){#experiment .plot-panel{position:sticky;top:18px}#plot{max-height:calc(100dvh - 250px)}.next-lesson .lesson-plot{max-height:calc(100dvh - 300px)}}
@media(max-width:740px){.lesson-roadmap{gap:8px;margin-bottom:28px}.lesson-roadmap a{display:block;padding:12px 10px;font-size:.8125rem}.lesson-roadmap a>span{display:block;margin-bottom:5px}.experiment-guide{grid-template-columns:1fr;gap:14px;padding:19px 20px}.experiment-guide strong{margin-bottom:0}.math-supplement>summary{padding:19px 18px}.math-supplement .explanation{padding:6px 18px 12px}.lesson-bridge{font-size:1rem}.lesson-readout .position-block{align-self:start}.readout .answer-controls{align-self:start}}

.mobile-history-slot,.mobile-axis-note,.compact-legend{display:none}
.compact-reference-label{font-family:var(--font-sans);font-size:14px;fill:var(--mean);paint-order:stroke;stroke:#fff;stroke-width:4;stroke-linejoin:round}
@media(max-width:740px),(max-width:1000px) and (max-height:500px){
  .experiment{grid-template-columns:minmax(0,1fr);gap:12px;isolation:isolate}
  .experiment .plot-panel{display:contents}
  .live-view{position:sticky;top:6px;z-index:2;min-width:0;padding:10px;background:#fff;border-radius:10px;box-shadow:var(--shadow-card)}
  .live-view .plot-heading h3{font-size:.8125rem;line-height:1.6}
  .live-view .data-count{display:none}
  .live-view .legend{font-size:.75rem;gap:8px 14px;margin-top:4px;min-height:22px;line-height:1.6}
  .live-view .wide-legend{display:none}.live-view .compact-legend{display:inline}
  .live-view #plot,.live-view .lesson-plot{width:100%;height:auto;max-height:max(160px,min(350px,calc(100svh - 340px)));margin:auto}
  .mobile-history-slot{display:block;min-width:0;border-top:1px solid #e5eaf0;padding-top:4px}
  .mobile-history-slot .history-block{padding:0;border:0;min-width:0}
  .mobile-history-slot .history-heading{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;min-height:38px}
  .mobile-history-slot .history-heading h3{font-size:.75rem;line-height:1.5;white-space:nowrap;margin:0}
  .mobile-history-slot .score{margin:0 0 0 auto;gap:0;flex-wrap:nowrap}
  .mobile-history-slot .score-symbol{display:none}
  .mobile-history-slot .score output{font-size:1.1rem;letter-spacing:-.04em;white-space:nowrap;line-height:1.4}
  .mobile-history-slot .history-heading .button{font-size:.6875rem;white-space:nowrap;padding:8px 0 8px 4px;min-height:38px}
  .mobile-history-slot .history-surface,.mobile-history-slot .mini-history-chart{margin:0}
  .mobile-history-slot .history-legend,.mobile-history-slot .history-note,.mobile-history-slot .history-axis-caption{display:none}
  .mobile-history-slot .history-empty{font-size:.75rem;line-height:1.4;top:10%;margin:0}
  .mobile-axis-note{display:block;font-size:.6875rem;line-height:1.5;color:#657080;text-align:right;margin:-6px 0 0}
  .experiment .plot-help{margin:0;padding:0 8px}
  .experiment .plot-actions{padding:8px;gap:8px}
  .experiment .readout{display:flex;flex-direction:column}
  .experiment .position-block{order:1;border-right:0;border-bottom:1px solid #ebebeb;align-self:stretch}
  .experiment .answer-controls{order:2;align-self:stretch}
  .experiment .mean-result{order:3}
  .experiment .objective-block{order:4;border-top:1px solid #ebebeb;border-bottom:0}
  .experiment .readout input,.experiment .readout button,.experiment .plot-actions button{scroll-margin-top:calc(var(--live-height,520px) + 18px);scroll-margin-bottom:16px}
}
@media(orientation:landscape) and (max-width:1000px) and (max-height:500px){
  .live-view{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:18px;align-items:center}
  .live-view .plot-heading{grid-column:1}.live-view .legend{grid-column:1}
  .live-view #plot,.live-view .lesson-plot{grid-column:1;grid-row:3/5;max-height:calc(100svh - 185px)}
  .mobile-history-slot{grid-column:2;grid-row:1/4;border:0;padding:0}
  .mobile-axis-note{grid-column:2;grid-row:4}
}
