html {
  scroll-padding-top: var(--header-offset, 96px);
}

.site-header.product-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 0 0 100vmax rgba(255, 255, 255, 0.88), 0 1px 0 0 #e2e8f0;
  clip-path: inset(0 -100vmax -2px);
  min-height: 68px;
  padding-block: 10px;
}

.product-header .brand {
  font-size: 16px;
  font-weight: 760;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.product-nav {
  justify-content: center;
  gap: 6px;
  font-size: 14px;
}

.product-nav a {
  padding: 7px 11px;
  border-radius: 8px;
  color: #475569;
  font-weight: 560;
  transition: background 0.15s ease, color 0.15s ease;
}

.product-nav a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.product-nav a[aria-current="page"] {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 660;
}

.product-nav .product-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.locale-switch {
  color: #475569;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.locale-switch:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #e2e8f0;
  text-decoration: none;
}

.header-actions .product-nav-store {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 660;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.header-actions .product-nav-store:hover {
  background: #1d4ed8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

.sample-shortcut {
  margin-top: 16px;
}

html[lang="zh-Hans"] .policy-content:first-of-type {
  border-top: 0;
  margin-top: 0;
}

@media (max-width: 960px) {
  .product-nav {
    gap: 2px;
  }
  .product-nav a {
    padding: 6px 8px;
    font-size: 13px;
  }
}

@media (max-width: 820px) {
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
  }
  .product-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 4px 0 2px;
    gap: 4px;
    position: relative;
    min-width: 0;
    scrollbar-width: none;
  }
  .product-nav::-webkit-scrollbar {
    display: none;
  }
  .product-nav a {
    flex: none;
  }
}

@media (max-width: 420px) {
  .site-header.product-header {
    column-gap: 6px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions .product-nav-store {
    padding: 7px 10px;
    font-size: 12px;
    min-height: 34px;
  }
  .locale-switch {
    font-size: 12px;
    padding: 6px 7px;
  }
}
