html {
  scroll-padding-top: 104px;
}

html,
body {
  overflow-x: clip;
}

.site-header,
.connect-page .site-header {
  position: sticky;
  top: 12px;
  z-index: 60;
  width: min(calc(100% - 40px), 1180px);
  margin: 12px auto 0;
  border: 1px solid rgba(174, 190, 232, 0.18);
  border-radius: 18px;
  background: rgba(4, 10, 23, 0.84);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}

body .site-header .site-header__inner {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 66px;
  margin: 0;
  padding: 8px 10px 8px 14px;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 22px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text, #f5f7ff);
  font-size: 21px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__logo {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.site-header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 22px;
  color: var(--muted, #aeb9d5);
  font-size: 14px;
}

.site-header__nav a,
.connect-page .site-header__nav a,
.connect-page .site-header__nav a:last-child {
  display: inline-flex;
  min-height: 42px;
  padding: 0;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted, #aeb9d5);
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.site-header__nav a:hover,
.site-header__nav a:focus-visible {
  color: var(--text, #f5f7ff);
}

.site-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(174, 190, 232, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text, #f5f7ff);
  cursor: pointer;
}

.site-header__toggle-icon {
  display: block;
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.site-header__nav .site-header__mobile-only {
  display: none;
}

@media (max-width: 980px) {
  .site-header,
  .connect-page .site-header {
    top: 8px;
    width: min(calc(100% - 28px), 720px);
    margin-top: 8px;
    border-radius: 16px;
  }

  body .site-header .site-header__inner {
    width: 100%;
    min-height: 64px;
    padding: 7px 8px 7px 12px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .site-header__logo {
    width: 40px;
    height: 40px;
  }

  .site-header__brand {
    font-size: 19px;
  }

  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    display: grid;
    width: min(320px, calc(100vw - 28px));
    padding: 10px;
    align-items: stretch;
    justify-content: stretch;
    justify-items: stretch;
    gap: 4px;
    border: 1px solid rgba(174, 190, 232, 0.18);
    border-radius: 16px;
    background: rgba(11, 21, 43, 0.98);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    text-align: left;
  }

  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .site-header__nav a,
  .connect-page .site-header__nav a,
  .connect-page .site-header__nav a:last-child {
    min-height: 44px;
    width: 100%;
    padding: 0 12px;
    justify-content: flex-start;
    border-radius: 10px;
    white-space: normal;
    text-align: left;
  }

  .site-header__nav a:hover,
  .site-header__nav a:focus-visible {
    background: rgba(255, 255, 255, 0.055);
  }

  .site-header__nav .site-header__mobile-only {
    display: flex;
  }
}

@media (max-width: 640px) {
  .site-header,
  .connect-page .site-header {
    width: calc(100% - 20px);
  }
}
