:root {
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;

  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);

  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

/* 上下文变量覆盖：深色面与浅色纸面 */
.dark-bg {
  --bg: var(--color-dark);
  --fg: var(--color-paper);
  --hl: var(--color-accent);
  --link: var(--color-accent);
  --surface: var(--color-dark);
  --border: rgba(244, 243, 247, 0.12);
}
.paper-bg {
  --bg: var(--color-paper);
  --fg: var(--color-body);
  --hl: var(--color-brand);
  --link: var(--color-brand);
  --surface: var(--color-paper);
  --border: rgba(25, 21, 35, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 排版 */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: 1rem; }
p { margin-bottom: 1.25rem; max-width: 38em; }
strong { font-weight: 600; }
a { color: var(--link); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; border-radius: 2px; }

/* 眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hl);
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.25rem;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 2px;
  background: var(--hl);
  border-radius: 1px;
}

/* 高亮关键词 */
.hl { color: var(--hl); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(237, 146, 110, 0.35); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
}
.btn-secondary:hover { background: rgba(25, 21, 35, 0.06); }
.dark-bg .btn-secondary { border-color: var(--fg); color: var(--fg); }

/* 卡片 */
.card {
  background: var(--surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }

/* 网格布局 */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}
table {
  width: 100%;
  min-width: 600px; /* 确保在小屏幕上出现横向滚动，而不是挤压变形 */
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th { font-weight: 600; color: var(--hl); }
td { color: var(--fg); }
tr:last-child td { border-bottom: none; }

/* 时间轴 */
.timeline { position: relative; padding-left: 1.5rem; border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 5px);
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hl);
  border: 2px solid var(--bg);
}
.timeline-time { font-size: 0.85rem; font-weight: 700; color: var(--hl); margin-bottom: 0.4rem; display: block; }

/* 步骤徽标 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  border-radius: 8px;
  margin-right: 0.75rem;
  font-size: 0.95rem;
}

/* FAQ */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  transition: box-shadow 0.2s;
}
details[open] { box-shadow: var(--card-shadow); }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  color: var(--hl);
}
details[open] summary::after { content: "−"; }
details p { margin-top: 0.75rem; margin-bottom: 0; color: var(--fg); }

/* 新闻卡片 */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.news-date { font-size: 0.8rem; color: var(--hl); margin-bottom: 0.5rem; }
.news-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--fg); }
.news-card p { font-size: 0.95rem; color: var(--fg); margin-bottom: 0; }

/* 响应式与基础组件 */
@media (max-width: 768px) {
  h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* SVG 通用响应式 */
.svg-responsive { width: 100%; height: auto; max-width: 100%; display: block; }
.svg-panel { background: rgba(255, 255, 255, 0.03); border-radius: 16px; padding: 1rem; position: relative; overflow: hidden; }

/* SVG 动效定义 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.85; }
}
@keyframes dash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes node-light {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.anim-float { animation: float 6s ease-in-out infinite; }
.anim-pulse { animation: pulse-opacity 4s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash 3s linear infinite; }
.anim-node { animation: node-light 5s ease-in-out infinite; }
.anim-node:nth-child(odd) { animation-delay: 0.8s; }
.anim-node:nth-child(even) { animation-delay: 1.6s; }

/* 旋转/缩放修正 */
.svg-animate { 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;
  }
  .svg-animate { animation: none !important; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
