/* One stable header shell shared by the home, docs, updates and download pages. */
.global-site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 3.2vw;
  border-bottom: 1px solid #e3e8ef;
  color: #172033;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 28px rgba(40, 56, 88, .04);
  backdrop-filter: blur(18px) saturate(145%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: none;
}

.home-page .global-site-header {
  position: fixed;
}

.global-brand {
  width: max-content;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #172033;
  text-decoration: none;
}

.global-brand-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.global-brand-icon img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

.global-brand strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.global-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.global-nav > a {
  width: 58px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 9px;
  color: #526075;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}

.global-nav > a:hover {
  color: #3449c9;
}

.global-nav > a.active,
.global-nav > a.nav-current {
  color: #3449c9;
  background: #eef2ff;
  font-weight: 700;
}

.global-actions {
  width: 224px;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.global-account,
.global-download {
  height: 36px;
  min-height: 36px !important;
  max-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  text-decoration: none;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  transform: none;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.global-account {
  width: 112px;
  padding: 0;
  color: #59677a;
  font-weight: 700;
  background: transparent;
}

.global-account:hover {
  color: #3449c9;
  background: #eef2ff;
}

.global-download {
  width: 104px;
  padding: 0;
  color: #fff;
  font-weight: 750;
  background: linear-gradient(135deg, #4f67ed, #667bf5);
  box-shadow: 0 10px 26px rgba(79, 103, 237, .22);
}

.global-download:hover,
.global-download.nav-current-action {
  color: #fff;
  background: linear-gradient(135deg, #4f67ed, #667bf5);
  box-shadow: 0 10px 26px rgba(79, 103, 237, .22) !important;
  transform: none;
}

.global-menu-button,
.global-docs-menu,
.global-mobile-link {
  display: none;
}

/* Keep the mobile-only account/download links out of the desktop center nav. */
.global-nav > a.global-mobile-link {
  display: none;
}

.docs-search-dock {
  position: fixed;
  z-index: 35;
  left: 22px;
  bottom: 22px;
}

.docs-search-dock .search-trigger {
  min-width: 208px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(40, 56, 88, .14);
}

@media (max-width: 820px) {
  .global-site-header,
  .home-page .global-site-header {
    height: 62px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 16px;
  }

  .global-nav,
  .global-actions .global-account,
  .global-actions .global-download {
    display: none;
  }

  .global-actions {
    width: auto;
    gap: 7px;
  }

  .global-menu-button {
    min-width: 48px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid #dce3f4;
    border-radius: 9px;
    color: #4056ce;
    background: #f3f5ff;
    font-size: 11px;
    font-weight: 750;
  }

  .global-docs-menu {
    min-width: 48px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid #dce3f4;
    border-radius: 9px;
    color: #4056ce;
    background: #f3f5ff;
    font-size: 11px;
    font-weight: 750;
  }

  .global-site-header.open .global-nav,
  .global-site-header.menu-open .global-nav {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 15px;
    border-bottom: 1px solid #e3e8ef;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 34px rgba(40, 56, 88, .12);
  }

  .global-site-header.open .global-nav > a,
  .global-site-header.menu-open .global-nav > a {
    width: 100%;
    justify-content: flex-start;
    padding: 11px;
  }

  .global-site-header.open .global-mobile-link,
  .global-site-header.menu-open .global-mobile-link {
    display: flex;
  }

  .docs-search-dock {
    left: 16px;
    bottom: 16px;
  }

  .docs-search-dock .search-trigger {
    min-width: 48px;
    width: 48px;
    height: 36px;
    justify-content: center;
    padding: 0;
  }

  .docs-search-dock .search-trigger span {
    font-size: 0;
  }

  .docs-search-dock .search-trigger span::after {
    content: "搜索";
    font-size: 11px;
  }

  .docs-search-dock .search-trigger kbd {
    display: none;
  }

  .mobile-global-nav .mobile-menu {
    width: 100%;
    min-height: 40px;
    justify-content: flex-start;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    color: #4056ce;
    background: #eef2ff;
    font-size: 13px;
    font-weight: 750;
  }
}
