/* 设计 Token */
:root {
  --bg-dark: #19102D;
  --bg-paper: #FCFCFD;
  --text-body: #191523;
  --brand: #5214EB;
  --accent: #D66EED;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text-body);
  background-color: var(--bg-paper);
  -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 + .section { border-top: 1px solid rgba(0,0,0,0.08); }
.dark-surface { background-color: var(--bg-dark); color: var(--bg-paper); }
.dark-surface a:not(.btn):hover { color: var(--accent); }
.dark-surface .hl { color: var(--accent); }
.paper-card {
  background-color: var(--bg-paper);
  color: var(--text-body);
  padding: var(--gap);
}

/* 眉标与标题 */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.badge--brand { color: var(--brand); }
.badge--accent { color: var(--accent); }
h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--gap);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--gap);
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.hl { color: var(--brand); }
.dark-surface .hl { color: var(--accent); }
.text-body { max-width: 38em; margin-bottom: 1rem; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border: none;
  flex-shrink: 0;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary {
  background-color: var(--accent);
  color: var(--bg-dark);
}
.btn--secondary {
  background: transparent;
  border: 1px solid var(--text-body);
  color: var(--text-body);
}
.dark-surface .btn--secondary {
  border-color: var(--bg-paper);
  color: var(--bg-paper);
}

/* 卡片与面板 */
.card {
  background-color: var(--bg-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.panel {
  background-color: var(--bg-dark);
  padding: var(--gap);
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dark-surface .panel { background-color: rgba(255,255,255,0.05); }

/* 网格 */
.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 {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--gap);
  table-layout: fixed;
}
td, th {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.dark-surface th, .dark-surface td { border-bottom-color: rgba(255,255,255,0.1); }
th { font-weight: 700; }

/* FAQ */
details {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 1rem 0;
}
.dark-surface details { border-bottom-color: rgba(255,255,255,0.1); }
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: "+";
  color: var(--brand);
  font-weight: 700;
}
.dark-surface summary::before { color: var(--accent); }
details[open] summary::before { content: "-"; }
details p { margin-top: 0.5rem; color: var(--text-body); }
.dark-surface details p { color: var(--bg-paper); }

/* 页头页脚 */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 1rem 0;
}
.dark-surface header { background-color: rgba(25, 16, 45, 0.9); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; }
.nav { display: flex; gap: 1.5rem; }
.nav a { font-weight: 500; }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.dark-surface .nav a[aria-current="page"] { color: var(--accent); }
footer { padding: 3rem 0; border-top: 1px solid rgba(0,0,0,0.08); margin-top: var(--section-y); }
.dark-surface footer { border-top-color: rgba(255,255,255,0.1); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { font-weight: 700; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }

/* SVG 动效 */
svg { width: 100%; height: auto; }
.path-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-path 4s ease forwards;
}
@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.breathe {
  animation: breathe 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}
.slide-in {
  animation: slide-in 8s ease-in-out infinite alternate;
}
@keyframes slide-in {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(10px); opacity: 1; }
}
.pulse-dot {
  animation: pulse-dot 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@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;
  }
}

/* 兜底：裁掉横向溢出 */
div,
td {
  overflow-x: clip;
}
