:root {
  --color-dark: #1B1231;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;
  --color-surface-light: #EAEBEF;
  --color-surface-dark: #251D3A;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;
  --font-main: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 排版 */
.mark {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.paper-mark { color: var(--color-brand); }
.dark-mark { color: var(--color-accent); }

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--gap);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--gap);
}
h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
p { margin-bottom: var(--gap); max-width: 38em; }
.hl { color: var(--color-brand); }
.dark .hl { color: var(--color-accent); }

/* 布局区块 */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section.dark { background: var(--color-dark); color: var(--color-paper); }
.section.dark .mark { color: var(--color-accent); }
.section.dark p, .section.dark h3 { color: var(--color-paper); }

.grid-2 { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* 组件：按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* 组件：卡片 */
.card {
  background: var(--color-surface-light);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.dark .card { background: var(--color-surface-dark); }

/* 组件：表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  box-sizing: border-box;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 100%;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}
.dark th, .dark td { border-bottom-color: rgba(244, 243, 247, 0.15); }
th { font-weight: 600; }

/* 组件：FAQ */
details {
  margin-bottom: var(--gap);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  padding-bottom: var(--gap);
}
.dark details { border-bottom-color: rgba(244, 243, 247, 0.15); }
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-brand);
}
.dark summary::before { background: var(--color-accent); }
summary:hover { color: var(--color-brand); }
.dark summary:hover { color: var(--color-accent); }
details[open] summary { color: var(--color-brand); }
.dark details[open] summary { color: var(--color-accent); }
details p { margin-top: 0.5rem; color: var(--color-text); }
.dark details p { color: var(--color-paper); }

/* 页头与页脚 */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 243, 247, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.dark .header { background: rgba(27, 18, 49, 0.9); border-bottom-color: rgba(244, 243, 247, 0.1); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap);
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; color: var(--color-brand); }
.dark .nav-links a { color: var(--color-paper); }
.dark .nav-links a:hover { color: var(--color-accent); }

.footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: var(--section-y) 0;
  text-align: center;
}
.footer p { margin: 0 auto; opacity: 0.8; font-size: 0.9rem; }

/* SVG 基础与动效 */
.svg-wrap {
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: hidden;
}
.svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}
.anim-child {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes dash-flow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes node-pulse {
  0%, 100% { r: 3; opacity: 0.5; fill: var(--color-brand); }
  50% { r: 4.5; opacity: 1; fill: var(--color-accent); }
}

.line-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dash-flow 5s ease infinite alternate;
}
.el-float { animation: float-y 6s ease-in-out infinite; }
.el-breathe { animation: breathe 4s ease-in-out infinite; }
.el-slide { animation: slide-in 1.5s ease-out forwards; }
.node-glow { animation: node-pulse 7s ease-in-out infinite; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  .line-draw, .el-float, .el-breathe, .el-slide, .node-glow {
    animation: none !important;
  }
}
