:root {
  /* 色板 */
  --color-dark: #140E25;
  --color-paper: #F7F5F3;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;

  /* 设计 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;

  /* 字体与排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --lh-body: 1.65;
}

/* 基础重置 */
*, *::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: var(--lh-body);
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
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-block: var(--section-y); position: relative; }
.section-dark { background: var(--color-dark); color: var(--color-paper); }
.section-paper { background: var(--color-paper); color: var(--color-text); }
.section-dark .card-light {
  background: var(--color-paper);
  color: var(--color-text);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}

/* 排版工具类 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 0.75em;
}
.section-paper .badge { color: var(--color-brand); }
.section-dark .badge { color: var(--color-accent); }
.badge::before { content: ""; display: inline-block; width: 14px; height: 2px; background: currentColor; border-radius: 1px; }

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: 0.6em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--gap);
  text-wrap: balance;
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-top: calc(var(--gap) * 1.5);
  margin-bottom: 0.5em;
}
p, li { max-width: 38em; }
.hl { font-weight: 700; }
.section-paper .hl { color: var(--color-brand); }
.section-dark .hl { color: var(--color-accent); }

/* 头部与导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 243, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
  padding: 0.75rem 0;
}
.section-dark ~ .site-header, .site-header[data-dark="true"] {
  background: rgba(20, 14, 37, 0.9);
  border-bottom-color: rgba(247, 245, 243, 0.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.5em; font-weight: 800; font-size: 1.1rem; }
.brand img { height: 28px; width: auto; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
.section-dark nav a { color: var(--color-paper); }
.section-dark nav a:hover, .section-dark nav a[aria-current="page"] { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 1.5em;
  border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem;
  cursor: pointer; border: none;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); box-shadow: 0 4px 12px rgba(200, 237, 110, 0.25); }
.btn-secondary { background: transparent; border: 1px solid currentColor; }
.section-dark .btn-secondary { color: var(--color-paper); }
.section-paper .btn-secondary { color: var(--color-text); }

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  color: var(--color-text);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }
.panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
}
.panel-light { background: var(--color-paper); border: 1px solid rgba(25, 21, 35, 0.08); }

/* 表格 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(25, 21, 35, 0.1); }
th { font-weight: 700; }
td:first-child { font-weight: 600; white-space: nowrap; }
.section-dark th, .section-dark td { border-bottom-color: rgba(247, 245, 243, 0.1); }

/* FAQ */
details {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--card-shadow);
  border: var(--card-border);
}
.summary {
  font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
details[open] .summary::after { transform: rotate(45deg); }
details > div { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(25, 21, 35, 0.08); }
.section-dark details { background: rgba(247, 245, 243, 0.05); color: var(--color-paper); }
.section-dark .summary { color: var(--color-paper); }
.section-dark details > div { border-top-color: rgba(247, 245, 243, 0.1); }

/* 页脚 */
.site-footer {
  padding: var(--section-y) 0 calc(var(--section-y) * 0.6);
  background: var(--color-dark);
  color: var(--color-paper);
  border-top: 1px solid rgba(247, 245, 243, 0.1);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--color-accent); }
.footer-col a { display: block; padding: 0.25rem 0; opacity: 0.85; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { text-align: center; font-size: 0.85rem; opacity: 0.7; padding-top: 1.5rem; border-top: 1px solid rgba(247, 245, 243, 0.08); }

/* SVG 视觉组件 */
.svg-visual { width: 100%; height: auto; max-width: 100%; }
.svg-visual circle, .svg-visual rect, .svg-visual path { vector-effect: non-scaling-stroke; }

/* 动效关键帧 */
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@keyframes drawLine {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breatheDots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(-4px); opacity: 0.8; }
}

/* 动效类 */
.anim-twinkle { animation: twinkle 4s ease-in-out infinite; }
.anim-draw { animation: drawLine 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.anim-float { animation: floatBubble 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breatheDots 3s ease-in-out infinite; }
.anim-slide { animation: slideIn 4s ease-in-out infinite; }

/* 减少动态效果 */
@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;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr !important; }
  .flex-row { flex-direction: column; }
  .flow-step { flex-direction: column; align-items: flex-start; }
  .flow-step:not(:last-child) { margin-bottom: 1.5rem; }
  .flow-arrow { display: none; }
}
@media (min-width: 769px) {
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
  .flex-row { display: flex; gap: var(--gap); align-items: center; }
}
