.chapter-story{margin:22px 0 34px;min-width:0;scroll-margin-top:105px;color:#294b3f}.story-header{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}.story-kicker{font-size:17px;font-weight:600;color:#41663f}.story-progress{font-size:16px;color:#53634d}.story-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;border-bottom:1px solid #d7dfcc;padding-bottom:22px;margin-bottom:26px}.story-toolbar label{flex:1 1 280px;font-size:16px;min-width:0;max-width:100%;color:#52624b}.story-toolbar select{display:block;font:inherit;min-height:48px;width:100%;max-width:100%;margin-top:6px;border:1px solid #b5c8a7;border-radius:9px;padding:10px 30px 10px 12px;background:#fffdf7;color:#34543a}.chapter-story button{font-weight:500;font-family:inherit;font-size:16px;line-height:1.65;min-height:48px;padding:11px 17px;border:1px solid #99b28a;border-radius:10px;background:#fffdf7;color:#345e40;cursor:pointer;max-width:100%;touch-action:manipulation}.chapter-story button:disabled{opacity:.45;cursor:default}.chapter-story button:focus-visible,.story-toolbar select:focus-visible{outline:3px solid #ba8d43;outline-offset:3px}.story-scene[hidden]{display:none!important}.story-scene{min-width:0}.story-scene-number{display:block;font-size:16px;color:#647853;margin-bottom:8px}.story-scene h3{font-size:clamp(23px,2.2vw,29px);line-height:1.6;color:#254e3e;margin:0 0 22px;letter-spacing:.2px}.story-prose{max-width:46em}.story-prose p{font-size:19px;line-height:2;margin:0 0 19px;color:#365346;overflow-wrap:anywhere}.story-focus{padding:18px 22px;border-left:4px solid #60905b;background:#eef4e6;color:#345e3c;font-size:18px;line-height:1.95;margin:24px 0;border-radius:0 11px 11px 0}.story-navigation{display:flex;align-items:stretch;justify-content:space-between;gap:12px;margin-top:26px;border-top:1px solid #d7dfcc;padding-top:22px}.story-navigation [data-story-next]{background:#286f59;color:#fffdf7;border-color:#286f59;max-width:72%}.story-navigation [data-story-prev]{flex-shrink:0}.story-note{font-size:16px;color:#62735a;line-height:1.8;margin:16px 0 0}.story-scene:not([hidden])~.story-scene:not([hidden]){margin-top:38px;padding-top:30px;border-top:1px solid #d7dfcc}.story-diagram{margin:25px 0;padding:24px;background:#fafbf4;border:1px solid #d9e3cd;border-radius:14px;min-width:0;overflow-wrap:anywhere}.story-diagram figcaption{font-size:18px;font-weight:600;color:#365b3d;line-height:1.8;margin-bottom:16px}.story-unit{font-size:16px;line-height:1.8;color:#607151;margin-bottom:20px}.story-bar-row{margin-top:19px}.story-bar-label{display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:9px;font-size:17px;line-height:1.8}.story-bar{display:grid;grid-template-columns:repeat(var(--story-cells),minmax(0,1fr));height:32px;width:100%}.story-bar-cell{background:#e5ebda;border-right:1px solid #fafbf4}.story-bar-cell.is-filled{background:#518164}.story-bar-cell.whole-end{border-right:2px solid #284f3a}.story-bar-scale{display:flex;justify-content:space-between;font-size:15px;color:#52684a;line-height:1.7;margin-top:5px}.story-fraction{display:inline-flex;vertical-align:middle;flex-direction:column;text-align:center;line-height:1.25;margin:0 .18em;font-variant-numeric:tabular-nums}.story-fraction>span:first-child{border-bottom:1.5px solid currentColor;padding:0 .18em .12em}.story-fraction>span:last-child{padding:.12em .18em 0}.story-calculation ol{list-style:none;padding:0;margin:0;counter-reset:story-line}.story-calculation li{padding:17px 0;counter-increment:story-line}.story-calculation li+li{border-top:1px solid #d9e3cd}.story-equation{font-size:22px;line-height:2.3;color:#2d5e41;overflow-wrap:anywhere}.story-calculation li p{font-size:17px;line-height:1.9;margin:10px 0 0;color:#506749}.chapter-story .math-lab{margin:24px 0}.chapter-story .math-lab-workbench>.math-lab-visual-column{position:static}.chapter-examples{scroll-margin-top:104px}.rope-ruler{display:flex;justify-content:space-between;font-size:16px;margin-bottom:12px;color:#486343}.rope-amount{font-size:18px;line-height:1.8;margin:12px 0}.rope-grid{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));height:36px}.rope-grid span{background:#e6eddf;border-right:1px solid #fffdf8}.rope-grid .filled{background:#35725a}.rope-grid .pair-even{background:#8bb09a}.rope-grid .meter-end{border-right:3px solid #244e36}.rope-grid .wrong{background:#b2764b}.rope-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.rope-actions output{font-size:19px;font-weight:600}.rope-grid-wrap{padding:20px 15px}.math-lab[data-math-lab=rope-repeat] .math-lab-workbench{display:block}.math-lab[data-math-lab=rope-repeat] .math-lab-live-equation{display:none}.math-lab[data-math-lab=rope-repeat] .math-lab-results>.math-lab-equation{display:block}.math-lab[data-math-lab=rope-repeat] .math-lab-controls{margin-bottom:20px}.math-lab[data-math-lab=rope-repeat] .math-lab-figure{margin-bottom:20px}.math-lab[data-math-lab=rope-repeat] .math-lab-mistake-button{margin-top:0}
@media(max-width:760px){.story-prose p{font-size:18px;line-height:1.95}.story-toolbar{align-items:stretch}.story-toolbar label{flex-basis:100%}.story-toolbar button{width:100%}.story-diagram{padding:19px 16px}.story-equation{font-size:20px}.story-focus{font-size:17px;padding:16px 18px}.story-navigation{flex-wrap:wrap}.story-navigation [data-story-next]{flex:1;min-width:180px;max-width:100%}.story-scene h3{font-size:24px}.chapter-story{scroll-margin-top:155px}.story-bar-label{font-size:16px}.story-bar{height:28px}}
@media(prefers-reduced-motion:no-preference){.story-scene:not([hidden]){animation:story-appear .18s ease-out}@keyframes story-appear{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}}

/* Keep optional reading controls together and reveal the next phase on request. */
.story-options{margin:0 0 26px;border-bottom:1px solid #d7dfcc}
.story-options>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding:8px 0;box-sizing:border-box;font-size:16px;line-height:1.6;color:#486343;cursor:pointer;list-style:none;touch-action:manipulation}
.story-options>summary::-webkit-details-marker{display:none}
.story-options>summary::after{content:'＋';font-size:20px;flex-shrink:0;width:auto;height:auto;border:0;position:static;transform:none}
.story-options[open]>summary::after{content:'−';transform:none}
.story-options>summary:focus-visible,.story-return:focus-visible{outline:3px solid #ba8d43;outline-offset:3px}
.story-options .story-toolbar{border:0;margin:0;padding:12px 0 20px}
.story-navigation [data-story-next]{min-width:160px;white-space:normal}
.story-navigation [data-story-prev][hidden],.story-followup[hidden],.step-actions[hidden],.chapter-footer-link[hidden]{display:none!important}
.story-followup{scroll-margin-top:110px}
.story-return{min-height:48px;font-size:16px;line-height:1.6;margin:0 0 20px;touch-action:manipulation}
@media(max-width:760px){.story-navigation [data-story-next]{min-width:140px}.story-followup{scroll-margin-top:155px}}
.question-diagram-row { margin:16px 0; }
.question-diagram-row strong { display:block; margin-bottom:7px; overflow-wrap:anywhere; }
.question-diagram-bar { display:grid; height:34px; border:2px solid #416c59; background:#d8e8dc; }
.question-diagram-segment + .question-diagram-segment { border-left:2px solid #416c59; }
