:root {
  /* 色板 */
  --c-dark: #121531;
  --c-paper: #E8E9EA;
  --c-body: #151723;
  --c-brand: #142CEB;
  --c-accent: #ED7D6E;

  /* 圆角 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --radius-sm: 8px;
  --radius-md: 12px;

  /* 卡片边界与阴影 */
  --card-border: 2px solid;
  --card-shadow: 4px 4px 0;

  /* 节奏与密度 */
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;

  /* 基础排版 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", monospace;
  --line-height-body: 1.75;
  --line-height-heading: 1.1;

  /* 默认取色（浅色纸面） */
  --text-main: var(--c-body);
  --text-muted: rgba(21, 23, 35, 0.65);
  --theme-color: var(--c-brand);
  --link-color: var(--c-brand);
  --surface-bg: var(--c-paper);
  --border-color: var(--c-body);
  --icon-color: var(--c-brand);
  --badge-color: var(--c-brand);
}

/* 深色面覆盖 */
.dark-surface {
  --text-main: var(--c-paper);
  --text-muted: rgba(232, 233, 234, 0.65);
  --theme-color: var(--c-accent);
  --link-color: var(--c-accent);
  --surface-bg: var(--c-dark);
  --border-color: rgba(232, 233, 234, 0.15);
  --icon-color: var(--c-accent);
  --badge-color: var(--c-accent);
}

/* 深色面内的浅色卡片恢复纸面取色 */
.dark-surface .light-card {
  --text-main: var(--c-body);
  --text-muted: rgba(21, 23, 35, 0.65);
  --theme-color: var(--c-brand);
  --link-color: var(--c-brand);
  --surface-bg: var(--c-paper);
  --border-color: var(--c-body);
  --icon-color: var(--c-brand);
  --badge-color: var(--c-brand);
}

/* 重置与基础 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-body);
  color: var(--text-main);
  background: var(--surface-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--link-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.85; }
a:focus-visible {
  outline: 2px solid var(--theme-color);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: var(--line-height-heading);
  color: var(--text-main);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  max-width: 38em;
  color: var(--text-main);
}

ul, ol {
  padding-left: 1.5em;
  color: var(--text-main);
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 眉标 */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--badge-color);
  margin-bottom: 0.75rem;
}
.badge::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--badge-color);
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 1px;
}

/* 高亮关键词 */
.hl {
  color: var(--theme-color);
}

/* 区块容器 */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--gap);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 4px 0;
  position: relative;
}
.nav-links a[aria-current="page"],
.nav-links a.active {
  color: var(--theme-color);
}
.nav-links a[aria-current="page"]::after,
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--theme-color);
  border-radius: 1px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--theme-color);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--c-accent);
  color: var(--c-dark);
}
.btn-primary:hover { background: #d96a5b; }
.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--text-main);
}
.btn-outline:hover { background: var(--text-main); color: var(--surface-bg); }
.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 卡片 */
.card {
  background: var(--surface-bg);
  border: var(--card-border) var(--border-color);
  box-shadow: var(--card-shadow) var(--border-color);
  border-radius: var(--radius-card);
  padding: var(--gap);
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}
.data-table th {
  font-weight: 700;
  background: var(--border-color);
  color: var(--surface-bg);
  border-radius: var(--radius-sm);
}
.data-table tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item {
  border: var(--card-border) var(--border-color);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
  overflow: hidden;
}
.faq-item summary {
  padding: 20px 24px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-main);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--theme-color);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item .faq-answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  line-height: var(--line-height-body);
}

/* 功能标签导航 */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--gap);
}
.tab-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border: var(--card-border) var(--border-color);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab-btn.active,
.tab-btn:hover {
  background: var(--theme-color);
  color: var(--surface-bg);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* 步骤条 */
.steps-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.step-item {
  flex: 1 1 200px;
  min-width: 0;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--surface-bg);
  background: var(--c-accent);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* 新闻卡片网格 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--gap);
}
.news-card {
  background: var(--surface-bg);
  border: var(--card-border) var(--border-color);
  border-radius: var(--radius-card);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-card time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.news-card h3 {
  font-size: 1.05rem;
  line-height: 1.4;
}
.news-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 页脚 */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-color);
  background: var(--surface-bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* SVG 面板容器 */
.svg-panel {
  background: var(--surface-bg);
  border: var(--card-border) var(--border-color);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow) var(--border-color);
  overflow: hidden;
}
.dark-surface .svg-panel {
  background: rgba(232, 233, 234, 0.05);
  border-color: rgba(232, 233, 234, 0.15);
  box-shadow: 4px 4px 0 rgba(232, 233, 234, 0.1);
}

/* SVG 动效 */
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes dashFlow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes pulseDot {
  0%, 100% { r: 2; opacity: 0.5; }
  50% { r: 3.5; opacity: 1; }
}

.draw-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 2s ease forwards;
}
.fade-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}
.fade-up-delay-1 { animation-delay: 0.2s; }
.fade-up-delay-2 { animation-delay: 0.4s; }
.fade-up-delay-3 { animation-delay: 0.6s; }
.fade-up-delay-4 { animation-delay: 0.8s; }
.float { animation: floatGentle 4s ease-in-out infinite; }
.breathe { animation: breathe 2.5s ease-in-out infinite; }
.slide-in { animation: slideInRight 0.8s ease forwards; }
.slide-in-delay-1 { animation-delay: 0.3s; }
.slide-in-delay-2 { animation-delay: 0.6s; }
.pulse-dot { animation: pulseDot 2s ease-in-out infinite; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .draw-line, .fade-up, .float, .breathe, .slide-in, .pulse-dot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .steps-row { flex-direction: column; }
  .hero-layout { flex-direction: column !important; }
  .feature-grid { grid-template-columns: 1fr !important; }
  .alt-row:nth-child(even) { flex-direction: column-reverse !important; }
  
  /* 修复下载中心按钮溢出 */
  .download-hero .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
  }
  .download-hero .btn-outline {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}

/* 两栏图文交错 */
.alt-row {
  display: flex;
  align-items: center;
  gap: var(--gap);
}
.alt-row.reverse { flex-direction: row-reverse; }
.alt-row .text-col { flex: 1 1 0; min-width: 0; }
.alt-row .visual-col { flex: 1 1 0; min-width: 0; }

/* 提示框 */
.callout {
  border-left: 4px solid var(--theme-color);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--border-color);
  margin: var(--gap) 0;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.7;
}
.dark-surface .callout {
  background: rgba(232, 233, 234, 0.08);
}

/* 特性胶囊 */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  color: var(--text-main);
  background: transparent;
}
.chip svg { width: 16px; height: 16px; }
.dark-surface .chip { color: var(--text-main); border-color: var(--border-color); }
.light-card .chip { color: var(--text-main); border-color: var(--border-color); }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
