:root {
  --color-bg: #f4f4f5;
  --color-surface: #ffffff;
  --color-text: #18181b;
  --color-text-secondary: #52525b;
  --color-accent: #25d366;
  --color-accent-hover: #1da851;
  --color-border: #e4e4e7;
  --color-code-bg: #fafafa;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --line-height-base: 1.8;
  --line-height-tight: 1.4;
  --container-max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

/* Typography */
h1, h2, h3, h4 { line-height: var(--line-height-tight); margin-top: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.35rem); }
p { margin: 0 0 1rem; color: var(--color-text-secondary); }
strong { color: var(--color-text); font-weight: 600; }

/* Header & Nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }
nav ul { display: flex; gap: 24px; flex-wrap: wrap; }
nav a {
  font-size: 0.95rem; color: var(--color-text-secondary); transition: color 0.2s;
  position: relative;
}
nav a:hover, nav a[aria-current="page"] { color: var(--color-text); }
nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: var(--color-accent); border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-size: 1rem; font-weight: 500; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s ease; border: none; text-align: center;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,211,102,0.25); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-text); background: var(--color-surface); }

/* Cards */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 24px; transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

/* Section Spacing */
section { padding: 64px 0; }
.section-header { max-width: 720px; margin-bottom: 40px; }
.section-header p { margin-top: 8px; }

/* Table */
.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: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #fafafa; font-weight: 600; color: var(--color-text); white-space: nowrap; }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* FAQ Details */
details {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  margin-bottom: 12px; padding: 16px; transition: box-shadow 0.2s;
}
details[open] { box-shadow: var(--shadow-card); }
summary {
  cursor: pointer; font-weight: 500; color: var(--color-text); list-style: none; display: flex; align-items: center; gap: 8px;
}
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; content: ""; }
summary::after {
  content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid var(--color-text-secondary); border-bottom: 1.5px solid var(--color-text-secondary);
  transform: rotate(45deg) translateY(-2px); transition: transform 0.2s; flex-shrink: 0;
}
details[open] summary::after { transform: rotate(-45deg) translateY(2px); }
details p { margin-top: 12px; font-size: 0.95rem; }

/* Iconography */
.icon-box { width: 44px; height: 44px; border-radius: 10px; background: #f4f4f5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-box svg { width: 22px; height: 22px; stroke-width: 1.8; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); padding: 48px 0 32px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { margin-bottom: 12px; font-size: 1rem; }
.footer-col a { display: block; color: var(--color-text-secondary); margin-bottom: 8px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { text-align: center; font-size: 0.85rem; color: #a1a1aa; padding-top: 24px; border-top: 1px solid var(--color-border); }

/* SVG Animation Base */
.wave-group { width: 100%; height: 100%; overflow: hidden; }
.wave-path { fill: none; stroke-width: 2; stroke-linecap: round; }
.w1 { animation: wave-up 6s ease-in-out infinite; }
.w2 { animation: wave-down 5s ease-in-out infinite; }
.w3 { animation: wave-up 7s ease-in-out infinite; }
.draw-line { fill: none; stroke-width: 2; stroke-linecap: round; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-wait 8s ease-in-out infinite; }
@keyframes wave-up { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes wave-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes draw-wait { 0%, 40% { stroke-dashoffset: 1; } 60%, 100% { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .wave-path, .draw-line { animation: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  nav ul { gap: 16px; }
  section { padding: 40px 0; }
  h1 { font-size: 1.75rem; }
}
