:root {
  --color-bg: #f7f5f0;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-text-muted: #555555;
  --color-accent: #2ea66b;
  --color-border: #e2dfd8;
  --color-highlight: rgba(46, 166, 107, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.08);
  --spacing-unit: 1rem;
  --max-width: 1120px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
h1 { font-size: clamp(2.2rem, 1.8rem + 2vw, 3.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 1.4rem + 1.2vw, 2.2rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.8vw, 1.5rem); margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; }
.section-spacer { padding: calc(var(--spacing-unit) * 6) 0; }
.section-header { max-width: 800px; margin-bottom: calc(var(--spacing-unit) * 3); }

/* Header & Nav */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.1rem; }
.nav-list { display: flex; gap: 24px; list-style: none; }
.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  font-size: 0.95rem;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  background: var(--color-highlight);
  color: var(--color-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
}
.btn-primary {
  background: var(--color-text);
  color: var(--color-surface);
}
.btn-primary:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover {
  border-color: var(--color-text);
}

/* Grid & Cards */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--color-accent);
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
th { background: #fafaf8; font-weight: 600; }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }

/* Details / FAQ */
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
.details-content {
  padding: 0 20px 20px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  margin-top: 0;
  padding-top: 16px;
}

/* Utility */
.text-muted { color: var(--color-text-muted); }
.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-highlight);
  color: var(--color-accent);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.divider {
  height: 1px;
  background: var(--color-border);
  margin: calc(var(--spacing-unit) * 4) 0;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: #ccc;
  padding: calc(var(--spacing-unit) * 4) 0;
  margin-top: calc(var(--spacing-unit) * 6);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.9rem;
}

/* SVG Animations */
.sweep-group {
  overflow: visible;
}
.sweep-highlight {
  fill: url(#linear-sweep);
  mix-blend-mode: screen;
  animation: lightSweep 6s ease-in-out infinite alternate;
}
.wireframe-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes lightSweep {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(250%) skewX(-15deg); }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  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;
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--spacing-unit); }
  .nav-list { display: none; }
  .grid-auto { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
