/* ══════════════════════════════════════════════
   MOBILE LAYER — loaded last on every page. Catches layouts that are fixed
   with inline styles or desktop-only rules, so nothing overflows on phones.
   ══════════════════════════════════════════════ */
img,video,iframe,svg,canvas{max-width:100%}
img,video{height:auto}
html,body{overflow-x:hidden}
@supports (overflow:clip){html,body{overflow-x:clip}}

@media (max-width:900px){
  /* inline-styled multi-column grids */
  [style*="grid-template-columns:repeat(3"],[style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],[style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"],[style*="grid-template-columns: repeat(5"]{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  [style*="grid-template-columns:1fr 1.4fr"],[style*="grid-template-columns:1.2fr 1fr"]{grid-template-columns:1fr !important}
  [style*="minmax(340px"],[style*="minmax(300px"],[style*="minmax(280px"]{grid-template-columns:1fr !important}
}

@media (max-width:600px){
  [style*="grid-template-columns:repeat(2"],[style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(3"],[style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:1fr 1fr"],[style*="grid-template-columns: 1fr 1fr"]{grid-template-columns:1fr !important}
  [style*="grid-template-columns:repeat(4"],[style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"],[style*="grid-template-columns: repeat(5"]{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  [style*="display:flex"][style*="gap"],[style*="display: flex"][style*="gap"]{flex-wrap:wrap}

  /* grid/flex children may shrink below their content width */
  [class*="grid"]>*,[style*="display:grid"]>*,[style*="display: grid"]>*{min-width:0}
  h1,h2,h3,p,li,a,span{overflow-wrap:break-word}

  /* wide tables scroll inside themselves */
  table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

  /* iOS: inputs under 16px trigger zoom on focus */
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px !important}

  /* inline padding on boxed sections */
  [style*="padding: 3rem"],[style*="padding:3rem"],[style*="padding: 4rem"],[style*="padding:4rem"]{padding-left:1.25rem !important;padding-right:1.25rem !important}

  /* decorative floating badges that sit outside their card */
  .about-floating-stat{right:8px !important;left:auto !important;max-width:calc(100% - 16px)}

  /* comfortable tap targets */
  .footer-col ul li a,.footer-sitelinks a{display:inline-block;padding:4px 0}
}
@media (max-width:380px){
  [style*="grid-template-columns:repeat(4"],[style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"],[style*="grid-template-columns: repeat(5"]{grid-template-columns:1fr !important}
}
