:root {
  /* 色板 */
  --color-dark: #17203F;
  --color-paper: #FCFCFD;
  --color-text: #151823;
  --color-brand: #1441EB;
  --color-accent: #6EEDBD;

  /* 结构 token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 1px solid rgba(21, 24, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-paper);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 表面层变量覆盖 */
.surface-paper { background: var(--color-paper); color: var(--color-text); }
.surface-dark { background: var(--color-dark); color: var(--color-paper); }
.surface-dark .hl { color: var(--color-accent); }
.surface-dark .badge { color: var(--color-accent); }
.surface-dark .link-accent { color: var(--color-accent); }
.surface-paper .hl { color: var(--color-brand); }
.surface-paper .badge { color: var(--color-brand); }
.surface-paper .link-accent { color: var(--color-brand); }

/* 容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); position: relative; }

/* 标题与眉标 */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.2em;
}
.badge::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 0.6em; height: 2px;
  background: currentColor;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
p { margin-bottom: 1rem; max-width: 38em; }
.hl { font-weight: 600; }

/* 按钮 */
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 48px; padding: 0 1.5rem;
  font-size: 1rem; font-weight: 500;
  border-radius: var(--radius-btn);
  cursor: pointer; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent); color: var(--color-dark); border: none;
}
.btn-primary:hover { transform: translateY(-1px); background: #5ddcb0; }
.btn-secondary {
  background: transparent; border: 1px solid var(--color-text); color: var(--color-text);
}
.surface-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.surface-dark .btn-secondary:hover { background: rgba(252, 252, 253, 0.08); }

/* 卡片 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
}
.surface-dark .card { background: #1e2a52; border-color: rgba(252, 252, 253, 0.12); }
.card:hover { transform: translateY(-2px); }

/* 网格 */
.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); }

/* 表格 */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(21, 24, 35, 0.12); }
th { font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* FAQ / Details */
details { border: var(--card-border); border-radius: var(--radius-card); margin-bottom: 0.75rem; background: var(--color-paper); }
.surface-dark details { background: #1e2a52; border-color: rgba(252, 252, 253, 0.12); }
summary {
  padding: 1rem; cursor: pointer; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { padding: 0 1rem 1rem; margin-bottom: 0; }

/* 页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252, 252, 253, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 24, 35, 0.08);
}
.surface-dark .site-header { background: rgba(23, 32, 63, 0.95); border-bottom-color: rgba(252, 252, 253, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 1.1rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { font-size: 0.95rem; font-weight: 500; opacity: 0.8; transition: opacity 0.2s; }
nav a:hover, nav a[aria-current="page"] { opacity: 1; }
.site-footer { padding: 3rem 0; border-top: 1px solid rgba(21, 24, 35, 0.08); font-size: 0.9rem; opacity: 0.85; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-links { display: flex; gap: 1.5rem; }

/* SVG 容器 */
.svg-panel { width: 100%; height: auto; max-width: 100%; overflow: hidden; }
.svg-panel svg { width: 100%; height: auto; display: block; }

/* SVG 动效类 */
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 6s ease infinite alternate; }
.anim-float { animation: float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-slide-in { animation: slide-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 响应式与无障碍 */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  nav { gap: 1rem; }
  .header-inner { flex-direction: column; height: auto; padding: 1rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
