/* =========================================
   全局设计变量与基础排版
   ========================================= */
:root {
  --bg-main: #F9F8F4;
  --bg-card: #FFFFFF;
  --bg-accent-soft: #EEF7F0;
  --bg-accent-block: #EBEBE5;
  --text-primary: #111111;
  --text-secondary: #4A4A4A;
  --text-muted: #7A7A7A;
  --accent-green: #25D366;
  --accent-hover: #1FB855;
  --border-light: #E8E6DF;
  --border-strong: #C5C3BB;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.04);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.08);
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --spacing-section: clamp(3rem, 5vw, 5rem);
  --spacing-element: clamp(1rem, 2vw, 1.5rem);
}

*, *::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);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
button, .btn { cursor: pointer; border: none; outline: none; font-family: inherit; }
ul, ol { list-style: none; }

/* =========================================
   排版系统（流体字号）
   ========================================= */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.25;
}
h1 { font-size: clamp(2.4rem, 1.8rem + 3.5vw, 4rem); margin-bottom: var(--spacing-element); }
h2 { font-size: clamp(1.8rem, 1.4rem + 2.5vw, 2.8rem); margin-bottom: 1.2rem; }
h3 { font-size: clamp(1.25rem, 1.1rem + 1.2vw, 1.5rem); margin-bottom: 0.8rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
.section-title {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 2.5rem;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em; bottom: 0.2em;
  width: 5px;
  background: var(--accent-green);
  border-radius: 4px;
}
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
section { padding: var(--spacing-section) 0; }

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
nav ul { display: flex; gap: 1.5rem; }
nav a {
  font-size: 0.95rem; font-weight: 500; color: var(--text-secondary);
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
}
nav a:hover, nav a[aria-current="page"] { color: var(--text-primary); border-color: var(--accent-green); }

.site-footer {
  background: #1A1A1A; color: #D1D1D1; padding: 3rem 0 2rem;
  margin-top: var(--spacing-section);
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem;
}
.footer-col h4 { color: #FFF; margin-bottom: 1rem; font-size: 1rem; }
.footer-col a { display: block; padding: 0.3rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: #FFF; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #333;
  text-align: center; font-size: 0.85rem; color: #888;
}

/* =========================================
   按钮与交互组件
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.8rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem; transition: all 0.2s ease;
}
.btn-primary { background: var(--accent-green); color: #FFF; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { border: 1.5px solid var(--text-primary); background: transparent; color: var(--text-primary); }
.btn-outline:hover { background: var(--text-primary); color: #FFF; }

.card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.6rem; display: flex; gap: 1rem; }

/* =========================================
   表格样式
   ========================================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-card); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-light); }
th { background: var(--bg-accent-block); font-weight: 600; color: var(--text-primary); }
td { color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }

/* =========================================
   FAQ (<details>)
   ========================================= */
.faq-item { border: 1px solid var(--border-light); border-radius: var(--radius-sm); margin-bottom: 0.8rem; background: var(--bg-card); }
.faq-item summary {
  padding: 1rem 1.2rem; 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; font-weight: 400; color: var(--text-muted); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.2rem 1.2rem; font-size: 0.95rem; line-height: 1.6; }

/* =========================================
   SVG 动效核心
   ========================================= */
.svg-grid-network { width: 100%; max-width: 480px; margin: 0 auto; }
.grid-node {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  opacity: 0.3; transition: opacity 0.3s;
}
.grid-line {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  opacity: 0.15;
}
@keyframes node-light {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.2; }
  50% { stroke-dashoffset: 1; opacity: 1; }
}
@keyframes line-trace {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
.animate-node-1 { animation: node-light 5s 0s infinite ease-in-out; }
.animate-node-2 { animation: node-light 5s 0.4s infinite ease-in-out; }
.animate-node-3 { animation: node-light 5s 0.8s infinite ease-in-out; }
.animate-node-4 { animation: node-light 5s 1.2s infinite ease-in-out; }
.animate-node-5 { animation: node-light 5s 1.6s infinite ease-in-out; }
.animate-node-6 { animation: node-light 5s 2.0s infinite ease-in-out; }
.animate-node-7 { animation: node-light 5s 2.4s infinite ease-in-out; }
.animate-node-8 { animation: node-light 5s 2.8s infinite ease-in-out; }
.animate-node-9 { animation: node-light 5s 3.2s infinite ease-in-out; }
.animate-node-10 { animation: node-light 5s 3.6s infinite ease-in-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    animation: none !important;
  }
  .grid-node, .grid-line { opacity: 0.5; stroke-dashoffset: 0; }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .header-inner { height: 64px; }
  nav ul { gap: 1rem; font-size: 0.9rem; }
  .grid-layout-2, .grid-layout-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
}
.grid-layout-2 { display: grid; gap: 2rem; }
.grid-layout-3 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
  .grid-layout-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-layout-3 { grid-template-columns: repeat(3, 1fr); }
}
.focus-visible:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 4px; border-radius: 4px; }
