:root {
  /* 色板 */
  --color-dark: #21163C;
  --color-paper: #E9E8EA;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;

  /* 设计 Token */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;

  /* 默认取色（纸面） */
  --c-bg: var(--color-paper);
  --c-text: var(--color-text);
  --c-highlight: var(--color-brand);
  --c-link: var(--color-brand);
  --c-muted: rgba(25, 21, 35, 0.6);
  --c-border: rgba(25, 21, 35, 0.12);
}

/* 深色面覆盖 */
.bg-dark {
  --c-bg: var(--color-dark);
  --c-text: var(--color-paper);
  --c-highlight: var(--color-accent);
  --c-link: var(--color-accent);
  --c-muted: rgba(233, 232, 234, 0.7);
  --c-border: rgba(233, 232, 234, 0.15);
}

/* 浅色卡片覆盖（用于深色区块内的卡片） */
.card-light {
  --c-bg: var(--color-paper);
  --c-text: var(--color-text);
  --c-highlight: var(--color-brand);
  --c-link: var(--color-brand);
  --c-muted: rgba(25, 21, 35, 0.6);
  --c-border: rgba(25, 21, 35, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: var(--line-height-body, 1.65);
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background-color: var(--c-bg);
  position: relative;
}
.section + .section { border-top: 1px solid var(--c-border); }

.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); }

/* 排版 */
.h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-text);
  text-wrap: balance;
}
.h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--c-text);
  margin-bottom: var(--gap);
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-text);
  margin-bottom: 0.5em;
}
p { margin-bottom: 1em; max-width: 38em; }
strong { font-weight: 600; }

/* 眉标 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-highlight);
  margin-bottom: 0.6em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.2em;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 52px;
  padding: 0 1.5em;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--c-highlight); outline-offset: 3px; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  box-shadow: 0 4px 12px rgba(237, 146, 110, 0.35);
}
.btn-primary:hover { background-color: #e08560; }

.btn-secondary {
  background: transparent;
  color: var(--c-text);
  border: 1.5px solid var(--c-text);
}
.btn-secondary:hover { background: rgba(25, 21, 35, 0.06); }
.bg-dark .btn-secondary { border-color: var(--c-text); color: var(--c-text); }

/* 卡片 */
.card {
  background-color: var(--c-bg);
  border: var(--card-border) solid var(--c-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* 表格 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.8em 1em;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
th { font-weight: 600; color: var(--c-highlight); }
td:first-child { font-weight: 500; }

/* FAQ */
details {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
  padding: 1em 1.2em;
  transition: box-shadow 0.2s ease;
}
details:hover { box-shadow: var(--card-shadow); }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6em;
}
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
summary::before {
  content: "+";
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  line-height: 1.4em;
  text-align: center;
  border-radius: 4px;
  background: var(--c-border);
  color: var(--c-text);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}
details[open] summary::before { content: "−"; transform: rotate(180deg); }
details p { margin-top: 0.8em; color: var(--c-muted); }

/* 时间轴 */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--c-highlight), var(--c-border));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: var(--section-y);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
.timeline-item::before {
  content: attr(data-time);
  position: absolute;
  left: -2.5rem;
  top: 0;
  transform: translateX(-100%);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-highlight);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .timeline-item { grid-template-columns: 1fr 1fr; }
  .timeline-item:nth-child(odd) { direction: rtl; }
  .timeline-item:nth-child(even) { direction: ltr; }
  .timeline-item:nth-child(odd) .tl-content { padding-right: 2rem; }
  .timeline-item:nth-child(even) .tl-content { padding-left: 2rem; }
  .timeline-item::before { left: auto; right: -2.5rem; }
  .timeline-item:nth-child(odd)::before { right: auto; left: -2.5rem; }
}

/* 新闻卡片 */
.news-card {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}
.news-date {
  font-size: 0.85rem;
  color: var(--c-muted);
  font-weight: 500;
}

/* SVG 基础 */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}
svg { overflow: hidden; }

/* SVG 动效 Keyframes */
@keyframes flow-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe-dot {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@keyframes slide-in-panel {
  0% { transform: translateX(-8px); opacity: 0.85; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.anim-flow { animation: flow-line 5s ease-in-out infinite alternate; }
.anim-float { animation: float-bubble 6s ease-in-out infinite; }
.anim-breathe { animation: breathe-dot 3s ease-in-out infinite; }
.anim-slide { animation: slide-in-panel 6s ease-out forwards; }
.anim-pulse { animation: pulse-ring 4s ease-in-out infinite; }

/* 旋转/缩放 SVG 子元素中心修正 */
svg g[transform], svg circle[transform], svg rect[transform] {
  transform-box: fill-box;
  transform-origin: center;
}

/* 响应式与无障碍 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-flow, .anim-float, .anim-breathe, .anim-slide, .anim-pulse {
    animation: none !important;
  }
}

@media (max-width: 767px) {
  .h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item::before { left: -2.5rem; right: auto; }
}

/* 焦点可见性增强 */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--c-highlight);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 长文本换行保护 */
.long-text { overflow-wrap: anywhere; word-break: break-word; }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
