/* === 基础变量与设计 Token === */
:root {
  --color-dark: #141838;
  --color-paper: #FCFCFD;
  --color-body: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;

  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;

  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  --header-h: 64px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* === 面色彩上下文 === */
.face-dark {
  --bg-surface: var(--color-dark);
  --text-primary: var(--color-paper);
  --text-secondary: rgba(252, 252, 253, 0.75);
  --accent-text: var(--color-accent);
  --brand-text: var(--color-accent);
}
.face-paper {
  --bg-surface: var(--color-paper);
  --text-primary: var(--color-body);
  --text-secondary: rgba(21, 23, 35, 0.7);
  --accent-text: var(--color-accent);
  --brand-text: var(--color-brand);
}
/* 深色面上的浅色卡片恢复纸面取色 */
.face-dark .card-light {
  --bg-surface: var(--color-paper);
  --text-primary: var(--color-body);
  --text-secondary: rgba(21, 23, 35, 0.7);
  --brand-text: var(--color-brand);
}

/* === 重置与全局 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
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-block: var(--section-y);
  background: var(--bg-surface);
  color: var(--text-primary);
}
.section-header {
  margin-bottom: var(--gap);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand-text);
  margin-bottom: 0.5rem;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
p {
  max-width: 38em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.hl {
  color: var(--brand-text);
  font-weight: 500;
}
.face-dark .hl {
  color: var(--accent-text);
}

/* === 导航与页头 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  height: 32px;
  width: auto;
}
.nav-list {
  display: flex;
  gap: 24px;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-brand);
}
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
  border-radius: 2px;
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-primary:hover {
  background: #5a9de0;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-body);
  border: 1px solid var(--color-body);
}
.face-dark .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}
.btn-secondary:hover {
  background: rgba(0,0,0,0.04);
  transform: translateY(-1px);
}
.face-dark .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
}
.btn-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* === 卡片与面板 === */
.card {
  background: var(--bg-surface);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: background 0.2s;
}
.panel-dark {
  background: var(--color-dark);
  border-radius: 16px;
  padding: var(--gap);
  overflow: hidden;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

/* === 表格 === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.face-dark .data-table th, .face-dark .data-table td {
  border-bottom-color: rgba(255,255,255,0.1);
}
.data-table th {
  font-weight: 600;
  color: var(--text-primary);
}
.data-table td {
  color: var(--text-secondary);
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 16px 0;
}
.face-dark .faq-item { border-bottom-color: rgba(255,255,255,0.1); }
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }
.faq-item summary::after {
  content: "+";
  margin-left: auto;
  font-weight: 400;
  color: var(--brand-text);
}
.faq-item[open] summary::after { content: "-"; }
.faq-item p {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* === 列表与定义 === */
.def-list dt {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.def-list dd {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.step-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.step-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* === 新闻卡片 === */
.news-card {
  background: var(--bg-surface);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-card time {
  font-size: 0.8rem;
  color: var(--brand-text);
  font-weight: 600;
}
.news-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* === SVG 动效 === */
.svg-container {
  width: 100%;
  height: auto;
}
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 6s ease-in-out infinite;
}
.breathe-dot {
  animation: breathOpacity 2.5s ease-in-out infinite alternate;
}
.float-layer {
  animation: gentleFloat 5s ease-in-out infinite alternate;
}
@keyframes drawStroke {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
@keyframes breathOpacity {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}
@keyframes gentleFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}
svg g, svg path, svg rect, svg circle {
  transform-box: fill-box;
  transform-origin: center;
}

/* === 响应式与无障碍 === */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-list { display: none; }
  h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
/* 防止溢出 */
.overflow-safe { overflow-wrap: anywhere; white-space: normal; }
.flex-col { flex-direction: column; }
@media (min-width: 769px) {
  .flex-col { flex-direction: row; }
}
.min-w-0 { min-width: 0; }
.text-balance { text-wrap: balance; }
