:root {
  /* 色板 */
  --bg-dark: #10112D;
  --bg-paper: #F5F0E5;
  --text-body: #151523;
  --brand: #1416EB;
  --accent: #89ED6E;

  /* 圆角与边界 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(21,21,35,0.16);
  --card-shadow: none;

  /* 节奏与密度 */
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;

  /* 排版 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --line-height-body: 1.65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: var(--line-height-body);
  background: var(--bg-paper);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 布局容器 */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--bg-dark);
  padding: 32px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  z-index: 50;
  min-width: 0;
}
.main { padding: var(--section-y) var(--gap); max-width: var(--content-max); margin-inline: auto; width: 100%; min-width: 0; }
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }

/* 侧边栏内容 */
.brand { display: flex; align-items: center; gap: 12px; color: var(--bg-paper); text-decoration: none; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }
.nav-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 48px; }
.nav-list a {
  color: rgba(245,240,229,0.7); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--accent); background: rgba(137,237,110,0.08); }
.footer-mini { color: rgba(245,240,229,0.4); font-size: 0.8rem; margin-top: auto; }

/* 响应式：窄屏退回顶部导航 */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; width: 100%; height: auto;
    flex-direction: row; align-items: center; padding: 12px 16px;
    background: var(--bg-dark);
  }
  .nav-list {
    display: flex; flex-direction: row; margin: 0; gap: 8px;
    position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--bg-dark); padding: 12px; flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .footer-mini { display: none; }
  .main { margin-top: 64px; padding-top: calc(var(--section-y) - 48px); }
}

/* 取色上下文覆盖 */
.dark-bg { background: var(--bg-dark); color: var(--bg-paper); }
.dark-bg a:not(.btn):not(.brand):not(.nav-list a) { color: var(--accent); }
.dark-bg .hl { color: var(--accent); }
.paper-bg { background: var(--bg-paper); color: var(--text-body); }
.paper-bg a:not(.btn):not(.brand):not(.nav-list a) { color: var(--brand); }
.paper-bg .hl { color: var(--brand); }

.card.paper-in-dark {
  background: var(--bg-paper); color: var(--text-body);
  border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: var(--radius-card); padding: var(--gap);
}
.card.paper-in-dark a { color: var(--brand); }
.card.paper-in-dark .hl { color: var(--brand); }

/* 排版组件 */
.section { margin-bottom: calc(var(--section-y) * 1.2); }
.section:last-child { margin-bottom: 0; }
.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 12px;
}
.dark-bg .eyebrow { color: #ffffff; }
.paper-bg .eyebrow { color: var(--brand); }
.dark-bg .hl { color: #ffffff; }

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 24px; text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25;
  letter-spacing: 0.02em; margin-bottom: 16px; text-wrap: balance;
}
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.35; margin: 24px 0 12px; }
p { margin-bottom: 16px; max-width: 38em; }
ul, ol { padding-left: 20px; margin-bottom: 16px; }
li { margin-bottom: 8px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 24px; height: 52px; border-radius: var(--radius-btn);
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  border: none; outline: none;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(137,237,110,0.25); }
.btn-secondary {
  background: transparent; border: 1.5px solid currentColor; color: inherit;
}
.dark-bg .btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }
.paper-bg .btn-secondary { color: var(--text-body); border-color: var(--text-body); }
.btn-secondary:hover { background: rgba(128,128,128,0.08); }

/* 卡片网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.card {
  border: var(--card-border); border-radius: var(--radius-card);
  padding: var(--gap); background: transparent; box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: var(--card-border); }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(128,128,128,0.15); }
th { font-weight: 700; }
.dark-bg th, .dark-bg td { border-color: rgba(255,255,255,0.1); }
.paper-bg th, .paper-bg td { border-color: rgba(21,21,35,0.1); }

/* FAQ Details */
details {
  border: var(--card-border); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; background: transparent; cursor: pointer;
}
summary { 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 { margin-top: 12px; margin-bottom: 0; font-size: 0.95rem; }

/* 编号徽标 */
.step-badge {
  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: 12px; flex-shrink: 0;
}
.timeline-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }

/* SVG 基础 */
.svg-container { width: 100%; height: auto; max-width: 520px; margin: 0 auto; }
.svg-container svg { width: 100%; height: auto; display: block; }

/* SVG 动效 Keyframes */
@keyframes float-main { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float-sub { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.anim-float-main { animation: float-main 8s ease-in-out infinite; }
.anim-float-sub { animation: float-sub 10s ease-in-out infinite 1.5s; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 2.5s ease forwards; }
.anim-slide { animation: slide-in 0.8s ease forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-lg { margin-top: 32px; }
.mb-md { margin-bottom: 24px; }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.hidden-mobile { display: block; }
@media (max-width: 900px) { .hidden-mobile { display: none; } }
