:root {
  --navigation-header-height: 65px;
}

.site-header.unified-header {
  --navigation-highlight: linear-gradient(115deg, rgba(214, 227, 246, 0.82), rgba(225, 243, 242, 0.86));
  height: auto;
  isolation: isolate;
  background: rgba(248, 251, 254, 0.96);
  border-bottom-color: rgba(147, 175, 192, 0.26);
  box-shadow: 0 5px 24px rgba(29, 62, 87, 0.05);
}

.unified-header .unified-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}

.unified-header .brand {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.unified-header .unified-nav .site-nav,
.unified-header .unified-nav .product-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  height: auto;
  padding: 0;
}

.unified-header .unified-nav .site-nav {
  margin-inline-end: auto;
}

.unified-header .unified-nav .product-nav {
  gap: 0;
}

.unified-header .product-nav-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 5px;
  color: #273e52;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(164, 185, 204, 0.3);
  border-radius: 14px 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.unified-header .product-nav-title[aria-current],
.unified-header .product-nav-title:hover,
.unified-header .product-nav-title:focus-visible {
  color: #174965;
  background: #e8f2f6;
  border-color: #aac9d4;
}

.unified-header .product-nav-title:active {
  background: #d5e8ee;
  transition-duration: 0s;
}

.product-nav-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.navigation-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  color: #354e68;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(164, 185, 204, 0.3);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.navigation-toggle::-webkit-details-marker {
  display: none;
}

.navigation-toggle::marker {
  content: "";
}

.product-nav .navigation-toggle {
  min-width: 44px;
  padding: 0;
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

.toggle-chevron {
  width: 7px;
  height: 7px;
  margin: -3px 0 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.product-nav .toggle-chevron {
  margin-inline: 0;
}

.navigation-group[open] .navigation-toggle {
  background: #eaf3f6;
  border-color: #aac9d4;
}

.navigation-group[open] .toggle-chevron {
  transform: translateY(3px) rotate(225deg);
}

.unified-header .nav-track {
  position: absolute;
  top: calc(100% + 8px);
  right: max(18px, calc((100% - var(--page)) / 2));
  left: max(18px, calc((100% - var(--page)) / 2));
  max-height: calc(100svh - var(--navigation-header-height) - 24px);
  padding: 12px;
  overflow-y: auto;
  background: rgba(250, 253, 255, 0.98);
  border: 1px solid #dbe8ee;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(25, 59, 79, 0.14);
}

.unified-header .nav-track ul {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  list-style: none;
}

.unified-header .nav-track a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: #506276;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.unified-header .nav-track a[aria-current],
.unified-header .nav-track a:hover,
.unified-header .nav-track a:focus-visible {
  color: #174965;
}

.unified-header .product-links a {
  font-weight: 500;
}

html:not(.js) .unified-header .nav-track a[aria-current],
html:not(.js) .unified-header .nav-track a:hover {
  background: #e8f2f6;
}

.nav-highlight {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--navigation-highlight);
  border: 1px solid rgba(158, 190, 214, 0.2);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), width 320ms cubic-bezier(0.22, 1, 0.36, 1), height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease;
}

.compact-download {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  color: #fff;
  background: linear-gradient(115deg, #1e477c, #176b71);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: box-shadow 180ms ease;
}

.compact-download:hover {
  color: #fff;
  box-shadow: 0 4px 14px rgba(25, 75, 105, 0.2);
}

.unified-header a:focus-visible,
.unified-header summary:focus-visible {
  outline: 2px solid #26789a;
  outline-offset: 3px;
}

.nav-flip {
  --flip-height: 44px;
  --flip-panel: #e2edf5;
  --flip-edge: #b2cbdc;
  position: relative;
  display: grid;
  align-items: center;
  height: var(--flip-height);
}

.product-nav-title .nav-flip {
  --flip-height: 42px;
}

.compact-download .nav-flip {
  --flip-panel: #205679;
  --flip-edge: #4986a0;
}

.nav-flip-text {
  display: grid;
  align-items: center;
  height: var(--flip-height);
}

.nav-flip-cover {
  display: none;
}

.is-flipping .nav-flip-text {
  animation: nav-flip-label 560ms steps(1, end) both;
  animation-delay: var(--flip-delay);
}

.is-flipping .nav-flip-cover {
  position: absolute;
  inset: 0 -6px;
  display: block;
  background: linear-gradient(transparent 50%, var(--flip-panel) 50%);
  border-radius: 5px;
  perspective: 300px;
  pointer-events: none;
  animation: nav-flip-cover 560ms steps(1, end) both;
  animation-delay: var(--flip-delay);
}

.nav-flip-cover::before,
.nav-flip-cover::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 50%;
  overflow: hidden;
  color: inherit;
  background: var(--flip-panel);
  border: 1px solid var(--flip-edge);
  backface-visibility: hidden;
  animation-duration: 560ms;
  animation-delay: var(--flip-delay);
  animation-fill-mode: both;
}

