:root {
  /* 色板 */
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-body: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;
  /* 派生底色 */
  --color-paper-light: #EEEBEF;
  --color-dark-deep: #1A0A1D;
  --color-text-on-dark: #F6F3F7;
  --color-text-on-paper: #201523;

  /* 结构 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;

  /* 字体与排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --lh-prose: 1.55;
}

*, *::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(--lh-prose);
  color: var(--color-body);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
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-inline: auto;
  padding-inline: var(--gap);
  overflow-x: hidden;
}
.section {
  padding-block: var(--section-y);
  position: relative;
  overflow-x: hidden;
}
.bg-dark { background: var(--color-dark); color: var(--color-text-on-dark); }
.bg-dark .hl { color: var(--color-accent); }
.bg-dark .eyebrow { color: var(--color-accent); }
.bg-dark .link { color: var(--color-accent); }
.bg-paper { background: var(--color-paper); color: var(--color-text-on-paper); }
.bg-paper .hl { color: var(--color-brand); }
.bg-paper .eyebrow { color: var(--color-brand); }
.bg-paper .link { color: var(--color-brand); }
.bg-paper-light { background: var(--color-paper-light); color: var(--color-text-on-paper); }
.bg-paper-light .hl { color: var(--color-brand); }
.bg-paper-light .eyebrow { color: var(--color-brand); }
.bg-paper-light .link { color: var(--color-brand); }

/* 排版 */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: var(--gap); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: calc(var(--gap) * 1.5); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: var(--gap); }
p { margin-bottom: var(--gap); max-width: 38em; }
.text-small { font-size: 0.875rem; opacity: 0.85; }
.hl { font-weight: 600; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: calc(var(--gap) * 0.5);
  text-transform: uppercase;
}

/* 导航与页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 0.7; }
.nav-links a[aria-current="page"] { color: var(--color-brand); }
.site-footer {
  background: var(--color-dark); color: var(--color-text-on-dark);
  padding-block: 32px; font-size: 0.85rem;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { opacity: 0.8; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding-inline: 20px;
  font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer; transition: transform 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--color-accent); color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-1px); background: #d95b60; }
.btn-secondary {
  background: transparent; border: 1px solid currentColor; color: inherit;
}
.btn-secondary:hover { transform: translateY(-1px); opacity: 0.85; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* 卡片与面板 */
.card {
  background: var(--color-paper-light);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  border-radius: var(--radius-card);
}
.panel {
  background: var(--color-dark-deep);
  padding: var(--gap);
  border-radius: var(--radius-card);
  width: 100%; max-width: 100%;
  overflow: hidden;
}
.panel svg { width: 100%; height: auto; }

/* 网格与列表 */
.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-list { counter-reset: step; }
.step-item { counter-increment: step; display: flex; gap: 16px; align-items: flex-start; }
.step-badge {
  flex-shrink: 0; width: 32px; height: 32px;
  background: var(--color-accent); color: var(--color-dark);
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-card);
}
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 768px) { .feature-grid { grid-template-columns: 1fr; } }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; margin-top: var(--gap); }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
.data-table th { font-weight: 600; }
.bg-dark .data-table th, .bg-dark .data-table td { border-bottom-color: rgba(255,255,255,0.1); }

/* FAQ */
details { margin-bottom: var(--gap); border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: var(--gap); }
.bg-dark details { border-bottom-color: rgba(255,255,255,0.1); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; }
details[open] summary::after { content: "-"; }
details p { margin-top: 12px; }

/* SVG 动效基础 */
svg.anim-svg { width: 100%; height: auto; }
.star { animation: twinkle 4s ease-in-out infinite alternate; }
.line-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.line-draw.animate { animation: draw-line 6s linear infinite; }
.float-group { animation: float 8s ease-in-out infinite alternate; }
.rotate-center { transform-box: fill-box; transform-origin: center; }
.rotate-center.spin-slow { animation: spin 20s linear infinite; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}
@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .star, .line-draw.animate, .float-group, .rotate-center.spin-slow {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 焦点可见性 */
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.bg-dark :focus-visible { outline-color: var(--color-accent); }
