/* Keep layout contents within their columns; long pages retain normal scrolling. */
main,main :is(section,article,aside,figure,form,fieldset){min-width:0;box-sizing:border-box}
main :is(img,video,svg){max-width:100%}
main :is(input,select,textarea,button){max-width:100%;box-sizing:border-box}
main :is(h1,h2,h3,p,a,button,label){overflow-wrap:break-word}
main .actions{flex-wrap:wrap}
:is(.discovery-hero,.account-layout,.tp-hero,.tp-feature,.tp-details,.privacy-visual)>*{min-width:0}
.tp-hero,.tp-feature,.tp-details,.privacy-visual{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
/* The pinned desktop story must fit between the viewport's top and bottom. */
.scroll-story .story-stage{min-height:calc(100svh - 48px);padding:clamp(20px,3vh,36px);gap:clamp(20px,3vw,48px);overflow:visible;box-sizing:border-box}
.scroll-story .story-copy h2{font-size:clamp(28px,min(3.5vw,6vh),54px)}
.scroll-story .story-instruction{font-size:clamp(15px,1.2vw,19px);line-height:1.55}
.scroll-story .story-drawing{max-width:min(100%,calc((100svh - 260px)*1.6));margin-inline:auto}
.scroll-story .story-concept{height:80px;margin-top:10px}
.scroll-story .story-concept svg{height:80px;max-width:360px}
.scroll-story .story-progress{margin-top:16px}
.scroll-story .story-steps{gap:9px;margin-top:20px}
/* Previews keep their proportions without becoming taller than the screen. */
.course-showcase .showcase-stage{max-height:clamp(180px,calc(100svh - 300px),520px);aspect-ratio:8/5}
.course-showcase .showcase-stage>svg{object-fit:contain}
.discovery-studio .studio-picture{max-height:clamp(180px,calc(100svh - 260px),520px)}
.tp-hero img,.privacy-visual img{max-height:65svh;object-fit:contain}
@media(max-width:850px){.tp-hero,.tp-feature,.tp-details,.privacy-visual{grid-template-columns:minmax(0,1fr)}}
/* On phones and short windows, flow the section instead of pinning clipped content. */
@media(max-width:760px),(max-height:650px){
 .scroll-story{height:auto}
 .scroll-story .story-stage{position:relative;top:auto;min-height:0;padding:24px 18px;overflow:visible}
 .scroll-story .story-drawing{max-width:100%}
 .scroll-story .story-copy h2{min-height:0;font-size:clamp(26px,5vw,38px)}
 .scroll-story .story-instruction{font-size:15px}
 .scroll-story .story-visual{width:100%}
 .scroll-story .story-concept{height:70px}
 .scroll-story .story-concept svg{height:70px}
 .family-guide.course-showcase{position:relative;top:auto}
}
@media(max-width:760px){.scroll-story .story-stage{grid-template-columns:minmax(0,1fr);gap:20px}.course-showcase .showcase-pair{gap:6px}.tp-dot-groups>div{padding:8px;gap:6px}.tp-dot-groups i{width:16px;height:16px}}

/* Compact homepage lesson showcase: bounded artwork and closer copy. */
.scroll-story{height:175svh;margin:40px 0 48px;border-radius:28px}
.scroll-story .story-stage{min-height:0;max-width:1440px;margin-inline:auto;padding:30px 36px;gap:36px;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);border-radius:28px}
.scroll-story .story-copy h2{font-size:clamp(28px,2.8vw,42px);min-height:2.16em;margin:12px 0 18px}
.scroll-story .story-instruction{font-size:16px;line-height:1.5;margin:0;max-width:28em}
.scroll-story .story-steps{gap:8px;margin-top:20px}
.scroll-story .story-drawing{max-width:min(100%,640px,calc((100svh - 220px)*1.6));margin-inline:auto}
.scroll-story .story-concept{height:48px;max-width:640px;margin:8px auto 0}
.scroll-story .story-concept svg{height:48px;max-width:300px}
.scroll-story .story-progress{max-width:612px;margin:12px auto 0;height:2px}
@media(max-width:760px){.scroll-story{height:auto;margin:28px 0 36px}.scroll-story .story-stage{position:relative;top:auto;grid-template-columns:1fr;padding:24px 18px;gap:20px}.scroll-story .story-copy h2{min-height:0;font-size:28px}.scroll-story .story-drawing{max-width:min(100%,480px)}.scroll-story .story-instruction{font-size:14px}.scroll-story .story-steps{margin-top:14px}}
@media(prefers-reduced-motion:reduce),(max-height:600px){.scroll-story{height:auto}.scroll-story .story-stage{position:relative;top:auto}.scroll-story .story-drawing{max-width:min(100%,560px)}}

/* Keep previews inside one compact card instead of several screens of scroll. */
.scroll-story{height:auto}.scroll-story .story-stage{position:relative;top:auto}
.scroll-story .story-steps button{display:flex;align-items:center;gap:10px;text-align:left;font:inherit;font-size:13px;font-weight:500;color:#bdcde0;background:transparent;border:0;box-shadow:none;padding:5px 0;border-radius:8px;min-height:36px}
.scroll-story .story-steps button span{font-size:inherit;color:inherit;display:inline}
.scroll-story .story-steps button.active{color:white;font-weight:800;translate:none}
.scroll-story .story-steps button:focus-visible{outline:3px solid #b7d1f5;outline-offset:4px}
.scroll-story .story-steps button b{flex-shrink:0;width:25px;height:25px}
@media(max-width:760px){.scroll-story .story-steps{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px}.scroll-story .story-steps button{font-size:11px;gap:7px}}
@media(max-height:600px){.scroll-story .story-steps{display:grid}}

/* Keep the homepage people stories balanced with the introductory copy. */
.discovery-hero .people-studio{width:100%;max-width:900px;justify-self:end;padding:20px}
.people-studio h2.studio-topic-title{margin:10px 0 14px;padding-bottom:10px}
.people-studio .people-controls{margin-top:10px}
.people-studio>p.people-note{margin-top:8px}
@media(min-width:761px){
 .people-studio .people-film{width:100%;aspect-ratio:2/1;max-height:400px}
 .people-film video{object-position:center 42%}
}
@media(max-width:760px){
 .discovery-hero .people-studio{padding:16px;justify-self:stretch}
 .people-studio .people-film{aspect-ratio:16/9}
}
