:root {
  --dark: #17203F;
  --paper: #FCFCFD;
  --body-text: #151823;
  --brand: #1441EB;
  --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, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--dark);
  color: var(--body-text);
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 主题上下文变量覆盖 */
.theme-dark {
  background-color: var(--dark);
  color: var(--paper);
}
.theme-dark .hl { color: var(--accent); }
.theme-dark .eyebrow { color: var(--accent); }
.theme-dark .btn-secondary { color: var(--paper); border-color: var(--paper); }
.theme-dark table th, .theme-dark table td { color: var(--paper); border-color: rgba(252, 252, 253, 0.15); }
.theme-dark details { border-color: rgba(252, 252, 253, 0.15); }
.theme-dark summary { color: var(--paper); }

.theme-light {
  background-color: var(--paper);
  color: var(--body-text);
}
.theme-light .hl { color: var(--brand); }
.theme-light .eyebrow { color: var(--brand); }
.theme-light .btn-secondary { color: var(--body-text); border-color: var(--body-text); }
.theme-light table th, .theme-light table td { color: var(--body-text); border-color: rgba(21, 24, 35, 0.1); }
.theme-light details { border-color: rgba(21, 24, 35, 0.1); }
.theme-light summary { color: var(--body-text); }

/* 排版基础 */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-top: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: 1rem; }
p { max-width: 38em; margin-bottom: 1.5rem; line-height: 1.75; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); overflow-x: hidden; }
.section-panel { background: var(--paper); border-radius: var(--radius-card); padding: var(--gap); margin: var(--gap) auto; max-width: var(--content-max); box-shadow: var(--card-shadow); overflow-x: hidden; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 页头与页脚 */
header { position: sticky; top: 0; z-index: 100; background: rgba(23, 32, 63, 0.95); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(252, 252, 253, 0.1); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.25rem; color: var(--paper); }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { color: rgba(252, 252, 253, 0.8); font-size: 0.95rem; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--paper); }
footer { background: var(--dark); color: rgba(252, 252, 253, 0.6); padding: 3rem 0; font-size: 0.9rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(252, 252, 253, 0.8); }
.footer-links a:hover { color: var(--paper); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; cursor: pointer; border: none; min-height: 48px; }
.btn-primary { background: var(--accent); color: var(--dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(110, 237, 189, 0.3); }
.btn-secondary { background: transparent; color: var(--body-text); border: 1px solid var(--body-text); }
.btn-secondary:hover { transform: translateY(-2px); background: rgba(21, 24, 35, 0.05); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 卡片与组件 */
.card { background: var(--paper); border: 1px solid rgba(21, 24, 35, 0.08); border-radius: var(--radius-card); padding: 1.5rem; transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 8px 24px rgba(21, 24, 35, 0.12); }
.theme-dark .card { background: rgba(252, 252, 253, 0.05); border-color: rgba(252, 252, 253, 0.1); color: var(--paper); }
.feature-group-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--brand); display: inline-block; }
.theme-dark .feature-group-title { border-color: var(--accent); color: var(--accent); }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
th, td { padding: 0.75rem 1rem; text-align: left; }
th { font-weight: 700; }
td:first-child { font-weight: 600; }

/* FAQ */
details { margin-bottom: 1rem; }
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.2rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { margin-top: 0.75rem; line-height: 1.7; }

/* 流程条 */
.flow-container { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 2rem 0; }
.flow-node { background: var(--brand); color: var(--paper); padding: 0.75rem 1.25rem; border-radius: var(--radius-btn); font-weight: 600; font-size: 0.95rem; }
.theme-dark .flow-node { background: var(--accent); color: var(--dark); }
.flow-arrow { width: 48px; height: 24px; flex-shrink: 0; }

/* SVG 动效基础 */
.svg-panel { width: 100%; height: auto; display: block; }
svg { width: 100%; height: auto; }
svg .anim-draw, svg .anim-flow { stroke-dasharray: 1; stroke-dashoffset: 0; }
svg .anim-float { animation: svg-float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
svg .anim-breathe { animation: svg-breathe 2.5s ease-in-out infinite; }
svg .anim-slide { animation: svg-slide 1.5s ease-out forwards; }
svg .anim-flow { animation: svg-flow 2s linear infinite; }

@keyframes svg-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes svg-flow { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes svg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes svg-breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes svg-slide { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  svg .anim-draw, svg .anim-flow, svg .anim-float, svg .anim-breathe, svg .anim-slide { animation: none !important; }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .flow-container { flex-direction: column; align-items: stretch; }
  .flow-arrow { width: 24px; height: 24px; margin: 0 auto; transform: rotate(90deg); }
  h1 { font-size: clamp(2rem, 7vw, 3.2rem); }
}
