/* =============================================
   Small Helix — 全站统一顶栏（与官网首页一致）
   在子页面引入：fonts + 本文件；body 加 class has-site-header
   诊断页若有顶栏进度条：body 再加 nav-shift
   ============================================= */

:root {
  --sh-lp-accent: #7c3aed;
  --sh-lp-accent-soft: #a78bfa;
  --sh-lp-accent-legacy: #7c5cfc;
  --sh-purple: #6c5ce7;
  --sh-purple-dark: #5b21b6;
  --sh-purple-light: #a78bfa;
  --sh-bg-dark: #0f0f1a;
  --sh-bg-dark2: #1a1a2e;
  --sh-text-light: #ffffff;
  --sh-lp-ink: #1e1b4b;
  --sh-lp-muted: #555;
  --sh-lp-bg-soft: #f5f3ff;
  --sh-lp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --sh-lp-shadow-lg: 0 10px 25px -5px rgba(30, 27, 75, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.06);
}

body.has-site-header {
  padding-top: calc(58px + env(safe-area-inset-top, 0px));
}

@media (max-width: 375px) {
  body.has-site-header {
    padding-top: calc(54px + env(safe-area-inset-top, 0px));
  }
}

/* 诊断页：3px 进度条在顶，导航紧贴其下 */
body.has-site-header.nav-shift .progress-bar {
  z-index: 1001;
}

body.has-site-header.nav-shift .nav {
  top: 3px;
  z-index: 1000;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(124, 92, 252, 0.15);
  box-shadow: 0 10px 28px rgba(7, 8, 18, 0.28);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px max(24px, env(safe-area-inset-right, 0px)) 12px max(24px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
}

.nav-logo-text {
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sh-text-light);
}

.nav-logo-text .b {
  color: var(--sh-purple-light);
}

.nav-links {
  display: flex;
  gap: 12px 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a:active {
  color: var(--sh-lp-accent);
}

.nav-link-exp {
  color: var(--sh-purple-light);
  font-weight: 600;
}

.nav-link-exp:hover {
  color: #c4b5fd;
}

.nav-cta {
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--sh-lp-shadow);
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.22);
}

.nav-cta:active {
  transform: translateY(1px);
  box-shadow: none;
}

.nav-mobile {
  display: none;
  position: relative;
}

.nav-mobile__btn {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, background 0.2s;
}

.nav-mobile__btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
}

.nav-mobile__btn::-webkit-details-marker {
  display: none;
}

.nav-mobile__panel {
  position: absolute;
  right: max(0px, env(safe-area-inset-right, 0px));
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 12px;
  background: rgba(15, 15, 26, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 252, 0.18);
  box-shadow: 0 20px 38px rgba(8, 8, 18, 0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile__panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-mobile__panel a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.nav-mobile__panel a.nav-mobile__cta {
  margin-top: 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff !important;
}

.nav-mobile__panel a.nav-mobile__cta:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff !important;
}

@media (min-width: 1440px) {
  .nav-inner {
    max-width: 1200px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-mobile {
    display: block;
  }
}

@media (max-width: 375px) {
  .nav-inner {
    padding: 12px 16px;
  }
}
