/* === 设计变量与 Token === */
:root {
  /* 色板 */
  --color-bg-dark: #231334;
  --color-bg-paper: #E9E8EA;
  --color-text-body: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  
  /* 派生变量（仅用于边框、次级背景等结构性用途，文字仍用上述色板） */
  --border-color: rgba(28, 21, 35, 0.1);
  --border-color-dark: rgba(233, 232, 234, 0.1);
  
  /* 圆角 */
  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-badge: 6px;
  
  /* 卡片边界与阴影 */
  --card-border: 2px solid var(--color-text-body);
  --card-shadow: 4px 4px 0 var(--color-text-body);
  --card-shadow-dark: 4px 4px 0 var(--color-accent);
  
  /* 节奏与密度 */
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  
  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-body: 1.75;
}

/* === 基础重置与排版 === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg-paper);
  color: var(--color-text-body);
  line-height: var(--line-height-body);
  font-size: 16px;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  padding: 0;
  list-style: none;
}

/* === 布局容器 === */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-bg-paper);
}

/* 深色面上的浅色卡片 */
.card--light-on-dark {
  background-color: var(--color-bg-paper);
  color: var(--color-text-body);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* === 标题系统 === */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  color: var(--color-brand);
}

.section--dark .badge {
  color: var(--color-accent);
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 0.5em;
  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: 1.5em;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 0.8em;
}

.hl {
  color: var(--color-brand);
}

.section--dark .hl {
  color: var(--color-accent);
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 48px;
  padding: 0 1.5em;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
}

.btn--primary:hover {
  background-color: #e5c85d;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text-body);
  border: 2px solid var(--color-text-body);
}

.section--dark .btn--secondary {
  color: var(--color-bg-paper);
  border-color: var(--color-bg-paper);
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* === 卡片与面板 === */
.card {
  background-color: #fff;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.panel {
  background-color: var(--color-bg-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}

/* === 表格 === */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--card-border);
  border-radius: var(--radius-card);
  background: #fff;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.table-wrapper th,
.table-wrapper td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table-wrapper th {
  background-color: rgba(125, 20, 235, 0.05);
  font-weight: 600;
  white-space: nowrap;
}

.table-wrapper tr:last-child td {
  border-bottom: none;
}

/* === FAQ === */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  background: #fff;
  overflow: hidden;
}

.faq-item summary {
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item[open] summary::before {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.5rem 1.5rem;
  margin: 0;
  color: var(--color-text-body);
}

/* === 步骤条 === */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.step {
  flex: 1;
  min-width: 200px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
  font-weight: 700;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

/* === SVG 动效 Keyframes === */
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-8px); opacity: 1; }
}

@keyframes slideIn {
  0% { transform: translateX(20px); opacity: 0; }
  10% { transform: translateX(0); opacity: 1; }
  90% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(20px); opacity: 0; }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.5); opacity: 1; }
}

@keyframes flowPath {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

/* === 动效类 === */
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.anim-float {
  animation: floatBubble 6s ease-in-out infinite;
}

.anim-slide {
  animation: slideIn 8s ease-in-out infinite;
}

.anim-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulseDot 2s ease-in-out infinite;
}

.anim-flow {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flowPath 6s linear infinite;
}

/* === 响应式 === */
@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-draw, .anim-float, .anim-slide, .anim-pulse, .anim-flow {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .steps {
    flex-direction: column;
  }
  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
