.lesson-hero h1{font-size:clamp(2.6rem,4.5vw,3.9rem)}
.definition{border-left:4px solid var(--blue);background:#f2f7ff;padding:15px 20px;margin:22px 0;border-radius:0 10px 10px 0}
.definition>span{font-size:10px;font-weight:800;letter-spacing:1.7px;color:var(--blue)}
.definition p{margin:7px 0 0!important;line-height:1.8}
.notes-intent{margin-top:28px;padding:20px 24px;border:1px solid #dbe5f4;border-radius:14px;background:#fff;max-width:1000px}
.notes-intent p{margin:7px 0 0;color:var(--muted);line-height:1.7}
.animation-demo{border:1px solid #cfdcec;background:linear-gradient(135deg,#f5f9ff,#fff);border-radius:18px;padding:24px;margin:30px 0;min-width:0}
.animation-demo h3{margin-top:5px!important}
.diagram-scroll{overflow-x:auto;max-width:100%;border-radius:12px;background:#fff;border:1px solid #e1e9f5;margin:18px 0;scrollbar-width:thin}
.concept-svg{display:block;width:100%;height:auto;min-width:620px;color:#2563eb}
.svg-box rect{fill:#eff6ff;stroke:#b9d2f5;stroke-width:2}
.svg-label,.svg-note,.svg-value,.svg-heading{text-anchor:middle;fill:#30435d;font-family:inherit}
.svg-label{font-size:16px;font-weight:700}.svg-value{font-size:22px;font-weight:800;fill:#1450b4}
.svg-note{font-size:15px;fill:#5d6d81}.svg-heading{font-size:15px;font-weight:800;letter-spacing:.8px}
.svg-link{fill:none;stroke:#2563eb;stroke-width:3;transition:opacity .25s ease}
.limit-box rect{fill:#fff7ed;stroke:#edb984;stroke-dasharray:6 4}.limit-box .svg-value{font-size:18px;fill:#a05b10}
#call-params,#call-main{font-size:19px}#passing-p{font-size:19px}
#arith-cursor{transition:transform .45s ease}
.svg-box.active rect{fill:#dbeafe;stroke:#2563eb;stroke-width:3}
.svg-box.changed rect{fill:#dcfce7;stroke:#42a56a;stroke-width:3}.svg-box.changed .svg-value{fill:#187044}
.trace-code{counter-reset:trace;list-style:none;margin:18px 0!important;padding:0!important;border:1px solid #d9e4f4;border-radius:12px;overflow:hidden;background:#fff}
.trace-code li{padding:12px 15px;border-bottom:1px solid #edf2f8;line-height:1.7;counter-increment:trace;transition:background .2s}
.trace-code li:last-child{border-bottom:0}.trace-code li:before{content:counter(trace,decimal-leading-zero);font-size:11px;font-weight:800;color:#7c8da3;margin-right:14px}
.trace-code li.current{background:#dfeaff;border-left:4px solid #2563eb;padding-left:11px}
.trace-code li small{display:block;color:var(--muted);margin-left:32px}
.demo-result{background:#eaf2ff;border-radius:10px;padding:15px 18px;line-height:1.8!important;color:#214c87;min-height:84px;font-weight:600}
.diagram-caption{font-size:13px;color:var(--muted);line-height:1.7!important}
.animation-controls{align-items:center}.step-label{font-size:12px;font-weight:700;color:#62758d}
.button:disabled{opacity:.48;cursor:not-allowed}.demo-fields{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:15px 0}
.demo-fields label{font-size:13px;font-weight:700}.demo-fields input,.demo-fields select{padding:9px 12px;border:1px solid #bdcce0;border-radius:8px;background:#fff;font:inherit;color:#263850}
.demo-fields input{width:90px}.demo-fields select{max-width:160px}
.category-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.category-tabs .button{font-size:12px;padding:10px 12px}
.category-tabs [aria-pressed=true]{color:#fff;background:var(--blue);border-color:var(--blue)}
.two-traces{display:grid;grid-template-columns:1fr 1fr;gap:12px}.two-traces pre{font-size:12px;min-width:0}
.memory-formula{background:#eff6ff;padding:18px;border-radius:10px;font-family:monospace;font-weight:700}
.model-answer{margin:14px 0}.model-answer summary{font-weight:700}.model-answer[open]{background:#fbfdff}.model-answer>p,.model-answer>.definition,.model-answer>pre{margin-left:16px!important;margin-right:16px!important}
@media(max-width:700px){.animation-demo{padding:15px}.two-traces{grid-template-columns:1fr}.demo-fields input{width:78px}.animation-controls .button{font-size:12px;padding:10px 12px}.notes-intent{padding:16px}.definition{padding:12px 15px}.lesson-hero h1{font-size:2.6rem}.concept-svg{min-width:620px}}
@media(prefers-reduced-motion:reduce){.svg-link,#arith-cursor,.trace-code li{transition:none}}
@media print{.animation-controls,.category-tabs,.demo-fields{display:none!important}.animation-demo{break-inside:avoid;background:#fff;border:1px solid #bbb}.diagram-scroll{overflow:visible}.concept-svg{min-width:0}.definition{break-inside:avoid;background:#fff;border-left:3px solid #333}.notes-intent{background:#fff}.model-answer{break-inside:auto}.model-answer summary{font-weight:700}.demo-result{min-height:0;background:#fff;color:#111}.two-traces{grid-template-columns:1fr 1fr}.lesson-content .diagram-caption{color:#333}}
