/* 设计变量与基础重置 */
:root {
  --color-bg: #F9F7F4;
  --color-surface: #FFFFFF;
  --color-text: #181818;
  --color-text-muted: #555555;
  --color-border: #E3E0DA;
  --color-accent: #008A6E;
  --color-accent-hover: #006B55;
  --color-highlight: #FFECD1;
  --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --transition-fast: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 var(--spacing-sm); }
ul, ol { margin: 0; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

/* 排版系统 */
h1, h2, h3, h4 { text-wrap: balance; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: var(--spacing-sm); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: var(--spacing-md); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-bottom: var(--spacing-xs); }
.subtitle { font-size: clamp(1rem, 1.8vw, 1.25rem); color: var(--color-text-muted); font-weight: 400; margin-bottom: var(--spacing-lg); max-width: 640px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--spacing-md); }
section { padding: var(--spacing-xl) 0; }
.section-header { text-align: center; margin-bottom: var(--spacing-lg); }

/* 布局组件 */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--spacing-sm); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  cursor: pointer; border: none;
}
.btn-primary { background: var(--color-text); color: var(--color-surface); }
.btn-primary:hover { background: #000; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-secondary { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-text); background: rgba(0,0,0,0.02); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

/* 卡片 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--spacing-md);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card-icon { width: 48px; height: 48px; margin-bottom: var(--spacing-sm); stroke: var(--color-accent); stroke-width: 1.5; fill: none; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin: var(--spacing-md) 0; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #F2F0EB; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 500; color: var(--color-accent); }

/* FAQ */
details { border-bottom: 1px solid var(--color-border); }
summary {
  padding: 1rem 0; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: 0.6rem; user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
summary::after { content: "+"; margin-left: auto; font-weight: 400; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding-bottom: 1.25rem; color: var(--color-text-muted); }

/* 页头页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(249, 247, 244, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--color-text); font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--color-text-muted); font-weight: 500; padding: 0.5rem 0; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-text); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--color-accent); }
.footer { border-top: 1px solid var(--color-border); padding: var(--spacing-lg) 0; background: var(--color-surface); margin-top: var(--spacing-xl); }
.footer-inner { display: flex; flex-direction: column; gap: var(--spacing-md); align-items: center; text-align: center; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; }
.footer-nav a { color: var(--color-text-muted); text-decoration: none; font-size: 0.95rem; }
.footer-copy { color: var(--color-text-muted); font-size: 0.85rem; }

/* 新闻与阅读卡片 */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-date { font-size: 0.85rem; color: var(--color-accent); font-weight: 600; margin-bottom: 0.5rem; }
.news-title { font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.news-excerpt { color: var(--color-text-muted); font-size: 0.95rem; flex-grow: 1; }
.reading-list { list-style: none; padding: 0; margin: 0; }
.reading-list li { padding: 0.75rem 0; border-bottom: 1px dashed var(--color-border); }
.reading-list a { color: var(--color-text); text-decoration: none; font-weight: 500; display: flex; justify-content: space-between; align-items: baseline; }
.reading-list a:hover { color: var(--color-accent); }
.reading-desc { display: block; font-size: 0.9rem; color: var(--color-text-muted); margin-top: 0.25rem; font-weight: 400; }

/* SVG 动效系统 */
.svg-wireframe { width: 100%; max-width: 480px; margin: 0 auto; }
.wire-path { stroke: var(--color-text); stroke-width: 1.5; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; }
.highlight-sweep { fill: url(#grad-highlight); opacity: 0.8; mix-blend-mode: multiply; }
.anim-sweep { animation: sweepLine 8s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw { animation: drawPath 6s ease-in-out infinite alternate; }
.anim-pulse { animation: pulseOpacity 4s ease-in-out infinite alternate; }

@keyframes sweepLine {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}
@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseOpacity {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-sweep, .anim-draw, .anim-pulse { animation: none !important; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-auto { grid-template-columns: 1fr; }
  section { padding: var(--spacing-lg) 0; }
  h1 { font-size: 2rem; }
}
