/* 设计变量 */
:root {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-text: #0F172A;
  --color-text-secondary: #475569;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-accent: #25D366;
  --color-accent-hover: #1EBE57;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-focus: 0 0 0 3px rgba(37,211,102,0.25);
  --font-main: ui-rounded, "SF Pro Rounded", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --container-max: 1120px;
  --header-height: 72px;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* 排版层级 */
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 600; }
p { margin: 0 0 1rem; color: var(--color-text-secondary); }
strong { color: var(--color-text); font-weight: 600; }

/* 布局容器 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

/* 页头与页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,250,252,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex; align-items: center;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo-wrap { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.1rem; }
.logo-wrap img { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }
nav ul { display: flex; gap: 24px; }
nav a { font-size: 0.95rem; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--color-accent); color: var(--color-text); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.site-footer { background: #0F172A; color: #CBD5E1; padding: 48px 0 32px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 32px; }
.footer-col h4 { color: #F8FAFC; margin-bottom: 16px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: #FFF; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 24px; text-align: center; color: #94A3B8; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all 0.2s ease; border: none; outline: none;
}
.btn-primary { background: var(--color-accent); color: #FFF; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.btn-secondary { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
:focus-visible { outline: var(--shadow-focus); }

/* 卡片网格 */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.card-icon { width: 48px; height: 48px; margin-bottom: 16px; stroke: var(--color-accent); stroke-width: 1.5; fill: none; }
.card-title { margin-bottom: 8px; }
.card-text { font-size: 0.95rem; color: var(--color-text-secondary); line-height: 1.7; }

/* 新闻卡片 */
.news-card .meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 8px; }
.news-card .tag { background: #EFF6FF; color: #2563EB; padding: 2px 8px; border-radius: 6px; font-weight: 500; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #F1F5F9; font-weight: 600; color: var(--color-text); }
tr:last-child td { border-bottom: none; }
td[colspan] { text-align: center; color: var(--color-text-muted); font-style: italic; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary { padding: 16px 0; 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-answer { padding: 0 0 16px; color: var(--color-text-secondary); line-height: 1.8; }

/* 相关阅读 */
.related-list li { margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
.related-list li::before { content: "→"; color: var(--color-accent); font-weight: 600; }
.related-link { font-weight: 500; transition: color 0.2s; }
.related-link:hover { color: var(--color-accent); }
.related-desc { display: block; font-size: 0.85rem; color: var(--color-text-muted); margin-top: 2px; }

/* SVG 动效核心 */
.wave-path {
  stroke: var(--color-accent);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.wave-1 { animation: waveDash 6s ease-in-out infinite alternate; opacity: 0.8; }
.wave-2 { animation: waveDash 8s ease-in-out infinite alternate; opacity: 0.5; }
.wave-3 { animation: waveDash 10s ease-in-out infinite alternate; opacity: 0.3; }
.sync-dot { animation: pulseSync 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes waveDash {
  0%, 100% { stroke-dashoffset: 0; transform: translateY(0); }
  50% { stroke-dashoffset: 1; transform: translateY(-4px); }
}
@keyframes pulseSync {
  0%, 100% { opacity: 0.4; r: 3; }
  50% { opacity: 1; r: 5; }
}

/* 双列响应式布局工具类 */
.grid-2-responsive { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; align-items: center; }
.grid-2-download   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; align-items: start; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-name: none !important;
  }
  html { scroll-behavior: auto; }
}

/* 响应式 */
@media (max-width: 768px) {
  nav ul { display: none; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-surface); padding: 16px; border-bottom: 1px solid var(--color-border); }
  nav.open ul { display: flex; }
  .mobile-toggle { display: block; }
  section { padding: 56px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  /* 移动端双列自适应为单列，消除窄屏横向溢出 */
  .grid-2-responsive, .grid-2-download { grid-template-columns: 1fr; gap: 24px; }
}
