/* Math scenes are self-contained, responsive, and compatible with style-src self. */
.wv-scene{--wv-paper:#fffefb;--wv-ink:#191c19;--wv-muted:#60645a;--wv-line:#d9d9cd;--wv-green:#275d40;--wv-orange:#ed572a;container-type:inline-size;container-name:pt-wv;width:100%;max-width:100%;min-width:0;margin:0;border:1px solid var(--wv-line);border-radius:18px;background:var(--wv-paper);padding:clamp(14px,3vw,26px);color:var(--wv-ink);box-sizing:border-box;overflow:hidden}
.wv-scene *{box-sizing:border-box;min-width:0}
.wv-caption{font-size:14px;line-height:1.5;font-weight:600;letter-spacing:.015em;margin-bottom:20px;color:var(--wv-green);overflow-wrap:anywhere}
.wv-scene .wv-scene-note{font-size:14px;line-height:1.65;color:var(--wv-muted);margin:12px 0 0;overflow-wrap:anywhere}
.wv-math{display:inline-block;max-width:100%;vertical-align:middle;line-height:1.5;overflow-x:auto;overflow-y:hidden;padding-block:4px;white-space:nowrap}
.wv-math .katex{font-size:1.08em}
.wv-svg{display:block;width:100%;height:auto;overflow:visible}
.wv-axis{stroke:var(--wv-ink);stroke-width:3;stroke-linecap:round}
.wv-tick{stroke:var(--wv-muted);stroke-width:2}
.wv-axis-label{fill:var(--wv-ink);font:600 32px DM,Arial,sans-serif}
.wv-motion-path,.wv-branch-path{fill:none;stroke:var(--wv-orange);stroke-width:5;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:0}
.wv-arrowhead{fill:var(--wv-orange)}
.wv-start-dot{fill:var(--wv-paper);stroke:var(--wv-green);stroke-width:4}
.wv-end-dot{fill:var(--wv-orange);stroke:var(--wv-paper);stroke-width:3}
.wv-movement{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.wv-movement>div{display:flex;flex-direction:column;align-items:center;border-radius:10px;background:#f4f1e9;padding:12px 6px;text-align:center}
.wv-movement>div>span:first-child{font-size:12px;line-height:1.5;color:var(--wv-muted)}
.wv-movement .wv-math{font-size:clamp(22px,6cqi,32px);font-weight:600;color:var(--wv-green)}
.wv-movement .wv-movement-change{background:#fff0e6}
.wv-movement .wv-movement-change .wv-math{color:var(--wv-orange)}
.wv-fraction-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:18px;margin-top:22px}
.wv-fraction-group{width:100%;max-width:250px;justify-self:center;padding:16px;border:1px solid #d5dfd0;border-radius:13px;background:#f4f8f1;text-align:center}
.wv-orange-group{border-color:#f1d3c2;background:#fff5ed}
.wv-pieces{display:grid;gap:5px;min-height:55px;border:2px solid var(--wv-green);border-radius:8px;padding:5px;background:var(--wv-paper)}
.wv-orange-group .wv-pieces{border-color:var(--wv-orange)}
.wv-den-1{grid-template-columns:repeat(1,minmax(0,1fr))}.wv-den-2{grid-template-columns:repeat(2,minmax(0,1fr))}.wv-den-3{grid-template-columns:repeat(3,minmax(0,1fr))}.wv-den-4{grid-template-columns:repeat(4,minmax(0,1fr))}.wv-den-5{grid-template-columns:repeat(5,minmax(0,1fr))}.wv-den-6{grid-template-columns:repeat(6,minmax(0,1fr))}.wv-den-7{grid-template-columns:repeat(7,minmax(0,1fr))}.wv-den-8{grid-template-columns:repeat(8,minmax(0,1fr))}.wv-den-9{grid-template-columns:repeat(9,minmax(0,1fr))}.wv-den-10{grid-template-columns:repeat(10,minmax(0,1fr))}.wv-den-11{grid-template-columns:repeat(11,minmax(0,1fr))}.wv-den-12{grid-template-columns:repeat(12,minmax(0,1fr))}
.wv-piece{display:block;min-height:40px;border-radius:3px;background:#e7eade;transform-origin:center bottom}
.wv-filled{background:var(--wv-green)}
.wv-orange-group .wv-filled{background:var(--wv-orange)}
.wv-piece:nth-child(2){animation-delay:.1s}.wv-piece:nth-child(3){animation-delay:.2s}.wv-piece:nth-child(4){animation-delay:.3s}.wv-piece:nth-child(5){animation-delay:.4s}.wv-piece:nth-child(6){animation-delay:.5s}
.wv-fraction-value{font-size:clamp(27px,6cqi,37px);font-weight:600;margin-top:14px}
.wv-scene .wv-group-label{font-size:15px;line-height:1.5;margin-top:4px;color:var(--wv-ink);overflow-wrap:anywhere}
.wv-equation-lines{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.wv-equation-row{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:12px;padding:12px;border:1px solid var(--wv-line);border-radius:11px;background:#f7f5ee}
.wv-equation-row .wv-math{font-size:clamp(22px,5.5cqi,34px)}
.wv-equation-expression{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px;max-width:100%}
.wv-equation-chunk{flex:0 1 auto}
.wv-equation-row.wv-active{border:2px solid var(--wv-green);background:#eef5e9;box-shadow:0 0 0 3px #275d4010}
.wv-step-number{display:grid;place-items:center;width:27px;height:27px;border:1px solid #cbd7c4;border-radius:50%;font-size:12px;line-height:1;font-weight:600;color:var(--wv-green);background:var(--wv-paper)}
.wv-previous{background:#fffefb}.wv-upcoming{border-style:dashed}
.wv-balance-sides{display:grid;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);gap:12px;align-items:center}
.wv-balance-side{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 10px;border:1px solid #cbd8c3;border-radius:12px;background:#f3f7ef;text-align:center}
.wv-side-label{display:block;font-size:12px;line-height:1.5;color:var(--wv-muted);overflow-wrap:anywhere}
.wv-balance-side>.wv-math{font-size:clamp(23px,5.8cqi,35px)}
.wv-equals{font-size:34px;text-align:center;font-weight:500}
.wv-operation{width:100%;padding:8px 4px;border:1px dashed var(--wv-green);border-radius:8px;background:var(--wv-paper);color:var(--wv-green);font-size:17px}
.wv-operation-text{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.wv-scale{fill:none;stroke:var(--wv-green);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.wv-scale-pivot{fill:var(--wv-orange)}
.wv-balance .wv-svg{margin-top:14px;max-height:140px}
.wv-source-expression{font-size:clamp(27px,6.5cqi,39px);text-align:center;margin-bottom:18px}
.wv-factor{display:flex;flex-direction:column;align-items:center;gap:4px;width:fit-content;max-width:100%;margin-inline:auto;padding:12px 25px;border-radius:12px;background:#fff0e6;border:1px solid #efcab3}
.wv-factor>span:first-child{font-size:12px;color:var(--wv-muted)}
.wv-factor .wv-math{font-size:28px;color:var(--wv-orange)}
.wv-branches{display:block;width:100%;height:auto;max-height:115px}
.wv-second-branch{animation-delay:.2s}
.wv-branch-space{height:28px}
.wv-terms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.wv-term-card{padding:15px 9px;text-align:center;border:1px solid #d2dcca;border-radius:12px;background:#f4f8f1}
.wv-term-card>.wv-math{font-size:29px}
.wv-small-product{padding-top:10px;border-top:1px solid #d2dcca;margin-top:10px;font-size:19px;color:var(--wv-green)}
.wv-product-answer{display:flex;flex-direction:column;align-items:center;font-size:clamp(23px,5.7cqi,31px);font-weight:600;color:var(--wv-green)}
.wv-product-answer>span:first-child{font-size:25px;color:var(--wv-orange)}
.wv-distribution-result{padding:17px 10px;text-align:center;font-size:clamp(25px,6cqi,36px);background:#eef5e9;border-radius:12px;margin-top:20px}
.wv-table-frame{border:1px solid var(--wv-line);border-radius:13px;overflow:hidden}
.wv-table table{width:100%;table-layout:fixed;border-collapse:collapse;text-align:center}
.wv-table th{font-size:14px;font-weight:500;color:var(--wv-muted);background:#f4f1e9;padding:12px 7px;border-bottom:1px solid var(--wv-line)}
.wv-table td{padding:10px 8px;font-size:27px;border-bottom:1px solid #e5e5da}
.wv-table td+td,.wv-table th+th{border-left:1px solid var(--wv-line)}
.wv-table tr:last-child td{border-bottom:0}
.wv-table .wv-highlight-row td{background:#eaf3e3;color:var(--wv-green);font-weight:600;box-shadow:inset 0 2px var(--wv-green),inset 0 -2px var(--wv-green)}
.wv-table-changes{margin-top:18px}
.wv-table-changes ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}
.wv-table-changes li{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border-radius:8px;background:#f4f1e9;padding:8px;text-align:center;font-size:17px}
.wv-table-changes .wv-highlight-delta{background:#eaf3e3;color:var(--wv-green);outline:1px solid #c4d6b8}
.wv-table-rule{display:flex;flex-direction:column;align-items:center;padding:15px 10px;margin-top:18px;background:#fff0e6;border-radius:11px;font-size:clamp(25px,6cqi,33px)}
.wv-sign-regions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.wv-sign-regions>div{display:flex;flex-direction:column;align-items:center;gap:5px;padding:12px 5px;border-radius:10px;background:#eef5e9;text-align:center}
.wv-sign-regions>div+div{background:#fff0e6}
.wv-sign-regions>div>span:first-child{font-size:12px;line-height:1.5;color:var(--wv-muted)}
.wv-sign-regions .wv-math{font-size:clamp(22px,5.4cqi,31px)}
.wv-positive-region{fill:#e8f1e0}.wv-negative-region{fill:#ffdfc8}
.wv-region-arrow{fill:none;stroke:var(--wv-orange);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.wv-open-boundary{fill:var(--wv-paper);stroke:var(--wv-ink);stroke-width:4}
.wv-point-guide{stroke:var(--wv-muted);stroke-width:2;stroke-dasharray:5 4}
.wv-threshold-point{fill:var(--wv-green);stroke:var(--wv-paper);stroke-width:3}
.wv-negative-point{fill:var(--wv-orange)}.wv-zero-point{fill:var(--wv-ink)}
.wv-threshold-example{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;justify-content:center;padding:15px 10px;border-top:1px solid var(--wv-line);margin-top:18px;font-size:14px}
.wv-threshold-example .wv-math{font-size:25px;color:var(--wv-green);font-weight:600}
.wv-empty{color:var(--wv-muted);font-size:16px;line-height:1.6}
@container pt-wv (max-width:350px){.wv-balance-sides{grid-template-columns:minmax(0,1fr);gap:5px}.wv-balance-side{padding:12px}.wv-balance-side>.wv-math{font-size:27px}.wv-equals{line-height:1}.wv-terms{gap:10px}.wv-small-product{font-size:17px}.wv-equation-row{grid-template-columns:minmax(0,1fr);gap:0;padding:10px 8px}.wv-equation-row .wv-step-number{display:none}.wv-equation-row .wv-math{font-size:18px}.wv-equation-expression{gap:0 8px}.wv-scene .wv-caption{margin-bottom:16px}.wv-table-changes li{font-size:15px}}
@keyframes wv-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes wv-arrive{from{transform:translateY(-7px)}to{transform:translateY(0)}}
@keyframes wv-piece-in{0%{transform:scaleY(.75)}65%{transform:scaleY(1.04)}100%{transform:scaleY(1)}}
@keyframes wv-row-in{from{transform:translateY(4px)}to{transform:translateY(0)}}
@keyframes wv-operation-in{from{transform:translateY(5px)}to{transform:translateY(0)}}
/* A paused lesson must still show its mathematical state at time zero. */
.walkthrough-paused .wv-motion-path,.walkthrough-paused .wv-branch-path{animation:none!important;stroke-dashoffset:0}
@media(prefers-reduced-motion:reduce){.wv-scene *{animation:none!important;transition:none!important}.wv-motion-path,.wv-branch-path{stroke-dashoffset:0}}
/* Motion comes from walkthrough-motion.js; these rules only give it stable origins. */
.wv-svg circle,.wv-svg rect{transform-box:fill-box;transform-origin:center}
.wv-balance .wv-svg{transform-origin:50% 22%}
.wv-piece,.wv-operation,.wv-movement>div,.wv-fraction-value,.wv-table-rule,.wv-distribution-result,.wv-small-product,.wv-choice,.wv-choice-state{transform-origin:center;will-change:auto}
/* Reading evidence scene. */
.wv-evidence-prompt{font-size:17px;line-height:1.5;font-weight:600;color:var(--wv-ink);margin:0 0 14px;overflow-wrap:anywhere}
.wv-quotes{display:grid;gap:10px;margin-bottom:16px}
.wv-quote{margin:0;border-left:3px solid var(--wv-green);background:#f4f1e9;border-radius:0 10px 10px 0;padding:12px 14px}
.wv-quote-label{display:block;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--wv-muted);margin-bottom:4px}
.wv-quote p{margin:0;font-size:16px;line-height:1.7;color:var(--wv-ink);overflow-wrap:anywhere}
.wv-mark{color:inherit;background-color:transparent;background-image:linear-gradient(#ffe08a,#ffe08a);background-repeat:no-repeat;background-size:100% 100%;border-radius:3px;padding:1px 0;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.wv-choices{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.wv-choice{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;align-items:start;border:1px solid var(--wv-line);border-radius:10px;padding:11px 12px;background:var(--wv-paper)}
.wv-choice-letter{font-size:11px;font-weight:600;border:1px solid var(--wv-line);border-radius:4px;min-width:24px;height:24px;line-height:22px;text-align:center;color:var(--wv-muted)}
.wv-choice-text{font-size:15px;line-height:1.55;color:var(--wv-ink);overflow-wrap:anywhere}
.wv-choice-state{grid-column:2;justify-self:start;font-size:12px;font-weight:600;line-height:1.5}
.wv-choice.wv-focus{border-color:var(--wv-ink)}
.wv-eliminated{background:#fbf4f0;border-color:#ecd3c7}.wv-eliminated .wv-choice-text{text-decoration:line-through;text-decoration-color:#b1432b;opacity:.55}.wv-eliminated .wv-choice-state{color:#b1432b}
.wv-supported{background:#e7efe7;border-color:var(--wv-green)}.wv-supported .wv-choice-letter{background:var(--wv-green);border-color:var(--wv-green);color:#fff}.wv-supported .wv-choice-state{color:var(--wv-green)}
@container pt-wv (max-width:350px){.wv-balance-sides.wv-balance-short{grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);gap:6px;align-items:stretch}.wv-balance-short .wv-balance-side{padding:10px 6px;gap:6px;justify-content:center}.wv-balance-short .wv-balance-side>.wv-math{font-size:18px}.wv-balance-short .wv-equals{font-size:24px;align-self:center}.wv-balance-short .wv-operation{font-size:13px;padding:6px 4px}.wv-balance-short .wv-side-label{font-size:11px}}
@container pt-wv (max-width:420px){.wv-balance .wv-svg{max-height:84px;margin-top:8px}.wv-balance .wv-scene-note{display:none}}
/* Phone-width scenes: keep one step within one screen. */
@container pt-wv (max-width:420px){
.wv-fraction-groups{grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:10px;margin-top:12px}.wv-fraction-group{padding:10px}.wv-pieces{min-height:44px}.wv-piece{min-height:32px}.wv-fraction-value{font-size:25px;margin-top:8px}.wv-scene .wv-group-label{font-size:13px}
.wv-source-expression{font-size:25px;margin-bottom:10px}.wv-factor{padding:7px 18px}.wv-factor .wv-math{font-size:23px}.wv-branches{max-height:66px}.wv-branch-space{height:14px}.wv-term-card{padding:9px 6px}.wv-term-card>.wv-math{font-size:23px}.wv-small-product{padding-top:6px;margin-top:6px;font-size:16px}.wv-product-answer{font-size:21px}.wv-product-answer>span:first-child{font-size:18px;line-height:1.1}.wv-distribution-result{padding:10px;margin-top:12px;font-size:23px}
.wv-table th{padding:7px 5px;font-size:12px}.wv-table td{padding:5px 6px;font-size:21px}.wv-table-changes{margin-top:10px}.wv-table-changes ul{gap:5px;margin-top:5px}.wv-table-changes li{padding:5px;font-size:14px}.wv-table-rule{padding:9px;margin-top:10px;font-size:22px}
.wv-sign-regions{gap:8px}.wv-sign-regions>div{padding:8px 4px}.wv-threshold-example{padding:10px 6px;margin-top:10px}.wv-threshold-example .wv-math{font-size:21px}
.wv-evidence-prompt{font-size:15px;margin-bottom:10px}.wv-quote{padding:9px 11px}.wv-quote p{font-size:14px;line-height:1.6}.wv-quotes{margin-bottom:10px;gap:6px}.wv-choices{gap:6px}.wv-choice{padding:8px 10px;gap:2px 9px}.wv-choice-text{font-size:14px;line-height:1.45}
.wv-scene .wv-scene-note{font-size:13px;margin-top:8px}
}
/* Choices already dealt with shrink to one line so the current one has the room. */
.wv-eliminated:not(.wv-focus) .wv-choice-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wv-eliminated:not(.wv-focus) .wv-choice-state{display:none}
.wv-evidence>.wv-caption{display:none}
/* ---- Stage look: bright card, bold plain math, dark value pills (matches the videos) ---- */
.walkthrough-card .wv-scene{border:0;border-radius:0;background:transparent;padding:0;overflow:visible}
.walkthrough-card .wv-scene>.wv-caption{display:none}
.walkthrough-card .wv-math{font-family:DM,Arial,sans-serif;font-weight:700;letter-spacing:-.01em}
.walkthrough-card .wv-math .katex{font-weight:400}
.wv-balance-instruction{display:block;width:fit-content;max-width:100%;margin:0 auto 14px;padding:7px 18px;border-radius:22px;background:var(--wv-orange);color:var(--wv-ink);font-size:17px;line-height:1.3;font-weight:700;text-align:center;overflow-wrap:anywhere}
.walkthrough-card .wv-balance-side .wv-operation,.walkthrough-card .wv-balance-side .wv-side-label,.walkthrough-card .wv-balance .wv-scene-note{display:none}
.walkthrough-card .wv-balance-sides{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:6px;align-items:stretch}
.walkthrough-card .wv-balance-side{position:relative;justify-content:center;min-height:68px;padding:14px 8px;border:0;border-radius:14px;background:#1b1e1b;color:#f4f1e9;font-size:clamp(15px,5.4cqi,24px)}
.walkthrough-card .wv-balance-short .wv-balance-side{font-size:clamp(19px,7.4cqi,32px)}
.walkthrough-card .wv-balance-side>.wv-math{font-size:1em;color:#f4f1e9}
.walkthrough-card .wv-equals{align-self:center;font-size:26px;line-height:1;font-weight:700}
.walkthrough-card .wv-balance .wv-beam{margin-top:8px;max-height:none}
.wv-beam-line{stroke:#5a5d57;stroke-width:5;stroke-linecap:round;transform-box:fill-box;transform-origin:center}
.wv-fulcrum{fill:var(--wv-orange);transform-box:fill-box;transform-origin:center}
.wv-ghost{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#1b1e1b;color:#f4f1e9;font-weight:700;white-space:nowrap;overflow:hidden}
.wv-ghost-cut{position:relative;margin-left:.28em}
.wv-strike{position:absolute;left:-4px;right:-4px;top:50%;height:4px;margin-top:-2px;border-radius:3px;background:var(--wv-orange);transform-origin:left center}
.walkthrough-card .wv-equation-lines{gap:4px}
.walkthrough-card .wv-equation-row,.walkthrough-card .wv-equation-row.wv-active{display:grid;grid-template-columns:auto;justify-content:center;gap:0;padding:8px 2px;border:0;border-radius:0;background:transparent;box-shadow:none;text-align:center}
.walkthrough-card .wv-equation-row .wv-step-number{display:none}
.walkthrough-card .wv-equation-row .wv-math{font-size:clamp(19px,6.4cqi,30px)}
.walkthrough-card .wv-equation-row:not(.wv-active){color:#77796e}
.walkthrough-card .wv-equation-row:not(.wv-active) .wv-math{font-size:clamp(17px,5.4cqi,25px)}
.walkthrough-card .wv-equation-expression{justify-content:center}
.walkthrough-card .wv-fraction-value,.walkthrough-card .wv-movement .wv-math,.walkthrough-card .wv-table td{font-weight:700}
.wv-ghost-add{display:inline-block;margin-left:.28em;color:#ff8a5c;transform-origin:left center}
.wv-ghost{white-space:pre}
