/* Story Engine Runtime v5.3 — Canonical Context-Aware Header */

:root {
  --se-header-font-family: Inter, system-ui, sans-serif;
  --se-header-font-size: 13px;
  --se-header-font-weight: 600;
  --se-header-letter-spacing: 0px;

  --se-header-top: 18px;
  --se-header-width: min(1180px, calc(100% - 40px));
  --se-header-height: 72px;
  --se-header-bg: rgba(5,8,13,.76);
  --se-header-border: rgba(255,255,255,.15);
}

.se-canonical-header {
  font-family: var(--se-header-font-family);
  position: fixed;
  left: 50%;
  top: var(--se-header-top);
  transform: translateX(-50%);
  z-index: 100000;
  width: var(--se-header-width);
  pointer-events: none;
  transition: transform 240ms ease;
}

.se-canonical-header.is-hidden {
  transform: translateX(-50%) translateY(calc(-100% - 28px));
}

.se-canonical-header__inner {
  pointer-events: auto;
  min-height: var(--se-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 10px 16px 10px 20px;
  border: 1px solid var(--se-header-border);
  border-radius: 999px;
  background: var(--se-header-bg);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: 0 14px 46px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.13);
  box-sizing: border-box;
}

.se-canonical-header__logo {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto;
  line-height: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
  text-decoration: none !important;
}

.se-canonical-header__logo img,
.se-canonical-header__logo svg {
  display: block !important;
  width: auto !important;
  height: 42px !important;
  max-width: 198px !important;
  object-fit: contain !important;
}

.se-canonical-header__desktop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.se-canonical-header__desktop a {
  font-family: var(--se-header-font-family);
  text-transform: none;
  color: rgba(248,251,255,.76);
  text-decoration: none;
  font-size: var(--se-nav-font-size, var(--ds-menu-font-size, 13px));
  font-weight: var(--se-header-font-weight);
  padding: 9px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 180ms ease-out, color 180ms ease-out;
}

.se-canonical-header__desktop a:hover,
.se-canonical-header__desktop a:focus-visible {
  color: #f8fbff;
  background: rgba(255,255,255,.09);
}

.se-canonical-header__toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  place-items: center;
  position: relative;
}

.se-canonical-header__toggle span {
  position: absolute;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: #f8fbff;
  left: 50%;
  transform: translateX(-50%);
  transition: top 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.se-canonical-header__toggle span:nth-child(1) { top: 16px; }
.se-canonical-header__toggle span:nth-child(2) { top: 22px; }
.se-canonical-header__toggle span:nth-child(3) { top: 28px; }

.se-canonical-header.is-open .se-canonical-header__toggle span:nth-child(1) {
  top: 22px;
  transform: translateX(-50%) rotate(45deg);
}

.se-canonical-header.is-open .se-canonical-header__toggle span:nth-child(2) {
  opacity: 0;
}

.se-canonical-header.is-open .se-canonical-header__toggle span:nth-child(3) {
  top: 22px;
  transform: translateX(-50%) rotate(-45deg);
}

.se-canonical-header__mobile-panel {
  pointer-events: auto;
  margin-top: 12px;
  border: 1px solid var(--se-header-border);
  border-radius: 28px;
  background: rgba(5,8,13,.94);
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  box-shadow: 0 24px 80px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.12);
  overflow: hidden;
}

.se-canonical-header__mobile {
  display: grid;
  padding: 20px;
  gap: 4px;
}

.se-canonical-header__mobile a {
  display: block;
  color: #f8fbff;
  text-decoration: none;
  font-size: clamp(calc(var(--se-nav-font-size, var(--ds-menu-font-size, 13px)) * 1.8), 8vw, 46px);
  font-weight: var(--ds-menu-font-weight, 850);
  letter-spacing: -.055em;
  line-height: 1;
  padding: 16px 12px;
  border-radius: 18px;
}

.se-canonical-header__mobile a:hover,
.se-canonical-header__mobile a:focus-visible {
  background: rgba(255,255,255,.08);
}

