:root {
  /* 色板 */
  --color-dark: #10112D;
  --color-paper: #F5F0E5;
  --color-text: #151523;
  --color-brand: #1416EB;
  --color-accent: #89ED6E;

  /* 设计 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(21, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 全局重置与基础 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* 布局容器 */
.container {
  width: 100%;
  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-paper);
}

.section--paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}

/* 眉标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section--paper .badge {
  color: var(--color-brand);
}

.section--dark .badge {
  color: var(--color-accent);
}

.badge::before {
  content: "";
  display: block;
  width: 1.25em;
  height: 1px;
  background-color: currentColor;
}

/* 标题 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

/* 高亮关键词 */
.hl {
  color: var(--color-brand);
}

.section--dark .hl {
  color: var(--color-accent);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  height: 48px;
  padding-inline: 1.5em;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn--secondary {
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.section--dark .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* 卡片 */
.card {
  background-color: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}

.section--dark .card {
  background-color: var(--color-dark);
  border-color: rgba(245, 240, 229, 0.16);
}

/* 网格 */
.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));
}

/* 图文交错 */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
}

.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}

/* 视觉面板 */
.panel {
  background-color: var(--color-dark);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.section--paper .panel {
  background-color: var(--color-dark);
}

.section--dark .panel {
  background-color: rgba(245, 240, 229, 0.05);
}

/* 列表 */
.list li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.5em;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.4em;
  height: 0.4em;
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0.6;
}

/* 步骤 */
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step__num {
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.9rem;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  border: var(--card-border);
  border-radius: var(--radius-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
}

th {
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.03);
}

.section--dark th {
  background-color: rgba(255, 255, 255, 0.05);
}

/* FAQ */
details {
  border-bottom: 1px solid var(--card-border);
  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.25rem;
  font-weight: 400;
  opacity: 0.5;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* 页头页脚 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 240, 229, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}

.section--dark ~ .footer {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.footer {
  padding-block: 3rem;
  border-top: 1px solid var(--card-border);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  opacity: 1;
  color: var(--color-brand);
}

.section--dark .nav__link:hover,
.section--dark .nav__link[aria-current="page"] {
  color: var(--color-accent);
}

/* SVG 动效 */
.svg-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

svg {
  width: 100%;
  height: auto;
}

/* 同心轨道呼吸 */
@keyframes breathe {
  0%, 100% {
    transform: scale(0.98);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

.anim-breathe-1 {
  animation: breathe 6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.anim-breathe-2 {
  animation: breathe 8s ease-in-out infinite reverse;
  transform-origin: center;
  transform-box: fill-box;
}

.anim-breathe-3 {
  animation: breathe 10s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .anim-breathe-1,
  .anim-breathe-2,
  .anim-breathe-3 {
    animation: none;
  }
}
