/* ================= 设计变量 ================= */
:root {
  --color-primary: #5A7A84;
  --color-primary-light: #8BA8B3;
  --color-accent: #C4B6A4;
  --color-text: #2C323C;
  --color-text-muted: #5E6672;
  --color-bg: #F6F4F1;
  --color-surface: #FFFFFF;
  --color-border: #E8E4DE;
  --color-highlight: #D6EAF2;

  --font-title: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-soft: 0 4px 20px rgba(44, 50, 60, 0.06);
  --shadow-hover: 0 8px 30px rgba(44, 50, 60, 0.10);

  --container-max: 1120px;
}

/* ================= 基础重置 ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-primary-light); }
ul, ol { list-style: none; }

/* ================= 排版 ================= */
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--color-primary); line-height: 1.3; }
h1 { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.4rem); margin-bottom: var(--space-md); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); margin-bottom: var(--space-sm); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); color: var(--color-text); }
.text-muted { color: var(--color-text-muted); }
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-surface); }

/* ================= 布局组件 ================= */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }

/* ================= 导航与页头页脚 ================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 244, 241, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border); padding: var(--space-sm) 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); }
.brand { display: flex; align-items: center; gap: var(--space-xs); }
.brand img { height: 36px; width: auto; object-fit: contain; }
.brand-name { font-family: var(--font-title); font-weight: 600; font-size: 1.1rem; color: var(--color-text); }
.nav-links { display: flex; gap: var(--space-md); }
.nav-links a {
  font-size: 0.95rem; color: var(--color-text-muted); padding: 0.5rem 0.8rem; border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); background: rgba(90, 122, 132, 0.08); }

.site-footer { background: var(--color-text); color: #CBD1D6; 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-md); margin-bottom: var(--space-md); }
.footer-col h4 { color: #FFF; margin-bottom: var(--space-sm); font-size: 1rem; }
.footer-col a { color: #AEBAC2; display: block; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-col a:hover { color: #FFF; }
.footer-bottom { border-top: 1px solid #3A414A; padding-top: var(--space-md); text-align: center; font-size: 0.85rem; color: #8A94A0; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 50px; font-weight: 500; font-size: 1rem;
  cursor: pointer; border: none; transition: all 0.25s ease; text-align: center;
}
.btn-primary { background: var(--color-primary); color: #FFF; box-shadow: 0 4px 12px rgba(90, 122, 132, 0.25); }
.btn-primary:hover { background: #4A6A75; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(90, 122, 132, 0.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: rgba(90, 122, 132, 0.08); }
.btn-icon { width: 20px; height: 20px; }

/* ================= 卡片与表格 ================= */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-md); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-icon { width: 44px; height: 44px; background: var(--color-highlight); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-sm); color: var(--color-primary); }
.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; min-width: 500px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #FAFAF8; font-weight: 600; color: var(--color-text); font-size: 0.95rem; }
td { color: var(--color-text-muted); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }

/* ================= FAQ / Details ================= */
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-sm); background: var(--color-surface); overflow: hidden; }
.faq-item summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; color: var(--color-text);
  list-style: none; position: relative; padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.2rem; color: var(--color-primary); transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.25rem 1rem; color: var(--color-text-muted); font-size: 0.95rem; margin: 0; }

/* ================= SVG 动画 ================= */
.svg-canvas { width: 100%; height: auto; overflow: visible; }
.wireframe-stroke { fill: none; stroke: var(--color-primary-light); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sweep-path { fill: none; stroke: url(#gradSweep); stroke-width: 2.5; stroke-linecap: round; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; }
.anim-slow-pulse { animation: pulseOpacity 8s ease-in-out infinite alternate; }
.transform-box-fill { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-slow-pulse { animation: none !important; }
}
@keyframes drawPath { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes pulseOpacity { 0% { opacity: 0.6; } 100% { opacity: 1; } }

/* ================= 响应式微调 ================= */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .nav-links { flex-wrap: wrap; gap: 0.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--space-lg) 0; }
}
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