.nav-flip-cover::before {
  top: 0;
  border-radius: 5px 5px 0 0;
  transform-origin: center bottom;
  animation-name: nav-flip-top;
  animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  content: "";
}

.nav-flip-cover::after {
  bottom: 0;
  border-radius: 0 0 5px 5px;
  line-height: 0;
  text-align: center;
  transform-origin: center top;
  animation-name: nav-flip-bottom;
  animation-timing-function: cubic-bezier(0.2, 0.65, 0.35, 1);
  content: attr(data-label);
}

@keyframes nav-flip-label {
  0% { clip-path: inset(0 0 100%); }
  45% { clip-path: inset(0 0 50%); }
  100% { clip-path: inset(0); }
}

@keyframes nav-flip-cover {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes nav-flip-top {
  0%, 10% { transform: rotateX(0deg); opacity: 1; }
  45% { transform: rotateX(-90deg); opacity: 1; }
  46%, 100% { transform: rotateX(-90deg); opacity: 0; }
}

@keyframes nav-flip-bottom {
  0%, 44% { transform: rotateX(90deg); opacity: 0; }
  45% { transform: rotateX(90deg); opacity: 1; }
  86% { transform: rotateX(-4deg); opacity: 1; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

@keyframes nav-surface-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 1121px) {
  .site-header.unified-header::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(243, 249, 251, 0.5) 52%, rgba(228, 246, 243, 0.68));
    pointer-events: none;
    content: "";
  }

  .site-header.unified-header.is-revealing::before {
    animation: nav-surface-reveal 220ms ease-out both;
  }

  .js:root {
    --navigation-header-height: 77px;
  }

  .js .unified-header .unified-nav {
    gap: 14px;
    height: 76px;
  }

  .js .unified-header .navigation-toggle,
  .js .unified-header .compact-download {
    display: none;
  }

  .js .unified-header .product-nav-title {
    padding-inline: 10px;
    gap: 8px;
    color: #273e52;
    background: transparent;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
  }

  .js .unified-header .product-nav-title[aria-current],
  .js .unified-header .product-nav-title:hover,
  .js .unified-header .product-nav-title:focus-visible {
    color: #174965;
    background: var(--navigation-highlight);
    box-shadow: inset 0 0 0 1px rgba(158, 190, 214, 0.2);
  }

  .js .unified-header .product-nav-title:active {
    background: #d5e8ee;
  }

  .js .product-nav-title .nav-flip {
    --flip-height: 44px;
  }

  .js .unified-header .unified-nav .product-nav {
    gap: 24px;
  }

  .js .product-nav-icon {
    width: 18px;
    height: 18px;
  }

  .js .unified-header .nav-track {
    position: relative;
    inset: auto;
    max-height: none;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .js .unified-header .nav-track ul {
    display: flex;
  }

  .js .unified-header .nav-track a {
    padding-inline: 10px;
  }
}

@media (max-width: 520px) {
  .unified-header .unified-nav {
    gap: 6px;
  }

  .unified-header .brand-copy {
    display: none;
  }

  .unified-header .brand-emblem {
    width: 32px;
    height: 32px;
  }

  .navigation-toggle,
  .compact-download {
    padding-inline: 8px;
  }
}

@media (max-width: 360px) {
  .compact-download > [aria-hidden="true"] {
    display: none;
  }
}

@keyframes nav-content-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  .site-header.unified-header {
    view-transition-name: site-navigation;
  }

  ::view-transition-group(root),
  ::view-transition-group(site-navigation) {
    animation: none;
  }

  ::view-transition-old(root),
  ::view-transition-old(site-navigation) {
    display: none;
  }

  ::view-transition-new(root) {
    animation: nav-content-enter 200ms ease-out both;
  }

  ::view-transition-new(site-navigation) {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header.unified-header.is-revealing::before {
    animation: none;
  }

  .is-flipping .nav-flip-cover {
    display: none;
  }

  .is-flipping .nav-flip-text {
    animation: none;
    clip-path: none;
  }

  .nav-highlight,
  .unified-header .product-nav-title,
  .navigation-toggle,
  .toggle-chevron,
  .compact-download {
    transition: none;
  }
}

.unified-header ~ main[id],
.unified-header ~ main [id] {
  scroll-margin-top: calc(var(--navigation-header-height) + 16px);
}
