:root {
  /* 色板 */
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-paper-light: #EDEAF5;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;
  --color-white: #FFFFFF;

  /* 表面派生色 */
  --text-on-dark: #DBD4ED;
  --accent-on-dark: #ED6E89;
  --border-color: rgba(25, 21, 35, 0.16);
  --border-on-dark: rgba(219, 212, 237, 0.15);

  /* 结构与间距 */
  --content-max: 960px;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --header-h: 64px;
  --sidebar-w: 240px;

  /* 排版 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-base: 1.75;

  /* 组件几何 */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid var(--border-color);
  --card-shadow: none;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  line-height: var(--lh-base);
  color: var(--color-body);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }

/* 桌面侧边栏 + 移动端顶部导航切换 */
.layout-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--color-paper-light); border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column; padding: 32px 24px; z-index: 50;
}
.mobile-header {
  display: none; position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: rgba(219, 212, 237, 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color); align-items: center; justify-content: space-between;
  padding: 0 var(--gap); z-index: 100;
}
.main-content {
  flex: 1; margin-left: var(--sidebar-w); padding-top: var(--header-h);
}

/* 品牌标识 */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-body); font-weight: 800; font-size: 1.1rem; margin-bottom: 40px; }
.brand img { height: 32px; width: auto; display: block; }
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.nav-links a { text-decoration: none; color: var(--color-body); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-brand); }

/* 区块背景交替 */
section { padding: var(--section-y) 0; }
.section-dark { background: var(--color-dark); color: var(--text-on-dark); }
.section-paper-light { background: var(--color-paper-light); }

/* 标题与眉标 */
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; text-transform: uppercase; }
.section-paper-light .eyebrow, .section-paper .eyebrow { color: var(--color-brand); }
.section-dark .eyebrow { color: var(--accent-on-dark); }
.hl { color: var(--color-brand); }
.section-dark .hl { color: var(--accent-on-dark); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; height: 52px; font-size: 1rem; font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); background: #d95a75; }
.btn-secondary { background: transparent; border: 2px solid var(--color-body); color: var(--color-body); }
.section-dark .btn-secondary { border-color: var(--text-on-dark); color: var(--text-on-dark); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

/* 卡片与面板 */
.card {
  background: var(--color-paper); border: var(--card-border); box-shadow: var(--card-shadow);
  padding: 24px; margin-bottom: var(--gap);
}
.section-dark .card { background: var(--color-paper-light); border-color: var(--border-on-dark); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
th { font-weight: 700; }
.section-dark table th, .section-dark table td { border-bottom-color: var(--border-on-dark); }

/* FAQ */
details { margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-weight: 800; color: var(--color-brand); }
details[open] summary::before { content: "-"; }
details p { margin-top: 0.8rem; }

/* 页脚 */
.site-footer { background: var(--color-dark); color: var(--text-on-dark); padding: 48px 0; border-top: 1px solid var(--border-on-dark); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.footer-grid a { color: var(--text-on-dark); text-decoration: none; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--accent-on-dark); }

/* SVG 动效基线 */
svg { width: 100%; height: auto; display: block; }
.line-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* 关键帧 */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes slideIn { 0% { transform: translateX(20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes lineFlow { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes nodeLight { 0%, 100% { fill: var(--color-body); opacity: 0.2; } 50% { fill: var(--color-brand); opacity: 1; } }

.anim-float { animation: float 4s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide-in { animation: slideIn 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-line-flow { stroke-dasharray: 1; stroke-dashoffset: 0; animation: lineFlow 2s linear infinite; }
.anim-grid-node { animation: nodeLight 4s ease-in-out infinite; }
.grid-node:nth-child(1) { animation-delay: 0s; }
.grid-node:nth-child(2) { animation-delay: 0.4s; }
.grid-node:nth-child(3) { animation-delay: 0.8s; }
.grid-node:nth-child(4) { animation-delay: 1.2s; }
.grid-node:nth-child(5) { animation-delay: 1.6s; }
.grid-node:nth-child(6) { animation-delay: 2.0s; }
.grid-node:nth-child(7) { animation-delay: 2.4s; }
.grid-node:nth-child(8) { animation-delay: 2.8s; }
.grid-node:nth-child(9) { animation-delay: 3.2s; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-float, .anim-breathe, .anim-slide-in, .anim-line-flow, .anim-grid-node { animation: none !important; }
}

/* 响应式 */
@media (max-width: 768px) {
  .layout-wrapper { flex-direction: column; }
  .sidebar { position: static; width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); padding: 16px 24px; overflow-x: hidden; }
  .main-content { margin-left: 0; padding-top: 0; overflow-x: hidden; }
  .mobile-header { display: flex; }
  .nav-links.desktop-only { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  .hero-layout { flex-direction: column-reverse !important; }
  
  /* 修复 Hero 区域 SVG 横向溢出 */
  .hero-section svg { max-width: 100%; height: auto; }
}
