/* AVIX Water v70 — production hardening.
   Edge-device resilience only. Loaded last to protect layout without redesigning it. */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
*,*::before,*::after{box-sizing:border-box}
body{min-width:0;max-width:100%;overflow-x:hidden}
@supports (overflow:clip){body{overflow-x:clip}}
main,section,article,aside,header,footer,nav,div{min-width:0}
img,video,canvas{max-width:100%;height:auto}
iframe{display:block;max-width:100%;border:0}
svg{max-width:100%}
button,a,input,select,textarea{touch-action:manipulation}
.av5-actions,.avix-hero-actions{flex-wrap:wrap}
.av5-menu{min-width:44px;min-height:44px}
.avix-section-nav,.avix-section-nav__viewport{max-width:100%}
.avix-section-nav__inner{box-sizing:border-box}

/* Mobile navigation must remain usable on short landscape screens and at text zoom. */
@media(max-width:1080px){
  .av5-nav{
    max-height:100dvh!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding-bottom:max(30px,env(safe-area-inset-bottom,0px))!important;
  }
  .av5-nav>a{flex-shrink:0}
}

/* Prevent Safari from zooming the whole page when a form field receives focus. */
@media(max-width:700px){
  input:not([type="checkbox"]):not([type="radio"]),textarea,select{font-size:16px!important}
  .av5-button,.avix-hero-cta,button[type="submit"]{min-height:48px}
  .tc-socials a{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .avix-global-footer a{min-height:32px}
  .avix-section-nav__inner{
    padding-left:max(16px,env(safe-area-inset-left,0px))!important;
    padding-right:max(16px,env(safe-area-inset-right,0px))!important;
  }
  main a[href^="http"],main a[href^="mailto:"],main a[href^="tel:"]{overflow-wrap:anywhere}
}

/* Very small but still active devices. Preserve the composition instead of clipping it. */
@media(max-width:320px){
  :root{--avix-page-gutter:14px!important}
  .av5-container{padding-left:14px!important;padding-right:14px!important}
  .avix-section-nav__inner{padding-left:14px!important;padding-right:14px!important;gap:18px!important}
  .av5-actions,.avix-hero-actions{gap:10px!important}
}
@media(max-width:290px){
  :root{--avix-page-gutter:12px!important}
  .av5-container{padding-left:12px!important;padding-right:12px!important}
  .avix-section-nav__inner{padding-left:12px!important;padding-right:12px!important;gap:16px!important}
}

/* Tables or code-like material on utility/reference pages should scroll, never widen the page. */
@media(max-width:700px){
  main table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  pre,code{max-width:100%;overflow-wrap:anywhere}
}

/* Respect accessibility preferences without changing the default AVIX animation language. */
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}
@media(forced-colors:active){
  .av5-button,.avix-hero-cta,.avix-section-nav__link{forced-color-adjust:auto}
}
