/*
 * Shared public-header shell for Yingtu static pages.
 * Mirrors the New API v1.0.0-rc.22 default frontend header without copying
 * its application runtime into the static documentation and monitor pages.
 */
:root {
  --yingtu-header-height: 64px;
  --yingtu-header-max-width: 1280px;
}

html .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--yingtu-header-max-width);
  min-height: var(--yingtu-header-height);
  margin: 0 auto;
  padding: 0 24px;
  gap: 20px;
}

.site-header .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 32px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

.site-header .brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-header .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.site-header .nav {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin-left: auto;
  overflow: visible;
}

.site-header .nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header .nav a:hover {
  color: var(--ink);
  background: transparent;
  text-decoration: none;
}

.site-header .nav a.active,
.site-header .nav a[aria-current="page"] {
  color: var(--ink);
  background: transparent;
}

.site-header .static-header-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-left: 0;
}

.site-header .static-header-actions::before {
  display: block;
  width: 1px;
  height: 16px;
  margin: 0 8px;
  background: color-mix(in srgb, var(--line) 65%, transparent);
  content: "";
}

.site-header .static-header-icon,
.site-header .static-user-chip {
  color: var(--muted);
  background: transparent;
}

.site-header .static-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-header .static-header-icon:hover,
.site-header .static-user-chip:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.site-header .static-user-chip {
  min-height: 32px;
  max-width: 140px;
  padding: 0 6px 0 3px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.site-header .static-user-avatar {
  width: 24px;
  height: 24px;
  background: #5c9dff;
  font-size: 12px;
}

.site-header .static-user-chip svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 960px) {
  .site-header .header-inner {
    padding: 0 16px;
    gap: 10px;
  }

  .site-header .brand > span:last-child {
    display: none;
  }

  .site-header .nav {
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header .nav::-webkit-scrollbar {
    display: none;
  }

  .site-header .nav a {
    padding-right: 9px;
    padding-left: 9px;
  }

  .site-header .static-header-actions::before {
    margin-right: 4px;
    margin-left: 4px;
  }
}

@media (max-width: 680px) {
  .site-header .header-inner {
    min-height: 56px;
    padding: 0 12px;
  }

  .site-header .brand-mark {
    width: 26px;
    height: 26px;
  }

  .site-header .nav a {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .site-header .static-header-actions {
    gap: 0;
  }

  .site-header .static-header-actions::before,
  .site-header .static-user-chip,
  .site-header .static-header-actions > .static-header-icon:first-child {
    display: none;
  }
}
