/* ================================================================
   AOM Traders V49.4 — Internal Page Layout Reset
   One final rhythm for every public page except Home.
   Loaded after all historical styles and V49.3 experiments.
   ================================================================ */

:root{
  --v494-gutter:clamp(24px,3.2vw,64px);
  --v494-wide:1760px;
  --v494-reading:1240px;
}

body:not(.page-home) #main{position:relative}

/* Back occupies one compact, predictable row. */
body:not(.page-home) .aom-page-back-wrap{
  position:relative!important;
  z-index:8!important;
  width:min(var(--v494-wide),calc(100% - (var(--v494-gutter) * 2)))!important;
  max-width:var(--v494-wide)!important;
  height:68px!important;
  min-height:68px!important;
  margin:0 auto!important;
  padding:18px 0 0!important;
  box-sizing:border-box!important;
  pointer-events:none!important;
}
body:not(.page-home) .aom-page-back{pointer-events:auto!important}

/* Kill inherited full-screen and oversized first-section behavior. */
body:not(.page-home) #main>.aom-page-back-wrap + .page-hero.section-first,
body:not(.page-home) #main>.aom-page-back-wrap + .hero.section-first,
body:not(.page-home) #main>.aom-page-back-wrap + .product-detail-hero.section-first,
body:not(.page-home) #main>.aom-page-back-wrap + .legal-hero.section-first,
body:not(.page-home) #main>.aom-page-back-wrap + .not-found.section-first{
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:22px 0 46px!important;
  align-items:center!important;
}

/* One horizontal boundary for Back and hero content. */
body:not(.page-home) #main>.aom-page-back-wrap + .page-hero.section-first>.container,
body:not(.page-home) #main>.aom-page-back-wrap + .hero.section-first>.container,
body:not(.page-home) #main>.aom-page-back-wrap + .product-detail-hero.section-first>.container,
body:not(.page-home) #main>.aom-page-back-wrap + .legal-hero.section-first>.container{
  width:min(var(--v494-wide),calc(100% - (var(--v494-gutter) * 2)))!important;
  max-width:var(--v494-wide)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* PRODUCTS — compact first view; filters and first row remain visible. */
body.page-products #main>.aom-page-back-wrap + .page-hero.section-first{
  padding-top:18px!important;
  padding-bottom:38px!important;
}
body.page-products .page-hero-grid{
  min-height:280px!important;
  height:auto!important;
  align-items:center!important;
}
body.page-products #main>.page-hero + .section{
  padding-top:30px!important;
}

/* GUIDE — a centered two-column composition, not a left-anchored canvas. */
body.page-app #main>.aom-page-back-wrap + .page-hero.section-first{
  padding:18px 0 38px!important;
}
body.page-app .page-hero-grid{
  width:min(var(--v494-reading),calc(100% - (var(--v494-gutter) * 2)))!important;
  max-width:var(--v494-reading)!important;
  min-height:290px!important;
  height:auto!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(440px,1fr) minmax(500px,1fr)!important;
  gap:58px!important;
  align-items:center!important;
  justify-items:stretch!important;
  text-align:left!important;
}
body.page-app .page-hero-grid>div:first-child{
  width:100%!important;
  max-width:570px!important;
  margin:0!important;
  text-align:left!important;
}
body.page-app .page-hero h1{
  max-width:570px!important;
  margin:12px 0 14px!important;
}
body.page-app .page-hero .lead{
  max-width:560px!important;
  margin:0!important;
  text-align:left!important;
}
body.page-app .page-hero .hero-mini{
  width:100%!important;
  max-width:540px!important;
  margin:0!important;
  justify-self:center!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
body.page-app #main>.page-hero + .section{
  padding-top:46px!important;
}
body.page-app .nav-left a[data-nav="app"]{
  color:#fff!important;
  border-bottom-color:#27d7f2!important;
}

/* PARTNER — remove the historic 138–150px internal top padding. */
body.page-partner #main>.aom-page-back-wrap + .partner-page .partner-hero.section-first{
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:22px 0 48px!important;
  align-items:center!important;
}
body.page-partner #main>.aom-page-back-wrap + .partner-page .partner-wide{
  width:min(var(--v494-wide),calc(100% - (var(--v494-gutter) * 2)))!important;
  max-width:var(--v494-wide)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.page-partner .partner-hero-copy{max-width:880px!important}

