:root {
  --bg-base: #f7f8fa;
  --bg-surface: #ffffff;
  --text-primary: #111111;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --brand: #25d366;
  --brand-hover: #1da851;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius-base: 6px;
  --radius-lg: 12px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --max-width: 1120px;
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--space-sm) 0; color: var(--text-primary); text-wrap: balance; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; margin-top: var(--space-lg); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
p { margin: 0 0 var(--space-sm) 0; color: var(--text-secondary); }
a { color: var(--brand); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus-visible { color: var(--brand-hover); outline: none; }

/* Layout */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.grid-auto { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Header / Nav */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand-logo { display: flex; align-items: center; gap: var(--space-xs); font-weight: 600; font-size: 1.1rem; color: var(--text-primary); }
.brand-logo img { height: 28px; width: auto; object-fit: contain; }
nav ul { display: flex; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
nav a { font-size: 0.95rem; color: var(--text-secondary); padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: border-color 0.2s, color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--brand); }

/* Footer */
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border); padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); }
.footer-col h4 { font-size: 1rem; margin-bottom: var(--space-sm); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; font-size: 0.9rem; color: var(--text-secondary); }
.footer-bottom { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border); text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.6rem; border-radius: var(--radius-base); font-weight: 500; font-size: 1rem; cursor: pointer; border: none; transition: all 0.2s var(--ease-out); text-align: center; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(37,211,102,0.3); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(37,211,102,0.4); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--text-muted); background: #fafafa; }

/* Cards */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-md); transition: box-shadow 0.2s, transform 0.2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-header { display: flex; align-items: flex-start; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.card-icon { width: 24px; height: 24px; flex-shrink: 0; stroke: var(--brand); stroke-width: 1.8; fill: none; }
.card-body p { font-size: 0.95rem; margin-bottom: 0; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-base); background: var(--bg-surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.data-table th { background: #f9fafb; font-weight: 600; color: var(--text-primary); }
.data-table tr:last-child td { border-bottom: none; }

/* Details/FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { padding: 1rem 0; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9; color: var(--text-secondary); font-size: 0.9rem; transition: background 0.2s; }
.faq-item[open] summary::before { content: "−"; background: var(--brand); color: #fff; }
.faq-item p { padding: 0.5rem 0 1rem 2.7rem; margin: 0; font-size: 0.95rem; color: var(--text-secondary); }

/* Steps */
.step-list { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step-list li { position: relative; padding-left: 2.5rem; margin-bottom: var(--space-md); }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; }

/* News Cards */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-xs); }
.news-card .btn-link { align-self: flex-start; font-size: 0.9rem; padding: 0.4rem 0; margin-top: auto; }

/* SVG Animation Utilities */
.svg-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 4s var(--ease-out) infinite alternate; }
.svg-node { animation: floatNode 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes floatNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .svg-draw, .svg-node { animation: none !important; }
  .card:hover { transform: none; }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-inner { flex-direction: column; height: auto; padding: 1rem 0; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: var(--space-sm); }
  .grid-auto { grid-template-columns: 1fr; }
}
