/* IRONScale v173 — global UI stabilization + hard-centered brand.
   Restores the original header scale while keeping the v171 footer/counter isolation. */
*{box-sizing:border-box}
.topbar{width:100%;box-sizing:border-box}

/* Desktop: original IRONScale pill-nav proportions (v130-era 14px labels). */
@media(min-width:1360px){
  .topbar{
    grid-template-columns:minmax(640px,1.2fr) 300px minmax(255px,.8fr)!important;
    padding-left:22px!important;padding-right:22px!important;column-gap:14px!important
  }
  .topbar .main-nav{
    justify-self:start!important;max-width:100%!important;min-width:0!important;
    gap:2px!important;padding:6px 7px!important;margin-left:12px!important;
    overflow:visible!important
  }
  .topbar .main-nav a{
    font-size:14px!important;min-height:34px!important;padding:0 12px!important;
    flex:0 0 auto!important;line-height:1!important
  }
  .topbar .main-nav a span{margin-right:7px!important}
  .topbar .brand{width:300px!important;justify-self:center!important}
  .topbar .brand img{width:100%!important;height:145px!important;object-fit:contain!important}
  .topbar .top-actions{justify-self:end!important;min-width:0!important;gap:9px!important}
  .topbar .mini-search{width:225px!important;max-width:225px!important}
}
/* Mid-size desktops: keep all six links readable without reverting to the tiny v171 text. */
@media(min-width:760px) and (max-width:1359px){
  .topbar .main-nav{
    max-width:100%!important;min-width:0!important;gap:2px!important;
    padding:6px 6px!important;margin-left:4px!important;
    overflow-x:auto!important;scrollbar-width:none
  }
  .topbar .main-nav::-webkit-scrollbar{display:none}
  .topbar .main-nav a{font-size:12.75px!important;padding:0 10px!important;min-height:34px!important;flex:0 0 auto!important}
}

/* One footer structure everywhere. Counter is only allowed in its own slot. */
.footer-top-rail{width:100%!important;margin-left:0!important;margin-right:0!important}
footer.site-footer-v171{
  width:100%!important;margin:0!important;padding:18px 28px!important;
  display:grid!important;grid-template-columns:160px minmax(0,1fr) auto!important;
  align-items:center!important;gap:24px!important;background:#080a08!important;
  color:#e7dfca!important;min-height:78px!important;position:relative!important;
  inset:auto!important;overflow:visible!important
}
.site-footer-v171 .footer-brand{min-width:140px;color:#f0e8d1!important}
.site-footer-v171 nav{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:0!important;flex-wrap:wrap!important;min-width:0!important}
.site-footer-v171 nav a{color:#d8cfb9!important;text-decoration:none!important;font-size:12px!important;line-height:1.3!important;padding:7px 16px!important;white-space:nowrap!important;position:relative!important}
.site-footer-v171 nav a:not(:last-child)::after{content:""!important;position:absolute!important;right:0!important;top:50%!important;width:1px!important;height:20px!important;transform:translateY(-50%)!important;background:rgba(207,176,93,.42)!important;opacity:1!important}
.site-footer-v171 nav a:hover{color:#f0cc68!important}
.footer-counter-slot-v171{justify-self:end!important;display:flex!important;align-items:center!important;min-width:0!important}
.site-footer-v171 .visitor-counter-v165{margin:0!important;white-space:nowrap!important;color:#a9a08b!important}
body.light .site-footer-v171,body.light footer.site-footer-v171{background:#080a08!important;color:#e7dfca!important}
body.light .site-footer-v171 nav a,body.light .site-footer-v171 .footer-brand{color:#e7dfca!important}
@media(max-width:980px){
  footer.site-footer-v171{grid-template-columns:auto 1fr!important}
  .footer-counter-slot-v171{grid-column:1/-1!important;justify-self:start!important}
  .site-footer-v171 nav a{padding:6px 11px!important}
}
@media(max-width:680px){
  footer.site-footer-v171{grid-template-columns:1fr!important;gap:10px!important;padding:18px 18px 20px!important}
  .footer-counter-slot-v171{grid-column:auto!important}
  .site-footer-v171 nav{gap:2px 0!important}
  .site-footer-v171 nav a{padding:6px 10px!important}
  .site-footer-v171 nav a:not(:last-child)::after{display:none!important}
}


/* v173: brand must stay geometrically centered in the viewport/header even when
   the left navigation and right search/action groups have different widths. */
@media(min-width:981px){
  .topbar{position:relative!important}
  .topbar .main-nav{grid-column:1!important}
  .topbar .top-actions{grid-column:3!important}
  .topbar .brand{
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    margin:0!important;
    justify-self:auto!important;
    z-index:35!important
  }
  .topbar .brand img{display:block!important;margin:0 auto!important}
}
@media(max-width:980px){
  .topbar .brand{position:static!important;left:auto!important;top:auto!important;transform:none!important}
}


/* v174 — sticky footer across short pages.
   Keeps the footer rail + footer pinned to the viewport bottom when page content is short,
   while preserving normal document flow on long pages. */
html{min-height:100%!important}
body{
  min-height:100vh!important;
  display:flex!important;
  flex-direction:column!important;
}
body>.footer-top-rail{margin-top:auto!important;flex:0 0 auto!important}
body>footer.site-footer-v171{flex:0 0 auto!important}
body>main,body>.advisor-layout-v172{flex:0 0 auto!important}


/* v175 — footer stays at the real bottom on short pages. */
html{min-height:100%!important}
body{min-height:100vh!important;display:flex!important;flex-direction:column!important}
body>.footer-top-rail{margin-top:auto!important;flex:0 0 auto!important}
body>footer.site-footer-v171{flex:0 0 auto!important}
body>main,body>.advisor-layout-v172{flex:0 0 auto!important}
