/* =========================================================
   V54 — RESTORED V47 HEADER + STICKY ONLY
   Old visual behavior restored. No negative-margin tricks.
   ========================================================= */
:root{--shg-header-h:88px;--shg-header-mobile-h:74px}

/* Base header geometry — same visual model as the old working header. */
html body #site-header{
  left:0!important;
  right:0!important;
  width:100%!important;
  height:var(--shg-header-h)!important;
  min-height:var(--shg-header-h)!important;
  margin:0!important;
  padding:0!important;
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  z-index:99999!important;
  transition:background-color .3s ease,border-color .3s ease,box-shadow .3s ease,color .3s ease!important;
}

html body #site-header .header-inner{
  width:min(1400px,calc(100% - 64px))!important;
  height:100%!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(275px,330px) minmax(0,1fr) minmax(235px,300px)!important;
  align-items:center!important;
}
html body #site-header .brand-lockup,
html body #site-header .header-actions{display:flex!important;align-items:center!important;opacity:1!important;visibility:visible!important}
html body #site-header .shg-primary-nav{display:flex!important;justify-content:center!important;overflow:visible!important;opacity:1!important;visibility:visible!important}
html body #site-header .header-actions{justify-content:flex-end!important;gap:20px!important}
html body #site-header .header-brand-partners{display:flex!important;align-items:center!important;gap:12px!important;width:max-content!important;max-width:100%!important}
html body #site-header .header-signal-logo{display:block!important;width:150px!important;height:46px!important;object-fit:contain!important;object-position:left center!important;opacity:1!important;visibility:visible!important}
html body #site-header .header-compass-logo{display:block!important;width:108px!important;height:auto!important;max-height:30px!important;object-fit:contain!important;opacity:1!important;visibility:visible!important}
html body #site-header .header-partner-divider{display:block!important;width:1px!important;height:30px!important;flex:0 0 auto!important}
html body #site-header .shg-primary-menu{display:flex!important;align-items:center!important;justify-content:center!important;gap:30px!important;margin:0!important;padding:0!important;list-style:none!important}
html body #site-header .shg-primary-menu>li{list-style:none!important;margin:0!important;padding:0!important}
html body #site-header .shg-primary-menu>li>a{display:inline-block!important;font-size:10px!important;letter-spacing:.15em!important;text-transform:uppercase!important;white-space:nowrap!important}

/* HOME — exact old behavior: overlay at top, sticky paper only after scroll. */
html body #site-header[data-header-mode="home"]{
  position:absolute!important;
  top:0!important;
  background:transparent!important;
  color:#fff!important;
  border-bottom:1px solid rgba(255,255,255,.18)!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
html body #site-header[data-header-mode="home"] .header-signal-logo,
html body #site-header[data-header-mode="home"] .header-compass-logo{
  filter:invert(1)!important;
  mix-blend-mode:screen!important;
}
html body #site-header[data-header-mode="home"] .header-partner-divider{background:rgba(255,255,255,.36)!important}
html body #site-header[data-header-mode="home"] .nav a,
html body #site-header[data-header-mode="home"] .shg-primary-menu a,
html body #site-header[data-header-mode="home"] .market-mark{color:#fff!important}
html body #site-header[data-header-mode="home"] .shg-desktop-connect{display:inline-flex!important;background:#fff!important;border-color:#fff!important;color:#10100f!important}

html body #site-header[data-header-mode="home"].is-scrolled{
  position:fixed!important;
  top:0!important;
  background:rgba(244,240,232,.97)!important;
  color:#10100f!important;
  border-bottom:1px solid rgba(16,16,15,.12)!important;
  box-shadow:0 6px 28px rgba(16,16,15,.08)!important;
  backdrop-filter:blur(15px)!important;
}
html body #site-header[data-header-mode="home"].is-scrolled .header-signal-logo,
html body #site-header[data-header-mode="home"].is-scrolled .header-compass-logo{filter:none!important;mix-blend-mode:normal!important}
html body #site-header[data-header-mode="home"].is-scrolled .header-partner-divider{background:rgba(16,16,15,.22)!important}
html body #site-header[data-header-mode="home"].is-scrolled .nav a,
html body #site-header[data-header-mode="home"].is-scrolled .shg-primary-menu a,
html body #site-header[data-header-mode="home"].is-scrolled .market-mark{color:#10100f!important}
html body #site-header[data-header-mode="home"].is-scrolled .shg-desktop-connect{background:#10100f!important;border-color:#10100f!important;color:#fff!important}

