:root {
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  --color-bg: var(--color-paper);
  --color-fg: var(--color-text);
  --color-hl: var(--color-brand);
  --color-btn-text: var(--color-dark);
  --color-btn-bg: var(--color-accent);
  --color-btn-border: var(--color-text);
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 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;
}

/* 深色面覆盖 */
.section-dark {
  --color-bg: var(--color-dark);
  --color-fg: var(--color-paper);
  --color-hl: var(--color-accent);
  --color-btn-text: var(--color-paper);
  --color-btn-bg: var(--color-accent);
  --color-btn-border: var(--color-paper);
}
/* 深色面内的浅色卡片恢复纸面取色 */
.section-dark .card {
  --color-bg: var(--color-paper);
  --color-fg: var(--color-text);
  --color-hl: var(--color-brand);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: var(--line-height-base);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-hl); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }

/* 页头 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(244, 243, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(25, 21, 35, 0.08); }
.section-dark .site-header { background: rgba(33, 22, 60, 0.92); border-bottom-color: rgba(244, 243, 247, 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: 800; font-size: 1.2rem; color: inherit; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: inherit; font-weight: 500; font-size: 0.95rem; }
.nav a[aria-current="page"] { color: var(--color-hl); font-weight: 700; }
@media (max-width: 768px) { .nav { display: none; } }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 24px; height: 48px; border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.btn-primary { background: var(--color-btn-bg); color: var(--color-btn-text); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(237, 146, 110, 0.4); }
.btn-secondary { background: transparent; color: var(--color-btn-border); border: 2px solid var(--color-btn-border); }
.btn-secondary:hover { background: rgba(25, 21, 35, 0.05); }
.section-dark .btn-secondary { background: transparent; color: var(--color-paper); border-color: var(--color-paper); }
.section-dark .btn-secondary:hover { background: rgba(244, 243, 247, 0.1); }

/* 排版 */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 24px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 32px; }
h3 { font-size: 1.35rem; margin-bottom: 16px; }
p { margin-bottom: 1.2em; max-width: 38em; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-hl); margin-bottom: 12px; }
.hl { color: var(--color-hl); }
.lead { font-size: 1.15rem; line-height: 1.6; margin-bottom: 32px; }

/* 宽屏左索引右内容布局 */
.layout-index { display: grid; grid-template-columns: 240px 1fr; gap: var(--gap); }
.layout-index > * { min-width: 0; }
.index-nav { position: sticky; top: 80px; align-self: start; padding-top: 24px; border-right: 1px solid currentColor; padding-right: 24px; overflow-y: auto; max-height: calc(100vh - 100px); }
.index-nav ul { list-style: none; }
.index-nav li { margin-bottom: 12px; }
.index-nav a { color: inherit; opacity: 0.7; font-size: 0.9rem; display: block; padding: 4px 0; }
.index-nav a:hover, .index-nav a.active { opacity: 1; color: var(--color-hl); }
@media (max-width: 900px) {
  .layout-index { grid-template-columns: 1fr; }
  .index-nav { display: none; }
}

/* 区块与卡片 */
section { padding: var(--section-y) 0; }
.section-dark { background: var(--color-dark); color: var(--color-paper); }
.card { background: var(--color-bg); color: var(--color-fg); border: var(--card-border) solid currentColor; box-shadow: var(--card-shadow); border-radius: var(--radius-card); padding: 24px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.4); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }

/* 时间轴 */
.timeline { position: relative; padding-left: 24px; border-left: 2px solid currentColor; margin-left: 12px; }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item::before { content: ""; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-hl); border: 2px solid var(--color-bg); }
.timeline-time { font-weight: 700; font-size: 0.9rem; color: var(--color-hl); margin-bottom: 4px; }

/* 功能列表 */
.feature-list { display: flex; flex-direction: column; gap: 24px; }
.feature-item { padding: 24px; background: var(--color-bg); border: 1px solid currentColor; border-radius: var(--radius-card); }
.feature-item h3 { margin-top: 0; }

/* 表格 */
.data-table { width: 100%; min-width: 0; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid currentColor; }
.data-table code { word-break: break-all; white-space: normal; }
.data-table th { font-weight: 700; color: var(--color-hl); width: 40%; }
.data-table tr:last-child td { border-bottom: none; }

/* FAQ */
details { margin-bottom: 16px; border-bottom: 1px solid currentColor; padding-bottom: 16px; }
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.2em; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 12px; opacity: 0.9; }

/* 步骤条 */
.steps { display: flex; gap: 24px; flex-wrap: wrap; }
.step { flex: 1 1 200px; counter-increment: step; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--color-accent); color: var(--color-dark); font-weight: 800; border-radius: 8px; margin-bottom: 12px; }
@media (max-width: 600px) { .steps { flex-direction: column; } }

/* 页脚 */
.site-footer { padding: 48px 0; border-top: 1px solid currentColor; margin-top: var(--section-y); font-size: 0.9rem; opacity: 0.8; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: inherit; }

/* SVG 动效基础 */
.svg-visual { width: 100%; height: auto; max-width: 500px; margin: 0 auto; }
.grid-node { fill: var(--color-brand); opacity: 0.2; }
@keyframes gridPulse { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.8; } }
.anim-grid { animation: gridPulse 4s ease-in-out infinite; }
.anim-grid:nth-child(2n) { animation-delay: 0.4s; }
.anim-grid:nth-child(3n) { animation-delay: 0.8s; }
.anim-grid:nth-child(5n) { animation-delay: 1.2s; }
.bubble { transform-origin: center; animation: floatBubble 6s ease-in-out infinite; }
@keyframes floatBubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.draw-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 3s ease forwards; }
@keyframes drawLine { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
.spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 12s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* 减少动态效果支持 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
