/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-accent: #25D366;
  --color-accent-hover: #1aae54;
  --color-border: #e5e7eb;
  --color-focus: #0ea5e9;
  --font-heading: "Georgia", "Noto Serif SC", "Songti SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-button: 0 2px 8px rgba(37,211,102,0.25);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ==================== 排版系统 ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.heading-h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.heading-h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.25;
  text-wrap: balance;
}
.heading-h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}
.text-body {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--color-text-secondary);
}
.section-gap { margin-top: var(--space-xl); }
.section-inner { padding: var(--space-lg) 0; }

/* ==================== 布局网格 ==================== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: var(--space-lg); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-md); }

/* ==================== 页头与导航 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.brand-logo { display: flex; align-items: center; gap: var(--space-xs); font-weight: 600; color: var(--color-text-primary); }
.nav-list { display: flex; gap: var(--space-sm); }
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base);
}
.nav-link:hover, .nav-link[aria-current="page"] { background: #f3f4f6; color: var(--color-text-primary); }
.nav-link[aria-current="page"] { font-weight: 600; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.icon-menu { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-button);
}
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}
.btn-secondary:hover { background: #f9fafb; border-color: #d1d5db; }

/* ==================== 卡片与面板 ==================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-xs); font-size: 0.875rem; color: var(--color-text-muted); }
.card-title { margin-bottom: 0.5rem; font-weight: 600; color: var(--color-text-primary); }
.card-desc { font-size: 0.9375rem; line-height: 1.6; margin-bottom: var(--space-sm); }
.link-btn { font-size: 0.9375rem; font-weight: 500; color: var(--color-accent); }
.link-btn:hover { text-decoration: underline; }

/* ==================== 表格样式 ==================== */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.table { width: 100%; min-width: 600px; }
.table th, .table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.9375rem; }
.table th { background: #f9fafb; font-weight: 600; color: var(--color-text-primary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafafa; }

/* ==================== FAQ 折叠面板 ==================== */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text-primary);
  user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::marker { display: none; content: ""; }
.faq-icon { width: 20px; height: 20px; transition: transform 0.2s; flex-shrink: 0; stroke: currentColor; stroke-width: 2; fill: none; }
[open] .faq-icon { transform: rotate(180deg); }
.faq-content { padding: 0 0 1.25rem; color: var(--color-text-secondary); line-height: 1.7; }

/* ==================== 工具类与动效 ==================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* SVG 动效：同心轨道呼吸 */
@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.35; stroke-width: 1.5; }
  50% { transform: scale(1.06); opacity: 0.85; stroke-width: 2.2; }
}
.orbit-ring { animation: orbit-breathe 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.orbit-ring--slow { animation-duration: 11s; animation-delay: -3s; }
.orbit-ring--fast { animation-duration: 6s; animation-delay: -1s; }

/* SVG 动效：描边绘制 */
@keyframes draw-path {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 1.5s ease-out forwards; }

@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .draw-path { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .mobile-toggle { display: block; }
  .nav-list.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .heading-h1 { font-size: 2.25rem; }
}
