:root {
  --color-dark: #17203F;
  --color-paper: #FCFCFD;
  --color-text: #151823;
  --color-brand: #1441EB;
  --color-accent: #6EEDBD;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(21, 24, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  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 {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}
.section + .section { border-top: 1px solid rgba(21, 24, 35, 0.1); }

/* 表面取色规则 */
.surface-dark {
  background: var(--color-dark);
  color: var(--color-paper);
}
.surface-dark h1, .surface-dark h2, .surface-dark h3, .surface-dark p, .surface-dark li { color: var(--color-paper); }
.surface-dark a:not(.btn) { color: var(--color-accent); }
.surface-dark .hl { color: var(--color-accent); }

.surface-paper {
  background: var(--color-paper);
  color: var(--color-text);
}
.surface-paper h1, .surface-paper h2, .surface-paper h3, .surface-paper p, .surface-paper li { color: var(--color-text); }
.surface-paper a:not(.btn) { color: var(--color-brand); }
.surface-paper .hl { color: var(--color-brand); }

/* 排版 */
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; line-height: 1.25; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; line-height: 1.25; margin-bottom: var(--gap); text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.lead { font-size: 1.125rem; line-height: 1.6; margin-bottom: 1.5rem; }
.masthead {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.surface-dark .masthead { color: var(--color-accent); }
.surface-paper .masthead { color: var(--color-brand); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
}
.surface-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.surface-paper .btn-secondary { color: var(--color-text); border-color: var(--color-text); }

/* 卡片与网格 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 12px 32px -12px rgba(21, 24, 35, 0.35); }

/* 表格 */
.table-wrap { overflow-x: auto; margin: var(--gap) 0; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(21, 24, 35, 0.1); }
th { font-weight: 600; background: rgba(21, 24, 35, 0.03); }

/* FAQ */
details {
  border: 1px solid rgba(21, 24, 35, 0.1);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  overflow: hidden;
}
summary {
  padding: 16px;
  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; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 16px 16px; line-height: 1.7; color: var(--color-text); }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 24, 35, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.brand img { width: 32px; height: 32px; }
nav ul { display: flex; gap: 24px; }
nav a { font-weight: 500; font-size: 0.95rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
.site-footer {
  padding: var(--gap) 0;
  border-top: 1px solid rgba(21, 24, 35, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(21, 24, 35, 0.7);
}

/* SVG 视觉组件基础 */
.svg-visual { width: 100%; height: auto; }
.svg-panel {
  width: 100%;
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}
.surface-dark .svg-panel { background: rgba(255,255,255,0.05); }

/* SVG 动效定义 */
.anim-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw { animation: draw 4s ease-in-out infinite alternate; }
.anim-float { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-pulse { animation: pulse 3s ease-in-out infinite; }
.anim-slide { animation: slide 5s ease-in-out infinite alternate; }
.anim-orbit { animation: orbit 8s linear infinite; transform-box: fill-box; transform-origin: center; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes slide { from { transform: translateX(-10px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; }
  nav ul { gap: 16px; margin: 8px 0; }
  .grid-split { grid-template-columns: 1fr !important; }
  .flow-row { flex-direction: column; align-items: flex-start; }
}
.grid-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.flow-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.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: 700;
  border-radius: 6px;
  margin-right: 8px;
  flex-shrink: 0;
}
.list-check li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-brand);
}
.surface-dark .list-check li::before { background: var(--color-accent); }

/* 兜底：裁掉横向溢出 */
div.download-grid {
  overflow-x: clip;
}
