/* Mitsiry Fluid Consistency v22
   Cross-page consistency layer after full content/layout audit.
   Loaded last on every public page. */

/* ---- shared shell ---- */
body.ms-orbital-theme .ms-global-header{
  grid-template-columns:minmax(190px,220px) minmax(0,1fr) minmax(190px,220px)!important;
}
body.ms-orbital-theme .ms-global-links{
  width:max-content;
  max-width:100%;
}
body.ms-orbital-theme .ms-global-links a{
  min-height:44px;
  font-size:13px!important;
  line-height:1.2!important;
}
body.ms-orbital-theme .ms-global-actions{
  min-width:0;
}
body.ms-orbital-theme .ms-global-cta{
  min-height:44px!important;
  padding-inline:18px!important;
  font-size:12px!important;
}
body.ms-orbital-theme .ms-global-language{
  min-height:44px!important;
}
body.ms-orbital-theme .ms-global-toggle{
  min-width:44px;
  min-height:44px;
}

/* ---- section and heading rhythm ---- */
body.ms-orbital-theme .msx-wrap{
  width:min(1300px,calc(100% - clamp(36px,6vw,96px)))!important;
}
body.ms-orbital-theme .msx-intro{
  grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr)!important;
  align-items:end!important;
}
body.ms-orbital-theme .msx-intro h2{
  max-width:15ch;
}
body.ms-orbital-theme .msx-intro>p,
body.ms-orbital-theme .msx-intro .msx-lede{
  max-width:58ch;
  justify-self:end;
}

/* ---- one numbering language for every visual card ---- */
body.ms-orbital-theme .msx-section .msx-grid{
  counter-reset:cr;
}
body.ms-orbital-theme .msx-section .msx-grid>.msx-card{
  counter-increment:cr;
}
body.ms-orbital-theme .msx-section .msx-grid>.msx-card::before{
  content:counter(cr,decimal-leading-zero)!important;
  position:absolute!important;
  z-index:8!important;
  top:16px!important;
  bottom:auto!important;
  left:16px!important;
  right:auto!important;
  width:46px!important;
  height:46px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(255,255,255,.84)!important;
  border-radius:50%!important;
  background:linear-gradient(180deg,rgba(255,247,219,.98),rgba(238,211,143,.97))!important;
  color:#765218!important;
  -webkit-text-fill-color:#765218!important;
  font:820 13px/1 Manrope,system-ui,sans-serif!important;
  letter-spacing:0!important;
  box-shadow:0 8px 22px rgba(27,45,31,.17),inset 0 1px 0 rgba(255,255,255,.9)!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  pointer-events:none;
}
body.ms-orbital-theme .msx-section .msx-card--split .msx-card-kicker{
  display:none!important;
}
@media(min-width:901px){
  body.ms-orbital-theme .msx-section .msx-grid>.msx-card--split:nth-child(5)::before{
    left:calc(48% + 16px)!important;
  }
}

/* ---- card geometry ---- */
body.ms-orbital-theme .msx-section .msx-card{
  border-radius:28px!important;
}
body.ms-orbital-theme .msx-section .msx-card-media{
  border-radius:27px 27px 0 0!important;
}
body.ms-orbital-theme .msx-section .msx-card:not(.msx-card--overlay):not(.msx-card--split) .msx-card-body{
  margin-top:-20px!important;
  padding:40px 26px 27px!important;
  border-radius:36px 36px 0 0/22px 22px 0 0!important;
}
body.ms-orbital-theme .msx-section .msx-card--overlay,
body.ms-orbital-theme .msx-section .msx-card--overlay .msx-card-body{
  min-height:500px!important;
}
body.ms-orbital-theme .msx-section .msx-card--overlay .msx-card-body{
  padding:30px 28px 28px!important;
}
body.ms-orbital-theme .msx-section .msx-card--split{
  min-height:330px!important;
}
body.ms-orbital-theme .msx-section .msx-card--split .msx-card-link{
  min-height:330px!important;
}
body.ms-orbital-theme .msx-section .msx-card--split .msx-card-body{
  padding:30px!important;
}
body.ms-orbital-theme .msx-section .msx-card h3{
  text-wrap:balance;
}
body.ms-orbital-theme .msx-section .msx-card p{
  text-wrap:pretty;
}

