/* Final responsive/interaction hardening */
html,body{max-width:100%;overflow-x:clip}
body.cookie-open{overflow:hidden;touch-action:none}
:where(.header-row,.nav-row,.layout,.slide.active,.prod-grid,.cat-grid,.trust-grid,.promo-grid,.blog-grid,.testi-grid,.brand-grid,.footer-grid,.product-detail,.cart-layout,.order-layout,.service-detail__grid,.feature-columns,.corp-grid,.builder-app,.contact-grid,.field-grid,.cookie-banner,.cookie-modal__head,.cookie-options label)>*{min-width:0}
:where(img,video,canvas,iframe,svg){max-width:100%}
:where(p,a,span,strong,small,li,td,th,label,h1,h2,h3,h4,h5,h6){overflow-wrap:anywhere}
:where(button,a,input,select,textarea){-webkit-tap-highlight-color:transparent}
:where(button,a,input,select,textarea):focus-visible{outline:2px solid var(--accent,#ff6000);outline-offset:3px}

/* Toast: never stretch between top and bottom, even when an internal flash is shown. */
.toast,.internal-flash{top:auto!important;right:auto!important;bottom:max(16px,env(safe-area-inset-bottom))!important;left:50%!important;width:min(400px,calc(100vw - 24px));height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;transform:translate(-50%,100px)!important;white-space:normal!important}
.toast.on,.internal-flash.on{transform:translate(-50%,0)!important}
.toast span,.internal-flash span{white-space:normal!important;text-overflow:clip!important;text-align:left;line-height:1.4}

/* Safe-area support for notched phones. */
.announce{padding-top:env(safe-area-inset-top)}
.panel-head{padding-top:max(16px,env(safe-area-inset-top))}
.panel-foot{padding-bottom:max(16px,env(safe-area-inset-bottom))}
.search-overlay{padding-bottom:max(20px,env(safe-area-inset-bottom))}
.search-close{top:max(16px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right))}
.wa-btn{bottom:max(16px,env(safe-area-inset-bottom));right:max(16px,env(safe-area-inset-right));padding-bottom:0}
.top-btn{bottom:max(16px,env(safe-area-inset-bottom));left:max(16px,env(safe-area-inset-left));padding-bottom:0}
.cookie-banner{bottom:max(10px,env(safe-area-inset-bottom));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right))}
.cookie-modal{padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
.cookie-modal__card{max-height:calc(100dvh - 20px)}

/* Robust media/content behavior. */
.prod-image img,.blog-img img,.product-detail__visual img{width:100%;height:100%;object-fit:contain}
.rich-content img,.article-body img{height:auto;max-width:100%;border-radius:12px}
.rich-content table,.article-body table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;-webkit-overflow-scrolling:touch}
.rich-content pre,.article-body pre{max-width:100%;overflow:auto;white-space:pre-wrap;word-break:break-word}

/* Mobile ergonomics and touch targets. */
@media(max-width:767px){
  :where(.action-btn,.panel-close,.search-close,.footer-social a,.top-btn,.wa-btn){min-width:44px;min-height:44px}
  .panel-nav a{min-height:46px}
  .cookie-btn{min-height:46px}
  .internal-page .btn{min-height:46px}
  .footer-bottom{padding-bottom:max(6px,env(safe-area-inset-bottom))}
}
@media(max-width:420px){
  .page-head,.internal-page-hero{padding:24px 16px}
  .page-head h1,.internal-page-hero h1,.product-detail__info h1,.service-detail h1,.contact-grid h1,.article h1{font-size:30px}
  .builder-page__intro{padding:28px 18px}
  .builder-page__intro h1{font-size:32px}
  .product-detail{padding:14px}
  .article{padding:22px 16px}
  .cta-strip{padding:20px}
  .hero-actions>.btn{width:100%}
}
@media(max-width:340px){
  :root{--pad:12px}
  .header-row{gap:7px}
  .action-btn{width:38px;height:38px}
  .page-head h1,.internal-page-hero h1,.product-detail__info h1,.service-detail h1,.contact-grid h1,.article h1{font-size:28px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .wa-btn::before{animation:none!important}
  .marquee-track{animation:none!important}
}
