/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #f6f5f2;
  --color-surface: #ffffff;
  --color-text: #2c2c2e;
  --color-text-muted: #6b6b6e;
  --color-accent: #8fa3b3;
  --color-accent-dark: #768a9c;
  --color-accent-light: #dce6ee;
  --color-border: #e8e6e1;
  --radius-md: 14px;
  --radius-lg: 20px;
  --spacing-section: clamp(3.5rem, 6vw, 5.5rem);
  --spacing-gap: clamp(1.5rem, 2vw, 2rem);
  --font-serif: "Noto Serif SC", "Source Han Serif CN", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-card: 0 6px 24px rgba(44, 44, 46, 0.04);
  --transition-base: 0.25s 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; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.75;
  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; }

/* =========================================
   排版系统
   ========================================= */
h1, h2, h3, h4 { font-family: var(--font-serif); text-wrap: balance; letter-spacing: -0.02em; color: var(--color-text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.15; margin-bottom: 1.2rem; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 1.8rem; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); margin-bottom: 0.8rem; font-weight: 600; }
p { margin-bottom: 1rem; max-width: 72ch; color: var(--color-text); }
.text-muted { color: var(--color-text-muted); font-size: 0.95rem; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.2rem, 3vw, 2.5rem); }
.section-padding { padding: var(--spacing-section) 0; }

/* =========================================
   通用网格与布局工具
   ========================================= */
.grid-auto-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--spacing-gap); }
.grid-auto-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--spacing-gap); }
.grid-auto-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--spacing-gap); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mb-2 { margin-bottom: 2rem; }
.content-intro { max-width: 65ch; margin-bottom: 2.5rem; }

/* =========================================
   组件：按钮
   ========================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.7rem; border-radius: var(--radius-md);
  font-weight: 500; font-size: 0.95rem; cursor: pointer;
  transition: all var(--transition-base); border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(143, 163, 179, 0.35); }
.btn-outline { background: transparent; border-color: var(--color-accent); color: var(--color-accent); }
.btn-outline:hover { background: var(--color-accent); color: #fff; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; border-radius: 8px; }

/* =========================================
   组件：卡片
   ========================================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-icon { width: 44px; height: 44px; margin-bottom: 1.2rem; color: var(--color-accent); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.date-tag { font-size: 0.8rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
th { background: #f2f1ee; font-weight: 600; color: var(--color-text); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafaf8; }

/* =========================================
   组件：FAQ (Details/Summary)
   ========================================= */
.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.faq-item summary {
  padding: 1.1rem 1.3rem; cursor: pointer; font-weight: 500;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s; user-select: none;
}
.faq-item summary:hover { background: #f8f7f5; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; color: var(--color-accent); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding: 0 1.3rem 1.2rem; color: var(--color-text-muted); line-height: 1.6; }

/* =========================================
   导航与页头页脚
   ========================================= */
header { position: sticky; top: 0; z-index: 100; background: rgba(246, 245, 242, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; color: var(--color-text); }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: 2.2rem; }
nav a { font-size: 0.95rem; color: var(--color-text-muted); position: relative; padding: 0.2rem 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-text); }
nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--color-accent); border-radius: 1px; }

footer { background: #f0efeb; padding: 3.5rem 0 2rem; font-size: 0.9rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-col h4 { font-family: var(--font-sans); font-weight: 600; color: var(--color-text); margin-bottom: 1rem; font-size: 0.95rem; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col li a:hover { color: var(--color-accent-dark); }
.copyright { text-align: center; padding-top: 1.5rem; border-top: 1px solid #e0ded9; font-size: 0.85rem; }

/* =========================================
   SVG 动效与装饰规则
   ========================================= */
.svg-container { width: 100%; max-width: 800px; margin: 0 auto; display: block; }
.icon-svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.list-marker li { position: relative; padding-left: 1.2rem; margin-bottom: 0.5rem; }
.list-marker li::marker { content: "• "; color: var(--color-accent); font-weight: bold; }

/* 数据点流动动画 */
.flow-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flowDash 7s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

.data-node {
  animation: nodeFloat 5s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes nodeFloat {
  0% { transform: translateY(0) scale(0.95); opacity: 0.5; }
  100% { transform: translateY(-8px) scale(1.05); opacity: 0.9; }
}

.pulse-ring {
  animation: ringPulse 6s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes ringPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* 无障碍：尊重系统减少动态效果设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .flow-line, .data-node, .pulse-ring { animation: none; }
}

/* 焦点可见性 */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline-offset: 4px; }
