:root {
  /* 色板 */
  --color-dark: #141838;
  --color-paper: #F7F5F3;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;
  --color-dark-text: #F7F5F3;
  --color-dark-accent: #6EAFED;

  /* 设计 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;
  --header-h: 64px;

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
svg { width: 100%; height: auto; }

/* 链接与强调 */
a { color: var(--color-brand); text-decoration: underline; text-underline-offset: 0.2em; transition: color 0.2s; }
a:hover { color: #0f22c0; }
.hl { font-weight: 700; }

/* 容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; }

/* 眉标 */
.epigraph {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.5em;
}
.bg-dark .epigraph { color: var(--color-dark-accent); }

/* 标题 */
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.8em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5em; }
p { max-width: 38em; margin-bottom: 1em; }

/* 按钮 */
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.5em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 20px; height: 48px; min-width: 140px;
  font-size: 1rem; font-weight: 600; border-radius: var(--radius-btn);
  text-decoration: none; cursor: pointer; transition: transform 0.2s, background 0.2s, color 0.2s;
}
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { background: #5a9fd9; transform: translateY(-1px); }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.btn-secondary:hover { background: rgba(21, 23, 35, 0.05); transform: translateY(-1px); }
.bg-dark .btn-primary { background: var(--color-accent); color: var(--color-dark); }
.bg-dark .btn-secondary { border-color: var(--color-dark-text); color: var(--color-dark-text); }
.bg-dark .btn-secondary:hover { background: rgba(247, 245, 243, 0.1); }

/* 布局：索引 + 正文 */
.layout-index { display: flex; gap: var(--gap); align-items: flex-start; }
.index-nav {
  width: 240px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 24px);
  padding-right: 16px; border-right: 1px solid rgba(21, 23, 35, 0.1);
}
.index-nav ul { list-style: none; }
.index-nav li { margin-bottom: 12px; }
.index-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-card);
  color: var(--color-text); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.index-nav a:hover, .index-nav a[aria-current="page"] { background: rgba(20, 44, 235, 0.08); color: var(--color-brand); }
.bg-dark .index-nav a { color: var(--color-dark-text); }
.bg-dark .index-nav a:hover, .bg-dark .index-nav a[aria-current="page"] { background: rgba(110, 175, 237, 0.15); color: var(--color-dark-accent); }

.content-main { flex: 1; min-width: 0; }
.content-main h2 { margin-top: var(--section-y); }

/* 卡片 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: var(--gap);
}
.card-light { background: var(--color-paper); color: var(--color-text); }
.card-light a { color: var(--color-brand); }
.card-light .hl { color: var(--color-brand); }

/* 表格 */
.table-wrapper { overflow-x: auto; margin: 1.5em 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(21, 23, 35, 0.1); }
th { font-weight: 600; background: rgba(21, 23, 35, 0.03); }
tr:last-child td { border-bottom: none; }

/* FAQ */
details { margin-bottom: 12px; border: 1px solid rgba(21, 23, 35, 0.1); border-radius: var(--radius-card); }
summary {
  box-sizing: border-box; width: 100%; padding: 16px 40px 16px 16px; cursor: pointer; font-weight: 600; list-style: none; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.2rem; transition: transform 0.2s;
}
details[open] summary::after { content: "-"; }
details[open] summary { border-bottom: 1px solid rgba(21, 23, 35, 0.1); }
details .faq-answer { padding: 16px; font-size: 0.95rem; line-height: 1.6; }

/* 视觉面板 */
.visual-panel {
  background: var(--color-dark);
  border-radius: 12px;
  padding: 24px;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.visual-panel svg { max-width: 90%; max-height: 90%; }

/* 图文交错 */
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; margin-bottom: var(--gap); }
.split-row.reverse { direction: rtl; }
.split-row.reverse > * { direction: ltr; }

/* 时间线 */
.timeline { position: relative; padding-left: 32px; border-left: 2px solid rgba(21, 23, 35, 0.1); margin: 2em 0; }
.timeline-item { position: relative; margin-bottom: 2em; }
.timeline-item::before {
  content: attr(data-num); position: absolute; left: -42px; top: 0;
  width: 28px; height: 28px; background: var(--color-accent); color: var(--color-dark);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

/* 新闻卡片 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.news-card { background: var(--color-paper); border-radius: var(--radius-card); padding: 20px; border: 1px solid rgba(21, 23, 35, 0.08); }
.news-card time { display: block; font-size: 0.8rem; color: rgba(21, 23, 35, 0.6); margin-bottom: 8px; }

/* SVG 动效类 */
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-cycle 6s ease-in-out infinite alternate;
}
.anim-float { animation: float-cycle 8s ease-in-out infinite; }
.anim-spin-slow { animation: spin-slow 12s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-pulse { animation: pulse-cycle 4s ease-in-out infinite; }

@keyframes draw-cycle {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float-cycle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulse-cycle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 响应式 */
@media (max-width: 900px) {
  .layout-index { flex-direction: column; }
  .index-nav {
    position: static; width: 100%; border-right: none; border-bottom: 1px solid rgba(21, 23, 35, 0.1);
    padding-right: 0; padding-bottom: 12px; margin-bottom: 24px;
  }
  .index-nav ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .split-row { grid-template-columns: 1fr; }
  .split-row.reverse { direction: ltr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* 兜底：裁掉横向溢出 */
div.layout-index,
summary {
  overflow-x: clip;
}
