.menu-toggle {
  display: none;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.10);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  outline: none;
  transform: translateY(-1px);
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-action {
  width: 38px;
  min-width: 38px;
  height: 38px;
}

.header-action-mark {
  width: 22px;
  height: 22px;
}

.header-action-mark img {
  width: 13px;
  height: 13px;
}

@media (max-width: 1450px) {
  .menu-toggle { display: inline-flex; }

  .links {
    display: none;
    order: initial;
    flex: initial;
    width: auto;
    overflow: visible;
    padding: 0;
  }

  .links.is-open {
    position: absolute;
    top: calc(100% + 1px);
    left: 48px;
    right: 48px;
    z-index: 10001;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 0 0 8px 8px;
    background: rgba(5,6,8,.98);
    box-shadow: 0 18px 44px rgba(0,0,0,.32);
  }

  .links.is-open a {
    justify-content: center;
    min-height: 40px;
    border-radius: 4px;
    background: rgba(255,255,255,.045);
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .nav-actions { gap: 6px; }

  .header-action {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .menu-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .links.is-open {
    left: 14px;
    right: 14px;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .links.is-open { grid-template-columns: 1fr; }
}