/* COMMUNITY — centered introduction; content begins without a dead zone. */
body.page-community #main>.aom-page-back-wrap + .v463-community-hero,
body.page-community #main>.aom-page-back-wrap + .v45-community-hero{
  min-height:0!important;
  height:auto!important;
  padding:20px 0 38px!important;
  display:flex!important;
  align-items:center!important;
}
body.page-community .v463-hero-copy{
  width:min(1100px,100%)!important;
  max-width:1100px!important;
  margin:0 auto!important;
  text-align:center!important;
}
body.page-community .v463-community-hero h1{
  max-width:1050px!important;
  margin:12px auto 16px!important;
}
body.page-community .v463-community-hero .lead{
  max-width:820px!important;
  margin:0 auto!important;
}
body.page-community .v463-latest-section{
  padding-top:34px!important;
  padding-bottom:54px!important;
}
body.page-community .v463-section-intro{
  margin:0 auto 24px!important;
  text-align:center!important;
}

/* DETAIL + remaining public pages use the same compact start. */
body:not(.page-home) #main>.aom-page-back-wrap + .product-detail-hero.section-first{
  padding-top:16px!important;
  padding-bottom:42px!important;
}
body:not(.page-home) #main>.aom-page-back-wrap + .legal-hero.section-first,
body:not(.page-home) #main>.aom-page-back-wrap + .not-found.section-first{
  padding-top:18px!important;
  padding-bottom:38px!important;
}

@media(max-width:1050px){
  body.page-app .page-hero-grid{
    width:min(760px,calc(100% - 30px))!important;
    grid-template-columns:1fr!important;
    gap:24px!important;
    min-height:0!important;
    text-align:center!important;
  }
  body.page-app .page-hero-grid>div:first-child,
  body.page-app .page-hero h1,
  body.page-app .page-hero .lead{
    max-width:720px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    text-align:center!important;
  }
}

@media(max-width:700px){
  :root{--v494-gutter:15px}
  body:not(.page-home) .aom-page-back-wrap{
    height:60px!important;
    min-height:60px!important;
    padding-top:12px!important;
  }
  body:not(.page-home) #main>.aom-page-back-wrap + .page-hero.section-first,
  body:not(.page-home) #main>.aom-page-back-wrap + .hero.section-first,
  body:not(.page-home) #main>.aom-page-back-wrap + .product-detail-hero.section-first,
  body.page-partner #main>.aom-page-back-wrap + .partner-page .partner-hero.section-first,
  body.page-community #main>.aom-page-back-wrap + .v463-community-hero{
    padding-top:14px!important;
    padding-bottom:30px!important;
  }
  body.page-app .page-hero-grid{
    width:calc(100% - 30px)!important;
    text-align:left!important;
  }
  body.page-app .page-hero-grid>div:first-child,
  body.page-app .page-hero h1,
  body.page-app .page-hero .lead{
    text-align:left!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.page-app .page-hero .hero-mini{
    max-width:none!important;
    grid-template-columns:1fr!important;
  }
  body.page-products .page-hero-grid{min-height:0!important}
  body.page-community .v463-hero-copy,
  body.page-community .v463-section-intro{text-align:left!important}
}

