:root {
  --color-dark: #13102D;
  --color-paper: #D6D4ED;
  --color-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(23, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* 主题覆盖：深色面 / 浅色卡片 */
.surface-dark { background: var(--color-dark); color: var(--color-paper); }
.surface-dark .hl,
.surface-dark .metag,
.surface-dark a:not(.btn-primary):not(.btn-secondary) { color: var(--color-accent); }
.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark p,
.surface-dark li,
.surface-dark strong { color: var(--color-paper); }
.card-paper { background: var(--color-paper); color: var(--color-text); border: var(--card-border); }
.card-paper .hl,
.card-paper a { color: var(--color-brand); }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-block: var(--section-y); position: relative; }
.divider { height: 1px; background: rgba(23,21,35,0.1); margin: 0; border: none; }
.surface-dark .divider { background: rgba(214,212,237,0.12); }

/* 排版 */
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin: 0 0 calc(var(--gap) * 0.75); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.02em; margin: 0 0 0.5em; }
p { max-width: 38em; margin: 0 0 1em; }
.metag { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-brand); display: block; margin-bottom: 0.5em; }
.surface-dark .metag { color: var(--color-accent); }
.hl { color: var(--color-brand); }
.surface-dark .hl { color: var(--color-accent); }

/* 按钮 */
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; height: 52px; padding: 0 1.5em; border-radius: var(--radius-btn); font-weight: 600; text-decoration: none; transition: transform 0.2s ease, opacity 0.2s ease; cursor: pointer; border: none; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.surface-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* 卡片与网格 */
.card { border-radius: var(--radius-card); border: var(--card-border); box-shadow: var(--card-shadow); padding: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(23,21,35,0.1); }
th { font-weight: 700; }
.surface-dark th, .surface-dark td { border-bottom-color: rgba(214,212,237,0.15); }

/* FAQ */
details { margin-bottom: 1rem; border-bottom: 1px solid rgba(23,21,35,0.1); padding-bottom: 1rem; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 0.5em; }
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; content: ""; }
summary:hover { color: var(--color-brand); }
.surface-dark details { border-bottom-color: rgba(214,212,237,0.15); }
.surface-dark summary:hover { color: var(--color-accent); }
details[open] summary { margin-bottom: 0.5rem; }

/* 时间线 */
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--color-brand); }
.surface-dark .timeline { border-left-color: var(--color-accent); }
.timeline-step { position: relative; margin-bottom: 2rem; }
.timeline-step::before { content: attr(data-step); position: absolute; left: -2.6rem; top: 0; width: 2rem; height: 2rem; border-radius: 8px; background: var(--color-accent); color: var(--color-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }

/* SVG 基础 */
svg { width: 100%; height: auto; display: block; }
.svg-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.svg-stroke { stroke: currentColor; stroke-width: 1.5; fill: none; }
.svg-fill { fill: currentColor; }

/* 动效关键帧 */
@keyframes orbit-pulse { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes float-bubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes slide-in-right { 0% { transform: translateX(20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes dash-flow { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

.anim-orbit { animation: orbit-pulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float { animation: float-bubble 5s ease-in-out infinite; }
.anim-blink { animation: blink-cursor 1.2s step-end infinite; }
.anim-slide { animation: slide-in-right 1.5s ease forwards; }
.anim-draw { animation: dash-flow 4s ease forwards; }

@media (prefers-reduced-motion: reduce) {
  .anim-orbit, .anim-float, .anim-blink, .anim-slide, .anim-draw { animation: none !important; }
  .btn:hover { transform: none; }
}

/* 导航与页脚 */
header { position: sticky; top: 0; z-index: 10; background: rgba(214,212,237,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(23,21,35,0.08); }
.surface-dark header { background: rgba(19,16,45,0.92); border-bottom-color: rgba(214,212,237,0.1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
nav a { text-decoration: none; font-weight: 500; color: inherit; }
nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
footer { padding: var(--section-y) 0; border-top: 1px solid rgba(23,21,35,0.1); margin-top: var(--section-y); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-grid a { color: inherit; text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.logo-img { height: 32px; width: auto; object-fit: contain; }

/* 兜底：裁掉横向溢出 */
section.section.container,
li {
  overflow-x: clip;
}
