/* Consolidated top navigation */
.topbar {
  position: relative;
  z-index: 30;
}

.topnav {
  gap: 10px;
}

.nav-group {
  position: relative;
  flex: none;
}

.nav-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(234, 241, 238, 0.18);
  border-radius: 8px;
  color: #EAF1EE;
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}

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

.nav-summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.8;
}

.nav-group[open] .nav-summary {
  background: rgba(234, 241, 238, 0.12);
  border-color: rgba(224, 165, 63, 0.58);
}

.nav-group[open] .nav-summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(25, 33, 29, 0.14);
  border-radius: 8px;
  background: #FBFCFA;
  box-shadow: 0 14px 34px rgba(10, 34, 31, 0.22);
}

.nav-menu--right {
  right: 0;
  left: auto;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu-link:hover,
.nav-menu-link:focus-visible {
  background: #EDF4F0;
  color: var(--river);
}

.nav-menu-form {
  margin: 0;
}

.nav-menu-button {
  width: 100%;
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
  }

  .nav-group[open] {
    width: 100%;
  }

  .nav-menu,
  .nav-menu--right {
    position: static;
    inset: auto;
    width: min(280px, calc(100vw - 32px));
    margin-top: 8px;
  }
}
