.portal-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.portal-nav__link {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  color: rgba(239, 255, 255, 0.68);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.portal-nav__link:hover,
.portal-nav__link:focus-visible,
.portal-nav__link.is-current {
  color: #efffff;
  background: rgba(255, 255, 255, 0.055);
}

.portal-nav__link:focus-visible,
.portal-mobile-menu__button:focus-visible,
.portal-mobile-menu__link:focus-visible {
  outline: 3px solid rgba(113, 231, 223, 0.38);
  outline-offset: 3px;
}

.portal-mobile-menu {
  position: relative;
  display: none;
}

.portal-mobile-menu > summary {
  list-style: none;
}

.portal-mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.portal-mobile-menu__button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  cursor: pointer;
  color: rgba(239, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 720;
  user-select: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.portal-mobile-menu__button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.portal-mobile-menu__button:hover,
.portal-mobile-menu[open] .portal-mobile-menu__button {
  color: #efffff;
  border-color: rgba(113, 231, 223, 0.32);
  background: rgba(113, 231, 223, 0.07);
}

.portal-mobile-menu__panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: min(286px, calc(100vw - 20px));
  padding: 7px;
  border: 1px solid rgba(207, 255, 250, 0.14);
  border-radius: 14px;
  background: rgba(7, 24, 25, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: portal-nav-in 0.15s ease-out both;
}

.portal-mobile-menu__link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 13px;
  color: rgba(239, 255, 255, 0.74);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  transition: color 0.17s ease, background-color 0.17s ease;
}

.portal-mobile-menu__link:hover,
.portal-mobile-menu__link.is-current {
  color: #efffff;
  background: rgba(113, 231, 223, 0.075);
}

.portal-mobile-menu__link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: rgba(239, 255, 255, 0.36);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

@keyframes portal-nav-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .portal-nav {
    display: none;
  }

  .portal-mobile-menu {
    display: block;
  }
}

@media (max-width: 520px) {
  .portal-mobile-menu__button {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .portal-mobile-menu__button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
