:root {
  /* 色板 */
  --color-dark: #141838;
  --color-paper: #FCFCFD;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;

  /* 结构变量 */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --line-divider: rgba(21, 23, 35, 0.12);

  /* 字体与间距 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 排版基础 */
h1, h2, h3, h4 { margin: 0 0 0.8em 0; line-height: 1.25; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
p { margin: 0 0 1.2em 0; max-width: 38em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; height: auto; }

/* 容器与分节 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-top: var(--section-y); padding-bottom: var(--section-y); position: relative; }
.divider { height: 1px; background: var(--line-divider); margin: 0 auto; max-width: var(--content-max); }

/* 主题覆盖 */
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.text-on-dark h1, .text-on-dark h2, .text-on-dark h3, .text-on-dark p, .text-on-dark li { color: var(--color-paper); }
.text-on-dark .kicker { color: var(--color-accent); }
.text-on-dark .hl { color: var(--color-accent); }
.text-on-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.text-on-dark .card { background: rgba(255, 255, 255, 0.06); }
.text-on-dark table th, .text-on-dark table td { color: var(--color-paper); border-color: rgba(255,255,255,0.15); }

/* 眉标 */
.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.6em;
}

/* 高亮词 */
.hl { color: var(--color-brand); font-weight: 600; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.75em 1.6em; min-height: 48px;
  border-radius: var(--radius-btn); font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { background: #5a9bd8; transform: translateY(-2px); }
.btn-secondary { background: transparent; border: 1px solid var(--color-text); color: var(--color-text); }
.btn-secondary:hover { background: rgba(21, 23, 35, 0.06); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.panel {
  background: var(--color-dark);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
th, td { padding: 0.8em 1em; text-align: left; border-bottom: 1px solid var(--line-divider); }
th { font-weight: 600; width: 40%; }
td { white-space: nowrap; }
@media (max-width: 640px) { th, td { display: block; width: 100%; } th { padding-bottom: 0.2em; } td { padding-left: 1em; } }

/* 步骤徽标 */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--color-accent); color: var(--color-dark);
  font-weight: 700; font-size: 0.85rem; margin-right: 0.6em;
}

/* 场景标签 */
.case-tag {
  display: inline-block; padding: 0.25em 0.6em; border-radius: 4px;
  background: rgba(20, 44, 235, 0.08); color: var(--color-brand);
  font-size: 0.75rem; font-weight: 600; margin-bottom: 0.5em;
}
.bg-dark .case-tag { background: rgba(110, 175, 237, 0.15); color: var(--color-accent); }

/* 链接与列表 */
ul, ol { padding-left: 1.2em; margin: 0 0 1.2em 0; }
li { margin-bottom: 0.5em; }
a.link-brand { color: var(--color-brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.bg-dark a.link-brand { color: var(--color-accent); }

/* 页头 */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252, 252, 253, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-divider);
}
.bg-dark .header { background: rgba(20, 24, 56, 0.9); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.6em; font-weight: 700; font-size: 1.1rem; }
.logo img { height: 28px; width: auto; }
.nav { display: flex; gap: 1.5em; align-items: center; }
.nav a { font-weight: 500; font-size: 0.95rem; }
.nav a:hover { opacity: 0.8; }
.nav .active { color: var(--color-brand); font-weight: 600; }
.bg-dark .nav .active { color: var(--color-accent); }
@media (max-width: 768px) { .nav { display: none; } }

/* 页脚 */
.footer { background: var(--color-dark); color: rgba(255,255,255,0.7); padding: 3rem 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { color: var(--color-paper); margin-bottom: 0.8em; font-size: 0.95rem; }
.footer-col a { display: block; margin-bottom: 0.5em; font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.85rem; }

/* SVG 动效 */
.svg-container { width: 100%; height: auto; }
.svg-orbit { animation: orbit-breathe 7s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.svg-orbit-slow { animation: orbit-breathe 10s ease-in-out infinite reverse; transform-origin: center; transform-box: fill-box; }
.svg-bubble { animation: bubble-float 5s ease-in-out infinite; }
.svg-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-draw 3.5s ease forwards; }
.svg-fade-layer { animation: layer-pulse 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }

@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 0.9; }
}
@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes dash-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes layer-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}

/* 响应式微调 */
@media (max-width: 900px) {
  .hero-layout { flex-direction: column; text-align: center; }
  .hero-layout .hero-text { max-width: 100%; }
  .hero-layout .hero-svg-wrap { width: 100%; max-width: 500px; margin-top: 2rem; }
  .feature-row { flex-direction: column; }
  .feature-row.reverse { flex-direction: column; }
}
@media (max-width: 768px) {
  .deep-dive-grid { grid-template-columns: 1fr !important; }
  .deep-dive-grid aside { position: static !important; width: 100% !important; }
}
