/* AOM Traders V58.12 — Public App Cleanup + Flow Guard */

/* ---------------------------------------------------------
   GLOBAL FLOW GUARD
   Keep public content in normal document flow and prevent
   the footer from visually covering the final section.
   --------------------------------------------------------- */
html,
body{
  min-height:100%;
}

body{
  min-height:100dvh;
  overflow-x:hidden;
}

body main#main{
  position:relative !important;
  width:100%;
  min-height:0 !important;
  overflow:visible !important;
  padding-bottom:clamp(42px,5vw,78px) !important;
}

body footer,
body .footer,
body .site-footer{
  position:relative !important;
  inset:auto !important;
  transform:none !important;
  clear:both !important;
  flex-shrink:0 !important;
}

/* Partner / Free EA page:
   never constrain the registration cards to a viewport height. */
#main > .partner-page{
  position:relative !important;
  min-height:0 !important;
  height:auto !important;
  overflow:visible !important;
}

.partner-page .partner-main-section,
.partner-page .partner-ecosystem,
.partner-page .partner-main-grid,
.partner-page .partner-program-card,
.partner-page .partner-application-card{
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}

.partner-page .partner-main-grid{
  align-items:start !important;
}

.partner-page .partner-ecosystem{
  padding-bottom:clamp(68px,6vw,108px) !important;
}

/* ---------------------------------------------------------
   /app is now the public Guide page.
   Neutralize historical App-specific desktop grid/negative
   offsets left by V49 layout CSS.
   --------------------------------------------------------- */
html body.page-app main#main{
  display:block !important;
  grid-template-columns:none !important;
  grid-template-rows:none !important;
  width:100% !important;
  max-width:none !important;
  min-height:0 !important;
  margin:0 !important;
  overflow:visible !important;
}

html body.page-app main#main > .aom-page-back-wrap{
  width:min(1760px,calc(100% - 64px)) !important;
  max-width:1760px !important;
  height:auto !important;
  margin:0 auto !important;
  padding:24px 0 0 !important;
}

html body.page-app main#main > .aom-guide-page{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  transform:none !important;
  overflow:visible !important;
}

.aom-guide-page .aom-guide-hero{
  min-height:0 !important;
  padding:34px 0 54px !important;
}

.aom-guide-page .aom-guide-hero .page-hero-grid{
  min-height:0 !important;
  align-items:center !important;
}

.aom-guide-section{
  position:relative;
  overflow:visible !important;
}

.aom-guide-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.aom-guide-steps article,
.aom-guide-panel{
  border:1px solid rgba(39,215,242,.14);
  background:#081924;
  border-radius:20px;
  padding:24px;
  min-height:0;
}

.aom-guide-steps article > span{
  display:flex;
  width:44px;
  height:44px;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  border:1px solid rgba(39,215,242,.18);
  color:#35d7f3;
  font-size:11px;
  font-weight:900;
  margin-bottom:18px;
}

.aom-guide-steps h3,
.aom-guide-panel h2{
  margin-top:0;
}

.aom-guide-steps p,
.aom-guide-panel p,
.aom-guide-codes span{
  color:#8fa8b7;
  line-height:1.7;
}

.aom-guide-two{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  align-items:stretch;
}

.aom-guide-panel{
  display:flex;
  flex-direction:column;
}

.aom-guide-panel .btn{
  margin-top:auto;
  align-self:flex-start;
}

.aom-guide-codes{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.aom-guide-codes > div{
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  padding:13px 14px;
  background:rgba(3,14,22,.45);
}

.aom-guide-codes b,
.aom-guide-codes span{
  display:block;
}

.aom-guide-codes b{
  font-size:11px;
  word-break:break-word;
}

.aom-guide-codes span{
  margin-top:4px;
  font-size:11px;
}

/* Give every major public page a safe final breathing room. */
#main > .section:last-child,
#main > .page-hero:last-child,
#main > .hero:last-child,
#main > .legal-hero:last-child,
#main > .product-detail-hero:last-child,
#main > .v43-calendar-root:last-child,
#main > .aom-guide-page:last-child{
  margin-bottom:0 !important;
}

@media (max-width:900px){
  body main#main{
    padding-bottom:52px !important;
  }

  html body.page-app main#main > .aom-page-back-wrap{
    width:calc(100% - 30px) !important;
    padding-top:18px !important;
  }

  .aom-guide-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .aom-guide-two{
    grid-template-columns:1fr;
  }

  .partner-page .partner-ecosystem{
    padding-bottom:76px !important;
  }
}

@media (max-width:620px){
  html body.page-app main#main > .aom-page-back-wrap{
    width:calc(100% - 28px) !important;
  }

  .aom-guide-page .aom-guide-hero{
    padding:22px 0 36px !important;
  }

  .aom-guide-steps{
    grid-template-columns:1fr;
  }

  .aom-guide-steps article,
  .aom-guide-panel{
    padding:20px;
  }

  .partner-page .partner-main-section,
  .partner-page .partner-ecosystem{
    padding-bottom:64px !important;
  }
}


/* V58.12.1_HOME_DIRECT_VISUAL */
.simple-direct-visual{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
}

