:root {
  /* 色板 */
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;
  --color-border-subtle: rgba(25, 21, 35, 0.16);
  --color-white: #ffffff;

  /* 结构 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --header-h: 64px;

  /* 排版变量 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 容器与区块 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

section.paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}
section.paper {
  --text-col: var(--color-text);
  --link-col: var(--color-brand);
  --hl-col: var(--color-brand);
  --border-col: var(--color-border-subtle);
}

section.dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
section.dark {
  --text-col: var(--color-paper);
  --link-col: var(--color-accent);
  --hl-col: var(--color-accent);
  --border-col: rgba(219, 212, 237, 0.16);
}

/* 排版 */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--text-col);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin-bottom: 1rem;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.8rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  max-width: 38em;
  margin-bottom: 1rem;
}

.overline {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link-col);
  margin-bottom: 0.5rem;
}

.hl {
  color: var(--hl-col);
  font-weight: 800;
}

a {
  color: var(--link-col);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.8; }
a:focus-visible {
  outline: 2px solid var(--link-col);
  outline-offset: 2px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  height: 52px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--link-col);
  outline-offset: 2px;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: 1px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--text-col);
  color: var(--text-col);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.05);
}
section.dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}
section.dark .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 网格与卡片 */
.grid {
  display: grid;
  gap: var(--gap);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

.card {
  background: var(--color-paper);
  border: 1px solid var(--border-col);
  padding: var(--gap);
  border-radius: var(--radius-card);
  box-shadow: none;
}
section.dark .card {
  background: var(--color-dark);
  border-color: var(--border-col);
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  min-width: 600px;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-col);
}
th { font-weight: 700; }
td { vertical-align: top; }

/* 详情列表 (FAQ) */
details {
  margin-bottom: 1rem;
  border: 1px solid var(--border-col);
  padding: 1rem;
  background: var(--color-paper);
}
section.dark details {
  background: var(--color-dark);
  border-color: var(--border-col);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  background-color: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform-origin: center;
  transition: transform 0.2s ease;
}
details[open] summary::before {
  transform: rotate(90deg);
}
details p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--text-col);
}

/* 定义列表 */
dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
dt {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-col);
}
dd {
  margin-left: 0;
  color: var(--text-col);
  max-width: 38em;
}

/* 步骤条 */
.steps {
  display: flex;
  gap: var(--gap);
  counter-reset: step;
}
.step-item {
  flex: 1;
  min-width: 0;
  position: relative;
  padding-top: 2.5rem;
}
.step-num {
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 2rem;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
}
.step-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-col);
}
.step-desc {
  font-size: 0.95rem;
  color: var(--text-col);
  max-width: 30em;
}

/* 新闻卡片 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.news-card {
  background: var(--color-paper);
  border: 1px solid var(--border-col);
  padding: var(--gap);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
section.dark .news-card {
  background: var(--color-dark);
  border-color: var(--border-col);
}
.news-meta {
  font-size: 0.85rem;
  color: var(--link-col);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-col);
  line-height: 1.3;
}
.news-excerpt {
  font-size: 0.95rem;
  color: var(--text-col);
  margin-bottom: 0;
}

/* 头部与导航 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid transparent;
  padding: 0.75rem 0;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
header.scrolled {
  background: rgba(219, 212, 237, 0.95);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--border-col);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
section.dark header {
  background: var(--color-dark);
}
section.dark header.scrolled {
  background: rgba(37, 25, 67, 0.95);
  border-bottom-color: var(--border-col);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-col);
}
.brand img {
  height: 32px;
  width: auto;
  display: block;
}
nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}
nav a {
  font-weight: 500;
  color: var(--text-col);
  padding: 0.5rem 0;
}
nav a[aria-current="page"] {
  color: var(--link-col);
  font-weight: 700;
}

/* 页脚 */
footer {
  padding: var(--section-y) 0;
  background: var(--color-dark);
  color: var(--color-paper);
  border-top: 1px solid rgba(219, 212, 237, 0.16);
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
footer a {
  color: var(--color-paper);
  opacity: 0.8;
}
footer a:hover { opacity: 1; }
.footer-note {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: auto;
}

/* SVG 动效 */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
}
.anim-float {
  animation: float 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-breathe {
  animation: breathe 4s ease-in-out infinite;
}
.anim-slide-in {
  animation: slideIn 5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.anim-flow {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dashFlow 8s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes dashFlow {
  from { stroke-dashoffset: 1; }
  to { 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;
  }
  .anim-float, .anim-breathe, .anim-slide-in, .anim-flow {
    animation: none !important;
  }
}

/* 响应式适配 */
@media (max-width: 768px) {
  header nav ul { display: none; }
  .hero-layout { grid-template-columns: 1fr !important; }
  .steps { flex-direction: column; }
  h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .grid-2, .grid-3, .news-grid { grid-template-columns: 1fr; }
  dl { gap: 1rem; }
}