.se-story-switcher {
  position: fixed;
  inset: 0;
  z-index: 200000;
  pointer-events: auto;
  background: rgba(5,8,13,.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 96px 20px 24px;
}

.se-story-switcher__inner {
  width: min(720px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 28px;
  background: rgba(5,8,13,.94);
  box-shadow: 0 24px 80px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.12);
  padding: clamp(28px, 6vw, 48px);
}

.se-story-switcher__eyebrow {
  color: #99d9d9;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin: 0 0 10px;
}

.se-story-switcher h2 {
  margin: 0 0 24px;
  color: #f8fbff;
  font-size: clamp(38px, 7vw, 72px);
  line-height: .95;
  letter-spacing: -.06em;
}

.se-story-switcher__list {
  display: grid;
  gap: 10px;
}

.se-story-switcher__list a {
  color: #f8fbff;
  text-decoration: none;
  display: block;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.12;
  font-weight: 800;
}

.se-story-switcher__list a[aria-current="page"] {
  color: #99d9d9;
  border-color: rgba(153,217,217,.4);
}

.se-story-switcher__close {
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #f8fbff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}

/* Hide earlier experimental nav/header injections only */
.se-nav,
.se-site-header,
.se-story-switcher:not([data-se-story-switcher]):not([data-se-capability-switcher]) {
  display: none !important;
}

/* Hide logo text fallback without disabling the original header wrapper */
.site-title,
.site-description,
.se-logo-text,
.brand-text,
.mobile-logo-text {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
}

.admin-bar .se-canonical-header {
  top: calc(var(--se-header-top) + 32px);
}

@media (max-width: 782px) {
  .admin-bar .se-canonical-header {
    top: calc(var(--se-header-top) + 46px);
  }
}

@media (max-width: 900px) {
  :root {
    --se-header-width: calc(100% - 28px);
    --se-header-top: 14px;
    --se-header-height: 68px;
  }

  .se-canonical-header__inner {
    padding: 8px 10px 8px 14px;
    gap: 12px;
  }

  .se-canonical-header__logo img,
.se-canonical-header__logo svg {
    height: 36px !important;
    max-width: 176px !important;
  }

  .se-canonical-header__desktop {
    display: none;
  }

  .se-canonical-header__toggle {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .se-canonical-header,
  .se-canonical-header * {
    transition: none !important;
  }
}

/* v5.3.1 — suppress legacy duplicate menus when canonical header is active */

body.se-canonical-header-active .site-header:not(.se-canonical-header),
body.se-canonical-header-active header.site-header:not(.se-canonical-header),
body.se-canonical-header-active #masthead:not(.se-canonical-header),
body.se-canonical-header-active .ds-site-header:not(.se-canonical-header),
body.se-canonical-header-active .mobile-header:not(.se-canonical-header),
body.se-canonical-header-active .mobile-nav:not(.se-canonical-header),
body.se-canonical-header-active .main-navigation:not(.se-canonical-header__desktop),
body.se-canonical-header-active nav.primary-navigation:not(.se-canonical-header__desktop),
body.se-canonical-header-active .primary-menu-container,
body.se-canonical-header-active .menu-toggle:not(.se-canonical-header__toggle) {
  display: none !important;
}

/* v5.3.2 — Growth anchor target */
#growth-in-practice,
.se-anchor-target {
  scroll-margin-top: calc(var(--se-header-height, 72px) + 28px);
}

/* v6.0.0-beta.5.41 — keep canonical logo identical and visible on every template. */
.se-canonical-header__logo {
  min-width: 168px;
  min-height: 42px;
  opacity: 1 !important;
  visibility: visible !important;
}
.se-canonical-header__logo img,
.se-canonical-header__logo svg {
  opacity: 1 !important;
  visibility: visible !important;
}


.se-canonical-header__logo svg {
  flex: 0 0 auto;
  overflow: visible;
}
.se-canonical-header__logo-fallback {
  color: #99d9d9;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

/* =========================================================
   SHARED CONTEXTUAL SWITCHER — beta.5.72
   Compact version. This lives with the canonical component so
   later-loaded header CSS cannot restore the old oversized rules.
   ========================================================= */
.se-story-switcher {
  background: rgba(5,8,13,.62) !important;
  padding: 82px 20px 24px !important;
}

.se-story-switcher__inner {
  width: min(640px, calc(100vw - 40px)) !important;
  max-width: 640px !important;
  padding: 28px !important;
  border-radius: 24px !important;
}

.se-story-switcher__eyebrow {
  margin: 0 0 8px !important;
  font-size: 10px !important;
}

.se-story-switcher h2 {
  margin: 0 0 20px !important;
  font-size: clamp(32px, 3.2vw, 42px) !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
}

.se-story-switcher__list {
  gap: 8px !important;
}

.se-story-switcher__list a {
  min-height: 56px !important;
  padding: 12px 16px !important;
  border-radius: 15px !important;
  font-size: clamp(18px, 1.65vw, 22px) !important;
  line-height: 1.1 !important;
}

.se-story-switcher__close {
  margin-top: 18px !important;
  padding: 9px 16px !important;
  min-height: 40px !important;
  font-size: 13px !important;
}

@media (max-width: 700px) {
  .se-story-switcher {
    padding: 74px 14px 18px !important;
  }
  .se-story-switcher__inner {
    width: 100% !important;
    padding: 22px !important;
  }
  .se-story-switcher h2 {
    font-size: 32px !important;
  }
  .se-story-switcher__list a {
    min-height: 52px !important;
    font-size: 18px !important;
  }
}
