:root {
  /* 色板 */
  --color-dark: #271231;
  --color-paper: #F5F0E5;
  --color-text: #1F1523;
  --color-brand: #9B12D8;
  --color-accent: #ED6EC0;
  --color-border: rgba(31, 21, 35, 0.16);
  --color-border-light: rgba(31, 21, 35, 0.08);

  /* 结构变量 */
  --radius-card: 0;
  --radius-btn: 0;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;

  /* 排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-tight: 1.15;
  --line-height-body: 1.55;

  /* 语义化层变量（纸面默认） */
  --bg-surface: var(--color-paper);
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text);
  --accent-color: var(--color-brand);
  --border-color: var(--color-border);
}

/* 深色面覆盖 */
.surface-dark {
  --bg-surface: var(--color-dark);
  --text-primary: var(--color-paper);
  --text-secondary: var(--color-paper);
  --accent-color: var(--color-accent);
  --border-color: rgba(245, 240, 229, 0.16);
}

/* 深色面上的浅色卡片（恢复纸面取色） */
.card-light {
  background: var(--color-paper);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-surface);
  color: var(--text-primary);
  line-height: var(--line-height-body);
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 区块 */
section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: var(--bg-surface);
}

/* 排版 */
h1, h2, h3, h4 { line-height: var(--line-height-tight); font-weight: 500; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) / 2); }
p { max-width: 38em; margin-bottom: var(--gap); }
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: calc(var(--gap) / 2); display: inline-block;
}
.hl { color: var(--accent-color); }

/* 页头与页脚 */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: var(--gap); list-style: none; }
nav a { color: var(--text-primary); text-decoration: none; font-weight: 500; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent-color); }
footer { border-top: 1px solid var(--border-color); padding: var(--section-y) 0; background: var(--bg-surface); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 24px; height: 48px; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; transition: transform 0.2s ease, background 0.2s ease;
  border-radius: var(--radius-btn);
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--text-primary); }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

/* 卡片与网格 */
.card {
  border: 1px solid var(--border-color); background: var(--bg-surface);
  padding: var(--gap); display: flex; flex-direction: column; gap: var(--gap);
  border-radius: var(--radius-card);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.text-center { text-align: center; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); text-align: left; }
th { font-weight: 600; }

/* FAQ */
details { border-bottom: 1px solid var(--border-color); padding: 16px 0; }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; }
details[open] summary::after { content: "-"; }
details p { margin-top: 16px; font-size: 0.95rem; color: var(--text-secondary); }

/* 步骤编号徽标 */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--color-accent); color: var(--color-dark);
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0; border-radius: var(--radius-card);
}
.step-list { counter-reset: step; }
.step-item { display: flex; gap: 16px; margin-bottom: var(--gap); align-items: flex-start; }
.step-item span { flex-shrink: 0; }

/* SVG 基础与动效 */
svg { width: 100%; height: auto; max-width: 100%; display: block; }
svg [class*="anim-"] { transform-box: fill-box; transform-origin: center; }

@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes slideIn {
  from { transform: translateX(-10px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 3s ease forwards; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-slide { animation: slideIn 0.8s ease forwards; }

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
