: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: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  
  /* 排版 */
  --line-height-body: 1.55;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }

/* 容器与节奏 */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.section {
  padding-block: var(--section-y);
}

.surface-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.surface-dark .hl { color: var(--color-accent); }
.surface-dark .marker { color: var(--color-accent); }
.surface-dark a:not(.btn) { color: var(--color-accent); }

.surface-paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}

.surface-paper .hl { color: var(--color-brand); }
.surface-paper .marker { color: var(--color-brand); }
.surface-paper a:not(.btn) { color: var(--color-brand); }

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}

.panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.panel svg {
  width: 100%;
  height: 100%;
}

/* 标题系统 */
.marker {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p { margin-bottom: 1rem; max-width: 38em; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 52px;
  padding-inline: 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-primary:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.surface-dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.btn-secondary:hover { background: rgba(25,21,35,0.05); }
.surface-dark .btn-secondary:hover { background: rgba(233,232,234,0.1); }
.btn-secondary:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* 页头与页脚 */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(233, 232, 234, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}

.surface-dark .header {
  background: rgba(33, 22, 60, 0.9);
  border-bottom-color: rgba(233, 232, 234, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { font-weight: 500; font-size: 0.95rem; }
.nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.surface-dark .nav a[aria-current="page"] { color: var(--color-accent); }

.footer {
  border-top: 1px solid var(--card-border);
  padding-block: 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* 表格 */
.table-wrapper { overflow-x: auto; border: var(--card-border); border-radius: var(--radius-card); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--card-border); }
th { font-weight: 600; background: rgba(25,21,35,0.03); }
tr:last-child th, tr:last-child td { border-bottom: none; }

/* FAQ */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
  padding: 1rem;
  background: var(--color-paper);
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

details[open] summary::before { transform: rotate(45deg); }
details p { margin-top: 0.75rem; color: var(--color-text); }
.surface-dark details { background: rgba(233,232,234,0.05); border-color: rgba(233,232,234,0.15); }
.surface-dark details p { color: var(--color-paper); }

/* 时间轴与步骤 */
.timeline { position: relative; padding-left: 1.5rem; border-left: 2px solid var(--card-border); }
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 1rem; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-brand);
  border: 2px solid var(--color-paper);
}
.surface-dark .timeline-item::before { background: var(--color-accent); border-color: var(--color-dark); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* 新闻卡片网格 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card time {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  display: block;
}

/* 交互与焦点 */
*:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.surface-dark *:focus-visible { outline-color: var(--color-accent); }

/* SVG 动效核心 */
svg.anim-svg { width: 100%; height: auto; }
svg.anim-svg path, svg.anim-svg rect, svg.anim-svg circle, svg.anim-svg line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.anim-draw {
  animation: draw-line 6s ease-in-out infinite alternate;
}

.anim-float {
  animation: float-up 5s ease-in-out infinite;
}

.anim-breathe {
  animation: breathe 8s ease-in-out infinite;
  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;
    animation: none !important;
  }
}
