/* 设计变量与基础重置 */
:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-accent: #25D366;
  --color-accent-hover: #1da851;
  --color-highlight: #f0fdf4;
  --font-serif: "Noto Serif SC", "Source Han Serif CN", "SimSun", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --container-max: 1200px;
  --header-height: 64px;
}

*, *::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(--color-bg);
  color: var(--color-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; transition: color 0.2s ease; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 排版系统 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: var(--space-md); }
p { margin-bottom: var(--space-md); color: var(--color-text-secondary); }
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-2xl) 0; }
.section-alt { background-color: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

/* 页头与导航 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250,250,250,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); height: var(--header-height); display: flex; align-items: center; }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: var(--space-lg); list-style: none; }
.nav a { font-size: 0.95rem; font-weight: 500; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); transition: background 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(0,0,0,0.04); color: var(--color-text-primary); }
.nav a[aria-current="page"] { font-weight: 600; }

/* 通用组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem;
  cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-primary); }
.btn-secondary:hover { border-color: var(--color-text-secondary); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-lg); transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-highlight); font-weight: 600; }
td { vertical-align: middle; }
ul, ol { padding-left: 1.25rem; margin-bottom: var(--space-md); }
li { margin-bottom: var(--space-sm); color: var(--color-text-secondary); }
.news-date { display: inline-block; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-xs); }
.related-link { display: block; padding: var(--space-sm) 0; border-bottom: 1px dashed var(--color-border); color: var(--color-text-primary); }
.related-link:hover { color: var(--color-accent); }
.related-link span { display: block; font-size: 0.85rem; color: var(--color-text-secondary); margin-top: 2px; }

/* FAQ 样式 */
.faq-list { display: grid; gap: var(--space-md); }
.faq-item 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; }
.faq-item details[open] { border-color: var(--color-accent); }
.faq-item summary { list-style: none; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-weight: 400; font-size: 1.2rem; transition: transform 0.2s; }
.faq-item details[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: var(--space-sm); margin-bottom: 0; font-size: 0.95rem; }

/* SVG 动效系统 */
.svg-canvas { width: 100%; height: auto; overflow: visible; }
.flow-line { fill: none; stroke: var(--color-text-muted); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; pathLength: 1; }
@keyframes contourFlow {
  0% { stroke-dashoffset: 1; opacity: 0.3; }
  50% { opacity: 0.8; }
  100% { stroke-dashoffset: 0; opacity: 0.3; }
}
.flow-line.a { animation: contourFlow 6s linear infinite; }
.flow-line.b { animation: contourFlow 8s linear infinite 1s; }
.flow-line.c { animation: contourFlow 7s linear infinite 2s; }
.flow-line.d { animation: contourFlow 9s linear infinite 0.5s; }
.icon-svg { width: 24px; height: 24px; stroke-width: 1.8; stroke: currentColor; fill: none; }

@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 { animation: none; opacity: 0.5; }
}

/* 响应式 */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-toggle { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: var(--space-xl) 0; }
}
@media (min-width: 769px) { .mobile-toggle { display: none; } }
