/* Exact-stage presentation: native standalone headers only; no second iframe frame. */
html[data-services-metal-context="standalone"] body.services-circuit-stage :is(.navbar,.mos-public-intro,.embed-title),
html[data-services-metal-context="standalone"] body.services-circuit-stage>.mos-portal-hero,
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup) {
  --sm-corner-w: 64px;
  --sm-corner-h: 30.58px;
  --sm-side-w: 10px;
  position: relative;
  isolation: isolate;
}
/* Native navbar padding is !important; retain its inline gutters, reserve only rail clearance. */
html[data-services-metal-context="standalone"] body.services-circuit-stage .navbar {
  padding-block: 32px !important;
}
html[data-services-metal-context="standalone"] body.services-circuit-stage :is(.mos-public-intro,.embed-title),
html[data-services-metal-context="standalone"] body.services-circuit-stage>.mos-portal-hero,
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup) {
  padding-block: 32px;
}
html[data-services-metal-context="standalone"] body.services-circuit-stage .embed-title {
  padding-inline: 10px;
  box-sizing: border-box;
}
/* Keep native menu popovers and their targets above the decorative rail. */
html[data-services-metal-context="standalone"] body.services-circuit-stage .navbar>.container-fluid {
  position: relative;
  z-index: 1;
}
html[data-services-metal-context="standalone"] body.services-circuit-stage :is(.navbar,.mos-public-intro,.embed-title)::after,
html[data-services-metal-context="standalone"] body.services-circuit-stage>.mos-portal-hero::after,
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup)::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url('/assets/circuit-services/metal-frames/header-top-left.8e6cbb517b6d.webp'),url('/assets/circuit-services/metal-frames/header-top-right.6d8062a57f89.webp'),
    url('/assets/circuit-services/metal-frames/header-bottom-left.a5e1e6ed444c.webp'),url('/assets/circuit-services/metal-frames/header-bottom-right.edd167fe1cbc.webp'),
    url('/assets/circuit-services/metal-frames/header-top.650cecfad2fd.webp'),url('/assets/circuit-services/metal-frames/header-bottom.92d7e30ae8ee.webp'),
    url('/assets/circuit-services/metal-frames/straight-rail-left.33e32b350d08.png'),url('/assets/circuit-services/metal-frames/straight-rail-right.56e356b2a5e7.png');
  background-position: left top,right top,left bottom,right bottom,center top,center bottom,left center,right center;
  background-size:
    var(--sm-corner-w) var(--sm-corner-h),var(--sm-corner-w) var(--sm-corner-h),
    var(--sm-corner-w) var(--sm-corner-h),var(--sm-corner-w) var(--sm-corner-h),
    calc(100% - 2 * var(--sm-corner-w)) var(--sm-corner-h),calc(100% - 2 * var(--sm-corner-w)) var(--sm-corner-h),
    var(--sm-side-w) 2.3px,var(--sm-side-w) 2.3px;
  background-repeat: no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,repeat-y,repeat-y;
}
/* A native rem-sized icon must fit its button at enlarged text sizes, in both contexts. */
@media (max-width: 767px) {
  /* Reserve the measured 78px enlarged toggle plus 16px gap, not 5 root ems. */
  body.services-circuit-stage .navbar .navbar-brand { max-width: calc(100% - 94px); }
  body.services-circuit-stage .navbar .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 46px;
    padding-block: 4px;
    line-height: 1;
  }
}
@media (max-width: 600px) {
  html[data-services-metal-context="standalone"] body.services-circuit-stage :is(.navbar,.mos-public-intro,.embed-title),
  html[data-services-metal-context="standalone"] body.services-circuit-stage>.mos-portal-hero,
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup) {
    --sm-corner-w: 48px;
    --sm-corner-h: 22.93px;
    --sm-side-w: 8px;
  }
  html[data-services-metal-context="standalone"] body.services-circuit-stage .navbar {
    padding-block: 26px !important;
  }
  html[data-services-metal-context="standalone"] body.services-circuit-stage :is(.mos-public-intro,.embed-title),
  html[data-services-metal-context="standalone"] body.services-circuit-stage>.mos-portal-hero,
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup) {
    padding-block: 26px;
  }
}
@media (forced-colors: active) {
  html[data-services-metal-context="standalone"] body.services-circuit-stage :is(.navbar,.mos-public-intro,.embed-title)::after,
  html[data-services-metal-context="standalone"] body.services-circuit-stage>.mos-portal-hero::after,
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup)::after {
    background: none;
    border: 1px solid CanvasText;
  }
}

/* Native reset branding sits above its form; frame that branding, never the form. */
html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup) {
  background: var(--sc-panel);
  color: var(--sc-text);
  padding-block: 32px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  html[data-services-metal-context="standalone"] body.services-circuit-stage.page-password-reset .col-md-6>.d-flex:has(.mos-brand-lockup) { padding-block: 26px; }
}

/* Native language popover must clear following content, in either entry context. */
body.services-circuit-stage .navbar { z-index: 30; }

/* Keep the native #top action in footer flow, never above customer controls. */
body.services-circuit-stage a.position-fixed.btn[href="#top"] {
  position: static !important;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: max-content;
  max-inline-size: calc(100% - 32px);
  min-block-size: 44px;
  margin-block: 16px !important;
  margin-inline: auto 16px !important;
}