/* Properties keeps its image-overlay header, then becomes sticky on scroll. */
html body #site-header[data-header-mode="property"]{
  position:absolute!important;
  top:0!important;
  background:transparent!important;
  color:#fff!important;
  border-bottom:1px solid rgba(255,255,255,.18)!important;
  box-shadow:none!important;
}
html body #site-header[data-header-mode="property"] .header-signal-logo,
html body #site-header[data-header-mode="property"] .header-compass-logo{filter:invert(1)!important;mix-blend-mode:screen!important}
html body #site-header[data-header-mode="property"] .header-partner-divider{background:rgba(255,255,255,.36)!important}
html body #site-header[data-header-mode="property"] .nav a,
html body #site-header[data-header-mode="property"] .shg-primary-menu a,
html body #site-header[data-header-mode="property"] .market-mark{color:#fff!important}
html body #site-header[data-header-mode="property"] .shg-desktop-connect{background:#fff!important;border-color:#fff!important;color:#10100f!important}
html body #site-header[data-header-mode="property"].is-scrolled{
  position:fixed!important;
  top:0!important;
  background:rgba(244,240,232,.97)!important;
  color:#10100f!important;
  border-bottom:1px solid rgba(16,16,15,.12)!important;
  box-shadow:0 6px 28px rgba(16,16,15,.08)!important;
  backdrop-filter:blur(15px)!important;
}
html body #site-header[data-header-mode="property"].is-scrolled .header-signal-logo,
html body #site-header[data-header-mode="property"].is-scrolled .header-compass-logo{filter:none!important;mix-blend-mode:normal!important}
html body #site-header[data-header-mode="property"].is-scrolled .nav a,
html body #site-header[data-header-mode="property"].is-scrolled .shg-primary-menu a,
html body #site-header[data-header-mode="property"].is-scrolled .market-mark{color:#10100f!important}
html body #site-header[data-header-mode="property"].is-scrolled .shg-desktop-connect{background:#10100f!important;border-color:#10100f!important;color:#fff!important}

/* ABOUT / TEAM / CONTACT / JOURNAL — same paper design, guaranteed sticky. */
html body #site-header[data-header-mode="paper"]{
  position:fixed!important;
  top:0!important;
  background:#f4f0e8!important;
  color:#10100f!important;
  border-bottom:1px solid #d8d1c6!important;
  box-shadow:0 5px 20px rgba(16,16,15,.05)!important;
  backdrop-filter:none!important;
}
html body #site-header[data-header-mode="paper"] .header-signal-logo,
html body #site-header[data-header-mode="paper"] .header-compass-logo{filter:none!important;mix-blend-mode:normal!important}
html body #site-header[data-header-mode="paper"] .header-partner-divider{background:rgba(16,16,15,.22)!important}
html body #site-header[data-header-mode="paper"] .nav a,
html body #site-header[data-header-mode="paper"] .shg-primary-menu a,
html body #site-header[data-header-mode="paper"] .market-mark{color:#10100f!important}
html body #site-header[data-header-mode="paper"] .shg-desktop-connect{background:#10100f!important;border-color:#10100f!important;color:#fff!important}

/* Only internal paper pages need content offset for the fixed header. */
body:not(.home) .shg-about-page,
body:not(.home) .team-v16,
body:not(.home) .contact-page-v18,
body:not(.home) .journal-v16,
body:not(.home) .journal-single-v38{padding-top:var(--shg-header-h)!important}
body:not(.home) .shg-about-page>.internal-hero,
body:not(.home) .team-v16>.team-v16-hero,
body:not(.home) .contact-page-v18>.contact-hero-v18,
body:not(.home) .journal-v16>.journal-v16-hero,
body:not(.home) .journal-single-v38>.journal-single-hero{margin-top:0!important}

/* WordPress admin bar offset */
body.admin-bar #site-header[data-header-mode="home"].is-scrolled,
body.admin-bar #site-header[data-header-mode="property"].is-scrolled,
body.admin-bar #site-header[data-header-mode="paper"]{top:32px!important}
@media(max-width:782px){
  body.admin-bar #site-header[data-header-mode="home"].is-scrolled,
  body.admin-bar #site-header[data-header-mode="property"].is-scrolled,
  body.admin-bar #site-header[data-header-mode="paper"]{top:46px!important}
}

/* Existing requested left rail — keep Compass between SHG and FL ↔ MA. */
.brand-rail{position:fixed!important;z-index:35!important;left:18px!important;top:50%!important;transform:translateY(-50%)!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:14px!important;color:#fff!important;mix-blend-mode:difference!important;pointer-events:none!important}
.brand-rail span{font-size:10px!important;line-height:1!important;letter-spacing:.28em!important;text-transform:uppercase!important;font-weight:700!important;writing-mode:vertical-rl!important;transform:rotate(180deg)!important}
.brand-rail i{width:1px!important;height:42px!important;background:currentColor!important;opacity:.45!important}

@media(max-width:1100px){
  html body #site-header .header-inner{grid-template-columns:minmax(220px,1fr) auto!important;width:calc(100% - 48px)!important}
  html body #site-header .shg-primary-nav{display:none!important}
  html body #site-header .market-mark{display:none!important}
  html body #site-header .shg-menu-toggle{display:flex!important}
  .brand-rail{display:none!important}
}
@media(max-width:820px){
  :root{--shg-header-h:74px}
  html body #site-header{height:var(--shg-header-mobile-h)!important;min-height:var(--shg-header-mobile-h)!important}
  html body #site-header .header-inner{width:calc(100% - 28px)!important;grid-template-columns:minmax(0,1fr) auto!important}
  html body #site-header .header-brand-partners{gap:8px!important}
  html body #site-header .header-signal-logo{width:112px!important;height:40px!important}
  html body #site-header .header-compass-logo{width:76px!important;max-height:24px!important}
  html body #site-header .header-partner-divider{height:24px!important}
  html body #site-header .shg-desktop-connect{display:none!important}
  body:not(.home) .shg-about-page,
  body:not(.home) .team-v16,
  body:not(.home) .contact-page-v18,
  body:not(.home) .journal-v16,
  body:not(.home) .journal-single-v38{padding-top:var(--shg-header-mobile-h)!important}
}
