/* ChemLabBG: mobile sizing. Desktop styles stay unchanged. */
@media (max-width:900px){
 html,html body{box-sizing:border-box;width:100%;max-width:100%;min-width:0;margin-left:0!important;margin-right:0!important}
 html body #page,html body #content,html body #content>.ast-container,html body #content>.ast-container-fluid,
 html body #page #content #primary,html body #page #content #primary>.site-main,
 html body #page #content #primary .ast-article-single,html body #page #content #primary .entry-content,
 html body #page #content #primary .entry-content>.wp-block-html{
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;
  margin-left:0!important;margin-right:0!important;left:auto!important;right:auto!important;transform:none!important;
 }
 html body #page #content #primary,html body #page #content #primary .entry-content{padding-left:0!important;padding-right:0!important}
 html body :is(#clCatalog,#cl2,#clLesson,#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog,#clb-haunt){box-sizing:border-box!important;max-width:100%!important;min-width:0!important;width:100%!important;margin-left:0!important;margin-right:0!important}
 html body :is(#clCatalog,#cl2,#clLesson,#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) :where(div,main,aside,section,nav,article,header,footer,label){min-width:0!important;box-sizing:border-box}
 html body :is(#clCatalog,#cl2,#clLesson,#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) :is(h1,h2,h3,h4,p,a,button,label){overflow-wrap:anywhere}
 html body :is(#clCatalog,#cl2,#clLesson) :is(img,video,iframe,canvas){max-width:100%}
 /* Grid children must be allowed to shrink below their content width. */
 html body #clCatalog .cc-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;gap:16px!important}
 html body #clCatalog .cc-layout>main,html body #clCatalog .cc-sidebar{width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;float:none!important}
 html body #clCatalog .cc-sidebar{position:static!important;padding:14px!important}
 html body #clCatalog .cc-sidebar nav{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:156px!important;grid-template-columns:none!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain;gap:8px!important;padding-bottom:5px;scroll-snap-type:x proximity}
 html body #clCatalog .cc-sidebar nav a{width:auto!important;max-width:none!important;white-space:normal!important;scroll-snap-align:start;padding:10px!important;font-size:12px!important}
 html body #clCatalog .cc-wrap{width:calc(100% - 24px)!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important}
 html body #clCatalog .cc-section,html body #clCatalog .cc-card,html body #clCatalog .cc-list{width:100%!important;max-width:100%!important;min-width:0!important}
 html body #clCatalog .cc-toggle{white-space:normal!important;min-width:0!important}
 html body #clCatalog .cc-title{white-space:normal!important;overflow-wrap:anywhere!important}
 html body #clCatalog .cc-auto-state{white-space:normal!important;max-width:100%!important;text-align:left!important}
 html body #cl2 .cl2-wrap{width:100%!important;max-width:100%!important;padding-left:16px!important;padding-right:16px!important}
 html body #cl2 .cl2-hero-in,html body #cl2 .cl2-today,html body #cl2 .cl2-video,html body #cl2 .home-video-card{grid-template-columns:minmax(0,1fr)!important;gap:20px}
 html body #clLesson .cl-layout{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}
 html body #clLesson .cl-layout>*,html body #clLesson .cl-sidebar{min-width:0!important;width:100%!important;position:static!important}
 html body #clLesson .cl-wrap{box-sizing:border-box;width:calc(100% - 24px)!important;max-width:100%!important;margin-inline:auto!important;padding-inline:0!important}
 html body #clLesson table{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog){padding:14px!important;border-radius:0!important;margin-top:0!important}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) .cxpGrid{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) .cxpCard{width:100%!important;min-width:0!important}
 html body .clbg-auth-layout{grid-template-columns:minmax(0,1fr)!important;width:calc(100% - 24px)!important;max-width:100%!important;min-width:0!important;margin:16px auto!important;border-radius:18px!important}
 html body .clbg-auth-story{min-height:0!important;padding:25px!important}
 html body .clbg-auth-story h1{font-size:30px!important;letter-spacing:-1px!important}
 html body .clbg-auth-form{width:100%!important;padding:25px!important;min-width:0!important}
 html body .clbg-auth-form .um{min-width:0!important;max-width:100%!important}
 html body .clbg-dashboard{left:auto!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:20px 12px!important;box-sizing:border-box!important}
 html body .clbg-dashboard .clbg-dash-grid{display:flex!important;flex-direction:column!important;gap:14px!important}
 html body .clbg-dashboard .clbg-dash-side{display:contents!important}
 html body .clbg-dashboard :is(.clbg-total-card,.clbg-sources,.clbg-board,.clbg-study-link,.clbg-detail,.clbg-xp-guide){min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
 html body .clbg-dashboard .clbg-missions{grid-template-columns:minmax(0,1fr)!important}
 html body .clbg-dashboard .clbg-possible-summary{grid-template-columns:minmax(0,1fr)!important}
 html body .clbg-dashboard .clbg-kind-filters{display:flex!important;flex-wrap:wrap!important;min-width:0!important}
 html body .clbg-dashboard .clbg-kind-filters button{flex:1 1 85px!important}
 html body .clbg-dashboard .clbg-board-row{grid-template-columns:28px 32px minmax(0,1fr) auto!important;gap:8px!important}
 html body .clbg-dashboard .clbg-board-row strong{min-width:0!important;overflow-wrap:anywhere}
 /* Native modal stays inside the viewport, including landscape phones. */
 html body #clbgAuthPrompt[open]{position:fixed!important;inset:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;margin:0!important;width:calc(100vw - 24px)!important;max-width:420px!important;min-width:0!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;box-sizing:border-box!important;border-radius:18px!important;padding:0!important}
 html body #clbgAuthPrompt .clbg-auth-dialog-body{width:100%!important;min-width:0!important;padding:28px 20px 20px!important}
 html body #clbgAuthPrompt h2{font-size:24px!important;line-height:1.25!important;overflow-wrap:anywhere}
 html body #clbgAuthPrompt p{font-size:13px!important;line-height:1.55!important}
 html body #clbgAuthPrompt :is(.clbg-auth-create,.clbg-auth-login){box-sizing:border-box!important;width:100%!important;min-width:0!important;white-space:normal!important;font-size:13px!important;padding:12px!important;min-height:46px!important;gap:8px!important}
 html body #clbgAuthPrompt .clbg-auth-benefits{gap:6px!important;margin:16px 0!important}
 html body #clbgAuthPrompt .clbg-auth-benefits span{font-size:10px!important}
 html body #clbgAuthPrompt .clbg-auth-close{width:36px!important;height:36px!important;right:8px!important;top:8px!important}
}
@media(max-width:600px){
 html body #clCatalog .cc-head{padding:24px 0!important}
 html body #clCatalog h1{font-size:30px!important;line-height:1.2!important}
 html body #clCatalog .cc-toolbar{grid-template-columns:minmax(0,1fr)!important}
 html body #clCatalog .cc-toolbar label{grid-column:auto!important}
 html body #clCatalog .cc-toolbar :is(input,select){width:100%!important;min-width:0!important;font-size:16px!important}
 html body #clCatalog .cc-row{flex-wrap:wrap!important;align-items:center!important;gap:8px!important}
 html body #clCatalog .cc-row>.cc-toggle{flex:1 1 calc(100% - 44px)!important}
 html body #clCatalog .cc-icons{flex-wrap:wrap!important;margin-left:0!important}
 html body #clCatalog .cc-parts{padding:0 12px 12px!important}
 html body #clCatalog .cc-part{flex-wrap:wrap!important;gap:8px!important}
 html body #clCatalog .cc-controls{flex-wrap:wrap!important}
 html body #cl2 .cl2-h1{font-size:clamp(38px,11vw,58px)!important;letter-spacing:-1.7px!important;overflow-wrap:normal!important}
 html body #cl2 .cl2-h1 em{white-space:normal!important}
 html body #cl2 .cl2-lead{font-size:15px!important}
 html body #cl2 .cl2-bento,html body #cl2 .cl2-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html body #cl2 .cl2-tile{min-height:160px!important;padding:18px!important}
 html body #cl2 .cl2-tile h3{font-size:16px!important}
 html body #cl2 .cl2-sec-head{align-items:flex-start!important}
 html body #cl2 #changes .home-release-date{position:static!important;display:inline-block!important;font-size:12px!important;margin-bottom:9px!important;white-space:normal!important}
 html body #cl2 #changes .home-change-eyebrow{padding-right:0!important}
 html body #clLesson .cl-title-row{display:block!important}
 html body #clLesson .cl-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 html body #clLesson .cl-panel{padding:18px!important}
 html body #clLesson .cl-lesson-tools{flex-wrap:wrap!important;gap:8px!important}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) :is(.cxpHero,.cxpTools){padding:16px!important;grid-template-columns:minmax(0,1fr)!important}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) .cxpActions{flex-wrap:wrap!important}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) .cxpXPBox{flex-wrap:wrap!important;gap:8px!important}
 html body :is(#clbgTestsGrade8Catalog,#clbgTestsProfileCatalog) .cxpXPBox p{text-align:left!important;max-width:100%!important}
 html body .clbg-dashboard .clbg-profile-head{flex-wrap:wrap!important;gap:10px!important}
 html body .clbg-dashboard .clbg-resource{grid-template-columns:30px minmax(0,1fr)!important;padding:16px 10px!important}
 html body .clbg-dashboard .clbg-resource-score{grid-column:2!important;min-width:0!important;text-align:left!important}
 html body .clbg-dashboard .clbg-resource-score strong{white-space:normal!important}
}
/* Reflow the global header, including the separate Halloween button. */
@media(max-width:1249px){
 html body #clnav-header{width:100%!important;max-width:100%!important;min-width:0!important;left:0!important;right:0!important;box-sizing:border-box!important}
 html body #clnav-header .clnav-bar{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
 html body #clnav-header .clnav-links{min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
 html body #clnav-header :is(.clnav-main-link,.clnav-main-button){width:100%!important;white-space:normal!important;overflow-wrap:anywhere;min-width:0!important;box-sizing:border-box!important}
 html body #clnav-header .clnav-levels{position:static!important;width:100%!important;max-width:100%!important;box-shadow:none!important;box-sizing:border-box!important}
}
@media(max-width:600px){
 html body #clnav-header .clnav-bar{display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;align-items:center!important;padding:10px 12px!important;gap:9px!important;min-height:0!important}
 html body #clnav-header .clnav-brand{grid-column:1!important;grid-row:1!important;min-width:0!important;font-size:20px!important;gap:7px!important;justify-self:start!important}
 html body #clnav-header .clnav-brand-mark{width:30px!important;height:30px!important;flex-shrink:0!important}
 html body #clnav-header .clnav-toggle{display:grid!important;place-items:center!important;grid-column:2!important;grid-row:1!important;width:44px!important;height:44px!important;margin:0!important;padding:0!important;min-width:0!important}
 html body #clnav-header .clnav-auth{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-column:1/-1!important;grid-row:2!important;width:100%!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;gap:8px!important}
 html body #clnav-header .clnav-auth a{width:100%!important;min-width:0!important;min-height:40px!important;padding:9px 10px!important;white-space:normal!important;font-size:12px!important;box-sizing:border-box!important}
 html body #clnav-header #clb-hb{grid-column:1/-1!important;grid-row:3!important;width:100%!important;min-width:0!important;margin:0!important;position:relative!important;justify-self:stretch!important}
 html body #clnav-header #clb-hb #hbBtn{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:40px!important;height:auto!important;box-sizing:border-box!important;padding:10px 14px!important;font-size:12px!important;letter-spacing:.4px!important;white-space:normal!important}
 html body #clnav-header #clb-hb .hb-long{display:inline!important;white-space:normal!important}
 html body #clnav-header #clb-hb .hb-short{display:none!important}
 html body #clnav-header #clb-hb .dot{font-size:8px!important;letter-spacing:1px!important;right:5px!important;top:-6px!important}
 html body #clnav-header #clb-hb .bub{position:fixed!important;left:12px!important;right:12px!important;top:190px!important;bottom:auto!important;width:calc(100vw - 24px)!important;max-width:420px!important;max-height:calc(100dvh - 210px)!important;overflow:auto!important;transform:none!important;box-sizing:border-box!important;margin:0 auto!important}
 html body.admin-bar #clnav-header #clb-hb .bub{top:230px!important;max-height:calc(100dvh - 250px)!important}
 html body #clnav-header .clnav-links{grid-column:1/-1!important;grid-row:4!important;order:9!important;flex-basis:auto!important;max-height:calc(100dvh - 240px)!important;overflow-y:auto!important;padding:5px 0!important;gap:3px!important;align-items:stretch!important;flex-direction:column!important}
 html body #clnav-header:not(.clnav-is-open) .clnav-links{display:none!important}
 html body #clnav-header.clnav-is-open .clnav-links{display:flex!important}
 html body #clnav-header :is(.clnav-main-link,.clnav-main-button){font-size:14px!important;min-height:44px!important;padding:11px 12px!important;line-height:1.45!important}
 html body #clnav-header .clnav-menu-group{width:100%!important;min-width:0!important}
 html body #clnav-header .clnav-main-title-link{min-width:0!important;white-space:normal!important}
 html body #clnav-header .clnav-plus{flex:0 0 14px!important}
 html body #clnav-header .clnav-tools{grid-column:1/-1!important;width:100%!important;min-width:0!important}
}
@media(max-height:560px) and (max-width:900px){
 html body #clbgAuthPrompt .clbg-auth-mark,html body #clbgAuthPrompt .clbg-auth-brand,html body #clbgAuthPrompt .clbg-auth-benefits{display:none!important}
 html body #clbgAuthPrompt .clbg-auth-dialog-body{padding:25px 18px 16px!important}
 html body #clbgAuthPrompt .clbg-auth-or{margin:12px 0!important}
}
