/* Let the page shell take the space available in its own window. */
@media screen {
  body:has(>main), body.native-page { max-inline-size:none!important; }
  body>main:not([hidden]),body.native-page>main.native-example {
    inline-size:100%;max-inline-size:none!important;min-inline-size:0;box-sizing:border-box;
    margin-inline:0!important;padding-inline:clamp(.7rem,1.6vw,2rem)!important;
  }
  body>header:has(#title),body>header:has(+main>aside) {
    padding-inline:clamp(.7rem,1.6vw,2rem)!important;
  }
  main:has(>aside+article#content) { inline-size:100%!important;max-inline-size:none!important; }
  #content,.native-screen,.native-example { min-inline-size:0;box-sizing:border-box; }
  body.native-page main.native-example { margin-inline:0;padding-inline:clamp(.7rem,1.5vw,1.7rem)!important; }
  .native-example div:has(>details:nth-of-type(3)), main>#contents[open]>ul {
    display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,22rem),1fr));
    gap:.6rem;align-items:start;
  }
  .native-example div:has(>details:nth-of-type(3))>details { min-inline-size:0;margin:0;overflow-wrap:anywhere; }
  .native-example div:has(>details:nth-of-type(3))>:not(details),.native-example div:has(>details:nth-of-type(3))>details[open] {grid-column:1/-1}
  .native-example details[open] :is(p,li), main:not(:has(>aside))>p {max-inline-size:85ch}
  main:has(>#parts+#cards)>#cards,main>#products:has(>article) {
    display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,19rem),1fr));gap:.85rem
  }
}
/* Label sizing is independent of touch-target sizing and browser text zoom. */
@media screen and (max-width:640px) {
  .tutor282 .dir390-tile strong,.tutor282 .dir390-switch button,
  .tutor282 :is(.subject-grid385,.t382-filters,.bank385 .stages,.levels,.t382-levels) button,
  .tutor282 .dir390-detail summary, .tutor282 .dir390>button,
  nav.subjects [data-subject],.ak-list .ak-subject384,.native-example summary,
  .ak-side summary, .valley-scene .valley-label,.kh-programs272 .kh-program-card272 small {
    font-size:.86rem!important;line-height:1.24;white-space:normal;overflow-wrap:anywhere;
  }
  .tutor282 .dir390-tile strong {font-size:.84rem!important;padding:.13em .26em}
  .tutor282 .dir390-switch button,.tutor282 .dir390>button,.native-example summary {
    min-block-size:44px;box-sizing:border-box;
  }
  .native-example summary {align-content:center}
  body>main:has(>article#content) article#content {padding-inline:clamp(.7rem,3vw,1rem)}
}
@media screen and (max-width:640px) {
 .tutor282 .t382-chips button,.tutor282 .dir390 button:not(.dir390-tile) {
   font-size:.86rem!important;line-height:1.23;min-block-size:44px;white-space:normal;overflow-wrap:anywhere;
 }
}
@media screen and (max-width:640px) {
 body[data-room] #content .ak-destination385 strong {font-size:1.06rem;line-height:1.24}
 .material-card385>strong,.kh-program-card272 :is(h3,h4),.tutor282 .t382-grid h3 {font-size:1.08rem;line-height:1.24}
 .ak-side a,.dir390-tile,.t382-chips button,.subjects a {hyphens:auto}
}
@media screen {
 #root :is(.container,.content-wrap,.wrapper,.page-inner,.desktop-content,.page-content,.window-content)
 :is(.kh-catalogue272,.kh-programs272,.t382-catalog,.site-sections385,.science-hub-grid091) {min-inline-size:0;max-inline-size:none!important}
 #root :is(.container,.content-wrap,.wrapper,.page-inner,.desktop-content,.page-content,.window-content):has(:is(.kh-catalogue272,.t382-catalog,.kh-programs272,.site-sections385,.science-hub-grid091)) {
   max-inline-size:none!important;min-inline-size:0;box-sizing:border-box
 }
}
/* Editorial covers give a lesson its own identity when its subject image was used. */
body[data-room] #content .ak-destination385[data-cover393=title]::before{display:none}
body[data-room] #content .ak-destination385[data-cover393=title]>strong {
 box-sizing:border-box;display:flex;align-items:flex-end;min-height:clamp(7rem,10vw,9rem);
 margin:0 0 .45rem;padding:1.1rem 1rem 1.05rem 1.3rem;
 border-left:.42rem solid #bfaa78;background:linear-gradient(120deg,#233647,#234753);
 color:#fff8e9;font:650 clamp(1.13rem,1.4vw,1.7rem)/1.17 Georgia,serif;overflow-wrap:anywhere;
}
body[data-room] #content .ak-destination385[data-binding393="1"]>strong {background:linear-gradient(149deg,#3c3448,#4e3945);border-color:#bba1aa}
body[data-room] #content .ak-destination385[data-binding393="2"]>strong {background:linear-gradient(140deg,#273f3d,#354a38);border-color:#aebe9a}
@media(max-width:640px){body[data-room] #content .ak-destination385[data-cover393=title]>strong {min-height:5.3rem;font-size:1.08rem}}
