:root {
  --c-dark: #231334;
  --c-paper: #E9E8EA;
  --c-text: #1C1523;
  --c-brand: #7D14EB;
  --c-accent: #EDD26E;
  --r-card: 20px;
  --r-btn: 12px;
  --sec-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --max-w: 960px;
  --line-h: 1.65;
}

/* 表面层颜色覆盖规则 */
.surface-dark {
  --bg: var(--c-dark);
  --fg: var(--c-paper);
  --link: var(--c-accent);
  --hl: var(--c-accent);
  --card-bg: rgba(255,255,255,0.04);
}
.surface-paper {
  --bg: var(--c-paper);
  --fg: var(--c-text);
  --link: var(--c-brand);
  --hl: var(--c-brand);
  --card-bg: #ffffff;
}
.card-light {
  --bg: #f4f3f5;
  --fg: var(--c-text);
  --link: var(--c-brand);
  --hl: var(--c-brand);
  color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: var(--line-h);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .85; }
ul, ol { list-style: none; }

/* 布局容器 */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-top: var(--sec-y);
  padding-bottom: var(--sec-y);
  background: var(--bg);
}

/* 排版 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 0.6em;
}
h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
  margin-bottom: 1.2em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg);
  margin-bottom: 1em;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 0.6em;
}
p { margin-bottom: 1em; max-width: 38em; }
.hl { color: var(--hl); font-weight: 600; }

/* 按钮 */
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--r-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--c-accent);
  color: var(--c-dark);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); background: #e5ca60; }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
}
.btn-secondary:hover { transform: translateY(-2px); opacity: .9; }
.btn svg { width: 20px; height: 20px; margin-right: 8px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 网格与卡片 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.card {
  background: var(--card-bg);
  border-radius: var(--r-card);
  padding: var(--gap);
  position: relative;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: var(--fg);
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(128,128,128,0.2); }
th { font-weight: 600; }
td:first-child { font-weight: 600; color: var(--fg); }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(128,128,128,0.2); margin-bottom: 12px; }
.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--fg);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding-bottom: 16px; color: var(--fg); line-height: 1.7; }

/* 步骤徽标 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--c-accent);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  margin-right: 8px;
  vertical-align: middle;
}

/* 页头与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid rgba(128,128,128,0.15);
  padding: 12px 0;
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg); }
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--fg); font-weight: 500; }
.nav a[aria-current="page"] { color: var(--hl); font-weight: 700; }
.site-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(128,128,128,0.15);
  text-align: center;
  color: var(--fg);
  font-size: 0.9rem;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.footer-links a { color: var(--link); }

/* SVG 基础与响应式 */
.svg-panel { width: 100%; height: auto; max-width: 100%; overflow: visible; }
.svg-panel svg { width: 100%; height: auto; }

/* SVG 动效关键帧 */
@keyframes draw-line {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slide-shift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}
@keyframes node-glow {
  0%, 100% { r: 3; opacity: 0.3; }
  50% { r: 5; opacity: 1; }
}

.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 6s ease-in-out infinite;
}
.anim-float {
  animation: float-up 4.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-breathe {
  animation: breathe 3s ease-in-out infinite;
}
.anim-slide {
  animation: slide-shift 5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-node {
  animation: node-glow 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav { gap: 16px; font-size: 0.9rem; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
