:root {
  /* 色板 */
  --c-dark: #13102D;
  --c-paper: #D6D4ED;
  --c-text: #171523;
  --c-brand: #2714EB;
  --c-accent: #89ED6E;

  /* 结构与尺寸 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(23,21,35,0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;

  /* 排版 */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-body: 1.55;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 主题层 */
.theme-dark {
  background: var(--c-dark);
  color: var(--c-paper);
}
.theme-dark .hl { color: var(--c-accent); }
.theme-dark .eyebrow { color: var(--c-accent); }
.theme-dark .btn-primary { background: var(--c-accent); color: var(--c-dark); }
.theme-dark .btn-secondary { border-color: var(--c-paper); color: var(--c-paper); }
.theme-dark .btn-secondary:hover { background: rgba(214,212,237,0.12); }

.theme-paper {
  background: var(--c-paper);
  color: var(--c-text);
}
.theme-paper .hl { color: var(--c-brand); }
.theme-paper .eyebrow { color: var(--c-brand); }
.theme-paper .btn-primary { background: var(--c-brand); color: var(--c-paper); }
.theme-paper .btn-secondary { border-color: var(--c-text); color: var(--c-text); }
.theme-paper .btn-secondary:hover { background: rgba(23,21,35,0.08); }

.card-light {
  background: var(--c-paper);
  color: var(--c-text);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}
.card-light .hl { color: var(--c-brand); }
.card-light .eyebrow { color: var(--c-brand); }
.card-light .btn-primary { background: var(--c-brand); color: var(--c-paper); }
.card-light .btn-secondary { border-color: var(--c-text); color: var(--c-text); }

/* 容器与区块 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* 排版组件 */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  display: inline-block;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 0.8em;
  text-wrap: balance;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
}

p {
  margin-bottom: 1em;
  max-width: 38em;
}

.hl {
  font-weight: 700;
}

/* 按钮 */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

/* 胶囊特性 */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid currentColor;
  font-size: 0.85rem;
  opacity: 0.85;
}

.pill svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid currentColor;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid currentColor;
}

th {
  font-weight: 600;
  opacity: 0.8;
}

td a {
  color: var(--c-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.theme-dark td a { color: var(--c-accent); }

/* FAQ */
details {
  border: 1px solid currentColor;
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: var(--gap);
  transition: background 0.2s ease;
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 24px;
}

summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1em;
}

details[open] summary::after { content: "−"; }

details p {
  margin-top: 12px;
  opacity: 0.9;
}

/* 步骤时间线 */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid currentColor;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: attr(data-step);
  position: absolute;
  left: -36px;
  top: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-accent);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 8px;
}
.theme-paper .timeline-item::before { background: var(--c-brand); color: var(--c-paper); }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(214,212,237,0.85);
  border-bottom: 1px solid rgba(23,21,35,0.08);
}
.theme-dark .site-header {
  background: rgba(19,16,45,0.85);
  border-bottom-color: rgba(214,212,237,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  height: 28px;
  width: auto;
}

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] { font-weight: 600; }

.site-footer {
  padding: 48px 0;
  border-top: 1px solid currentColor;
  margin-top: var(--section-y);
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gap);
}

/* SVG 动效基础 */
.svg-visual {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.svg-visual path, .svg-visual rect, .svg-visual circle, .svg-visual polyline, .svg-visual line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.anim-draw {
  animation: drawLine 4s ease-in-out infinite alternate;
}

.anim-float {
  animation: floatY 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.anim-pulse {
  animation: pulseOpacity 3s ease-in-out infinite;
}

.anim-slide {
  animation: slideInX 1s ease-out forwards;
}

.anim-flow {
  animation: flowDash 2s linear infinite;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes slideInX {
  from { transform: translateX(-18px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes flowDash {
  to { stroke-dashoffset: -20; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 响应式微调 */
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .nav { margin-top: 8px; }
  h1 { font-size: 2rem; }
}
