/* 设计变量与基础排版 */
:root {
  --color-dark: #13102D;
  --color-paper: #D6D4ED;
  --color-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --color-bg-dark: var(--color-dark);
  --color-bg-paper: var(--color-paper);
  --color-text-body: var(--color-text);
  --color-text-on-dark: var(--color-paper);
  --color-highlight-on-paper: var(--color-brand);
  --color-highlight-on-dark: var(--color-accent);

  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(23, 21, 35, 0.16);
  --card-shadow: none;
  --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;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg-paper);
  color: var(--color-text-body);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
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); }
.section { padding: var(--section-y) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* 主题层变量覆盖 */
.bg-dark { background: var(--color-bg-dark); color: var(--color-text-on-dark); }
.bg-dark .hl { color: var(--color-highlight-on-dark); }
.bg-dark .eyebrow { color: var(--color-highlight-on-dark); }
.bg-dark .btn-secondary { color: var(--color-text-on-dark); border-color: var(--color-text-on-dark); }
.bg-dark table th, .bg-dark table td { border-color: rgba(214, 212, 237, 0.15); color: var(--color-text-on-dark); }
.bg-dark details { border-color: rgba(214, 212, 237, 0.2); color: var(--color-text-on-dark); }
.bg-light { background: var(--color-bg-paper); color: var(--color-text-body); }
.bg-light .hl { color: var(--color-highlight-on-paper); }
.bg-light .eyebrow { color: var(--color-highlight-on-paper); }
.bg-light .btn-secondary { color: var(--color-text-body); border-color: var(--color-text-body); }
.bg-light table th, .bg-light table td { border-color: var(--card-border); }
.bg-light details { border-color: var(--card-border); }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0 2rem; height: 48px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { background: #7de063; transform: translateY(-2px); }
.btn-secondary { background: transparent; border: 1px solid currentColor; }
.btn-secondary:hover { background: rgba(128,128,128,0.1); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* 组件：卡片与面板 */
.card {
  background: inherit; border: var(--card-border); border-radius: var(--radius-card);
  padding: var(--gap); position: relative; overflow: hidden;
}
.panel {
  background: var(--color-dark); border-radius: var(--radius-card); padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* 排版辅助 */
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.hl { font-weight: 600; }
.text-muted { opacity: 0.85; }
.max-w-prose { max-width: 38em; }
.mb-gap { margin-bottom: var(--gap); }

/* 表格与问答 */
table { width: 100%; border-collapse: collapse; margin: var(--gap) 0; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; text-align: left; }
th { font-weight: 600; }
tr:not(:last-child) td { border-bottom: var(--card-border); }
details { margin-bottom: 1rem; border-radius: 12px; padding: 1rem; }
summary { cursor: pointer; font-weight: 600; list-style: none; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
details[open] summary { margin-bottom: 0.75rem; }

/* 页头与页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(214, 212, 237, 0.85); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(23,21,35,0.08); }
.bg-dark .site-header { background: rgba(19, 16, 45, 0.9); border-bottom-color: rgba(214,212,237,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { opacity: 0.8; }
.nav-links a[aria-current="page"] { font-weight: 700; }
.footer { padding: var(--section-y) 0; border-top: 1px solid var(--card-border); margin-top: var(--section-y); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--gap); }
.footer-links { display: flex; gap: 1.5rem; }

/* SVG 动效系统 */
.svg-visual { width: 100%; height: auto; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 4s ease-in-out infinite; }
.anim-float { animation: float-y 4.5s ease-in-out infinite; }
.anim-orbit { transform-box: fill-box; transform-origin: center; animation: orbit-breath 6s ease-in-out infinite; }
.anim-pulse { transform-box: fill-box; transform-origin: center; animation: pulse-dot 2s ease-in-out infinite; }
.anim-slide-in { animation: slide-x 5s ease-in-out infinite; }

@keyframes draw-path {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-8px); opacity: 1; }
}
@keyframes orbit-breath {
  0%, 100% { transform: scale(0.96); opacity: 0.35; }
  50% { transform: scale(1.04); opacity: 0.75; }
}
@keyframes pulse-dot {
  0%, 100% { r: 2.5; opacity: 0.6; }
  50% { r: 4; opacity: 1; }
}
@keyframes slide-x {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(12px); opacity: 1; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
