/* 设计变量与基础重置 */
:root {
  --color-dark: #2D1438;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #6EEDA8;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --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-paper);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
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); }
.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); }

/* 排版系统 */
h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: calc(var(--gap) * 2); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin-bottom: var(--gap); }
p { max-width: 38em; margin-bottom: var(--gap); }

/* 眉标与高亮 */
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: calc(var(--gap) * 0.5); display: flex; align-items: center; gap: 8px; }
.paper-face .eyebrow { color: var(--color-brand); }
.dark-face .eyebrow { color: var(--color-accent); }
.hl { font-weight: 600; }
.paper-face .hl { color: var(--color-brand); }
.dark-face .hl { color: var(--color-accent); }

/* 组件：卡片 */
.card {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: calc(var(--gap) * 1.5);
  position: relative;
  overflow: hidden;
}
.dark-face .card { background: var(--color-paper); color: var(--color-text); }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; height: 52px; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-btn); transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(110, 237, 168, 0.35); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.paper-face .btn-secondary { border-color: var(--color-text); }
.dark-face .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { opacity: 0.85; }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

/* 组件：表格 */
table { width: 100%; border-collapse: collapse; margin-block: var(--gap); font-size: 0.95rem; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
th { font-weight: 600; }
.dark-face table th, .dark-face table td { border-bottom-color: rgba(246, 243, 247, 0.15); }

/* 组件：时间轴 */
.timeline { position: relative; padding-left: 24px; border-left: 2px solid var(--color-brand); margin-left: 12px; }
.timeline-item { position: relative; margin-bottom: var(--gap); }
.timeline-item::before {
  content: ""; position: absolute; left: -29px; top: 6px;
  width: 12px; height: 12px; background: var(--color-brand); border-radius: 50%; border: 2px solid var(--color-paper);
}
.time-tag { font-size: 0.85rem; font-weight: 700; color: var(--color-brand); margin-bottom: 4px; display: block; }

/* 组件：FAQ */
details { background: var(--color-paper); border-radius: var(--radius-card); margin-bottom: var(--gap); overflow: hidden; border: 1px solid rgba(31, 21, 35, 0.08); }
summary { padding: 16px 20px; 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.2rem; font-weight: 400; }
details[open] summary::after { content: "-"; }
details > div { padding: 0 20px 16px; line-height: 1.6; }

/* 页头与页脚 */
header { position: sticky; top: 0; z-index: 100; background: var(--color-paper); border-bottom: 1px solid rgba(31, 21, 35, 0.1); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
nav a { margin-left: var(--gap); font-weight: 500; }
nav a[aria-current="page"] { color: var(--color-brand); }
footer { background: var(--color-dark); color: var(--color-paper); padding: var(--section-y) 0; }
footer .container { display: flex; flex-direction: column; gap: var(--gap); align-items: center; text-align: center; }
footer a { color: var(--color-accent); }

/* 面类控制 */
.paper-face { background: var(--color-paper); color: var(--color-text); }
.dark-face { background: var(--color-dark); color: var(--color-paper); }
.dark-face .card { background: var(--color-paper); color: var(--color-text); }
.dark-face table th, .dark-face table td { color: var(--color-text); }

/* SVG 动效规范 */
.hero-svg { width: 100%; height: auto; max-width: 100%; }
.anim-float { animation: float 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLoop 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes drawLoop { 0%, 100% { stroke-dashoffset: 1; } 50% { stroke-dashoffset: 0; } }

/* 减少动态效果支持 */
@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; }
  .anim-float, .anim-breathe, .anim-draw { animation: none !important; }
}

/* 响应式适配 */
@media (max-width: 768px) {
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .header-inner { flex-wrap: wrap; gap: 8px; }
  nav { display: flex; gap: 8px; flex-wrap: wrap; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
