:root:has(.sf-header) {
  --header-h: 64px;
  scroll-padding-top: 80px;
}

body:has(.sf-header) { overflow-x: clip; }

.sf-header.site-header {
  display: block;
  padding: 0 clamp(18px, 3vw, 56px);
  background: #102b45;
  border-bottom: 1px solid #314b61;
  box-shadow: 0 3px 14px rgb(10 33 56 / 13%);
}

.sf-header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sf-header .brand { flex: 0 0 auto; font-size: 1.125rem; line-height: 1.2; }
.sf-header .brand-logo { width: 38px; height: 38px; flex: 0 0 auto; }

.sf-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .9375rem;
  line-height: 1.25;
}

.sf-nav-group { position: relative; }

.sf-nav a,
.sf-nav summary,
.sf-nav-toggle {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.sf-nav summary {
  list-style: none;
  cursor: pointer;
  gap: 9px;
}

.sf-nav summary::-webkit-details-marker { display: none; }

.sf-nav summary::after {
  content: "";
  width: .4rem;
  height: .4rem;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}

.sf-nav-group[open] > summary::after { transform: translateY(2px) rotate(225deg); }

.sf-nav a:hover,
.sf-nav summary:hover,
.sf-nav-group[open] > summary,
.sf-nav-group[data-current] > summary,
.sf-nav [aria-current="page"],
.sf-nav-toggle:hover {
  background: #25445e;
  color: #fff3c7;
}

.sf-nav a:focus-visible,
.sf-nav summary:focus-visible,
.sf-nav-toggle:focus-visible,
.sf-header .brand:focus-visible {
  outline: 2px solid #e9c872;
  outline-offset: 2px;
}

.sf-nav .sf-nav-primary {
  background: #efd38c;
  color: #142f49;
  margin-inline-start: 6px;
}

.sf-nav .sf-nav-primary:hover,
.sf-nav .sf-nav-primary[aria-current="page"] {
  background: #ffe6a4;
  color: #142f49;
}

.sf-nav-links {
  position: absolute;
  inset: calc(100% + 6px) 0 auto auto;
  z-index: 1;
  width: max-content;
  max-width: min(18rem, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid #375369;
  border-radius: 12px;
  background: #102b45;
  box-shadow: 0 12px 28px rgb(7 22 37 / 25%);
}

.sf-nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }

.sf-nav-toggle {
  display: none;
  gap: 8px;
  border: 1px solid #587085;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .9375rem;
}

.sf-nav-toggle::before {
  content: "";
  width: 14px;
  height: 10px;
  border-block: 1px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}

@media (max-width: 56rem) {
  .sf-header.site-header { padding-inline: 18px; }
  .sf-header .brand-logo { width: 34px; height: 34px; }
  .sf-header-inner { flex-wrap: wrap; }
  .sf-nav { flex-wrap: wrap; width: 100%; padding-bottom: 10px; }
  .sf-nav-enhanced .sf-nav-toggle { display: flex; }
  .sf-nav-enhanced .sf-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    max-height: calc(100vh - var(--header-h) - 16px);
    max-height: calc(100dvh - var(--header-h) - 16px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid #375369;
    border-radius: 12px;
    background: #102b45;
    box-shadow: 0 12px 28px rgb(7 22 37 / 25%);
  }
  .sf-nav-enhanced .sf-nav-toggle[aria-expanded="true"] + .sf-nav { display: block; }
  .sf-nav-links {
    position: static;
    width: auto;
    max-width: none;
    padding: 0 0 3px 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .sf-nav-enhanced .sf-nav .sf-nav-primary { margin: 5px 0 0; }
}

@media print {
  .sf-header.site-header { display: none; }
}