/* ---- process cards: same number badge and clean image seam ---- */
body.ms-orbital-theme .msx-section .msx-process{
  align-items:stretch!important;
  gap:clamp(16px,1.7vw,22px)!important;
}
body.ms-orbital-theme .msx-section .msx-process-card{
  display:flex;
  flex-direction:column;
  height:100%;
  border-radius:27px!important;
}
body.ms-orbital-theme .msx-section .msx-process-picture{
  flex:0 0 auto;
  height:clamp(190px,15vw,215px)!important;
  border-radius:26px 26px 0 0!important;
}
body.ms-orbital-theme .msx-section .msx-process-number{
  top:16px!important;
  bottom:auto!important;
  left:16px!important;
  width:46px!important;
  height:46px!important;
  border:1px solid rgba(255,255,255,.84)!important;
  border-radius:50%!important;
  background:linear-gradient(180deg,rgba(255,247,219,.98),rgba(238,211,143,.97))!important;
  color:#765218!important;
  -webkit-text-fill-color:#765218!important;
  font:820 13px/1 Manrope,system-ui,sans-serif!important;
  box-shadow:0 8px 22px rgba(27,45,31,.17),inset 0 1px 0 rgba(255,255,255,.9)!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
body.ms-orbital-theme .msx-section .msx-process-body{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  padding:24px 22px 25px!important;
}
body.ms-orbital-theme .msx-section .msx-process-body h3{
  margin-bottom:9px!important;
}
body.ms-orbital-theme .msx-section .msx-process-body p{
  margin-bottom:0!important;
}

/* ---- actions and readable labels ---- */
body.ms-orbital-theme .msx-section .msx-card-action,
body.ms-orbital-theme .msx-section .msx-plain-link,
body.ms-orbital-theme .msx-button{
  min-height:46px!important;
}
body.ms-orbital-theme .msx-section .msx-card-action{
  padding:11px 17px!important;
  font-size:13px!important;
}
body.ms-orbital-theme .msx-section .msx-card--overlay .msx-card-action{
  background:linear-gradient(180deg,#f1d58e,#e4c46f)!important;
  color:#17382c!important;
  -webkit-text-fill-color:#17382c!important;
  border-color:rgba(255,247,218,.64)!important;
}

/* ---- FAQ and footer touch/visual alignment ---- */
body.ms-orbital-theme .msx-qa details{
  overflow:hidden;
}
body.ms-orbital-theme .msx-qa summary{
  min-height:48px!important;
  padding:10px 16px!important;
}
body.ms-orbital-theme .msx-qa details p{
  margin:0!important;
  padding:0 16px 16px!important;
}
body.ms-orbital-theme .editorial-footer .editorial-shell{
  align-items:center!important;
  gap:20px!important;
}
body.ms-orbital-theme .editorial-footer nav{
  align-items:center!important;
  row-gap:6px!important;
}
body.ms-orbital-theme .editorial-footer nav a{
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center!important;
}

/* ---- topic orbit text remains readable while retaining page-specific motion ---- */
body.ms-orbital-theme .ms-constellation[data-scene] .ms-satellite-translation{
  min-height:32px!important;
  font-size:11px!important;
  line-height:1.05!important;
}
body.ms-orbital-theme .ms-constellation[data-scene] .ms-constellation-caption{
  font-size:10.5px!important;
}

/* ---- language states ---- */
html[lang="en"] body.ms-orbital-theme .ms-global-links{
  gap:clamp(7px,1.05vw,16px);
}
html[lang="en"] body.ms-orbital-theme .msx-card h3,
html[lang="en"] body.ms-orbital-theme .msx-process-body h3,
html[lang="en"] body.ms-orbital-theme .msx-contact-band h2{
  text-wrap:balance;
}

/* ---- projector / wide desktop ---- */
@media(min-width:1800px){
  body.ms-orbital-theme .ms-global-header{
    width:min(1420px,calc(100% - 64px))!important;
  }
  body.ms-orbital-theme .msx-wrap{
    width:min(1360px,calc(100% - 120px))!important;
  }
  body.ms-orbital-theme .ms-unified-hero-grid{
    max-width:1360px!important;
  }
}

/* ---- laptop / tablet ---- */
@media(max-width:1150px){
  body.ms-orbital-theme .msx-intro{
    grid-template-columns:minmax(0,1fr) minmax(280px,.82fr)!important;
  }
}
@media(max-width:1100px){
  body.ms-orbital-theme .ms-global-header{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  body.ms-orbital-theme .ms-global-links{
    width:auto;
    max-width:none;
  }
  body.ms-orbital-theme .ms-global-links.is-open{
    max-height:calc(100svh - var(--mu-header-h) - 38px);
    overflow:auto;
  }
}
@media(max-width:850px){
  body.ms-orbital-theme .msx-intro{
    grid-template-columns:1fr!important;
    align-items:start!important;
  }
  body.ms-orbital-theme .msx-intro>p,
  body.ms-orbital-theme .msx-intro .msx-lede{
    justify-self:start;
    max-width:62ch;
  }
}

/* ---- mobile ---- */
@media(max-width:620px){
  body.ms-orbital-theme .msx-wrap{
    width:calc(100% - 32px)!important;
  }
  body.ms-orbital-theme .msx-section{
    padding-block:60px!important;
  }
  body.ms-orbital-theme .msx-section .msx-grid{
    gap:16px!important;
  }
  body.ms-orbital-theme .msx-section .msx-grid>.msx-card::before,
  body.ms-orbital-theme .msx-section .msx-process-number{
    top:14px!important;
    left:14px!important;
    width:42px!important;
    height:42px!important;
    font-size:12px!important;
  }
  body.ms-orbital-theme .msx-section .msx-card:not(.msx-card--overlay):not(.msx-card--split) .msx-card-body{
    margin-top:-18px!important;
    padding:36px 21px 23px!important;
  }
  body.ms-orbital-theme .msx-section .msx-card--overlay,
  body.ms-orbital-theme .msx-section .msx-card--overlay .msx-card-body{
    min-height:440px!important;
  }
  body.ms-orbital-theme .msx-section .msx-card--split::before{
    left:14px!important;
  }
  body.ms-orbital-theme .msx-section .msx-card--split .msx-card-body{
    padding:25px 22px!important;
  }
  body.ms-orbital-theme .msx-section .msx-process-picture{
    height:190px!important;
  }
  body.ms-orbital-theme .msx-section .msx-process-body{
    padding:22px 20px 23px!important;
  }
  body.ms-orbital-theme .msx-qa summary{
    min-height:48px!important;
    padding:10px 14px!important;
  }
  body.ms-orbital-theme .msx-qa details p{
    padding:0 14px 15px!important;
  }
  body.ms-orbital-theme .ms-constellation[data-scene] .ms-satellite-translation{
    min-height:29px!important;
    font-size:10px!important;
    padding:5px 8px!important;
  }
  body.ms-orbital-theme .ms-constellation[data-scene] .ms-constellation-caption{
    font-size:9.5px!important;
  }
}

/* ---- very small phones ---- */
@media(max-width:360px){
  body.ms-orbital-theme .ms-global-brand strong{font-size:17px!important}
  body.ms-orbital-theme .ms-global-language{font-size:10px!important;gap:4px!important}
  body.ms-orbital-theme .msx-wrap{width:calc(100% - 24px)!important}
  body.ms-orbital-theme .msx-section .msx-card-action{font-size:12px!important}
}

/* ---- motion policy ---- */
@media(hover:hover) and (pointer:fine){
  body.ms-orbital-theme .msx-section .msx-card:hover,
  body.ms-orbital-theme .msx-section .msx-process-card:hover{
    transform:translateY(-3px)!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.ms-orbital-theme .msx-section .msx-card,
  body.ms-orbital-theme .msx-section .msx-process-card,
  body.ms-orbital-theme .msx-section .msx-card-media img,
  body.ms-orbital-theme .msx-section .msx-process-picture img{
    transition:none!important;
    animation:none!important;
  }
}

/* v22 audit refinement: minimum orbit label size at tablet/desktop. */
body.ms-orbital-theme #top .ms-home-orbit-copy small{
  font-size:10.5px!important;
  line-height:1.2!important;
}

/* v22 final badge normalization: beat legacy variant-specific seam rules. */
body.ms-orbital-theme .msx-section .msx-grid>.msx-card:not(.msx-card--overlay):not(.msx-card--split)::before,
body.ms-orbital-theme .msx-section .msx-grid>.msx-card.msx-card--overlay::before,
body.ms-orbital-theme .msx-section .msx-grid>.msx-card.msx-card--split::before{
  top:16px!important;
  bottom:auto!important;
  left:16px!important;
  right:auto!important;
  width:46px!important;
  height:46px!important;
  border:1px solid rgba(255,255,255,.84)!important;
  background:linear-gradient(180deg,rgba(255,247,219,.98),rgba(238,211,143,.97))!important;
  color:#765218!important;
  -webkit-text-fill-color:#765218!important;
  font:820 13px/1 Manrope,system-ui,sans-serif!important;
  box-shadow:0 8px 22px rgba(27,45,31,.17),inset 0 1px 0 rgba(255,255,255,.9)!important;
}
@media(min-width:901px){
  body.ms-orbital-theme .msx-section .msx-grid>.msx-card.msx-card--split:nth-child(5)::before{
    left:calc(48% + 16px)!important;
  }
}
@media(max-width:620px){
  body.ms-orbital-theme .msx-section .msx-grid>.msx-card:not(.msx-card--overlay):not(.msx-card--split)::before,
  body.ms-orbital-theme .msx-section .msx-grid>.msx-card.msx-card--overlay::before,
  body.ms-orbital-theme .msx-section .msx-grid>.msx-card.msx-card--split::before{
    top:14px!important;
    left:14px!important;
    width:42px!important;
    height:42px!important;
    font-size:12px!important;
  }
}
