:root {
  /* 色板 */
  --bg-dark: #271231;
  --bg-paper: #F6F3F7;
  --text-body: #1F1523;
  --brand-color: #9E13DD;
  --accent-color: #ED6EC0;
  
  /* 衍生颜色 */
  --text-on-dark: var(--bg-paper);
  --text-on-dark-accent: var(--accent-color);
  
  /* 设计 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  
  /* 其他 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-base: 1.75;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-base);
  color: var(--text-body);
  background-color: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s ease; }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* 布局容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 眉标 */
.label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  display: inline-block;
}
.paper .label { color: var(--brand-color); }
.dark .label { color: var(--accent-color); }

/* 标题 */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}
h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 1.5rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.hl { color: var(--brand-color); }
.dark .hl { color: var(--accent-color); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--brand-color); outline-offset: 2px; }
.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-dark);
}
.btn-primary:hover { background-color: #d95aae; }
.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--text-body);
  color: var(--text-body);
}
.dark .btn-secondary {
  border-color: var(--text-on-dark);
  color: var(--text-on-dark);
}
.btn-secondary:hover { background-color: rgba(31, 21, 35, 0.05); }
.dark .btn-secondary:hover { background-color: rgba(246, 243, 247, 0.05); }

/* 页面背景类 */
.paper { background-color: var(--bg-paper); color: var(--text-body); }
.dark { background-color: var(--bg-dark); color: var(--text-on-dark); }
.dark .btn-secondary { border-color: var(--text-on-dark); color: var(--text-on-dark); }

/* 区块通用 */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-paper);
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
  backdrop-filter: blur(8px);
}
.dark .site-header { background-color: var(--bg-dark); border-color: rgba(246, 243, 247, 0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-list { display: flex; gap: 2rem; }
.nav-link { font-size: 0.95rem; font-weight: 500; opacity: 0.8; }
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; color: var(--brand-color); }
.dark .nav-link:hover, .dark .nav-link[aria-current="page"] { color: var(--accent-color); }

/* 页脚 */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(31, 21, 35, 0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}
.dark .site-footer { border-color: rgba(246, 243, 247, 0.1); }

/* 卡片 */
.card {
  background-color: #fff;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  border-radius: var(--radius-card);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 14px 32px -12px rgba(31, 21, 35, 0.35); }
.dark .card { background-color: #2f173b; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
}
.dark th, .dark td { border-color: rgba(246, 243, 247, 0.1); }
td:first-child { font-weight: 600; width: 40%; }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
.dark .faq-item { border-color: rgba(246, 243, 247, 0.1); }
.faq-item summary {
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--brand-color);
}
.dark .faq-item summary::after { color: var(--accent-color); }
.faq-item[open] summary::after { content: '-'; }
.faq-item p { padding-bottom: 1.5rem; opacity: 0.9; line-height: 1.8; }

/* SVG 动效基础 */
.svg-anim path, .svg-anim circle, .svg-anim rect {
  transition: all 0.3s ease;
}
.svg-anim [class*="flow-"] {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.flow-line { animation: flowDash 3s linear infinite; }
.float-anim { animation: float 6s ease-in-out infinite; }
.pulse-anim { animation: pulse 4s ease-in-out infinite; }

/* 减少动态效果 */
@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;
  }
  .flow-line, .float-anim, .pulse-anim { animation: none !important; }
}

/* 响应式网格 */
.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); }
.flex-col { flex-direction: column; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
