/* One navigation treatment across the current static and legacy public-page shells. */
:root {
  --kcg-nav-ink: #0b2453;
  --kcg-nav-blue: #0874dc;
  --kcg-nav-hover: #edf8ff;
  --kcg-nav-active: #e8f6ff;
  --kcg-nav-active-line: #c4e8fa;
}

/* The public pages use a legacy grid header; match the newer flexible shell. */
body:has(.site-header) .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fffffff0;
  border-bottom: 1px solid #dce9f4;
  box-shadow: 0 6px 20px #0a4a7a0a;
  backdrop-filter: blur(14px);
  padding: 0;
}

body:has(.site-header) .header-top.site-container {
  display: flex;
  align-items: center;
  gap: 30px;
  width: min(1320px, calc(100% - 48px));
  min-height: 72px;
  margin-inline: auto;
}

body:has(.site-header) .brand-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 11px;
  color: var(--kcg-nav-ink);
}

body:has(.site-header) .brand-mark {
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 3px solid var(--kcg-nav-blue);
  border-radius: 10px;
  background: #e8f7ff;
  box-shadow: none;
  color: var(--kcg-nav-blue);
}

body:has(.site-header) .brand-mark > span {
  display: block;
  position: relative;
  inset: auto;
  width: 19px;
  height: 19px;
  border: 0;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  border-radius: 0 7px 0 0;
  background: transparent;
  box-shadow: none;
  transform: translate(7px, -7px);
}
body:has(.site-header) .brand-mark::after { display: none; }

body:has(.site-header) .brand-wordmark strong {
  color: var(--kcg-nav-ink);
  font-size: 17px;
  letter-spacing: -.015em;
}
body:has(.site-header) .brand-wordmark small { color: #5e7697; font-size: 9px; letter-spacing: 0; }

body:has(.site-header) .desktop-nav {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  gap: 21px;
  width: auto;
  margin-inline: auto;
  color: var(--kcg-nav-ink);
  font-size: 14px;
}

body:has(.site-header) .site-header .desktop-nav a,
:is(.home-v3-body, .pricing-v2-body) .v2-nav a {
  color: var(--kcg-nav-ink);
  border: 1px solid transparent;
  border-radius: 7px;
}

body:has(.site-header) .site-header .desktop-nav a {
  display: block;
  height: auto;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  color: var(--kcg-nav-ink);
}

body:has(.site-header) .site-header .desktop-nav a:hover,
:is(.home-v3-body, .pricing-v2-body) .v2-nav a:hover {
  color: var(--kcg-nav-blue);
  background: var(--kcg-nav-hover);
}

body:has(.site-header) .site-header .desktop-nav a.is-current,
body:has(.site-header) .mobile-nav a.is-current,
:is(.home-v3-body, .pricing-v2-body) .v2-nav a.is-current {
  color: var(--kcg-nav-blue);
  background: var(--kcg-nav-active);
  border-color: var(--kcg-nav-active-line);
  box-shadow: none;
}

/* The legacy public stylesheet has its own active colors; replace them here. */
body:has(.site-header) .site-header .desktop-nav a.is-current {
  color: #0874dc;
  background: #e8f6ff;
}

body:has(.site-header) .language-switch {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  height: 40px;
  padding: 4px;
  border: 1px solid #d6e7f4;
  border-radius: 999px;
  background: #f5faff;
}

body:has(.site-header) .language-switch button {
  display: grid;
  place-items: center;
  min-width: 39px;
  height: 30px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #385379;
  font-size: 12px;
  font-weight: 800;
}

body:has(.site-header) .site-header .language-switch button[aria-pressed="true"] {
  background: #0874dc;
  box-shadow: none;
  color: #fff;
}

body:has(.site-header) .desktop-nav a:focus-visible,
body:has(.site-header) .language-switch button:focus-visible,
:is(.home-v3-body, .pricing-v2-body) .v2-nav a:focus-visible {
  outline: 3px solid #064fc7;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  body:has(.site-header) .header-top.site-container {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0;
    min-height: 0;
    padding-top: 9px;
  }

  body:has(.site-header) .site-header .desktop-nav {
    order: 3;
    display: flex !important;
    flex: 0 0 100%;
    justify-content: flex-start;
    gap: 3px;
    width: 100%;
    margin: 8px 0 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  body:has(.site-header) .site-header .desktop-nav a { display: flex; align-items: center; height: 39px; min-height: 0; padding: 10px 13px; font-size: 12px; line-height: 16px; }
  body:has(.site-header) .language-switch { margin-left: auto; }
  body:has(.site-header) .mobile-menu-button,
  body:has(.site-header) .mobile-menu-toggle,
  body:has(.site-header) .mobile-nav { display: none !important; }

  body:has(.site-header) .guide-tabs {
    top: 97px;
    background: #f4fafff0;
    backdrop-filter: blur(14px);
  }
  body:has(.site-header) .guide-step-nav { top: 165px; }
}

@media (max-width: 680px) {
  body:has(.site-header) .header-top.site-container { width: min(100% - 26px, 1320px); }
  body:has(.site-header) .brand-mark { width: 36px; height: 36px; }
  body:has(.site-header) .brand-wordmark strong { font-size: 15px; }
  body:has(.site-header) .brand-logo { min-width: 123px; }
  body:has(.site-header) .brand-wordmark small { display: none; }
  body:has(.site-header) .language-switch button { min-width: 31px; }
}
