/* 设计变量与基础重置 */
:root {
  --color-bg: #f5f2eb;
  --color-surface: #ffffff;
  --color-primary: #3a3f3b;
  --color-text: #2b2e2a;
  --color-muted: #6b6f6a;
  --color-accent: #6a8f73;
  --color-accent-hover: #557a5e;
  --color-border: #e4dfd6;
  --color-highlight: #e8e3da;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 16px rgba(43,46,42,0.06);
  --shadow-elevated: 0 8px 24px rgba(43,46,42,0.10);
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --spacing-section: clamp(3rem, 6vw, 6rem);
  --spacing-element: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  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; transition: color 0.2s ease; }
ul, ol { padding-left: 1.2em; margin: 0; }
table { border-collapse: collapse; width: 100%; }

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

/* 容器与网格 */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.grid-auto { display: grid; gap: var(--spacing-element); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* 排版 */
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.8em; color: var(--color-primary); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; margin-top: 1.5em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }

/* 页头页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(245,242,235,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: 64px; }
.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand img { height: 32px; width: auto; }
.brand span { font-size: 1.1rem; font-weight: 600; color: var(--color-primary); }
nav ul { display: flex; gap: 1.5rem; list-style: none; }
nav a { font-size: 0.95rem; font-weight: 500; padding: 0.4em 0.6em; border-radius: var(--radius-sm); }
nav a:hover, nav a[aria-current="page"] { background: var(--color-highlight); color: var(--color-primary); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--color-primary); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  nav ul { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--color-surface); padding: 1rem; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-card); }
  nav.open ul { display: flex; }
}

.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 3rem 0 2rem; margin-top: var(--spacing-section); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { margin: 0 0 1rem; font-size: 1rem; color: var(--color-primary); }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--color-accent); }
.copyright { text-align: center; color: var(--color-muted); font-size: 0.85rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

/* 按钮与交互 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; border: none; cursor: pointer; transition: all 0.2s ease; text-wrap: balance; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 4px 10px rgba(58,63,59,0.25); }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(58,63,59,0.3); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-primary); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; border-radius: var(--radius-sm); }

/* 卡片与内容块 */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.5rem; box-shadow: var(--shadow-card); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.feature-item { border-left: 3px solid var(--color-accent); padding-left: 1rem; }
.section-desc { max-width: 720px; margin-bottom: 2rem; color: var(--color-muted); font-size: 1.05rem; }

/* 表格样式 */
.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-wrapper table { width: 100%; min-width: 600px; }
.table-wrapper th, .table-wrapper td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.table-wrapper th { background: var(--color-highlight); font-weight: 600; color: var(--color-primary); }
.table-wrapper tr:last-child td { border-bottom: none; }

/* 下载区块 */
.download-box { background: linear-gradient(135deg, #fafaf8 0%, #f0ece6 100%); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2.5rem; margin-top: 1rem; }
.install-steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0; }
.install-steps li { position: relative; padding-left: 2.5rem; margin-bottom: 1rem; }
.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%; font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem 1.2rem; transition: border-color 0.2s ease; }
details[open] { border-color: var(--color-accent); }
summary { 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; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0.8rem 0 0; color: var(--color-muted); line-height: 1.65; }

/* 新闻卡片 */
.news-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.news-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; }
.news-content { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.news-meta { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.5rem; }
.news-title { font-weight: 600; margin-bottom: 0.5rem; color: var(--color-primary); }
.news-excerpt { font-size: 0.95rem; color: var(--color-text); margin-bottom: 1rem; flex: 1; }

/* 相关阅读 */
.related-links { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; padding: 0; }
.related-links li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.8rem 1.2rem; transition: all 0.2s; }
.related-links li:hover { border-color: var(--color-accent); background: var(--color-highlight); }
.related-links strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }
.related-links span { font-size: 0.85rem; color: var(--color-muted); }

/* SVG 动效核心 */
.svg-container { width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 4/3; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; animation: draw-line 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.fill-shape { fill: none; stroke: currentColor; stroke-width: 1.5; }
.breathe-shape { animation: soft-breathe 4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes draw-line { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes soft-breathe { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.03); opacity: 0.88; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .svg-container { animation: none; }
  .draw-path, .breathe-shape { animation: none; stroke-dashoffset: 0; }
}

/* 页面特有微调 */
.hero-layout { display: grid; gap: 2rem; align-items: center; }
.hero-text { max-width: 560px; }
.hero-badge { display: inline-block; background: var(--color-highlight); color: var(--color-accent); padding: 0.3rem 0.8rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; }
.scenario-list { list-style: none; padding: 0; counter-reset: scene; }
.scenario-list li { counter-increment: scene; position: relative; padding-left: 2.2rem; margin-bottom: 1.5rem; }
.scenario-list li::before { content: counter(scene); position: absolute; left: 0; top: 0; font-weight: 700; color: var(--color-accent); }
.quick-start { background: var(--color-surface); border: 1px dashed var(--color-border); padding: 1.5rem; border-radius: var(--radius-md); margin-top: 1.5rem; }
.related-heading { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.related-heading::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
