:root {
  /* 色板 */
  --bg-dark: #1B1231;
  --bg-paper: #DBD4ED;
  --text-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;

  /* 结构性设计 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid var(--text-body);
  --card-shadow: 4px 4px 0 var(--text-body);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;

  /* 排版基础 */
  --font-base: system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --lh-body: 1.55;
  --lh-heading: 1.25;
}

/* 面层变量覆盖：纸面 */
.paper-surface {
  --bg-surface: var(--bg-paper);
  --text-primary: var(--text-body);
  --text-secondary: var(--text-body);
  --brand-color: var(--color-brand);
  --accent-color: var(--color-accent);
  --border-color: var(--text-body);
  --card-bg: var(--bg-paper);
  --icon-color: var(--text-body);
}

/* 面层变量覆盖：深色 */
.dark-surface {
  --bg-surface: var(--bg-dark);
  --text-primary: var(--bg-paper);
  --text-secondary: var(--bg-paper);
  --brand-color: var(--color-accent);
  --accent-color: var(--color-accent);
  --border-color: var(--bg-paper);
  --card-bg: var(--bg-paper);
  --icon-color: var(--bg-paper);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  background: var(--bg-paper);
  color: var(--text-body);
  line-height: var(--lh-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* 面包屑/眉标 */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

/* 标题系统 */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: 0;
  line-height: var(--lh-heading);
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-block-end: 1rem; }
h3 { font-size: 1.25rem; margin-block-end: 0.5rem; }
.text-hl { color: var(--brand-color); }
.dark-surface .text-hl { color: var(--accent-color); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  border: none;
}
.btn-primary {
  background: var(--accent-color);
  color: var(--bg-dark);
}
.btn-secondary {
  background: transparent;
  border: 2px solid var(--text-body);
  color: var(--text-body);
}
.dark-surface .btn-secondary {
  border-color: var(--bg-paper);
  color: var(--bg-paper);
}
.btn:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }

/* 卡片与面板 */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 24px;
  position: relative;
}
.panel {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  table-layout: fixed;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  overflow-wrap: anywhere;
}
.data-table th { font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }

/* FAQ */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--card-bg);
  box-shadow: 2px 2px 0 var(--border-color);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-left: 24px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border: 2px solid var(--brand-color);
  border-radius: 50%;
}
.dark-surface summary::before { border-color: var(--accent-color); }
details[open] summary::after { content: " −"; }
details p { margin-top: 12px; color: var(--text-secondary); }

/* 页头与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(219, 212, 237, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--text-body);
  padding: 12px 0;
}
.dark-surface .site-header { background: rgba(27, 18, 49, 0.92); border-bottom-color: var(--bg-paper); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a[aria-current="page"] { color: var(--brand-color); font-weight: 700; }
.dark-surface .nav-links a[aria-current="page"] { color: var(--accent-color); }

.site-footer {
  background: var(--bg-dark);
  color: var(--bg-paper);
  padding: 48px 0;
  text-align: center;
  font-size: 0.9rem;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.footer-links a { opacity: 0.8; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }

/* 布局网格 */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-layout { grid-template-columns: 1.1fr 0.9fr; }
}

/* 时间线 */
.timeline { counter-reset: step; }
.timeline li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
}
.timeline li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-color);
  color: var(--bg-dark);
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* 列表样式 */
.check-list { margin-top: 12px; }
.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--brand-color);
  border-radius: 50%;
}
.dark-surface .check-list li::before { background: var(--accent-color); }

/* 定义列表 */
.feature-dl dt {
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.feature-dl dd {
  margin-left: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* SVG 动效基础 */
svg { width: 100%; height: auto; }
svg path, svg circle, svg rect, svg line, svg polyline, svg polygon {
  vector-effect: non-scaling-stroke;
}
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.float-group {
  animation: float-bubble 4s ease-in-out infinite alternate;
}
.breathe-group {
  animation: breathe-dots 2.5s ease-in-out infinite alternate;
}
.slide-panel {
  animation: slide-in 3s ease-out forwards;
  transform: translateX(20px);
  opacity: 0;
}
@keyframes float-bubble {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}
@keyframes breathe-dots {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}
@keyframes slide-in {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  50%, 100% { stroke-dashoffset: 0; }
}
@keyframes flow-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
  .draw-path { stroke-dashoffset: 0; }
  .slide-panel { transform: none; opacity: 1; }
}
