:root {
  --c-dark: #10112D;
  --c-paper: #F5F0E5;
  --c-text: #151523;
  --c-brand: #1416EB;
  --c-accent: #89ED6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(21,21,35,0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;
  --lh-body: 1.75;
  --fw-heading: 700;
  --ls-heading: 0.02em;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--c-paper);
  color: var(--c-text);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* 上下文取色变量 */
.dark-surface {
  background: var(--c-dark);
  color: var(--c-paper);
}
.dark-surface .hl, .dark-surface a {
  color: var(--c-accent);
}
.paper-surface {
  background: var(--c-paper);
  color: var(--c-text);
}
.paper-surface .hl, .paper-surface a {
  color: var(--c-brand);
}
.card-light {
  background: var(--c-paper);
  color: var(--c-text);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}

/* 排版 */
h1, h2, h3 {
  font-weight: var(--fw-heading);
  letter-spacing: var(--ls-heading);
  line-height: 1.25;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: calc(var(--gap) * 1.5);
}
h3 {
  font-size: 1.25rem;
  margin-bottom: var(--gap);
}
p {
  margin-bottom: var(--gap);
  max-width: 38em;
}
.hl {
  font-weight: 800;
}
.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.paper-surface .eyebrow {
  color: var(--c-brand);
}
.dark-surface .eyebrow {
  color: var(--c-accent);
}

/* 布局容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
section:last-of-type {
  border-bottom: none;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-paper);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links {
  display: flex;
  gap: var(--gap);
}
.nav-links a {
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  border-bottom-color: var(--c-brand);
}
.dark-surface .nav-links a:hover, .dark-surface .nav-links a[aria-current="page"] {
  border-bottom-color: var(--c-accent);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  font-size: 1rem;
}
.btn-primary {
  background: var(--c-accent);
  color: var(--c-dark);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(137,237,110,0.4);
}
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--c-text);
  color: var(--c-text);
}
.paper-surface .btn-secondary {
  border-color: var(--c-text);
  color: var(--c-text);
}
.dark-surface .btn-secondary {
  border-color: var(--c-paper);
  color: var(--c-paper);
}
.btn:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* 卡片与网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.feature-group-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}
.feature-list li {
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* FAQ */
details {
  margin-bottom: var(--gap);
  border-bottom: 1px solid rgba(128,128,128,0.2);
  padding-bottom: var(--gap);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
summary::marker { display: none; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.2rem;
  margin-left: auto;
  font-weight: 400;
}
details[open] summary::after {
  content: "−";
}
details p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
th {
  font-weight: 700;
}

/* 步骤条 */
.steps-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  counter-reset: step;
}
.step-item {
  flex: 1 1 200px;
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
}
.step-item::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--c-accent);
  color: var(--c-dark);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.dark-surface .step-item::before {
  background: var(--c-accent);
  color: var(--c-dark);
}

/* 资讯卡片 */
.news-card {
  background: var(--c-paper);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.news-date {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  display: block;
}

/* SVG 基础与动效 */
.svg-anim {
  width: 100%;
  height: auto;
}
.grid-node {
  fill: var(--c-accent);
  opacity: 0.2;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}
.grid-node:nth-child(1) { animation: gridPulse 4s ease-in-out infinite 0s; }
.grid-node:nth-child(2) { animation: gridPulse 4s ease-in-out infinite 0.4s; }
.grid-node:nth-child(3) { animation: gridPulse 4s ease-in-out infinite 0.8s; }
.grid-node:nth-child(4) { animation: gridPulse 4s ease-in-out infinite 1.2s; }
.grid-node:nth-child(5) { animation: gridPulse 4s ease-in-out infinite 1.6s; }
.grid-node:nth-child(6) { animation: gridPulse 4s ease-in-out infinite 2.0s; }

.bubble {
  fill: var(--c-paper);
  opacity: 0;
  transform: translateY(10px);
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes bubbleFloat {
  0%, 100% { opacity: 0; transform: translateY(10px); }
  10%, 90% { opacity: 1; transform: translateY(0); }
}
.bubble-1 { animation: bubbleFloat 5s ease-in-out infinite 0.5s; }
.bubble-2 { animation: bubbleFloat 5s ease-in-out infinite 1.2s; }

.notification {
  fill: var(--c-accent);
  opacity: 0;
  transform: translateX(-20px);
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes notifSlide {
  0%, 100% { opacity: 0; transform: translateX(-20px); }
  15%, 85% { opacity: 1; transform: translateX(0); }
}
.notification { animation: notifSlide 6s ease-in-out infinite 1s; }

.draw-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  pathLength: 1;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes lineDraw {
  0% { stroke-dashoffset: 1; }
  50%, 100% { stroke-dashoffset: 0; }
}
.draw-line { animation: lineDraw 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;
    scroll-behavior: auto !important;
  }
  .grid-node, .bubble, .notification, .draw-line {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
  .hero-layout {
    grid-template-columns: 1fr !important;
  }
  .hero-visual {
    order: -1;
    margin-bottom: var(--gap);
  }
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 0;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
  }
}
