/* Mobile-only final layout fixes: one continuous page scroll, fixed header, no horizontal overflow. */
@media (max-width:900px){
  html,body{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  /* Keep the mobile header visible while the entire document scrolls. */
  .site-header{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    z-index:1000!important;
  }

  body.home-page,
  body:not(.home-page){
    height:auto!important;
    min-height:100svh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  /* Reserve the header's space because it is fixed on mobile. */
  body.home-page main,
  body:not(.home-page) main{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding-top:70px!important;
  }

  body.home-page .home-section,
  body:not(.home-page) main>.section,
  body:not(.home-page) main>.funding{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }

  body.home-page .home-layout{
    height:auto!important;
    min-height:0!important;
  }

  /* Funding terms: always fit inside the phone width. */
  body.home-page .terms,
  body:not(.home-page) .terms{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    gap:8px!important;
  }

  body.home-page .terms div,
  body:not(.home-page) .terms div{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    flex:none!important;
    box-sizing:border-box!important;
  }

  /* No individual section/card scrolling. */
  body.home-page .home-support,
  body.home-page .home-section,
  body:not(.home-page) .section,
  body:not(.home-page) .funding,
  body:not(.home-page) .op-card{
    overflow:visible!important;
  }
}

@media (max-width:600px){
  body.home-page main,
  body:not(.home-page) main{
    padding-top:64px!important;
  }

  body.home-page .terms,
  body:not(.home-page) .terms{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.home-page .terms div,
  body:not(.home-page) .terms div{
    padding:10px 11px!important;
  }
}
