/* Only migrated lessons opt in. Technical diagram geometry remains page-owned. */
body.rs-lesson [data-rs-legacy-shell],body.rs-lesson [data-rs-legacy-language],body.rs-lesson .phase-home{display:none!important}
body.rs-lesson main{width:min(1400px,calc(100% - 32px));max-width:1400px;margin:20px auto 28px;padding:0!important;min-width:0}
body.rs-lesson main :where(section,article,aside,div){min-width:0}
body.rs-lesson main img{max-width:100%;height:auto}
body.rs-lesson main .learning-layout{max-width:100%;min-width:0}
body.rs-lesson input[type=range]{accent-color:var(--rs-standard-blue)}
body.rs-lesson .rs-standard-footer{max-width:1400px}
body.rs-lesson .rs-presentation-stage{display:none}
body.rs-lesson.rs-lesson-presenting{overflow:hidden}
body.rs-lesson.rs-lesson-presenting>.rs-standard-header,body.rs-lesson.rs-lesson-presenting>.rs-standard-footer{visibility:hidden}
body.rs-lesson.rs-lesson-presenting main{position:fixed;z-index:90;top:70px;left:50%;transform:translateX(-50%);width:min(calc(100vw - 32px),calc((100dvh - 90px)*16/9));height:calc(100dvh - 90px);max-width:none;margin:0;padding:24px!important;overflow:auto;background:var(--rs-standard-white);border-top:4px solid var(--rs-standard-blue);box-sizing:border-box}
body.rs-lesson.rs-lesson-presenting .rs-presentation{display:block;z-index:95;position:fixed;inset:0 0 auto;width:100%;height:auto;max-height:64px;padding:8px 16px;overflow:visible;background:var(--rs-standard-soft)}
body.rs-lesson.rs-lesson-presenting .rs-lesson-step-hidden{display:none!important}
body.rs-lesson.rs-lesson-presenting main>section{margin-top:0;max-width:100%}
@media(max-width:760px){body.rs-lesson main{width:calc(100% - 24px)}body.rs-lesson .learning-layout,body.rs-lesson .intro,body.rs-lesson .compare{grid-template-columns:minmax(0,1fr)}body.rs-lesson .rs-standard-header{padding:12px}body.rs-lesson.rs-lesson-presenting main{width:calc(100vw - 16px);padding:12px!important}body.rs-lesson .table-wrap{overflow-x:auto}body.rs-lesson .rs-standard-dialog{max-width:calc(100vw - 24px)}}
@media print{body.rs-lesson.rs-lesson-presenting{overflow:visible}body.rs-lesson.rs-lesson-presenting main{position:static;transform:none;width:100%;height:auto;overflow:visible}body.rs-lesson main>.rs-lesson-step-hidden{display:block!important}body.rs-lesson .rs-presentation{display:none!important}}
/* Isolate shell controls from legacy global button minimum widths. */
body.rs-lesson .rs-standard-actions button,body.rs-lesson .rs-standard-actions a{width:auto;min-width:0;flex:0 0 auto;line-height:1.4;margin:0;box-shadow:none}
body.rs-lesson .rs-presentation-controls button{width:auto;min-width:44px;flex:0 0 auto;margin-top:0;padding:8px 14px}
body.rs-lesson .home-btn{display:none!important}
body.rs-lesson .energy-badge{white-space:normal;max-width:100%;overflow-wrap:anywhere}
/* The pilot's card-table rules must not restructure lesson data tables. */
body.rs-lesson table{display:table;table-layout:auto}body.rs-lesson thead{display:table-header-group;position:static;width:auto;height:auto;clip-path:none}body.rs-lesson tbody{display:table-row-group}body.rs-lesson tbody tr{display:table-row}body.rs-lesson td{display:table-cell}body.rs-lesson td::before{content:none}
@media print{body.rs-lesson .intro,body.rs-lesson .intro-banner{display:block!important}body.rs-lesson main{width:100%!important;max-width:none!important}body.rs-lesson section{break-inside:auto}body.rs-lesson iframe{max-width:100%}}
body.rs-lesson .rs-lesson-table{max-width:100%;min-width:0;overflow-x:auto}
