:root {
  /* 色板 */
  --bg-dark: #19102D;
  --bg-paper: #FCFCFD;
  --text-main: #191523;
  --brand: #5214EB;
  --accent: #D66EED;
  
  /* 设计 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 2px solid var(--text-main);
  --card-shadow: 4px 4px 0 var(--text-main);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;
  
  /* 排版与组件 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --btn-h: 52px;
  --focus-ring: 2px solid var(--brand);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-main);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 容器与网格 */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: start; overflow-wrap: break-word; word-break: break-word; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* 排版 */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: 0; color: inherit; }
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: 1.25rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
ul, ol { padding-left: 1.5em; margin-bottom: 1rem; }
li { margin-bottom: 0.5em; }

/* 眉标 */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: var(--brand);
}
.dark-surface .section-label { color: #fff; }

/* 高亮词 */
.hl { color: var(--brand); }
.dark-surface .hl { color: var(--accent); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  padding: 0 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--text-main);
}
.dark-surface .btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.dark-surface .btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.btn svg { width: 20px; height: 20px; margin-right: 0.5em; stroke-width: 2; }

/* 卡片 */
.card {
  background: var(--bg-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  position: relative;
}
.dark-surface .card {
  background: var(--bg-paper);
  color: var(--text-main);
  border-color: var(--text-main);
  box-shadow: var(--card-shadow);
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--text-main);
}
.data-table th { font-weight: 600; background: rgba(0,0,0,0.03); }
.dark-surface .data-table th { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }
.dark-surface .data-table td { border-color: rgba(255,255,255,0.2); }

/* FAQ */
details {
  border: var(--card-border);
  margin-bottom: 0.75rem;
  background: var(--bg-paper);
}
.summary {
  padding: 1rem;
  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.25rem; font-weight: 400; }
details[open] .summary::after { content: "−"; }
.details-content { padding: 0 1rem 1rem; line-height: 1.7; }

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { text-decoration: none; color: var(--text-main); font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
.dark-surface .nav a { color: var(--bg-paper); }
.dark-surface .nav a:hover, .dark-surface .nav a[aria-current="page"] { color: var(--accent); }

/* 页脚 */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin-top: 2rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; color: var(--text-main); text-decoration: none; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-col a:hover { color: var(--brand); }
.dark-surface .footer-col a { color: var(--bg-paper); }
.dark-surface .footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,0.1); text-align: center; font-size: 0.85rem; color: rgba(0,0,0,0.6); }
.dark-surface .footer-bottom { border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

/* SVG 动效基础 */
.svg-wrapper { width: 100%; height: auto; max-width: 100%; overflow: hidden; }
.svg-wrapper svg { width: 100%; height: auto; display: block; }
.anim-star { animation: twinkle 4s ease-in-out infinite; }
.anim-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: flow 3s linear infinite; }
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-bubble { animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.rot-center { transform-box: fill-box; transform-origin: center; }

@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

@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; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
