.math-lesson .arithmetic-tool{border:1px solid #d0dfd5;background:#f7faf7;border-radius:20px;padding:26px;margin:26px 0}.math-lesson .arithmetic-tool h2{font-size:1.25rem;margin:0 0 10px}.math-lesson .arithmetic-tool form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.math-lesson .arithmetic-tool label{display:flex;flex-direction:column;gap:8px;font-size:.85rem;font-weight:700;min-width:0}.math-lesson .arithmetic-tool input,.math-lesson .arithmetic-tool select{width:100%;min-width:0;box-sizing:border-box;min-height:50px;padding:12px;border:1px solid #bfd3c5;border-radius:10px;background:#fff;color:#1a4335;font:inherit;font-size:16px}.math-lesson .arithmetic-tool .native-wide{grid-column:1/-1}.math-lesson .arithmetic-tool button{font:inherit;cursor:pointer;border:1px solid #bfd3c5;border-radius:10px;padding:12px 16px;background:white;color:#266c58}.math-lesson .arithmetic-tool button[type=submit]{background:#266c58;color:white;border:0;font-weight:750;grid-column:1/-1}.math-lesson .native-examples{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:18px 0;font-size:.78rem}.math-lesson .native-examples button{padding:8px 12px}.math-lesson .native-error{color:#9a3030;font-size:.85rem}.math-lesson .native-error:empty{display:none}.math-lesson .native-summary{padding:24px 14px;margin:26px 0;border:1px solid #cfdfd3;border-radius:16px;background:#eff8f0;text-align:center}.math-lesson .native-answer{font-size:1.2rem;overflow-x:auto}.math-lesson .arithmetic-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid #d7e3d9;border-radius:12px;background:white;padding:14px;box-sizing:border-box}.math-lesson .arithmetic-scroll svg{display:block;margin-inline:auto;max-width:none;height:auto}.math-lesson .native-graphic h3,.math-lesson .factor-ladder h3{font-size:1rem}.math-lesson .native-graphic p,.math-lesson .factor-ladder p{font-size:.8rem;line-height:1.7;color:#52695a}.math-lesson .native-steps{counter-reset:native;padding:0;list-style:none;display:grid;gap:14px}.math-lesson .native-steps li{counter-increment:native;background:#fff;border:1px solid #d7e3d9;border-radius:12px;padding:18px}.math-lesson .native-steps h4{font-size:.9rem;margin:0 0 8px}.math-lesson .native-steps h4:before{content:counter(native) '. ';color:#34805c}.math-lesson .native-steps p{font-size:.85rem;line-height:1.75;margin:8px 0;color:#52695a}.math-lesson .native-equation{font-size:1rem;overflow-x:auto;overflow-y:hidden}.math-lesson .factor-diagrams{display:grid;gap:22px}.math-lesson .factor-ladder table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:.9rem}.math-lesson .factor-ladder th,.math-lesson .factor-ladder td{padding:12px;text-align:center;border:1px solid #e0e9e2}.math-lesson .factor-ladder th:first-child{border-right:2px solid #609176}.math-lesson .factor-ladder caption{font-size:.75rem;margin-bottom:10px;text-align:left;color:#52695a}.math-lesson .ladder-divided{color:#155638;font-weight:750;background:#eff8f0}.math-lesson .ladder-held{color:#7b8b7f}.math-lesson .arithmetic-tool [hidden]{display:none!important}.math-lesson .arithmetic-tool button:focus-visible,.math-lesson .arithmetic-tool input:focus-visible,.math-lesson .arithmetic-tool select:focus-visible{outline:3px solid #9bc9ad;outline-offset:2px}
@media(max-width:500px){.math-lesson .arithmetic-tool{padding:18px 12px}.math-lesson .arithmetic-tool form{gap:12px}.math-lesson .arithmetic-tool label{font-size:.78rem}.math-lesson .arithmetic-tool input,.math-lesson .arithmetic-tool select{padding:10px}.math-lesson .native-answer{font-size:1rem}.math-lesson .native-steps li{padding:14px}.math-lesson .arithmetic-scroll{padding:8px}}
.math-lesson .factor-diagrams{grid-template-columns:minmax(0,1fr);min-width:0}.math-lesson .factor-ladder{min-width:0;max-width:100%}
.math-lesson .factor-ladder caption{white-space:normal}.math-lesson .ladder-scroll-tip{display:none}@media(max-width:650px){.math-lesson .ladder-scroll-tip{display:block}}
/* Strong school-ladder rules stay visible above cell backgrounds. */
.math-lesson .factor-ladder tbody tr:not(:last-child)>th,.math-lesson .factor-ladder tbody tr:not(:last-child)>td{border-bottom:2px solid #48765e}
.math-lesson .factor-ladder th:first-child{border-right:3px solid #315c48}
.math-lesson .ladder-product{margin:18px 0 0;padding:16px 10px;border-radius:12px;background:#eaf5ed;border:1px solid #bfd9c7;text-align:center;color:#183f2d;font-weight:700}
