/* 设计变量与基础重置 */
:root {
  --color-dark: #13102D;
  --color-paper: #D6D4ED;
  --color-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --transition-base: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 布局容器 */
.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; }
.surface-dark { background: var(--color-dark); color: var(--color-paper); }
.surface-dark .hl { color: var(--color-accent); }
.surface-dark .link { color: var(--color-accent); }
.card-light {
  background: var(--color-paper);
  color: var(--color-text);
  border: var(--card-border) rgba(23,21,35,0.16);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 下载页卡片深色背景 */
.download-bg-dark { background: #a19fac; }

/* 排版 */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 4.6vw, 3.4rem); margin-bottom: var(--gap); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: calc(var(--gap) * 0.75); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: calc(var(--gap) * 0.5); }
p { margin-bottom: var(--gap); max-width: 38em; }
.lead { font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.7; margin-bottom: calc(var(--gap) * 1.5); }
.hl { font-weight: 600; }
.paper .hl { color: var(--color-brand); }
.dark .hl { color: var(--color-accent); }
.badge {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  margin-bottom: 0.5rem; text-transform: uppercase;
}
.paper .badge { color: var(--color-brand); }
.dark .badge { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 52px; padding: 0 24px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; border: none;
  transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); background: #7de062; }
.btn-secondary { background: transparent; border: 2px solid currentColor; color: inherit; }
.paper .btn-secondary { border-color: var(--color-text); color: var(--color-text); }
.dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { background: rgba(128,128,128,0.1); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* 页头与页脚 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(214,212,237,0.85); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(23,21,35,0.08); }
.dark .site-header { background: rgba(19,16,45,0.9); border-bottom-color: rgba(214,212,237,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 24px; }
nav a { font-weight: 500; padding: 8px 0; position: relative; transition: color var(--transition-base); }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
.dark nav a:hover, .dark nav a[aria-current="page"] { color: var(--color-accent); }
@media (max-width: 768px) {
  nav ul { display: none; }
  .mobile-menu-toggle { display: block; background: none; border: none; color: inherit; font-size: 1.5rem; cursor: pointer; }
}
.mobile-menu-toggle { display: none; }
.site-footer { padding: 64px 0 32px; border-top: 1px solid rgba(23,21,35,0.1); margin-top: var(--section-y); }
.dark .site-footer { border-top-color: rgba(214,212,237,0.1); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); margin-bottom: 32px; }
.footer-grid h4 { margin-bottom: 16px; font-size: 1rem; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { text-decoration: underline; }
.copyright { text-align: center; font-size: 0.85rem; opacity: 0.8; }

/* 组件细节 */
dl.feature-list { display: grid; gap: 24px; }
dt { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
dd { margin-left: 28px; color: rgba(23,21,35,0.85); }
.dark dd { color: rgba(214,212,237,0.85); }
.step-list { counter-reset: step; }
.step-list li { position: relative; padding-left: 48px; margin-bottom: 24px; }
.step-list li::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  background: var(--color-accent); color: var(--color-dark);
  border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.news-card { padding: 24px; border-radius: var(--radius-card); border: var(--card-border) rgba(23,21,35,0.16); background: #fff; }
.news-card time { display: block; font-size: 0.8rem; color: #666; margin-bottom: 8px; }
.news-card h4 { margin-bottom: 12px; font-size: 1.1rem; }
.news-card p { font-size: 0.95rem; margin-bottom: 0; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(23,21,35,0.1); }
.spec-table th { font-weight: 600; width: 40%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.faq-item { margin-bottom: 16px; border: var(--card-border) rgba(23,21,35,0.16); border-radius: 12px; overflow: hidden; }
.faq-item summary {
  padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 16px; margin-bottom: 0; font-size: 0.95rem; }
.panel-svg { width: 100%; height: auto; max-width: 100%; }
.scene-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 768px) { .scene-row { grid-template-columns: 1fr; } }

/* 表格与网格溢出修复 */
table { display: block; width: max-content; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.grid-2 > * > .download-grid,
.download-grid { overflow-x: visible; }

/* SVG 动效 */
.svg-group { transform-box: fill-box; transform-origin: center; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.float-element { transform-box: fill-box; transform-origin: center; }
@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes breatheFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes slideInRight {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.anim-draw { animation: drawPath 4s ease-in-out infinite alternate; }
.anim-float { animation: breatheFloat 6s ease-in-out infinite; }
.anim-breathe { animation: pulseOpacity 4s ease-in-out infinite; }
.anim-slide { animation: slideInRight 5s ease-out forwards; }
svg .anim-float:nth-child(2) { animation-delay: 1.5s; }
svg .anim-float:nth-child(3) { animation-delay: 3s; }

/* 无障碍与减少动态效果 */
@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;
  }
}
/* 焦点可见性 */
:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.dark :focus-visible { outline-color: var(--color-accent); }

/* 兜底：裁掉横向溢出 */
div.download-grid {
  overflow-x: clip;
}
