/* =========================================================
   NUVORELIX V5.7 — MOBILE GOLD / BLACK FINAL FIX
   Mobile: black surfaces + gold accents, no blue/purple leftovers.
   ========================================================= */

@media (max-width: 820px){
  html,body{max-width:100%;overflow-x:hidden!important}

  body.cm-nova-ux,
  body.cm-theme-c{
    --c-bg:#000000!important;
    --c-card:#090909!important;
    --c-card-2:#0f0e0b!important;
    --c-line:rgba(212,175,55,.20)!important;
    --c-line-strong:rgba(212,175,55,.34)!important;
    --c-text:#f3eee3!important;
    --c-soft:#a99f90!important;
    --c-primary:#d4af37!important;
    --c-primary-2:#f0cf70!important;
    --c-primary-soft:rgba(212,175,55,.12)!important;
    --nx-bg:#000000!important;
    --nx-bg-soft:#080706!important;
    --nx-surface:#0b0a08!important;
    --nx-ink:#f3eee3!important;
    --nx-muted:#a99f90!important;
    --nx-line:rgba(212,175,55,.20)!important;
    --nx-accent:#d4af37!important;
    --nx-accent-2:#f0cf70!important;
  }

  body.cm-nova-ux{
    padding-bottom:calc(118px + env(safe-area-inset-bottom,0px))!important;
    background:#000!important;
  }

  body.cm-nova-ux main,
  body.cm-nova-ux .container,
  body.cm-nova-ux .cm-page,
  body.cm-nova-ux section,
  body.cm-nova-ux footer,
  body.cm-nova-ux .site-footer,
  body.cm-nova-ux .cm-footer-prelude,
  body.cm-nova-ux .nx-astro-hero,
  body.cm-nova-ux .nx-ecosystem{
    min-width:0!important;
    max-width:100%!important;
  }

  body.cm-nova-ux h1,
  body.cm-nova-ux h2,
  body.cm-nova-ux h3,
  body.cm-nova-ux p,
  body.cm-nova-ux a,
  body.cm-nova-ux span,
  body.cm-nova-ux small,
  body.cm-nova-ux b,
  body.cm-nova-ux strong{
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }

  /* Mobile dock: black + gold only */
  body.cm-nova-ux .cm-mobile-dock{
    left:18px!important;
    right:18px!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    padding:9px!important;
    gap:4px!important;
    border:1px solid rgba(212,175,55,.24)!important;
    border-radius:28px!important;
    background:rgba(5,5,5,.96)!important;
    box-shadow:0 20px 55px rgba(0,0,0,.62),0 0 0 1px rgba(212,175,55,.04) inset!important;
    backdrop-filter:blur(18px)!important;
  }
  body.cm-nova-ux .cm-mobile-dock a,
  body.cm-nova-ux .cm-mobile-dock button{
    min-width:0!important;
    min-height:60px!important;
    color:#d0c7b8!important;
    border-radius:18px!important;
  }
  body.cm-nova-ux .cm-mobile-dock a:hover,
  body.cm-nova-ux .cm-mobile-dock button:hover,
  body.cm-nova-ux .cm-mobile-dock a:focus-visible,
  body.cm-nova-ux .cm-mobile-dock button:focus-visible{
    background:rgba(212,175,55,.10)!important;
    color:#f0cf70!important;
  }
  body.cm-nova-ux .cm-mobile-dock span{
    color:#f0cf70!important;
  }
  body.cm-nova-ux .cm-mobile-dock b{
    color:#b9ae9d!important;
  }
  body.cm-nova-ux .cm-mobile-dock i{
    background:#d4af37!important;
    color:#000!important;
  }

  /* Footer CTA */
  body.cm-nova-ux .cm-footer-prelude,
  body.cm-nova-ux .studio-footer-cta{
    width:calc(100% - 36px)!important;
    margin:44px auto 32px!important;
    padding:30px 24px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:24px!important;
    border:1px solid rgba(212,175,55,.22)!important;
    border-radius:26px!important;
    background:linear-gradient(145deg,#0c0b08,#050505)!important;
    box-shadow:0 18px 48px rgba(0,0,0,.46)!important;
  }
  body.cm-nova-ux .cm-footer-prelude .cm-kicker,
  body.cm-nova-ux .studio-footer-cta .cm-kicker{
    color:#d4af37!important;
  }
  body.cm-nova-ux .cm-footer-prelude h2,
  body.cm-nova-ux .studio-footer-cta h2{
    max-width:100%!important;
    margin:8px 0 14px!important;
    color:#f2eadb!important;
    font-size:clamp(2rem,10vw,3.2rem)!important;
    line-height:1.03!important;
    letter-spacing:-.055em!important;
  }
  body.cm-nova-ux .cm-footer-prelude p,
  body.cm-nova-ux .studio-footer-cta p{
    margin:0!important;
    color:#a99f90!important;
    font-size:1rem!important;
    line-height:1.65!important;
  }
  body.cm-nova-ux .cm-footer-prelude-action,
  body.cm-nova-ux .studio-footer-cta .btn{
    width:100%!important;
    min-height:58px!important;
    padding:0 18px!important;
    justify-content:center!important;
    border-radius:18px!important;
    border:1px solid #d4af37!important;
    background:linear-gradient(135deg,#f0cf70,#c99725)!important;
    color:#0a0804!important;
    box-shadow:0 12px 30px rgba(212,175,55,.16)!important;
  }

  /* Footer: one column; never leaks horizontally */
  body.cm-theme-c .site-footer,
  body.cm-nova-ux .site-footer.cm-footer-mega{
    width:calc(100% - 36px)!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:38px 0 22px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:32px!important;
    border-top:1px solid rgba(212,175,55,.18)!important;
    overflow:hidden!important;
  }
  body.cm-nova-ux .site-footer>div,
  body.cm-nova-ux .cm-footer-brand-col{
    min-width:0!important;
    width:100%!important;
  }
  body.cm-nova-ux .site-footer strong{
    color:#e4c360!important;
    letter-spacing:.12em!important;
  }
  body.cm-nova-ux .site-footer a:not(.brand),
  body.cm-nova-ux .site-footer p,
  body.cm-nova-ux .site-footer small{
    color:#a99f90!important;
    white-space:normal!important;
    max-width:100%!important;
  }
  body.cm-nova-ux .site-footer a:not(.brand):hover{
    color:#f0cf70!important;
  }
  body.cm-nova-ux .nx-footer-logo-link{
    width:min(100%,360px)!important;
    max-width:100%!important;
    background:transparent!important;
  }
  body.cm-nova-ux .nx-footer-logo-link img,
  body.cm-nova-ux .nx-brand-logo{
    width:100%!important;
    max-width:360px!important;
    height:auto!important;
    display:block!important;
    background:transparent!important;
    box-shadow:none!important;
    filter:none!important;
  }
  body.cm-nova-ux .footer-bottom,
  body.cm-theme-c .footer-bottom{
    width:calc(100% - 36px)!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:18px 0 calc(126px + env(safe-area-inset-bottom,0px))!important;
    display:grid!important;
    gap:8px!important;
    color:#7f766a!important;
  }

  /* Astro: prevent overflow and separate label / description */
  body.cm-nova-ux .nx-astro-hero{
    width:calc(100% - 36px)!important;
    margin:0 auto!important;
    padding:42px 0 22px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:26px!important;
    overflow:hidden!important;
  }
  body.cm-nova-ux .nx-astro-hero>div,
  body.cm-nova-ux .nx-astro-hero>aside{
    min-width:0!important;
    width:100%!important;
  }
  body.cm-nova-ux .nx-astro-hero .cm-kicker,
  body.cm-nova-ux .nx-hero-panel .cm-kicker,
  body.cm-nova-ux .nx-section-heading .cm-kicker{
    color:#d4af37!important;
  }
  body.cm-nova-ux .nx-astro-hero h1{
    max-width:100%!important;
    margin:12px 0 18px!important;
    color:#f3eee3!important;
    font-size:clamp(3rem,14vw,4.8rem)!important;
    line-height:.92!important;
    letter-spacing:-.065em!important;
    overflow-wrap:anywhere!important;
  }
  body.cm-nova-ux .nx-astro-hero h1 em{
    display:block!important;
    margin-top:6px!important;
    color:#d4af37!important;
  }
  body.cm-nova-ux .nx-astro-hero p{
    max-width:100%!important;
    color:#a99f90!important;
    font-size:1rem!important;
    line-height:1.72!important;
  }
  body.cm-nova-ux .nx-home-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.cm-nova-ux .nx-home-actions a{
    width:100%!important;
    min-width:0!important;
    min-height:54px!important;
    padding:12px 16px!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
    border-color:rgba(212,175,55,.24)!important;
    color:#eee5d6!important;
    background:#080706!important;
  }
  body.cm-nova-ux .nx-home-actions .primary{
    background:linear-gradient(135deg,#f0cf70,#c99725)!important;
    color:#090704!important;
    border-color:#d4af37!important;
  }
  body.cm-nova-ux .nx-hero-panel{
    width:100%!important;
    padding:22px!important;
    border-radius:24px!important;
    border:1px solid rgba(212,175,55,.22)!important;
    background:linear-gradient(145deg,#0b0a08,#050505)!important;
  }
  body.cm-nova-ux .nx-service-list{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.cm-nova-ux .nx-service-list div{
    min-width:0!important;
    padding:18px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    border:1px solid rgba(212,175,55,.18)!important;
    border-radius:18px!important;
    background:#080706!important;
  }
  body.cm-nova-ux .nx-service-list b{
    display:block!important;
    color:#f0cf70!important;
    font-size:1rem!important;
  }
  body.cm-nova-ux .nx-service-list small{
    display:block!important;
    color:#a99f90!important;
    font-size:.93rem!important;
    line-height:1.55!important;
  }

  body.cm-nova-ux .nx-ecosystem{
    width:calc(100% - 36px)!important;
    margin:52px auto!important;
    overflow:hidden!important;
  }
  body.cm-nova-ux .nx-section-heading{
    min-width:0!important;
  }
  body.cm-nova-ux .nx-section-heading h2{
    color:#f3eee3!important;
    font-size:clamp(2rem,10vw,3.4rem)!important;
    line-height:1.02!important;
  }
  body.cm-nova-ux .nx-ecosystem-grid,
  body.cm-nova-ux .nx-ecosystem-grid-four{
    grid-template-columns:1fr!important;
  }
  body.cm-nova-ux .nx-eco-card{
    min-width:0!important;
    min-height:280px!important;
    background:#080706!important;
    border-color:rgba(212,175,55,.18)!important;
  }
  body.cm-nova-ux .nx-eco-card small,
  body.cm-nova-ux .nx-eco-card b{
    color:#d4af37!important;
  }
  body.cm-nova-ux .nx-eco-card h3{
    color:#f3eee3!important;
    margin-top:54px!important;
    font-size:clamp(2rem,10vw,3rem)!important;
  }
  body.cm-nova-ux .nx-eco-card p{
    color:#a99f90!important;
  }

  /* Help: black/gold, not blue */
  body.cm-nova-ux .studio-page-hero,
  body.cm-nova-ux .studio-help-grid{
    min-width:0!important;
    max-width:100%!important;
  }
  body.cm-nova-ux .studio-page-hero .cm-kicker,
  body.cm-nova-ux .studio-info-card .cm-kicker,
  body.cm-nova-ux .studio-steps b{
    color:#d4af37!important;
  }
  body.cm-nova-ux .studio-info-card{
    min-width:0!important;
    padding:22px!important;
    border:1px solid rgba(212,175,55,.18)!important;
    border-radius:22px!important;
    background:#090909!important;
  }
  body.cm-nova-ux .studio-info-card h2,
  body.cm-nova-ux .studio-info-card h3,
  body.cm-nova-ux .studio-info-card summary{
    color:#f3eee3!important;
  }
  body.cm-nova-ux .studio-info-card p,
  body.cm-nova-ux .studio-policy,
  body.cm-nova-ux .studio-steps p{
    color:#a99f90!important;
  }
  body.cm-nova-ux .studio-steps{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  body.cm-nova-ux .studio-steps article{
    min-width:0!important;
    padding:14px 0!important;
    border-bottom:1px solid rgba(212,175,55,.11)!important;
  }
  body.cm-nova-ux .studio-steps article:last-child{
    border-bottom:0!important;
  }

  /* Remove purple/cyan from common mobile accents */
  body.cm-nova-ux .cm-kicker,
  body.cm-nova-ux .eyebrow,
  body.cm-nova-ux .cm-section-kicker,
  body.cm-nova-ux .cm-product-labels span,
  body.cm-nova-ux .cm-product-meta strong,
  body.cm-nova-ux .cm-preview-tabs button.active,
  body.cm-nova-ux .cm-demo-plan-chip.active,
  body.cm-nova-ux .cm-function-card-v21.active,
  body.cm-nova-ux .cm-breadcrumb b{
    color:#d4af37!important;
    border-color:rgba(212,175,55,.22)!important;
  }
}
