:root {
  /* 色板 */
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;

  /* 结构性约束 */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --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;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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: var(--section-y) 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid rgba(25, 21, 35, 0.15);
}

.dark-section {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.dark-section .section-header h2,
.dark-section .section-header p {
  color: var(--color-paper);
}

.dark-section .section-header .eyebrow {
  color: var(--color-accent);
}

.dark-section .section-header .hl {
  color: var(--color-accent);
}

.light-card {
  background-color: var(--color-paper);
  color: var(--color-text);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  border-radius: var(--radius-card);
}

/* 排版 */
.section-header {
  margin-bottom: var(--gap);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--color-brand);
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.hl {
  color: var(--color-brand);
}

.dark-section .hl {
  color: var(--color-accent);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn-secondary {
  background: 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:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* 卡片网格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

.card {
  background-color: var(--color-paper);
  color: var(--color-text);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  border-radius: var(--radius-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.75rem var(--gap);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

th {
  font-weight: 600;
  background-color: rgba(25, 21, 35, 0.05);
}

.dark-section th,
.dark-section td {
  border-bottom-color: rgba(219, 212, 237, 0.15);
}

.dark-section th {
  background-color: rgba(219, 212, 237, 0.05);
}

/* FAQ */
details {
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  padding: 1rem 0;
}

summary {
  font-weight: 600;
  cursor: pointer;
  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;
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.dark-section details {
  border-bottom-color: rgba(219, 212, 237, 0.15);
}

/* 步骤列表 */
.steps-list {
  counter-reset: step;
}

.step-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

.step-item::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
}

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(219, 212, 237, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

.dark-section .site-header {
  background-color: rgba(37, 25, 67, 0.9);
  border-bottom-color: rgba(219, 212, 237, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  height: 32px;
  width: auto;
}

nav ul {
  display: flex;
  gap: var(--gap);
}

nav a {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--color-brand);
}

.dark-section nav a:hover,
.dark-section nav a[aria-current="page"] {
  color: var(--color-accent);
}

.site-footer {
  padding: var(--section-y) 0;
  border-top: 1px solid rgba(25, 21, 35, 0.1);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap);
}

.footer-links {
  display: flex;
  gap: var(--gap);
}

/* SVG 动效 */
.svg-visual {
  width: 100%;
  height: auto;
  max-width: 600px;
  margin: 0 auto;
}

.float-card-1 { animation: float1 6s ease-in-out infinite; }
.float-card-2 { animation: float2 7s ease-in-out infinite; }
.float-card-3 { animation: float3 8s ease-in-out infinite; }

@keyframes float1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bubble-pop {
  animation: popIn 4s ease-in-out infinite;
}

@keyframes popIn {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

.typing-dot {
  animation: typing 1.5s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.line-flow {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s linear infinite;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { 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;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
