:root {
  --bg-base: #F9F8F6;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F2F1EF;
  --text-primary: #0F0F0F;
  --text-secondary: #4A4A4A;
  --text-tertiary: #6B6B6B;
  --accent: #25D366;
  --accent-hover: #1EBE57;
  --border: #E0DFDC;
  --border-strong: #C8C7C4;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --container-max: 1120px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--text-secondary); }
mark { background: transparent; color: var(--accent); font-weight: 600; }

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  height: 32px;
  width: auto;
}
.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}
nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}
nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  padding: 6px 0;
  position: relative;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--text-primary);
}
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.footer-col a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.copyright {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  border: none;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--text-primary);
  color: #fff;
}
.btn-primary:hover {
  background: #2A2A2A;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Layout Utilities */
.section {
  padding: var(--space-xl) 0;
}
.section-alt {
  background: var(--bg-surface);
}
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: var(--space-md);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-primary);
}
td { color: var(--text-secondary); }

/* FAQ / Details */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
details {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: border-color 0.2s ease;
}
details[open] {
  border-color: var(--border-strong);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-weight: 400;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Progress/Steps */
.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-surface);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 50%;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.step-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.step-content p {
  font-size: 0.9rem;
  margin: 0;
}

/* SVG Icons Base */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 20px; height: 20px; }
.icon-lg { width: 48px; height: 48px; }

/* SVG Animations */
@keyframes node-glow {
  0%, 100% { opacity: 0.3; stroke: var(--border-strong); }
  50% { opacity: 1; stroke: var(--accent); }
}
.node-light {
  animation: node-glow 6s infinite linear;
}
.node-light.delay-1 { animation-delay: 0.2s; }
.node-light.delay-2 { animation-delay: 0.4s; }
.node-light.delay-3 { animation-delay: 0.6s; }
.node-light.delay-4 { animation-delay: 0.8s; }
.node-light.delay-5 { animation-delay: 1.0s; }

@keyframes draw-line {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
.line-draw {
  stroke-dasharray: 1;
  animation: draw-line 3s ease-in-out infinite alternate;
}

@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;
  }
  .node-light, .line-draw {
    animation: none;
    opacity: 1;
    stroke: var(--accent);
  }
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .header-inner nav ul { display: none; }
  .grid-2, .grid-3, .grid-4, .responsive-grid { grid-template-columns: 1fr !important; }
  .section { padding: var(--space-lg) 0; }
}
