:root {
  /* 莫兰迪低饱和配色体系 */
  --color-bg: #f6f4f1;
  --color-surface: #ffffff;
  --color-text-primary: #2e3a34;
  --color-text-secondary: #5d6b63;
  --color-text-muted: #8a968f;
  --color-accent: #6b8f71;
  --color-accent-hover: #5a7a60;
  --color-accent-light: rgba(107, 143, 113, 0.12);
  --color-border: #e6e2dc;
  --color-highlight: rgba(107, 143, 113, 0.18);
  
  /* 排版系统 */
  --font-serif: 'Georgia', 'Noto Serif SC', 'Source Han Serif CN', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  --fs-hero: clamp(2.2rem, 4.5vw + 0.4rem, 3.2rem);
  --fs-h1: clamp(1.8rem, 3vw + 0.2rem, 2.4rem);
  --fs-h2: clamp(1.4rem, 2.5vw + 0.1rem, 1.8rem);
  --fs-h3: clamp(1.15rem, 1.8vw + 0.1rem, 1.35rem);
  --fs-body: clamp(0.95rem, 1vw + 0.4rem, 1.05rem);
  --fs-small: 0.85rem;
  --line-height: 1.65;
  
  /* 间距与圆角 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
  
  /* 阴影与过渡 */
  --shadow-card: 0 4px 12px rgba(46, 58, 52, 0.04);
  --shadow-hover: 0 8px 24px rgba(46, 58, 52, 0.08);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1120px;
  --header-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--line-height);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 基础排版 */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--color-text-primary);
}
h1 { font-size: var(--fs-h1); line-height: 1.2; margin-bottom: var(--space-sm); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--space-md); position: relative; display: inline-block; }
h3 { font-size: var(--fs-h3); margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); color: var(--color-text-secondary); }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-accent-hover); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: var(--radius-sm); }

img, svg { display: block; max-width: 100%; height: auto; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section-alt { background-color: var(--color-surface); }

/* 页头导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(246, 244, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text-primary);
}
.brand img { width: 28px; height: 28px; object-fit: contain; }
.nav-links { display: flex; gap: var(--space-md); list-style: none; }
.nav-links a {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-accent);
}

/* 移动端菜单切换 */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-xs); }
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--color-text-primary); }
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-110%);
    transition: transform var(--transition-base);
    z-index: 99;
  }
  #menu-checkbox:checked ~ .header-inner .nav-links { transform: translateY(0); }
}

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(107, 143, 113, 0.25);
}
.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(107, 143, 113, 0.3);
}
.btn-secondary {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* 网格与卡片 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--color-accent-light); }
.card-icon {
  width: 44px; height: 44px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
}
.card-icon svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* 表格组件 */
.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: 500px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #fafaf9; font-weight: 600; color: var(--color-text-primary); }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }

/* FAQ (Details/Summary) */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-base);
}
details[open] { border-color: var(--color-accent-light); box-shadow: var(--shadow-card); }
summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform var(--transition-base);
}
details[open] summary::before { content: "−"; transform: rotate(90deg); }
details p { margin-top: var(--space-sm); font-size: 0.95rem; color: var(--color-text-secondary); }

/* 页脚 */
.site-footer {
  background: var(--color-text-primary);
  color: #c5ceca;
  padding: var(--space-xl) 0 var(--space-lg);
  font-size: var(--fs-small);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-lg); }
.footer-brand { color: #fff; font-weight: 600; font-size: 1.1rem; margin-bottom: var(--space-xs); display: flex; align-items: center; gap: var(--space-xs); }
.footer-brand img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a { color: #a3b0aa; }
.footer-nav a:hover { color: #fff; }
.copyright { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.1); text-align: center; color: #8a968f; }

/* 新闻卡片特殊样式 */
.news-date { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.5rem; display: block; }
.news-title { margin-bottom: var(--space-xs); }
.news-excerpt { font-size: 0.9rem; line-height: 1.5; color: var(--color-text-secondary); }
.view-btn { font-size: 0.85rem; margin-top: var(--space-sm); display: inline-block; }

/* 相关链接 */
.related-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-sm); }
.related-item { display: flex; flex-direction: column; }
.related-item strong { display: block; margin-bottom: 0.25rem; color: var(--color-text-primary); }
.related-item span { font-size: 0.9rem; color: var(--color-text-secondary); }

/* 下载区域高亮 */
.download-zone {
  background: linear-gradient(135deg, #f0f5f1 0%, #ffffff 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.install-steps { counter-reset: step; list-style: none; }
.install-steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}
.install-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 1.8rem; height: 1.8rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 1.8rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* SVG 动效系统 */
.svg-canvas { width: 100%; max-width: 480px; margin: 0 auto; }
.draw-path {
  fill: none;
  stroke: var(--color-text-primary);
  stroke-width: 1.5;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0;
}
.sweep-light {
  fill: url(#grad-highlight);
  mix-blend-mode: screen;
  opacity: 0;
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; opacity: 0; }
  10% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes light-sweep {
  0% { transform: translateX(-120%); opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.8; }
  100% { transform: translateX(120%); opacity: 0; }
}
.animate-draw { animation: draw-line 4s ease-in-out infinite alternate; }
.animate-sweep { animation: light-sweep 6s 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;
    scroll-behavior: auto !important;
  }
  .animate-draw, .animate-sweep { animation: none !important; }
}
