:root {
  /* 色板 */
  --color-dark: #1B1231;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;
  --color-white: #FFFFFF;

  /* 结构 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;

  /* 排版 */
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --lh-body: 1.65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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-inline: auto;
  padding-inline: var(--gap);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section.dark { background-color: var(--color-dark); color: var(--color-white); }
.section.paper { background-color: var(--color-paper); color: var(--color-text); }

/* 排版组件 */
.overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.section.dark .overline { color: var(--color-accent); }
.section.paper .overline { color: var(--color-brand); }

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: var(--gap);
  text-wrap: balance;
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}
p { margin-bottom: 1rem; max-width: 38em; }
.hl { font-weight: 600; }
.section.dark .hl { color: var(--color-accent); }
.section.paper .hl { color: var(--color-brand); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 52px;
  padding-inline: 1.5rem;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  border: 2px solid currentColor;
  color: inherit;
}
.section.dark .btn-secondary { border-color: var(--color-white); color: var(--color-white); }
.section.paper .btn-secondary { border-color: var(--color-text); color: var(--color-text); }

/* 卡片 */
.card {
  background: var(--color-white);
  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(-2px); }

/* 表格 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(128,128,128,0.3);
}
.spec-table th { font-weight: 600; width: 40%; }
.spec-table tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item {
  border: var(--card-border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem var(--gap);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 var(--gap) 1rem;
  color: inherit;
  opacity: 0.9;
}

/* 时间线 */
.timeline-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.step-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  border-radius: 10px;
  font-size: 1rem;
}

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 243, 247, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0.75rem 0;
}
.section.dark ~ .site-header, .site-header.dark-mode {
  background: rgba(27, 18, 49, 0.9);
  border-bottom-color: rgba(255,255,255,0.1);
  color: var(--color-white);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] { color: var(--color-accent); }
@media (max-width: 768px) {
  .nav { display: none; }
  .header-btn { display: none; }
}

.site-footer {
  padding-block: 3rem;
  border-top: 1px solid rgba(128,128,128,0.2);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* SVG 基础与动效 */
.svg-panel { width: 100%; height: auto; display: block; }
svg { overflow: visible; }
svg path, svg circle, svg rect, svg line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s;
}
svg .anim-flow { animation: flow-path 3s linear infinite; }
svg .anim-float { animation: float-bubble 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
svg .anim-draw { animation: draw-line 4s ease forwards; }
svg .anim-breathe { animation: breathe 2.5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }

@keyframes flow-path {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes breathe {
  0% { opacity: 0.4; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  svg .anim-flow, svg .anim-float, svg .anim-draw, svg .anim-breathe {
    animation: none !important;
  }
}
