:root {
  /* 色板 */
  --color-dark: #13102D;
  --color-paper: #D6D4ED;
  --color-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;

  /* 默认纸面取色 */
  --color-bg: var(--color-paper);
  --color-fg: var(--color-text);
  --color-highlight: var(--color-brand);
  --color-link: var(--color-brand);
  --color-btn-bg: var(--color-accent);
  --color-btn-fg: var(--color-dark);
  --color-btn-outline: var(--color-text);
  --color-card-border: 1px solid rgba(23, 21, 35, 0.16);
  --color-card-shadow: none;

  /* 结构 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --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;
}

/* 深色面覆盖 */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
  --color-bg: var(--color-dark);
  --color-fg: var(--color-paper);
  --color-highlight: var(--color-accent);
  --color-link: var(--color-accent);
  --color-btn-bg: var(--color-accent);
  --color-btn-fg: var(--color-dark);
  --color-btn-outline: var(--color-paper);
  --color-card-border: 1px solid rgba(214, 212, 237, 0.15);
  --color-card-shadow: none;
}

/* 深色面内的浅色卡片恢复纸面取色 */
.card-light {
  background-color: var(--color-paper);
  color: var(--color-text);
  border: var(--color-card-border);
  box-shadow: var(--color-card-shadow);
  border-radius: var(--radius-card);
  --color-fg: var(--color-text);
  --color-highlight: var(--color-brand);
  --color-link: var(--color-brand);
  --color-btn-bg: var(--color-accent);
  --color-btn-fg: var(--color-dark);
  --color-btn-outline: var(--color-text);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.75;
  font-size: 16px;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { padding-left: 1.2em; margin: 0; }
li { margin-bottom: 0.5em; }

/* 容器与区块 */
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }
section { padding-block: var(--section-y); }
.section-header { margin-bottom: calc(var(--gap) * 1.5); }
.section-label {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--color-highlight); margin-bottom: 0.6em; text-transform: uppercase;
}
.section-label::before { content: ""; display: inline-block; width: 1.5em; height: 2px; background: currentColor; border-radius: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 0.8em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; }
p { margin: 0 0 1em; max-width: 38em; }
.hl { color: var(--color-highlight); font-weight: 600; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  height: 52px; padding: 0 1.5em; border-radius: var(--radius-btn);
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 3px; }
.btn-primary { background: var(--color-btn-bg); color: var(--color-btn-fg); border-color: var(--color-btn-bg); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary { background: transparent; color: var(--color-btn-outline); border-color: var(--color-btn-outline); }
.btn-secondary:hover { background: rgba(128,128,128,0.1); transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; stroke-width: 2; }

/* 卡片 */
.card {
  background: var(--color-bg);
  border: var(--color-card-border);
  box-shadow: var(--color-card-shadow);
  border-radius: var(--radius-card);
  padding: 1.5em;
}

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 0.8em 1em; text-align: left; border-bottom: 1px solid rgba(128,128,128,0.2); }
th { font-weight: 600; }
tr:last-child th, tr:last-child td { border-bottom: none; }

/* FAQ */
details { margin-bottom: 1em; border: var(--color-card-border); border-radius: var(--radius-card); padding: 1em 1.2em; }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 1.5em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(-50%) rotate(90deg); content: "›"; }
details p { margin-top: 0.8em; margin-bottom: 0; }

/* 步骤徽标 */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--color-btn-bg); color: var(--color-btn-fg);
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}

/* 页头 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(214, 212, 237, 0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(23, 21, 35, 0.08);
}
.bg-dark .site-header { background: rgba(19, 16, 45, 0.9); border-bottom-color: rgba(214, 212, 237, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: inherit; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 1.5em; list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; font-weight: 500; font-size: 0.95rem; opacity: 0.85; }
.nav-list a:hover, .nav-list a[aria-current="page"] { opacity: 1; color: var(--color-highlight); }

/* 页脚 */
.site-footer { padding: 3em 0; border-top: 1px solid rgba(128,128,128,0.15); margin-top: 2em; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2em; }
.footer-col h4 { margin: 0 0 0.8em; font-size: 0.9rem; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5em; }
.footer-col a { text-decoration: none; opacity: 0.8; font-size: 0.9rem; }
.footer-col a:hover { opacity: 1; }
.copyright { margin-top: 2em; font-size: 0.85rem; opacity: 0.7; text-align: center; }

/* SVG 基础与动效 */
svg { overflow: visible; }
svg.hero-svg { width: 100%; height: auto; }
svg.feature-svg { width: 100%; height: auto; max-width: 280px; }
svg.anim-group { transform-box: fill-box; transform-origin: center; }

/* 描边自绘 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLoop 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes drawLoop {
  0%, 100% { stroke-dashoffset: 1; }
  20%, 80% { stroke-dashoffset: 0; }
}

/* 呼吸浮动 */
.float-bubble { animation: floatSoft 4s ease-in-out infinite alternate; }
@keyframes floatSoft {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* 滑入 */
.slide-in { animation: slideIn 5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite; }
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 1; }
  10%, 90% { transform: translateX(4px); opacity: 0.85; }
}

/* 减少动态效果 */
@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;
  }
  .draw-path, .float-bubble, .slide-in { animation: none !important; }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .flex-row-mobile-up { flex-direction: column; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 0.8em 0; }
  .nav-list { order: 3; width: 100%; justify-content: center; margin-top: 0.5em; }
  .btn { width: 100%; }
}
.grid-2 { display: grid; gap: var(--gap); }
.flex-row-mobile-up { display: flex; gap: var(--gap); flex-wrap: wrap; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1em; }
.mb-2 { margin-bottom: 2em; }

/* 兜底：裁掉横向溢出 */
div.flex-row-mobile-up {
  overflow-x: clip;
}
