.header .nav-group {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}
.header .nav-submenu summary {
  display: grid;
  place-items: center;
  cursor: pointer;
  width: 28px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  list-style: none;
}
.header .nav-submenu summary::-webkit-details-marker { display: none; }
.header .nav-submenu summary span {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.header .nav-submenu[open] summary span { transform: translateY(2px) rotate(225deg); }
.header .nav-submenu summary:hover,
.header .nav-submenu summary:focus-visible,
.header .nav-submenu li a:hover,
.header .nav-submenu li a:focus-visible { background: #ffffff18; color: var(--lime); }
.header .nav-submenu ul {
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid #f6f5ef55;
  border-radius: 14px;
}
.header .desktop-nav .nav-submenu ul {
  position: absolute;
  top: 100%;
  left: -8px;
  min-width: 220px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
}
.header .nav-submenu li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 10px;
  border-radius: 8px;
  white-space: normal;
}
.header .nav-submenu li a:not(:hover):not(:focus-visible):not([aria-current="page"]) { color: var(--paper); }
/* Mobile navigation: the section link and disclosure share one row.
   The list stays in normal flow so opening it moves the following rows. */
.header .mobile-nav {
  position: static;
}
.header .mobile-nav > summary {
  display: grid;
  place-items: center;
  min-width: 52px;
  min-height: 44px;
  padding: 0 8px;
  list-style: none;
  border: 0;
  background: transparent;
  color: #f6f5ef;
  cursor: pointer;
}
.header .mobile-nav[open] > summary {
  position: relative;
  font-size: 0;
}
.header .mobile-nav[open] > summary::before,
.header .mobile-nav[open] > summary::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
.header .mobile-nav[open] > summary::after { transform: rotate(-45deg); }

.header .mobile-nav > nav {
  position: absolute;
  top: calc(100% + 5px);
  inset-inline: -1px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 16px;
  background: #10100f;
  color: #f6f5ef;
  border: 1px solid #545450;
  border-radius: 18px;
  white-space: normal;
  animation: none;
}
.header .mobile-nav .nav-group {
  display: block;
  position: relative;
  border-bottom: 1px solid #3e3e39;
}
.header .mobile-nav nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  box-sizing: border-box;
  padding: 8px 4px;
  color: #f6f5ef;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  animation: none;
}
.header .mobile-nav .nav-group > a {
  position: absolute;
  top: 0;
  inset-inline: 0 48px;
}
.header .mobile-nav .nav-submenu { display: block; }
.header .mobile-nav .nav-submenu > summary {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  margin-inline-start: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f6f5ef;
}
.header .mobile-nav .nav-submenu ul {
  position: static;
  list-style: none;
  margin: 0;
  padding: 0 0 6px 16px;
  border: 0;
  background: transparent;
}
.header .mobile-nav .nav-submenu li a {
  min-height: 44px;
  font-size: 15px;
  font-weight: 400;
}
.header .mobile-nav nav > a:last-child {
  color: var(--lime, #c7ff48);
  border-top: 1px solid #3e3e39;
  border-radius: 0;
}
.header .mobile-nav :is(summary, a):focus-visible {
  outline: 2px solid #f6f5ef;
  outline-offset: -3px;
}

.header .logo img {
  display: block;
  width: 100px;
  height: auto;
}
