/* Safe Future — Mobile Layout + Visibility Hotfix v2
 * Isolated stability repair. No assessment/data logic changes.
 */
@media (max-width: 767px){
  #navbar{padding-top:.65rem!important;padding-bottom:.65rem!important}
  #navbar .container{min-height:52px!important}
  #navbar img{max-height:40px;width:auto}

  #home{
    min-height:auto!important;
    height:auto!important;
    align-items:flex-start!important;
    overflow:visible!important;
    padding-top:7.25rem!important;
    padding-bottom:4rem!important;
  }
  #home > .container{width:100%!important;max-width:100%!important;padding-left:1.25rem!important;padding-right:1.25rem!important}
  #home > .container > .grid{display:block!important}
  #home > .container > .grid > div:first-child{width:100%!important;max-width:100%!important;position:relative;z-index:3}
  #home .text-gold-shiny.uppercase{font-size:.62rem!important;line-height:1.35!important;letter-spacing:.18em!important;margin-bottom:1rem!important}
  #home h1{font-size:2.12rem!important;line-height:1.12!important;letter-spacing:-.02em!important;margin-bottom:1.25rem!important;max-width:22rem!important}
  #home p.text-lg{font-size:.96rem!important;line-height:1.65!important;margin-bottom:1.75rem!important;max-width:31rem!important}
  #home .flex.flex-col.sm\:flex-row{gap:.75rem!important}
  #home .flex.flex-col.sm\:flex-row > a{width:100%!important;min-height:56px!important;padding:1rem 1.1rem!important}
  #home .mt-12.flex{margin-top:1.5rem!important;gap:1rem!important;flex-wrap:wrap!important}
  #home .mt-12.flex > span{font-size:.68rem!important;line-height:1.4!important}

  .sf-v55-visual{width:210px!important;height:210px!important;right:-48px!important;top:72px!important;opacity:.32!important;z-index:1!important}
  .sf-v55-visual svg{width:100%!important;height:100%!important}
  .sf-v55-orb.a{right:-56px!important;top:40px!important;transform:scale(.72)!important}
  .sf-v55-orb.b{display:none!important}
  .hero-vignette{opacity:.9!important}
}

@media (min-width:768px){#home{min-height:100vh!important}}

/* Stability fallback: no section may remain invisible because an optional reveal animation failed. */
.fade-in,
.fade-in.visible,
section.fade-in,
section .fade-in,
.sf-reveal,
.sf-reveal.sf-visible,
.sf-v55-reveal,
.sf-v55-reveal.is-visible{
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  filter:none!important;
}

/* Never lock the document itself; scrolling must remain available on touch devices. */
html,body{
  overflow-x:hidden!important;
  overflow-y:auto!important;
  height:auto!important;
  min-height:100%!important;
}
body{
  position:relative!important;
  -webkit-overflow-scrolling:touch!important;
}
main{overflow:visible!important}


/* v3 — hard viewport containment.
   Prevent any legacy module/animation from shrinking the visible app shell
   or creating a horizontal canvas on touch devices. */
@media (max-width: 767px){
  html{
    width:100vw!important;
    min-width:100vw!important;
    max-width:100vw!important;
    margin:0!important;
    padding:0!important;
  }
  body{
    width:100vw!important;
    min-width:100vw!important;
    max-width:100vw!important;
    margin:0!important;
    padding:0!important;
    overflow-x:hidden!important;
  }
  #navbar,
  main,
  #home,
  section,
  footer{
    width:100vw!important;
    max-width:100vw!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  #home > .container,
  main > .container,
  section > .container{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  #home > .container > .grid,
  #home > .container > .grid > div{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  #home img,
  main img,
  section img{
    max-width:100%!important;
  }
  .nav-dropdown-panel{
    min-width:0!important;
    max-width:calc(100vw - 24px)!important;
  }
}
