.serial-lesson>h3,.serial-lesson>p,.serial-lesson>.scene-toolbar,.serial-lesson>.serial-solve-status{margin-left:1.2rem;margin-right:1.2rem}
.serial-lesson .scene-toolbar{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.6rem}
.serial-lesson .scene-host{height:420px;background:#f4f7fb;overflow:hidden}
.serial-lesson .scene-host canvas{display:block;width:100%;height:100%;touch-action:none}
.serial-lesson[data-scene-state=ready]>.static-figure{display:none}
.serial-lesson[data-scene-state=error] .scene-host{height:auto;background:#173344}
.serial-lesson .static-figure{margin:0;padding:1rem;background:#f4f7fb;color:#152e41}
.serial-lesson .static-figure svg{display:block;width:100%;height:auto;max-height:300px}
.serial-lesson .static-figure figcaption,.serial-lesson .serial-scale{font-size:.85rem;line-height:1.5}
.serial-lesson .serial-solve-status{padding:.65rem .8rem;background:#edf6f4;border-left:3px solid #087567;font-size:.85rem;line-height:1.5}
.serial-lesson[data-converged=false] .serial-solve-status{background:#fff2e6;border-color:#ac5915}
.serial-lesson .serial-totals{padding:0 1.2rem}
.serial-lesson .serial-cells{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:0 1.2rem}
.serial-lesson .serial-cell{min-width:0}
.serial-lesson .serial-cell h4{margin:1rem 0 .5rem}
.serial-lesson .serial-cell .readout{padding:0;grid-template-columns:1fr;margin:0}
.serial-lesson .readout dd{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.serial-lesson .serial-candidate{margin:1rem 1.2rem;padding:.8rem;background:#fff2e6;border:1px solid #d8ad89;font-size:.85rem}
.serial-lesson .preset{width:calc(100% - 2.4rem);height:18rem;margin:0 1.2rem 1.2rem;font-size:.8rem;line-height:1.4}
.serial-lesson .scene-error{font-size:.9rem}
@media(max-width:540px){.serial-lesson .scene-host{height:340px}.serial-lesson .serial-cells{grid-template-columns:1fr}.serial-lesson .controls{grid-template-columns:1fr}.serial-lesson .input-pair{grid-template-columns:minmax(0,1fr) 90px}.serial-lesson .scene-toolbar button{font-size:.85rem}}
@media print{.serial-lesson .scene-host,.serial-lesson .scene-toolbar,.serial-lesson .serial-cells,.serial-lesson .serial-totals,.serial-lesson .serial-solve-status,.serial-lesson .serial-candidate{display:none}.serial-lesson>.static-figure{display:block!important}.serial-lesson{break-inside:auto}}