.simple-direct-shell{
  width:min(100%,620px);
  border:1px solid rgba(39,215,242,.16);
  border-radius:24px;
  padding:28px;
  background:
    radial-gradient(circle at 85% 15%,rgba(39,215,242,.08),transparent 34%),
    linear-gradient(155deg,#081924,#06131d);
  box-shadow:0 34px 90px rgba(0,0,0,.34);
}

.simple-direct-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.simple-direct-shell h2{
  max-width:520px;
  margin:18px 0 24px;
  font-size:clamp(28px,3vw,44px);
  line-height:1.05;
}

.simple-direct-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.simple-direct-grid>div{
  min-height:92px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:15px;
  padding:15px;
  background:rgba(3,14,22,.52);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.simple-direct-grid span{
  color:#6f8797;
  font-size:9px;
  font-weight:800;
  letter-spacing:.09em;
}

.simple-direct-grid b{
  margin-top:7px;
  font-size:13px;
}

.simple-direct-foot{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.07);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  color:#8198a7;
  font-size:11px;
}

.simple-direct-foot a{
  color:#7eeaff;
  font-weight:800;
}

@media(max-width:900px){
  .simple-direct-visual{
    margin-top:8px;
  }

  .simple-direct-shell{
    width:100%;
  }
}

@media(max-width:620px){
  .simple-direct-shell{
    padding:20px;
    border-radius:18px;
  }

  .simple-direct-grid{
    grid-template-columns:1fr;
  }

  .simple-direct-foot{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* V58.12.3_HOME_LAYOUT_PRESERVE
   Keep the proven V49 hero geometry. Only the contents inside the
   existing .simple-app-visual box are replaced. */
.simple-app-visual.simple-direct-home-visual{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(18px,2.4vw,32px);
  box-sizing:border-box;
}

.simple-app-visual.simple-direct-home-visual::after{
  pointer-events:none;
}

.simple-direct-home-card{
  position:relative;
  z-index:2;
  width:min(100%,560px);
  border:1px solid rgba(39,215,242,.18);
  border-radius:20px;
  padding:clamp(20px,2vw,28px);
  background:rgba(5,18,28,.88);
  box-shadow:0 24px 70px rgba(0,0,0,.28);
  backdrop-filter:blur(10px);
}

.simple-direct-home-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.simple-direct-home-card h2{
  font-size:clamp(26px,2.6vw,38px);
  line-height:1.08;
  margin:18px 0 22px;
  max-width:480px;
}

.simple-direct-home-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.simple-direct-home-grid>div{
  min-height:82px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  background:rgba(3,13,21,.55);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.simple-direct-home-grid span{
  color:#718999;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}

.simple-direct-home-grid b{
  margin-top:6px;
  font-size:12px;
}

.simple-direct-home-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:17px;
  padding-top:15px;
  border-top:1px solid rgba(255,255,255,.07);
  color:#8198a7;
  font-size:10px;
}

.simple-direct-home-foot a{
  color:#78e8fb;
  font-weight:800;
  white-space:nowrap;
}

/* Keep hero typography inside the same V49 footprint. */
.simple-hero-grid h1{
  font-size:clamp(44px,4.6vw,68px);
}

@media(max-width:900px){
  .simple-app-visual.simple-direct-home-visual{
    padding:22px;
  }
}

@media(max-width:620px){
  .simple-direct-home-grid{
    grid-template-columns:1fr;
  }

  .simple-direct-home-foot{
    align-items:flex-start;
    flex-direction:column;
  }

  .simple-direct-home-foot a{
    white-space:normal;
  }
}


/* V58.12.4_HOME_VISUAL_ISOLATION
   Isolate the new Direct EA card from every legacy AOM App visual rule. */
.simple-app-visual.simple-direct-home-visual{
  position:relative !important;
  overflow:hidden !important;
  min-height:440px !important;
  background:
    radial-gradient(circle at 82% 18%,rgba(39,215,242,.09),transparent 30%),
    linear-gradient(145deg,#081924,#06131d) !important;
  background-image:
    radial-gradient(circle at 82% 18%,rgba(39,215,242,.09),transparent 30%),
    linear-gradient(145deg,#081924,#06131d) !important;
  border:1px solid rgba(39,215,242,.16) !important;
  box-shadow:0 28px 80px rgba(0,0,0,.30) !important;
}

.simple-app-visual.simple-direct-home-visual::before,
.simple-app-visual.simple-direct-home-visual::after{
  content:none !important;
  display:none !important;
  background:none !important;
  background-image:none !important;
  opacity:0 !important;
}

.simple-app-visual.simple-direct-home-visual > img,
.simple-app-visual.simple-direct-home-visual img[src*="aom-app-hero"],
.simple-app-visual.simple-direct-home-visual img[src*="app-hero"]{
  display:none !important;
  visibility:hidden !important;
}

.simple-app-visual.simple-direct-home-visual .simple-direct-home-card{
  position:relative !important;
  z-index:5 !important;
  width:min(100%,540px) !important;
  margin:auto !important;
  background:linear-gradient(155deg,rgba(7,24,36,.98),rgba(5,17,27,.98)) !important;
  border:1px solid rgba(39,215,242,.18) !important;
  border-radius:18px !important;
  box-shadow:0 22px 65px rgba(0,0,0,.30) !important;
  backdrop-filter:none !important;
}

.simple-app-visual.simple-direct-home-visual .simple-direct-home-card h2{
  color:#f4fbff !important;
  max-width:430px !important;
  font-size:clamp(27px,2.3vw,36px) !important;
  line-height:1.08 !important;
}

.simple-app-visual.simple-direct-home-visual .simple-direct-home-grid > div{
  background:#071722 !important;
  border-color:rgba(255,255,255,.08) !important;
}

.simple-app-visual.simple-direct-home-visual .simple-direct-home-grid span{
  color:#6f8a9b !important;
}

.simple-app-visual.simple-direct-home-visual .simple-direct-home-grid b{
  color:#f2f8fb !important;
}

@media(max-width:900px){
  .simple-app-visual.simple-direct-home-visual{
    min-height:390px !important;
  }
}

@media(max-width:620px){
  .simple-app-visual.simple-direct-home-visual{
    min-height:0 !important;
    padding:18px !important;
  }
}
