:root {
  /* 配色 */
  --color-dark: #140E25;
  --color-paper: #FCFCFD;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #6EEDD2;
  
  /* 圆角 */
  --radius-card: 8px;
  --radius-btn: 6px;
  
  /* 卡片边界 */
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  
  /* 节奏与密度 */
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  
  /* 内容最大宽度 */
  --content-max: 1120px;
  
  /* 标题处理 */
  --font-h1-size: clamp(2.6rem, 6.4vw, 5rem);
  --font-h1-weight: 500;
  --font-h1-line: 1.15;
  --font-h2-size: clamp(1.6rem, 3vw, 2.4rem);
  --font-h2-line: 1.25;
  
  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 基础排版 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 100%; height: auto; }

/* 容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 眉标 */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-brand);
  margin-bottom: 0.5rem;
}
.dark .section-label { color: var(--color-accent); }

/* 标题 */
h1, h2, h3, h4 {
  font-weight: var(--font-h1-weight);
  line-height: var(--font-h1-line);
  text-wrap: balance;
}
h1 { font-size: var(--font-h1-size); }
h2 {
  font-size: var(--font-h2-size);
  line-height: var(--font-h2-line);
  margin-bottom: var(--gap);
}
h3 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}
.hl { color: var(--color-brand); }
.dark .hl { color: var(--color-accent); }

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}
.nav-link[aria-current="page"] {
  color: var(--color-brand);
  font-weight: 700;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.dark .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

/* 卡片 */
.card {
  background-color: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  margin: var(--gap) 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-text);
  text-align: left;
}
th { font-weight: 700; background-color: rgba(25, 21, 35, 0.05); }

/* FAQ */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 0.75rem;
  padding: 1rem;
  background-color: var(--color-paper);
}
summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
  transform: rotate(-45deg);
  transition: transform 0.2s;
}
details[open] summary::before { transform: rotate(45deg); }
details p { margin-top: 0.75rem; color: var(--color-text); }

/* 提示框 */
.callout {
  border-left: 4px solid var(--color-brand);
  padding: 1rem 1.5rem;
  background-color: rgba(82, 20, 235, 0.05);
  margin: var(--gap) 0;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.dark .callout {
  border-left-color: var(--color-accent);
  background-color: rgba(110, 237, 210, 0.1);
}

/* 页脚 */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-paper);
  padding: var(--section-y) 0;
  margin-top: var(--section-y);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--color-paper); opacity: 0.8; }
.footer-links a:hover { opacity: 1; text-decoration: none; }

/* 深色面覆盖 */
.dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.dark .card {
  background-color: var(--color-paper);
  color: var(--color-text);
}

/* 网格布局辅助 */
.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); }

/* 步骤编号 */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  border-radius: var(--radius-btn);
  font-weight: 700;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* SVG 动效 */
@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes dashFlow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw 2s ease forwards;
}
.float { animation: float 4s ease-in-out infinite; }
.breathe { animation: breathe 3s ease-in-out infinite; }
.slide-in { animation: slideIn 0.8s ease forwards; }
.spin { animation: spin 12s linear infinite; }
.flow-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dashFlow 2s ease infinite;
}

@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;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-list { display: none; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
}
