:root {
  /* 色板 */
  --color-dark: #231334;
  --color-paper: #F5F3F7;
  --color-text: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  
  /* 设计 Token */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  
  /* 字体与基础排版 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --line-height-base: 1.75;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  font-size: 17px;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-paper);
  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-inline: auto;
  padding-inline: var(--gap);
}

.section {
  padding-block: var(--section-y);
}

.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.bg-paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}

/* 标题系统 */
.heading-xl {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading-lg {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

.heading-md {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
}

/* 眉标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.paper-section .badge {
  color: var(--color-brand);
}

.dark-section .badge {
  color: var(--color-accent);
}

.badge::before {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  background-color: currentColor;
}

/* 高亮词 */
.hl {
  color: var(--color-brand);
}

.dark-section .hl {
  color: var(--color-accent);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  height: 52px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.dark-section .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 243, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28, 21, 35, 0.08);
}

.dark-section .site-header {
  background-color: rgba(35, 19, 52, 0.85);
  border-bottom-color: rgba(245, 243, 247, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo img {
  height: 32px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  opacity: 1;
}

@media (max-width: 768px) {
  .nav-list {
    display: none;
  }
}

/* 卡片组件 */
.card {
  background-color: rgba(255, 255, 255, 0.6);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: transform 0.2s ease;
}

.paper-section .card {
  background-color: var(--color-paper);
  border: 1px solid rgba(28, 21, 35, 0.08);
}

.dark-section .card {
  background-color: rgba(245, 243, 247, 0.05);
  border: 1px solid rgba(245, 243, 247, 0.1);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(28, 21, 35, 0.1);
}

.dark-section .data-table th,
.dark-section .data-table td {
  border-bottom-color: rgba(245, 243, 247, 0.1);
}

.data-table th {
  font-weight: 600;
  color: var(--color-brand);
}

.dark-section .data-table th {
  color: var(--color-accent);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(28, 21, 35, 0.1);
}

.dark-section .faq-item {
  border-bottom-color: rgba(245, 243, 247, 0.1);
}

details summary {
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.6;
}

details[open] summary::after {
  content: "−";
}

details p {
  padding-bottom: 20px;
  opacity: 0.9;
  line-height: 1.7;
}

/* 列表与排版辅助 */
.text-balance {
  text-wrap: balance;
}

.max-w-prose {
  max-width: 38em;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 12px;
  flex-shrink: 0;
}

/* SVG 动效 */
.svg-visual {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.card-stack .card-bg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.paper-section .card-stack .card-bg {
  stroke: var(--color-text);
  opacity: 0.15;
}

.dark-section .card-stack .card-bg {
  stroke: var(--color-paper);
  opacity: 0.15;
}

.card-stack .card-fill {
  fill: currentColor;
  opacity: 0.05;
}

.paper-section .card-stack .card-fill {
  fill: var(--color-text);
}

.dark-section .card-stack .card-fill {
  fill: var(--color-paper);
}

.card-stack .ui-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.paper-section .card-stack .ui-line {
  stroke: var(--color-brand);
  opacity: 0.6;
}

.dark-section .card-stack .ui-line {
  stroke: var(--color-accent);
  opacity: 0.6;
}

.card-stack .ui-dot {
  fill: currentColor;
}

.paper-section .card-stack .ui-dot {
  fill: var(--color-text);
  opacity: 0.3;
}

.dark-section .card-stack .ui-dot {
  fill: var(--color-paper);
  opacity: 0.3;
}

/* 浮动动画 */
@keyframes floatA {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes floatC {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.c1 { animation: floatA 6s ease-in-out infinite; }
.c2 { animation: floatB 7.5s ease-in-out infinite 0.5s; }
.c3 { animation: floatC 8s ease-in-out infinite 1s; }

.ui-line.draw {
  animation: drawLine 4s ease-in-out infinite;
}

.ui-dot.breathe {
  animation: breathe 3s 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;
  }
  .c1, .c2, .c3 {
    animation: none;
    transform: translateY(0);
  }
  .ui-line.draw {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .heading-xl {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .btn {
    width: 100%;
  }
}
