/* ==================== 设计变量与基础重置 ==================== */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #6B6B6B;
  --border: #E2DFD6;
  --accent: #2A3B32;
  --accent-hover: #1F2D26;
  --highlight-block: #EFECE4;
  --focus-ring: rgba(42, 59, 50, 0.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.08);
  --transition-base: 0.2s ease;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-heading: "Noto Sans SC", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  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; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ==================== 排版系统 ==================== */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.8em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 0.6em; }
p { margin-bottom: 1em; color: var(--text-secondary); }
strong { font-weight: 600; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; position: relative; }
.section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ==================== 页头与导航 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 14px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 32px; width: auto; object-fit: contain; }
.brand span { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.nav-list { display: flex; gap: 28px; }
.nav-list a { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); transition: color var(--transition-base); }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--accent); }
.nav-list a[aria-current="page"] { font-weight: 600; position: relative; }
.nav-list a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--accent);
}

/* ==================== 按钮与交互组件 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all var(--transition-base); border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: rgba(42, 59, 50, 0.05); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 24px; transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.table-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
table { width: 100%; text-align: left; font-size: 0.95rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
th { background: var(--highlight-block); font-weight: 600; color: var(--text-primary); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: rgba(0,0,0,0.015); }

/* ==================== FAQ (Details/Summary) ==================== */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  padding: 18px 0; cursor: pointer; font-weight: 600; color: var(--text-primary);
  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; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; color: var(--text-secondary); margin-top: 8px; }

/* ==================== 最新文章卡片 ==================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card { padding: 20px; }
.news-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; display: block; }
.news-card h4 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4; }
.news-card p { font-size: 0.9rem; margin-bottom: 14px; }
.link-btn { font-size: 0.9rem; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { text-decoration-thickness: 2px; }

.related-links { display: flex; flex-direction: column; gap: 12px; }
.related-links a { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.related-links a:hover { color: var(--accent); }
.related-links .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }

/* ==================== 页脚 ==================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 24px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-col h5 { font-size: 0.95rem; margin-bottom: 12px; color: var(--text-primary); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { font-size: 0.9rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent); }
.copyright { text-align: center; margin-top: 32px; font-size: 0.85rem; color: var(--text-muted); }

/* ==================== SVG 动效核心 ==================== */
.svg-container { width: 100%; max-width: 320px; margin: 0 auto; }
.grid-node { fill: var(--border); transition: fill 0.4s ease, transform 0.4s ease; }
@keyframes nodePulse {
  0%, 100% { fill: var(--border); transform: scale(0.85); opacity: 0.6; }
  50% { fill: var(--accent); transform: scale(1.1); opacity: 1; }
}
.animate-node { animation: nodePulse 4s infinite ease-in-out; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 1.1s; }
.delay-4 { animation-delay: 1.7s; }
.delay-5 { animation-delay: 2.3s; }

.stroke-path { stroke: var(--text-muted); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; pathLength: 1; }
@keyframes dashDraw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.draw-animate { animation: dashDraw 2.5s ease forwards; }
.draw-delay-1 { animation-delay: 0.3s; }
.draw-delay-2 { animation-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .animate-node { opacity: 1; transform: none; fill: var(--accent); }
  .stroke-path { stroke-dashoffset: 0; }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 12px; }
  .nav-list { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .section { padding: 50px 0; }
  .grid-cards { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
}
