:root {
  /* 色板 */
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;

  /* 结构 token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  /* 排版 token */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-tight: 1.15;
  --lh-body: 1.75;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: var(--lh-tight);
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { max-width: 38em; margin: 0 0 1.25rem; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
img, svg { display: block; max-width: 100%; }

/* 容器与布局 */
.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 表面层取色规则 */
.surface-dark { background: var(--color-dark); color: var(--color-paper); }
.surface-dark .hl { color: var(--color-accent); }
.surface-dark a:not(.btn) { color: var(--color-accent); }
.surface-dark .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.surface-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.surface-dark input, .surface-dark textarea { background: rgba(219, 212, 237, 0.1); border-color: rgba(219, 212, 237, 0.3); color: var(--color-paper); }

.surface-paper { background: var(--color-paper); color: var(--color-text); }
.surface-paper .hl { color: var(--color-brand); }
.surface-paper a:not(.btn) { color: var(--color-brand); }
.surface-paper .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.surface-paper .btn-secondary { border-color: var(--color-text); color: var(--color-text); }

/* 眉标与高亮 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.surface-paper .eyebrow { color: var(--color-brand); }
.surface-dark .eyebrow { color: var(--color-accent); }
.hl { color: inherit; } /* 由表面类覆盖 */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* 卡片 */
.card {
  border: var(--card-border);
  background: #ffffff;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  border-radius: var(--radius-card);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(25, 21, 35, 0.1); }
th { font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* 步骤条 */
.steps { display: flex; gap: var(--gap); flex-wrap: wrap; counter-reset: step; }
.step-item { flex: 1 1 200px; position: relative; padding-left: 2.5rem; }
.step-item::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2rem; height: 2rem;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
}
.surface-dark .step-item::before { background: var(--color-accent); color: var(--color-dark); }

/* FAQ */
details { border: var(--card-border); margin-bottom: 0.75rem; background: #ffffff; }
summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
}
details[open] summary::after { content: "−"; }
details[open] summary { border-bottom: var(--card-border); }
details > div { padding: 1rem 1.25rem; }

/* 新闻卡片 */
.news-card { border: var(--card-border); background: #ffffff; padding: 1.5rem; }
.news-card time { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; opacity: 0.7; }
.news-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.news-card p { margin: 0; font-size: 0.95rem; line-height: 1.6; }

/* SVG 动效基类 */
.svg-panel { width: 100%; height: auto; max-width: 600px; margin: 0 auto; }
.svg-panel svg { width: 100%; height: auto; }
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.node-dot { transform-box: fill-box; transform-origin: center; }

@keyframes drawFlow {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes slideInCard {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.animate-draw { animation: drawFlow 3s linear infinite; }
.animate-node { animation: nodePulse 4s ease-in-out infinite; }
.animate-float { animation: floatBubble 5s ease-in-out infinite; }
.animate-slide { animation: slideInCard 6s ease-in-out infinite alternate; }

/* 响应式调整 */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column-reverse; }
  .steps { flex-direction: column; }
  .step-item { padding-left: 0; padding-top: 2.5rem; }
  .step-item::before { top: 0; left: 0; }
}

/* 减少动态效果 */
@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;
  }
  .animate-draw, .animate-node, .animate-float, .animate-slide { animation: none !important; }
}
