:root {
  /* 色板 */
  --color-dark: #141838;
  --color-paper: #F7F5F3;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;
  
  /* 结构 token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --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: 1280px;
  
  /* 字体与排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --line-height-base: 1.65;
  --line-height-tight: 1.1;
  --letter-spacing-tight: -0.02em;
}

*, *::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);
  font-size: 16px;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-paper);
  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: 0 auto;
  padding: 0 var(--gap);
  overflow-x: hidden;
}

/* 页头 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 243, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 23, 35, 0.1);
  padding: 16px 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
}

.brand img {
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-brand);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(21, 23, 35, 0.05);
}

/* 页面背景色切换类 */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.bg-dark .btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.bg-dark .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

.bg-dark .btn-secondary:hover {
  background: rgba(247, 245, 243, 0.1);
}

.bg-dark .nav a {
  color: var(--color-paper);
}

.bg-dark .nav a:hover,
.bg-dark .nav a[aria-current="page"] {
  color: var(--color-accent);
}

/* 区块通用 */
.section {
  padding: var(--section-y) 0;
}

.section-header {
  margin-bottom: var(--gap);
}

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.paper-surface .kicker {
  color: var(--color-brand);
}

.dark-surface .kicker {
  color: var(--color-accent);
}

h1, h2, h3, h4 {
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  font-weight: 800;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 24px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  max-width: 38em;
}

.hl {
  color: var(--color-brand);
}

.dark-surface .hl {
  color: var(--color-accent);
}

/* 卡片网格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
}

.dark-surface .card {
  background: var(--color-paper);
  color: var(--color-text);
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  border: var(--card-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(21, 23, 35, 0.1);
}

th {
  font-weight: 700;
  background: rgba(20, 44, 235, 0.05);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
  background: var(--color-paper);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  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.5rem;
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  padding: 0 24px 20px;
  line-height: 1.7;
}

/* 页脚 */
.footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0;
  border-top: 1px solid rgba(247, 245, 243, 0.1);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--color-paper);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* SVG 动效基类 */
.svg-anim {
  width: 100%;
  height: auto;
}

/* 绘制线条动画 */
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 3s ease-in-out infinite alternate;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 浮动动画 */
.anim-float {
  animation: floatY 4s ease-in-out infinite alternate;
}

@keyframes floatY {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* 呼吸动画 */
.anim-breathe {
  animation: breathe 3s ease-in-out infinite alternate;
}

@keyframes breathe {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* 旋转拼合 */
.anim-spin-slow {
  animation: spinSlow 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.anim-spin-reverse {
  animation: spinReverse 15s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes spinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
}
