/* V38: four public tabs start consistently below navigation. */
@media(min-width:981px){
  #home.tab-panel,#products.tab-panel,#about.tab-panel,#contact.tab-panel{padding-top:18px!important;}
  #home .home-grid,#about .about-layout,#contact .contact-layout{margin-top:0!important;align-items:stretch!important;min-height:0!important;}
  #home .home-grid,#about .about-layout,#contact .contact-layout{height:min(740px,calc(100dvh - 112px))!important;max-height:none!important;}
  #home .home-copy,#home .home-visual{min-height:0!important;}
  #about .about-layout,#contact .contact-layout{align-content:stretch!important;}
  #about .about-feature,#about .about-principles,#contact .contact-intro,#contact .contact-form{height:100%!important;min-height:0!important;}
  #about .about-feature{padding:clamp(18px,2.5vh,38px)!important;justify-content:space-evenly!important;}
  #about .about-principles{grid-auto-rows:minmax(0,1fr)!important;}
  #about .about-principles article{min-height:0!important;padding:clamp(12px,1.8vh,24px)!important;}
  #contact .contact-intro{padding:clamp(16px,2.5vh,32px)!important;}
  #contact .contact-form{padding:clamp(13px,2vh,28px)!important;align-content:space-between!important;}
  #contact .contact-intro h2{margin:10px 0!important;font-size:clamp(25px,2.5vw,40px)!important;}
  #contact .contact-guidance{margin-top:10px!important;}
  #contact .contact-journey{gap:5px!important;}
  #contact .contact-form textarea{min-height:65px!important;max-height:90px!important;}
  #products.tab-panel{padding-top:18px!important;}
  #products .product-grid{margin-top:0!important;}
}
/* Do not sacrifice readability on compact screens. */
@media(max-width:980px),(max-height:720px){
  #about .about-layout,#contact .contact-layout{height:auto!important;max-height:none!important;}
  #about.tab-panel,#contact.tab-panel{overflow:auto!important;}
}
@media(max-width:660px){#home.tab-panel,#products.tab-panel,#about.tab-panel,#contact.tab-panel{padding-top:14px!important;}}
/* Brand/nav centering after removing the left-side CTA, including on desktop. */
@media(min-width:981px){.site-header{grid-template-columns:1fr auto 1fr!important;}}
/* Keep desktop About and Contact within the viewport when there is room. */
@media (min-width:1181px) and (min-height:740px){
  #about.tab-panel,#contact.tab-panel{padding-bottom:10px!important;}
  #about .about-layout,#contact .contact-layout{height:calc(100dvh - 115px)!important;max-height:740px!important;}
  #about .about-principles article{display:flex!important;flex-direction:column!important;justify-content:center!important;}
}
@media(min-width:1181px) and (min-height:740px){#home.tab-panel{padding-bottom:8px!important;}}