/* V49.4.1 Guide precision alignment */
html body.page-app .aom-page-back-wrap{width:min(1140px,calc(100% - 48px))!important;max-width:1140px!important;margin-left:auto!important;margin-right:auto!important}
html body.page-app #main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{width:min(1140px,calc(100% - 48px))!important;max-width:1140px!important;margin-left:auto!important;margin-right:auto!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:64px!important;align-items:center!important}
html body.page-app .page-hero-grid>div:first-child{width:100%!important;max-width:510px!important;margin:0!important}
html body.page-app .page-hero .hero-mini{width:100%!important;max-width:540px!important;margin:0!important;justify-self:end!important}
@media(max-width:1050px){html body.page-app .aom-page-back-wrap,html body.page-app #main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{width:min(760px,calc(100% - 30px))!important}html body.page-app #main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{grid-template-columns:1fr!important;gap:24px!important}html body.page-app .page-hero-grid>div:first-child,html body.page-app .page-hero .hero-mini{max-width:720px!important;justify-self:center!important}}

/* V49.4.3 Guide centered + access focus */
html body.page-app .aom-page-back-wrap{height:56px!important;min-height:56px!important;padding-top:10px!important}
html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first{min-height:0!important;height:auto!important;padding-top:8px!important;padding-bottom:20px!important}
html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{width:min(1000px,calc(100% - 48px))!important;max-width:1000px!important;min-height:250px!important;height:auto!important;margin:0 auto!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:20px!important;text-align:center!important}
html body.page-app main#main .page-hero-grid>div:first-child{width:min(820px,100%)!important;max-width:820px!important;margin:0 auto!important;text-align:center!important}
html body.page-app main#main .page-hero h1{max-width:820px!important;margin:8px auto 10px!important;text-align:center!important}
html body.page-app main#main .page-hero .lead{max-width:720px!important;margin:0 auto!important;text-align:center!important}
html body.page-app main#main .page-hero .hero-mini{width:min(720px,100%)!important;max-width:720px!important;margin:0 auto!important;align-self:center!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
html body.page-app main#main>section.page-hero+section.aom-access-center-section{padding-top:22px!important;margin-top:0!important}
html body.page-app .aom-access-center{margin-top:0!important}
@media(max-width:700px){html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{width:calc(100% - 30px)!important;min-height:0!important;align-items:flex-start!important;text-align:left!important}html body.page-app main#main .page-hero-grid>div:first-child,html body.page-app main#main .page-hero h1,html body.page-app main#main .page-hero .lead{text-align:left!important;margin-left:0!important;margin-right:0!important}html body.page-app main#main .page-hero .hero-mini{width:100%!important;grid-template-columns:1fr!important}}

/* V49.4.6 exact Guide title center */
@media(min-width:1051px){html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{position:relative!important;left:auto!important;transform:none!important;width:1000px!important;max-width:1000px!important;margin-left:calc((100% - 1000px) / 2)!important;margin-right:0!important}}
@media(max-width:1050px){html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{position:relative!important;left:auto!important;transform:none!important;width:calc(100% - 30px)!important;margin-left:15px!important;margin-right:15px!important}}

/* V49.4.7 definitive Guide positioning */
@media(min-width:1051px){html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first{display:flex!important;justify-content:center!important;align-items:center!important}html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{position:relative!important;left:auto!important;transform:none!important;flex:0 0 1000px!important;width:1000px!important;max-width:1000px!important;margin:0!important}}
html body.page-app main#main>section.page-hero+section.aom-access-center-section{position:relative!important;transform:translateY(-70px)!important;margin-bottom:-70px!important;padding-top:0!important}
html body.page-app .guide-steps-after-access>.container{display:flex!important;justify-content:center!important}
html body.page-app .guide-steps-after-access .hero-mini{margin-left:auto!important;margin-right:auto!important}
@media(max-width:1050px){html body.page-app main#main>section.page-hero+section.aom-access-center-section{transform:translateY(-30px)!important;margin-bottom:-30px!important}}

/* V49.5 Guide structural layout */
@media(min-width:1201px){html body.page-app main#main{display:grid!important;grid-template-columns:minmax(360px,420px) minmax(720px,900px)!important;grid-template-rows:auto auto auto!important;column-gap:44px!important;row-gap:24px!important;justify-content:center!important;align-items:start!important}html body.page-app main#main>.aom-page-back-wrap{grid-column:1/-1!important;grid-row:1!important;width:100%!important;max-width:1364px!important;height:58px!important;margin:0 auto!important;padding:12px 0 0!important}html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first{grid-column:1!important;grid-row:2!important;position:relative!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;align-self:center!important;justify-content:flex-start!important}html body.page-app main#main>.aom-page-back-wrap+section.page-hero.section-first>.container.page-hero-grid{position:static!important;left:auto!important;top:auto!important;transform:none!important;width:100%!important;max-width:420px!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important;display:block!important;text-align:left!important}html body.page-app main#main .page-hero-grid>div:first-child,html body.page-app main#main .page-hero h1,html body.page-app main#main .page-hero .lead{width:100%!important;max-width:420px!important;margin-left:0!important;margin-right:0!important;text-align:left!important}html body.page-app main#main>section.aom-access-center-section{grid-column:2!important;grid-row:2!important;position:relative!important;width:100%!important;margin:0!important;padding:0!important;transform:none!important;background:transparent!important;border:0!important}html body.page-app main#main>section.aom-access-center-section>.aom-access-center{width:100%!important;max-width:900px!important;margin:0!important}html body.page-app main#main>.guide-steps-after-access{grid-column:1/-1!important;grid-row:3!important;width:100%!important;margin:0!important;padding:12px 0 50px!important}html body.page-app main#main>.guide-steps-after-access>.container{width:100%!important;max-width:1364px!important;margin:0 auto!important;display:flex!important;justify-content:center!important}html body.page-app main#main>.guide-steps-after-access .hero-mini{width:min(720px,100%)!important;margin:0 auto!important}}
@media(max-width:1200px){html body.page-app main#main{display:block!important}html body.page-app main#main>section.aom-access-center-section{transform:none!important;margin:0!important;padding-top:24px!important}}
