:root {
  /* 色板 */
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;

  /* 设计 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: 1120px;

  /* 排版基准 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", 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(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
  overflow-x: hidden;
}

/* 面与背景 */
.dark-face { background: var(--color-dark); color: var(--color-paper); }
.paper-face { background: var(--color-paper); color: var(--color-text); }
.dark-face .hl, .dark-face .eyebrow { color: var(--color-accent); }
.paper-face .hl, .paper-face .eyebrow { color: var(--color-brand); }

/* 眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.paper-face .eyebrow, .paper-face .hl { color: var(--color-text) !important; }

/* 对比度修复：浅色背景上的深色文字 */
.comparison.section .container.timeline-item .tl-content span.eyebrow,
.comparison.section .container.timeline-item .tl-content h2,
.comparison.section .container.timeline-item .tl-content span.hl,
#features .container.timeline-item .tl-content span.eyebrow,
#features .container.timeline-item .tl-content h2,
#features .container.timeline-item .tl-content span.hl,
#features .container.timeline-item .tl-content dt,
.comparison.section .container.timeline-item .tl-content th,
.comparison.section .container.timeline-item .tl-content td {
  color: #1f1523 !important;
}

/* 统一浅色区块底色，避免中途变色导致对比度不足 */
.paper-face section.comparison.section,
.paper-face section.features.section {
  background-color: var(--color-paper) !important;
}

/* 对比度修复：下载页步骤徽标与内容 */
.container .step-list .step-item span.step-badge {
  color: #1f1523 !important;
}

/* 标题 */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--gap);
  letter-spacing: 0.02em;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
p { margin-bottom: 1rem; max-width: 38em; }

/* 链接与强调 */
.hl { font-weight: 600; }
a:hover { opacity: 0.85; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(237, 110, 192, 0.4); }
.btn-secondary {
  background: transparent;
  border-color: var(--color-text);
  color: var(--color-text);
}
.dark-face .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); opacity: 0.8; }

/* 布局节奏 */
.section { padding: var(--section-y) 0; position: relative; }
.section + .section { border-top: 1px solid currentColor; opacity: 0.12; }

/* 纵向主线布局 */
.timeline-wrapper {
  position: relative;
  padding-left: 24px;
}
.timeline-wrapper::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: currentColor;
  opacity: 0.15;
}
.timeline-item {
  position: relative;
  margin-bottom: var(--gap);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.timeline-item:nth-child(even) .tl-content { order: 2; }
.timeline-item:nth-child(even) .tl-visual { order: 1; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  z-index: 1;
}
.tl-content, .tl-visual { min-width: 0; }
@media (max-width: 768px) {
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item:nth-child(even) .tl-content,
  .timeline-item:nth-child(even) .tl-visual { order: unset; }
  .timeline-wrapper { padding-left: 16px; }
  .timeline-item::before { left: -24px; }
}

/* 组件：卡片 */
.card {
  background: var(--color-paper);
  border: var(--card-border) solid currentColor;
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dark-face .card { background: rgba(255,255,255,0.05); }
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -12px rgba(31, 21, 35, 0.35); }

/* 组件：表格 */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; min-width: 0; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid currentColor; opacity: 0.85; }
th { font-weight: 700; }
td:first-child { font-weight: 600; }

/* 组件：FAQ */
details {
  margin-bottom: 1rem;
  border-bottom: 1px solid currentColor;
  opacity: 0.85;
  padding-bottom: 1rem;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  font-weight: 700;
  width: 20px;
  text-align: center;
}
details[open] summary::before { content: "-"; }
details p { margin-top: 0.5rem; font-size: 0.95rem; }

/* 组件：步骤徽标 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  margin-right: 10px;
}

/* 导航与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid currentColor;
  opacity: 0.95;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-weight: 600; font-size: 0.95rem; }
.nav-links a[aria-current="page"] { color: var(--color-brand); }
.dark-face .nav-links a[aria-current="page"] { color: var(--color-accent); }

.site-footer {
  padding: var(--section-y) 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 1rem; }
.footer-links a:hover { opacity: 0.7; }

/* SVG 动效基础 */
.svg-panel { width: 100%; height: auto; }
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 3s ease forwards;
}
.anim-float { animation: float-soft 4s ease-in-out infinite; }
.anim-pulse { animation: pulse-opacity 2s ease-in-out infinite; }
.anim-slide-in { animation: slide-in 0.8s ease-out forwards; }
.anim-rotate-snap {
  transform-box: fill-box;
  transform-origin: center;
  animation: rotate-snap 6s ease-in-out infinite alternate;
}

@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes slide-in { from { transform: translateX(-16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes rotate-snap { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-draw, .anim-float, .anim-pulse, .anim-slide-in, .anim-rotate-snap {
    animation: none !important;
  }
}
