.site-header .header-inner-left {
  position: relative;
  justify-content: flex-start;
  align-items: center;
}

.site-home-link,
.site-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
}

.site-home-link:hover,
.site-nav a:hover {
  background: var(--soft);
  color: var(--primary-dark);
}

.site-menu-toggle {
  display: none;
  width: 2.45rem;
  height: 2.45rem;
  margin-left: auto;
  padding: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
}

.site-menu-toggle:hover {
  background: #dbeafe;
  color: var(--primary-dark);
}

.site-menu-toggle span {
  display: block;
  width: 1.05rem;
  height: 0.13rem;
  border-radius: 999px;
  background: currentColor;
}

.site-header.nav-collapsed .header-inner-left {
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
}

.site-header.nav-collapsed .site-menu-toggle {
  display: inline-flex;
}

.site-header.nav-collapsed .site-nav {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 1rem;
  z-index: 20;
  width: min(220px, calc(100vw - 2rem));
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  overflow: visible;
}

.site-header.nav-collapsed.menu-open .site-nav {
  display: flex;
}

.site-header.nav-collapsed .site-nav a {
  width: 100%;
  border-radius: 0.75rem;
  padding: 0.65rem 0.8rem;
  color: var(--text);
}

.site-header.nav-collapsed .site-nav a:hover {
  background: var(--soft);
  color: var(--primary-dark);
}

@media (max-width: 760px) {
  .site-header .header-inner-left {
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
  }

  .site-header .site-menu-toggle {
    display: inline-flex;
  }

  .site-header .site-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 1rem;
    z-index: 20;
    width: min(220px, calc(100vw - 2rem));
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    overflow: visible;
  }

  .site-header.menu-open .site-nav {
    display: flex;
  }

  .site-header .site-nav a {
    width: 100%;
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
    color: var(--text);
  }
}

@media (max-width: 620px) {
  .header-inner {
    align-items: center;
    flex-direction: row;
  }

  .site-nav {
    width: auto;
    overflow-x: visible;
  }
}
