/* Shared public navigation — same size/position/style on every public page. */
html body.public-ui header.site-header.sticky {
  --header-bg: #fff;
  --header-ink: #1c2b33;
  --header-line: #dfe3e8;
  background: var(--header-bg) !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html.dark body.public-ui header.site-header.sticky {
  --header-bg: #111317;
  --header-ink: #f5f7fa;
  --header-line: #343942;
}

/* Homepage-aligned container: 1504 / 64 / 32 */
html body.public-ui header.site-header.sticky > div {
  width: 100%;
  max-width: 1504px !important;
  margin: 0 auto !important;
  height: 64px !important;
  padding: 0 32px !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: clamp(32px, 5vw, 72px) !important;
  box-sizing: border-box;
}

html body.public-ui header.site-header.sticky > div > a {
  flex-shrink: 0;
  color: var(--header-ink) !important;
  gap: 10px !important;
}
html body.public-ui header.site-header.sticky > div > a span {
  color: var(--header-ink) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}
html body.public-ui header.site-header.sticky > div > a img {
  width: 28px !important;
  height: 28px !important;
  background: transparent !important;
}

html body.public-ui header.site-header.sticky nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}
html body.public-ui header.site-header.sticky nav a {
  color: var(--header-ink) !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  white-space: nowrap;
}
html body.public-ui header.site-header.sticky nav a:hover {
  color: #0866e8 !important;
}

html body.public-ui header.site-header.sticky .site-header-actions {
  margin-left: auto;
  flex-shrink: 0;
}
html body.public-ui header.site-header.sticky .h-6.w-px {
  display: none !important;
}
html body.public-ui header.site-header.sticky #themeToggle {
  display: inline-flex !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--header-line) !important;
  border-radius: 50% !important;
  background: var(--header-bg) !important;
  color: var(--header-ink) !important;
  box-shadow: none !important;
}
html body.public-ui header.site-header.sticky #loginBtn:not(.hidden) {
  display: inline-flex !important;
  height: 36px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: #0866e8 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
html body.public-ui header.site-header.sticky .site-menu-toggle {
  display: none;
}

@media (min-width: 1440px) {
  html body.public-ui header.site-header.sticky > div { gap: 72px !important; }
  html body.public-ui header.site-header.sticky nav { gap: 36px !important; }
}

@media (max-width: 1100px) {
  html body.public-ui header.site-header.sticky > div {
    height: 56px !important;
    padding: 0 16px !important;
    gap: 12px !important;
  }
  html body.public-ui header.site-header.sticky nav {
    gap: 18px !important;
    font-size: 13px !important;
  }
  html body.public-ui header.site-header.sticky .site-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--header-ink);
  }
  html body.public-ui header.site-header.sticky .site-menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  html body.public-ui header.site-header.sticky nav {
    display: none !important;
  }
  html body.public-ui header.site-header.sticky nav.is-open {
    display: flex !important;
    position: absolute;
    top: 56px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
    padding: 8px !important;
    background: var(--header-bg) !important;
    border: 1px solid var(--header-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px #0002;
  }
  html body.public-ui header.site-header.sticky nav.is-open a {
    padding: 12px !important;
    text-align: left !important;
    flex: none !important;
  }
}

@media (max-width: 767px) {
  html body.public-ui header.site-header.sticky > div {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Links never get pill / selected backgrounds */
html body.public-ui header.site-header.sticky nav a,
html body.public-ui header.site-header.sticky nav a:is(:hover, :active, :focus, [aria-current], .active),
html body.public-ui.home-page.hp-scrolled header.site-header.sticky nav a:is(:hover, :active, :focus, [aria-current], .active),
html body.public-ui.home-page header.site-header.sticky nav a[href="/"] {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
