/* ==================== 设计变量 ==================== */
:root {
  /* 配色 */
  --color-dark: #231334;
  --color-paper: #E9E8EA;
  --color-body: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;

  /* 上下文覆盖变量 */
  --bg: var(--color-paper);
  --text: var(--color-body);
  --highlight: var(--color-brand);
  --accent-highlight: var(--color-accent);

  /* 结构 */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --line-height: 1.65;
}

/* 深色面上下文 */
.dark-surface {
  --bg: var(--color-dark);
  --text: var(--color-paper);
  --highlight: var(--color-accent);
  --accent-highlight: var(--color-accent);
}

/* 深色面内的浅色卡片恢复纸面取色 */
.dark-surface .card-light {
  --bg: var(--color-paper);
  --text: var(--color-body);
  --highlight: var(--color-brand);
  --accent-highlight: var(--color-accent);
}

/* ==================== 基础排版 ==================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: var(--line-height);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--highlight); text-decoration: none; transition: color 0.2s; }
a:hover { opacity: 0.85; }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; border-radius: 4px; }

/* ==================== 布局容器 ==================== */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  padding-block: var(--section-y);
  border-bottom: 1px solid rgba(128,128,128,0.15);
}
.section:last-child { border-bottom: none; }
.section-header {
  margin-bottom: var(--gap);
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--highlight);
  margin-bottom: 0.5em;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.4em 0;
  color: var(--text);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0.8em 0 0.4em;
  color: var(--text);
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.6em 0 0.3em;
  color: var(--text);
}
p { margin: 0.8em 0; max-width: 38em; }
strong { font-weight: 700; }
.hl { color: var(--highlight); }

/* ==================== 组件：按钮 ==================== */
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75em; margin-top: 1.5em; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75em 1.5em;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ==================== 组件：卡片与面板 ==================== */
.card {
  background: var(--bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
}
.panel {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; flex-direction: row; gap: var(--gap); align-items: stretch; }
@media (max-width: 768px) {
  .flex-row { flex-direction: column; }
}

/* ==================== 表格 ==================== */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1em 0;
}
th, td {
  text-align: left;
  padding: 0.75em 1em;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
th { font-weight: 700; white-space: nowrap; }
td { vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: none; }

/* ==================== FAQ (Details/Summary) ==================== */
details {
  background: var(--bg);
  border-radius: var(--radius-card);
  margin-bottom: 0.75em;
  overflow: hidden;
  border: var(--card-border);
}
summary {
  padding: 1em 1.25em;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: background 0.2s;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-right: 2px solid var(--highlight);
  border-bottom: 2px solid var(--highlight);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details[open] summary::before { transform: rotate(45deg); }
details p { padding: 0 1.25em 1em; margin: 0; font-size: 0.95rem; }

/* ==================== 新闻卡片 ==================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}
.news-date {
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0.7;
  font-weight: 500;
}
.news-title { font-weight: 700; font-size: 1.1rem; line-height: 1.4; margin: 0; }
.news-excerpt { font-size: 0.95rem; margin: 0; color: var(--text); opacity: 0.85; }

/* ==================== 步骤时间线 ==================== */
.timeline { position: relative; padding-left: 2em; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.5em;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(128,128,128,0.2);
}
.step { position: relative; margin-bottom: 1.5em; padding-left: 1em; }
.step::before {
  content: attr(data-num);
  position: absolute;
  left: -2.4em;
  top: 0;
  width: 2.2em; height: 2.2em;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.step h3 { margin: 0.2em 0 0.3em; }
.step p { margin: 0; font-size: 0.95rem; }

/* ==================== SVG 动效系统 ==================== */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
}
.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: breatheLine 6s ease-in-out infinite;
}
.float-layer {
  animation: floatShift 8s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.pulse-dot {
  animation: pulseDot 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes breatheLine {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
@keyframes floatShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ==================== 响应式与无障碍 ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .draw-line, .float-layer, .pulse-dot { animation: none !important; }
}
@media (max-width: 640px) {
  h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
  .container { padding-inline: 1rem; }
}
/* 防止长文本溢出 */
.overflow-wrap-anywhere { overflow-wrap: anywhere; }
.min-width-zero { min-width: 0; }
/* 头部样式 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid rgba(128,128,128,0.1);
  padding: 0.75em 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.logo { display: flex; align-items: center; gap: 0.5em; font-weight: 700; color: var(--text); text-decoration: none; }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: 1.25em; align-items: center; }
nav a { font-weight: 500; font-size: 0.95rem; color: var(--text); }
nav a[aria-current="page"] { color: var(--highlight); font-weight: 700; }
@media (max-width: 640px) {
  nav { gap: 0.75em; }
  nav a { font-size: 0.85rem; }
}
/* 页脚 */
.site-footer {
  background: var(--bg);
  padding: 3em 0 2em;
  border-top: 1px solid rgba(128,128,128,0.1);
  margin-top: var(--section-y);
}
.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2em;
}
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75em; color: var(--text); }
.footer-col a { display: block; color: var(--text); opacity: 0.8; margin-bottom: 0.5em; font-size: 0.9rem; }
.footer-col a:hover { opacity: 1; }
.footer-copy {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 1.5em var(--gap) 0;
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: center;
  margin-top: 2em;
}
