:root {
  --color-deep: #271231;
  --color-paper: #F5F0E5;
  --color-text: #1F1523;
  --color-brand: #9B12D8;
  --color-accent: #ED6EC0;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* 表面与文字取色覆盖 */
.surface-dark { background-color: var(--color-deep); color: var(--color-paper); }
.surface-dark .hl { color: var(--color-accent); }
.surface-dark .brand-link { color: var(--color-accent); }
.surface-dark .icon-svg { color: var(--color-accent); }
.surface-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }

.surface-paper { background-color: var(--color-paper); color: var(--color-text); }
.surface-paper .hl { color: var(--color-brand); }
.surface-paper .brand-link { color: var(--color-brand); }
.surface-paper .icon-svg { color: var(--color-brand); }

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: var(--font-sans); font-size: 16px; line-height: 1.65; }
body { min-height: 100vh; display: flex; flex-direction: column; }
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); }
section { padding-block: var(--section-y); position: relative; }
section:not(.surface-dark) { border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex-row { display: flex; gap: var(--gap); align-items: center; flex-wrap: wrap; }
.mt-2 { margin-top: calc(var(--gap) * 2); }
.text-center { text-align: center; }

/* 排版 */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: calc(var(--gap) * 2); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) * 0.5); }
p { margin-bottom: var(--gap); max-width: 38em; }
.subtitle { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: calc(var(--gap) * 0.5); display: block; }
.surface-dark .subtitle { color: var(--color-accent); }
.surface-paper .subtitle { color: var(--color-brand); }

/* 组件：按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 52px; padding: 0 24px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease; border-radius: var(--radius-btn); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background-color: var(--color-accent); color: var(--color-deep); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary { border: 2px solid var(--color-text); color: var(--color-text); background: transparent; }
.btn-secondary:hover { transform: translateY(-2px); }

/* 组件：卡片 */
.card { background: var(--color-paper); border: var(--card-border); box-shadow: var(--card-shadow); padding: var(--gap); border-radius: var(--radius-card); }
.surface-dark .card { background: rgba(245, 240, 229, 0.08); border: 1px solid rgba(245, 240, 229, 0.1); }
.card-meta { font-size: 0.85rem; color: var(--color-text); opacity: 0.7; margin-bottom: 8px; }
.surface-dark .card-meta { color: var(--color-paper); }

/* 组件：表格 */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
th { font-weight: 700; }
td { min-width: 0; }
/* 修复下载表格在窄屏下的横向溢出 */
.download-table { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.download-table td, .download-table th { min-width: 0; white-space: normal; }

/* 组件：FAQ */
.faq details { border-bottom: 1px solid rgba(31, 21, 35, 0.1); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; }
.faq details[open] summary::after { content: "-"; }
.faq p { margin-top: 12px; }

/* 组件：步骤 */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.step-card { padding: var(--gap); border: 1px solid rgba(31, 21, 35, 0.1); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--color-accent); color: var(--color-deep); font-weight: 800; border-radius: var(--radius-btn); margin-bottom: 12px; }

/* 页头页脚 */
header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(31, 21, 35, 0.1); padding: 16px 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
nav a { margin-left: 24px; font-weight: 600; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--color-brand); }
footer { background: var(--color-deep); color: var(--color-paper); padding: 48px 0; margin-top: auto; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--gap); align-items: flex-start; }
footer a { color: var(--color-accent); margin-right: 24px; }

/* SVG 动效 */
.svg-grid .node { fill: var(--color-accent); opacity: 0.3; transform: scale(0.8); }
@keyframes pulseNode {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
.svg-grid .node:nth-child(3n+1) { animation: pulseNode 6s infinite ease-in-out 0s; }
.svg-grid .node:nth-child(3n+2) { animation: pulseNode 6s infinite ease-in-out 1.2s; }
.svg-grid .node:nth-child(3n+3) { animation: pulseNode 6s infinite ease-in-out 2.4s; }

.svg-bubble .bubble { opacity: 0.6; transform: translateY(4px); }
@keyframes floatBubble {
  0%, 100% { opacity: 0.6; transform: translateY(4px); }
  50% { opacity: 1; transform: translateY(-2px); }
}
.svg-bubble .b1 { animation: floatBubble 5s infinite ease-in-out 0s; }
.svg-bubble .b2 { animation: floatBubble 5s infinite ease-in-out 1.5s; }
.svg-bubble .b3 { animation: floatBubble 5s infinite ease-in-out 3s; }

.svg-sync .sync-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes flowLine {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
.svg-sync .line1 { animation: flowLine 4s infinite linear; }
.svg-sync .line2 { animation: flowLine 4s infinite linear 1s; }
.svg-sync .line3 { animation: flowLine 4s infinite linear 2s; }

/* 视觉面板缩放控制 */
.hero-visual svg, .feature-visual svg { width: 100%; height: auto; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; }
}
