:root {
  /* 色板 */
  --color-dark: #2D1438;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #6EEDA8;

  /* 设计 Token */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;

  /* 排版 */
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --heading-weight: 600;
  --body-lineheight: 1.55;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--body-lineheight);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }

/* 面色分区 */
.section-paper { background-color: var(--color-paper); color: var(--color-text); }
.section-dark { background-color: var(--color-dark); color: var(--color-paper); }
.section-dark .hl { color: var(--color-accent); }
.section-dark a:not(.btn) { color: var(--color-accent); }
.section-dark .card-light { background-color: var(--color-paper); color: var(--color-text); }
.section-dark .card-light .hl { color: var(--color-brand); }
.section-dark .card-light a:not(.btn) { color: var(--color-brand); }

/* 区块头部 */
.section-header { margin-bottom: calc(var(--gap) * 2); }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-paper .eyebrow { color: var(--color-brand); }
.section-dark .eyebrow { color: var(--color-accent); }

/* 标题 */
h1, h2, h3 { font-weight: var(--heading-weight); line-height: 1.25; margin-bottom: var(--gap); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: var(--gap); max-width: 38em; }
.hl { color: var(--color-brand); font-weight: 700; }
.section-dark .hl { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0 1.5rem; height: 52px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border: none; text-decoration: none;
}
.btn-primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(110, 237, 168, 0.4); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.section-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { opacity: 0.85; }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

/* 卡片与网格 */
.card {
  background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--card-shadow); border: var(--card-border);
  padding: calc(var(--gap) * 1.5); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(31, 21, 35, 0.35); }
.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); }

/* 视觉面板 */
.visual-panel {
  background: var(--color-dark); border-radius: var(--radius-card);
  padding: 1.5rem; box-shadow: var(--card-shadow); position: relative; overflow: hidden;
}
.section-dark .visual-panel { background: rgba(255,255,255,0.08); }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.15); }
th { font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* FAQ */
details { border-bottom: 1px solid rgba(31, 21, 35, 0.15); padding: 1rem 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin-top: 0.75rem; font-size: 0.95rem; }

/* 时间轴 */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid rgba(31, 21, 35, 0.15); }
.section-dark .timeline { border-left-color: rgba(255,255,255,0.2); }
.timeline-item { position: relative; margin-bottom: var(--gap); }
.timeline-item::before {
  content: ""; position: absolute; left: -2.35rem; top: 0.5rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--color-brand);
}
.section-dark .timeline-item::before { background: var(--color-accent); }
.time-mark { font-size: 0.85rem; font-weight: 700; color: var(--color-brand); margin-bottom: 0.25rem; }
.section-dark .time-mark { color: var(--color-accent); }

/* 步骤徽标 */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; background: var(--color-accent);
  color: var(--color-dark); font-weight: 800; font-size: 0.9rem; margin-right: 0.75rem;
}

/* SVG 动效基础 */
.svg-wrap { width: 100%; height: auto; max-width: 100%; }
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes dash {
  to { stroke-dashoffset: 0; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.anim-breathe { animation: breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash 4s ease forwards; }
.anim-slide { animation: slideUp 0.8s ease forwards; }
.anim-float { animation: float 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* 响应式导航 */
header { position: sticky; top: 0; z-index: 100; background: rgba(246, 243, 247, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.2rem; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-weight: 500; font-size: 0.95rem; padding: 0.25rem 0; position: relative; }
nav a:hover { color: var(--color-brand); }
nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text); }

footer { background: var(--color-dark); color: var(--color-paper); padding: var(--section-y) 0; }
footer .container { display: flex; flex-direction: column; gap: var(--gap); }
footer a { opacity: 0.8; transition: opacity 0.2s; }
footer a:hover { opacity: 1; }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  nav ul { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--color-paper); flex-direction: column; padding: 1rem; box-shadow: var(--card-shadow); }
  nav ul.open { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column-reverse !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .anim-breathe, .anim-draw, .anim-slide, .anim-float { animation: none !important; opacity: 1 !important; transform: none !important; }
}
