:root {
  --bg-dark: #121531;
  --bg-paper: #E8E9EA;
  --text-body: #151723;
  --brand: #142CEB;
  --accent: #ED7D6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}

/* 表面上下文变量覆盖 */
.dark-surface { --c-bg: var(--bg-dark); --c-text: var(--bg-paper); --c-subtext: rgba(232,233,234,0.75); --c-accent: var(--accent); --c-link: var(--accent); --c-border: rgba(232,233,234,0.15); }
.paper-surface { --c-bg: var(--bg-paper); --c-text: var(--text-body); --c-subtext: rgba(21,23,35,0.65); --c-accent: var(--brand); --c-link: var(--brand); --c-border: rgba(21,23,35,0.12); }

.surface-wrap { background: var(--c-bg); color: var(--c-text); }

/* 排版 */
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: var(--gap); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) * 0.6); }
p { margin-bottom: var(--gap); max-width: 38em; }
ul, ol { padding-left: 1.2em; margin-bottom: var(--gap); }
li { margin-bottom: 0.5em; }

/* 容器与分节 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; position: relative; }
.section-divider { border-top: 1px solid var(--c-border); margin: 0 auto; max-width: var(--content-max); }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
@media (min-width: 768px) { .grid-2-alt { direction: rtl; } .grid-2-alt > *:nth-child(2) { direction: ltr; } }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 28px; height: 52px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
  border: none; outline: none;
}
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-secondary { background: transparent; border: 1px solid var(--c-text); color: var(--c-text); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* 卡片与面板 */
.card {
  background: color-mix(in srgb, var(--c-bg) 92%, white);
  border-radius: var(--radius-card); padding: var(--gap);
  border: var(--card-border) solid transparent;
  box-shadow: var(--card-shadow);
}
.panel-dark { background: var(--bg-dark); border-radius: var(--radius-card); padding: var(--gap); }
.panel-brand { background: var(--brand); border-radius: var(--radius-card); padding: var(--gap); }

/* 表格 */
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border); }
.spec-table th { font-weight: 700; width: 40%; }
.spec-table td { color: var(--c-subtext); }

/* 标签与眉标 */
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; color: var(--c-accent); margin-bottom: 0.8em; }
.hl { color: var(--c-accent); }

/* 步骤徽标 */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--bg-dark);
  font-weight: 800; font-size: 0.9rem; margin-right: 10px; flex-shrink: 0;
}

/* FAQ */
details { margin-bottom: var(--gap); border-bottom: 1px solid var(--c-border); padding-bottom: var(--gap); }
summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-left: 1.2em; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ''; position: absolute; left: 0; top: 0.4em; width: 8px; height: 8px; border-right: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent); transform: rotate(-45deg); }
details[open] summary::before { transform: rotate(45deg); top: 0.55em; }
details p { margin-top: 0.8em; color: var(--c-subtext); }

/* SVG 基础 */
svg.interface-svg { width: 100%; height: auto; max-width: 100%; overflow: visible; }
svg.interface-svg rect, svg.interface-svg circle, svg.interface-svg path, svg.interface-svg line { fill: none; stroke: currentColor; stroke-width: 1.5; }
svg.interface-svg .fill-solid { fill: currentColor; stroke: none; }
svg.interface-svg .accent-fill { fill: var(--accent); stroke: none; }
svg.interface-svg .brand-fill { fill: var(--brand); stroke: none; }
svg.interface-svg .dark-fill { fill: var(--bg-dark); stroke: none; }
svg.interface-svg .paper-fill { fill: var(--bg-paper); stroke: none; }

/* SVG 动效关键帧 */
@keyframes flowDash { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes slideInRight { 0% { transform: translateX(15px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes pulseDot { 0%, 100% { r: 2; opacity: 0.6; } 50% { r: 3.5; opacity: 1; } }

.anim-flow { animation: flowDash 4s linear infinite; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-float { animation: floatY 6s ease-in-out infinite; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }
.anim-slide { animation: slideInRight 1.8s ease-out forwards; }
.anim-pulse { animation: pulseDot 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* 减少动态效果 */
@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) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-2-alt { direction: ltr; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
}

/* 页头页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(232,233,234,0.85); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(21,23,35,0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo img { height: 28px; width: auto; vertical-align: middle; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { text-decoration: none; color: var(--text-body); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.site-footer { background: var(--bg-dark); color: var(--bg-paper); padding: 48px 0; margin-top: 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(232,233,234,0.7); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
