/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-accent: #128C7E;
  --color-accent-hover: #0f6b5e;
  --color-accent-light: rgba(18, 140, 126, 0.08);
  
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  
  --font-family-base: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --lh-tight: 1.4;
  --lh-base: 1.8;
  --lh-loose: 2;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: var(--lh-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus-visible { color: var(--color-accent-hover); text-decoration: underline; }
button, [role="button"] { cursor: pointer; font: inherit; border: none; background: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* =========================================
 排版系统
   ========================================= */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-3xl) 0; }
.section-alt { background-color: var(--color-surface); }
.section-grid { display: grid; gap: var(--space-xl); }
@media (min-width: 768px) { .section-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .section-grid { grid-template-columns: repeat(3, 1fr); } }

h1, h2, h3, h4 { line-height: var(--lh-tight); margin-top: 0; margin-bottom: var(--space-sm); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.25rem); font-weight: 600; margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.25rem, 1rem + 0.75vw, 1.5rem); font-weight: 600; margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-md); color: var(--color-text-secondary); }

.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

/* =========================================
 页头与导航
   ========================================= */
.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);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; color: var(--color-text-primary); }
.brand img { height: 32px; width: auto; }
.brand span { font-weight: 600; font-size: 1.1rem; }
.nav-list { display: flex; gap: var(--space-lg); align-items: center; }
.nav-link { font-weight: 500; color: var(--color-text-secondary); padding: var(--space-xs) 0; position: relative; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-accent); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--color-accent); border-radius: 2px; }
.nav-cta { background: var(--color-accent); color: #fff !important; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-sm); font-weight: 500; }
.nav-cta:hover { background: var(--color-accent-hover); text-decoration: none; }

/* =========================================
 组件：按钮
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem;
  transition: all 0.2s ease; outline-offset: 2px;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-outline { border: 1.5px solid var(--color-border); color: var(--color-text-primary); background: transparent; }
.btn-outline:hover, .btn-outline:focus-visible { border-color: var(--color-accent); color: var(--color-accent); }

/* =========================================
 组件：卡片与信息块
   ========================================= */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-lg); box-shadow: var(--shadow-card); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-icon { width: 40px; height: 40px; background: var(--color-accent-light); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); }
.card-icon svg { width: 22px; height: 22px; stroke: var(--color-accent); stroke-width: 1.8; fill: none; }
.feature-list li { position: relative; padding-left: var(--space-lg); margin-bottom: var(--space-md); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.4em; width: 6px; height: 6px; background: var(--color-accent); border-radius: 50%; }

/* =========================================
 表格
   ========================================= */
.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; min-width: 600px; }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text-primary); }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }

/* =========================================
 FAQ (Details/Summary)
   ========================================= */
.faq-list { display: grid; gap: var(--space-md); }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); transition: border-color 0.2s; }
details[open] { border-color: var(--color-accent); }
summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: var(--space-xs) 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 1.25rem; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.details-content { padding-top: var(--space-sm); color: var(--color-text-secondary); line-height: var(--lh-base); }

/* =========================================
 最新动态卡片
   ========================================= */
.news-grid { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(4, 1fr); } }
.news-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-md); display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.news-meta { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: var(--space-xs); }
.news-title { font-weight: 600; font-size: 1.1rem; margin-bottom: var(--space-xs); line-height: 1.4; }
.news-excerpt { font-size: 0.95rem; color: var(--color-text-secondary); margin-bottom: var(--space-md); flex-grow: 1; }
.link-btn { font-size: 0.9rem; font-weight: 500; text-align: right; }

/* =========================================
 相关阅读
   ========================================= */
.related-links { display: grid; gap: var(--space-sm); }
@media (min-width: 768px) { .related-links { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-links { grid-template-columns: repeat(3, 1fr); } }
.related-item { display: block; padding: var(--space-sm); border: 1px dashed var(--color-border); border-radius: var(--radius-sm); transition: all 0.2s; }
.related-item:hover { border-color: var(--color-accent); background: var(--color-accent-light); text-decoration: none; }
.related-title { font-weight: 500; display: block; margin-bottom: 2px; }
.related-desc { font-size: 0.85rem; color: var(--color-text-secondary); }

/* =========================================
 页脚
   ========================================= */
.site-footer { background: var(--color-text-primary); color: #cbd5e1; padding: var(--space-2xl) 0; font-size: 0.95rem; }
.footer-inner { display: flex; flex-direction: column; gap: var(--space-xl); }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-links { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.footer-links a { color: #94a3b8; }
.footer-links a:hover { color: #fff; }
.copyright { color: #64748b; font-size: 0.85rem; margin-top: var(--space-md); }

/* =========================================
 SVG 动效规范
   ========================================= */
.svg-canvas { width: 100%; max-width: 320px; margin: 0 auto; }
.draw-path {
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.2s ease;
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  45% { stroke-dashoffset: 0; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.animate-draw { animation: drawLine 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }

.node-circle { fill: var(--color-accent); opacity: 0.85; }
@keyframes floatNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.animate-float { animation: floatNode 4s ease-in-out infinite; }

/* 降低动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .animate-draw, .animate-float { animation: none !important; }
  html { scroll-behavior: auto; }
}
