/* === 基础变量与重置 === */
:root {
  /* 色板 */
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;
  --color-text-on-dark: var(--color-paper);
  --color-highlight: var(--color-brand);
  --color-highlight-dark: var(--color-accent);

  /* 结构 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --line-height-body: 1.75;

  /* 字体 */
  --font-main: 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-main);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--line-height-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 容器与排版 === */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}
.section-divider {
  height: 1px;
  background: rgba(25, 21, 35, 0.12);
  margin: 0;
}

/* 眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}
.bg-dark .eyebrow { color: var(--color-accent); }

/* 标题 */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 0; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.highlight { color: var(--color-highlight); font-weight: 600; }
.bg-dark .highlight { color: var(--color-highlight-dark); }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { background-color: #d95a75; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.bg-dark .btn-secondary {
  border-color: var(--color-text-on-dark);
  color: var(--color-text-on-dark);
}
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* === 卡片与面板 === */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 24px;
  border-radius: var(--radius-card);
}
.panel {
  background: var(--color-dark);
  padding: 32px;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}
.panel-light {
  background: var(--color-paper);
  border: var(--card-border);
}

/* === 表格 === */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(25, 21, 35, 0.12);
  white-space: normal;
}
th { font-weight: 700; background: rgba(25, 21, 35, 0.04); }
td { vertical-align: top; }
tr:last-child td { border-bottom: none; }

/* 深色背景面板内的表格：强制文字为浅色，确保对比度 */
.panel table th,
.panel table td {
  color: var(--color-paper) !important;
}

/* === FAQ === */
details {
  border: var(--card-border);
  margin-bottom: 12px;
  background: var(--color-paper);
  border-radius: var(--radius-card);
}
summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 20px 16px; margin: 0; }

/* === 导航与页脚 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(219, 212, 237, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.bg-dark .site-header { background: rgba(37, 25, 67, 0.95); border-bottom-color: rgba(219, 212, 237, 0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: 24px; }
nav a { font-size: 0.95rem; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--color-brand); }
.bg-dark nav a { border-bottom-color: transparent; }
.bg-dark nav a:hover, .bg-dark nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }
.site-footer {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
  padding: 48px 0;
  font-size: 0.9rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 24px; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { opacity: 0.8; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }

/* === SVG 动效系统 === */
.svg-visual { width: 100%; height: auto; display: block; }
.flow-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flow-draw 4s ease-in-out infinite alternate;
}
.dot-move {
  animation: dot-travel 5s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.bubble-rise {
  animation: bubble-float 6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.input-pulse {
  animation: pulse-dots 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes flow-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes dot-travel {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--tx, 40px), var(--ty, -30px)); opacity: 0; }
}
@keyframes bubble-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
@keyframes pulse-dots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === 响应式与无障碍 === */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  nav ul { gap: 16px; margin-top: 8px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .flow-path, .dot-move, .bubble-rise, .input-pulse { animation: none !important; }
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.timeline { position: relative; padding-left: 24px; border-left: 2px solid rgba(25, 21, 35, 0.15); }
.timeline-item { position: relative; margin-bottom: 32px; padding-left: 24px; }
.timeline-item::before {
  content: ""; position: absolute; left: -31px; top: 4px;
  width: 14px; height: 14px; background: var(--color-accent); border-radius: 50%;
}
.timeline-num {
  display: inline-block; background: var(--color-accent); color: var(--color-dark);
  font-weight: 800; padding: 4px 10px; margin-bottom: 8px; font-size: 0.9rem;
}
.bg-dark .timeline-num { background: var(--color-accent); color: var(--color-dark); }
.article-card { border: var(--card-border); padding: 20px; }
.article-card time { font-size: 0.85rem; color: rgba(25, 21, 35, 0.6); display: block; margin-bottom: 8px; }
.bg-dark .article-card time { color: rgba(219, 212, 237, 0.6); }
.article-card h3 { font-size: 1.1rem; margin: 0 0 8px; }
.article-card p { font-size: 0.95rem; margin: 0; }

/* 兜底：裁掉横向溢出 */
div.check-item {
  overflow-x: clip;
}
