:root {
  --color-bg: #f7f6f4;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-text-secondary: #4a4a4a;
  --color-text-muted: #767676;
  --color-accent: #2b5d4a;
  --color-accent-hover: #1f4537;
  --color-border: #e4e2df;
  --color-highlight: #e8f5f0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-focus: 0 0 0 3px rgba(43,93,74,0.25);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --container-max: 1120px;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-heading: "Inter", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4vw + 0.5rem, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw + 0.2rem, 2rem); margin-bottom: var(--spacing-md); }
h3 { font-size: clamp(1.1rem, 2vw + 0.1rem, 1.3rem); margin-bottom: var(--spacing-sm); }
p { margin-bottom: var(--spacing-sm); max-width: 75ch; }
strong { font-weight: 600; }

/* Layout */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--spacing-md); }
section { padding: var(--spacing-xl) 0; }
.grid-auto { display: grid; gap: var(--spacing-md); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-flex { display: flex; flex-wrap: wrap; gap: var(--spacing-lg); align-items: center; }
.flex-row { display: flex; gap: var(--spacing-sm); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-lg { margin-top: var(--spacing-lg); }

/* Header / Footer */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 246, 244, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--spacing-xs); text-decoration: none; color: var(--color-text); font-weight: 600; }
.brand img { height: 32px; width: auto; display: block; }
.nav-list { list-style: none; display: flex; gap: var(--spacing-md); }
.nav-link { text-decoration: none; color: var(--color-text-secondary); font-weight: 500; transition: color var(--transition-base); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-accent); }
.site-footer { background: var(--color-text); color: #d4d4d4; padding: var(--spacing-lg) 0; margin-top: var(--spacing-xl); }
.footer-inner { display: grid; gap: var(--spacing-md); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-col h4 { color: #fff; margin-bottom: var(--spacing-sm); font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col a { color: #a3a3a3; text-decoration: none; font-size: 0.9rem; transition: color var(--transition-base); }
.footer-col a:hover { color: #fff; }
.copyright { text-align: center; margin-top: var(--spacing-md); padding-top: var(--spacing-md); border-top: 1px solid #333; color: #888; font-size: 0.85rem; }

/* Components: Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 500;
  text-decoration: none; cursor: pointer; transition: background var(--transition-base), transform var(--transition-base);
  border: none; font-size: 1rem;
}
.btn-primary { background: var(--color-text); color: #fff; }
.btn-primary:hover { background: #2a2a2a; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-text); background: rgba(0,0,0,0.02); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Components: Cards */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--spacing-md); box-shadow: var(--shadow-card); transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--spacing-xs); }

/* Components: Table */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table-wrapper th, .table-wrapper td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.table-wrapper th { background: #f4f3f1; font-weight: 600; }
.table-wrapper tr:last-child td { border-bottom: none; }
.table-wrapper tr:hover td { background: #fafafa; }

/* Components: FAQ */
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--spacing-sm); overflow: hidden; }
summary { padding: 1rem; cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; transition: transform var(--transition-base); }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--color-border); }
.detail-content { padding: 1rem; color: var(--color-text-secondary); }
.detail-content p { margin-bottom: 0.5rem; }

/* Components: List */
.list-standard { padding-left: 1.25rem; }
.list-standard li { margin-bottom: 0.75rem; position: relative; }
.list-standard li::marker { color: var(--color-accent); }
.step-list { counter-reset: step; padding-left: 0; list-style: none; }
.step-list li { counter-increment: step; margin-bottom: var(--spacing-md); padding-left: 2.5rem; position: relative; }
.step-list li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; background: var(--color-text); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 0.9rem; font-weight: 600; }

/* SVG & Animations */
.svg-container { width: 100%; max-width: 600px; aspect-ratio: 16/9; position: relative; }
.node-dot { fill: var(--color-border); opacity: 0.4; transition: fill 0.3s; }
.node-line { stroke: var(--color-text); stroke-width: 1.5; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; fill: var(--color-accent); transform: scale(1.1); }
}
@keyframes drawStroke {
  0% { stroke-dashoffset: 1; }
  30%, 70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.grid-nodes .n1 { animation: nodePulse 5s 0s ease-in-out infinite; }
.grid-nodes .n2 { animation: nodePulse 5s 0.8s ease-in-out infinite; }
.grid-nodes .n3 { animation: nodePulse 5s 1.6s ease-in-out infinite; }
.grid-nodes .n4 { animation: nodePulse 5s 2.4s ease-in-out infinite; }
.grid-nodes .n5 { animation: nodePulse 5s 3.2s ease-in-out infinite; }
.grid-nodes .n6 { animation: nodePulse 5s 4.0s ease-in-out infinite; }
.paths-animated .line-1 { animation: drawStroke 6s 0.2s ease-in-out infinite; }
.paths-animated .line-2 { animation: drawStroke 6s 1.0s ease-in-out infinite; }
.paths-animated .line-3 { animation: drawStroke 6s 1.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .grid-nodes .node-dot { opacity: 0.6; transform: none; }
  .paths-animated .node-line { stroke-dashoffset: 0; }
}

/* Utility & Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 1rem 0; }
  .nav-list { gap: var(--spacing-sm); margin-top: var(--spacing-sm); }
  section { padding: var(--spacing-lg) 0; }
  .grid-auto { grid-template-columns: 1fr; }
  .table-wrapper { font-size: 0.9rem; }
}
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
a:not(.btn):not(.nav-link):not(.footer-col a) { color: var(--color-accent); text-decoration-thickness: 1px; }
::-moz-selection { background: var(--color-accent); color: #fff; }
::selection { background: var(--color-accent); color: #fff; }
