/* ==================== 设计变量与基础重置 ==================== */
:root {
  /* 配色层 */
  --bg-dark: #141838;
  --bg-paper: #FCFCFD;
  --text-body: #151723;
  --color-brand: #142CEB;
  --color-accent: #6EAFED;

  /* 结构 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 2px solid var(--text-body);
  --card-shadow: 4px 4px 0 var(--text-body);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;
  --line-height: 1.55;

  /* 字体与排版 */
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--line-height);
  color: var(--text-body);
  background-color: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ==================== 布局容器 ==================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.section {
  padding-block: var(--section-y);
}

.dark-surface {
  background-color: var(--bg-dark);
  color: var(--bg-paper);
}
.dark-surface .hl { color: var(--color-accent); }
.dark-surface .brand-tag { color: var(--color-accent); }
.dark-surface a:not(.btn) { color: var(--color-accent); }
.dark-surface .card {
  background-color: var(--bg-paper);
  color: var(--text-body);
  border-color: var(--text-body);
}
.dark-surface .card .hl { color: var(--color-brand); }
.dark-surface .card .brand-tag { color: var(--color-brand); }

.light-surface {
  background-color: var(--bg-paper);
  color: var(--text-body);
}

/* ==================== 排版组件 ==================== */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75em;
}
.brand-tag { color: var(--color-brand); }
.dark-surface .brand-tag { color: var(--color-accent); }

.section-tag::before {
  content: "";
  display: inline-block;
  width: 1.2em;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-top: 0;
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-top: 0;
}
p { margin: 0 0 1em; }
strong { font-weight: 600; }

.hl {
  font-weight: 700;
  color: var(--color-brand);
}
.dark-surface .hl { color: var(--color-accent); }

/* ==================== 按钮系统 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  height: 52px;
  padding-inline: 1.5em;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--bg-dark);
}
.btn-secondary {
  border: 2px solid var(--text-body);
  color: var(--text-body);
}
.dark-surface .btn-secondary {
  border-color: var(--bg-paper);
  color: var(--bg-paper);
}

/* ==================== 卡片与面板 ==================== */
.card {
  background: var(--bg-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }

.panel {
  background: var(--bg-dark);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* ==================== 表格 ==================== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.8em 1em;
  text-align: left;
  border-bottom: 2px solid rgba(120, 120, 140, 0.15);
  white-space: nowrap;
}
th { font-weight: 600; }
td:first-child { font-weight: 600; color: var(--text-body); }
.dark-surface td:first-child { color: var(--bg-paper); }

/* ==================== FAQ ==================== */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
  background: var(--bg-paper);
  box-shadow: var(--card-shadow);
}
summary {
  padding: 1rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.2s;
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details > div {
  padding: 0 1.2rem 1rem;
  line-height: var(--line-height);
}

/* ==================== SVG 动效基类 ==================== */
.svg-anim { width: 100%; height: auto; max-width: 100%; }
.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-flow { animation: flowDash 6s linear infinite; }
.anim-grid { animation: gridPulse 5s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* 节点依次点亮延迟 */
.node-1 { animation-delay: 0s; }
.node-2 { animation-delay: 0.4s; }
.node-3 { animation-delay: 0.8s; }
.node-4 { animation-delay: 1.2s; }
.node-5 { animation-delay: 1.6s; }
.node-6 { animation-delay: 2.0s; }
.node-7 { animation-delay: 2.4s; }
.node-8 { animation-delay: 2.8s; }
.node-9 { animation-delay: 3.2s; }

/* 变换原点设置 */
.anim-float, .anim-breathe, .anim-grid, .anim-slide-in {
  transform-box: fill-box;
  transform-origin: center;
}

/* 减少动态效果 */
@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;
    animation: none !important;
  }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .flex-row { flex-direction: column; }
  .flex-row > * { margin-bottom: var(--gap); }
}

.grid-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex-row { display: flex; gap: var(--gap); align-items: center; }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-block: 0.8rem;
}
.dark-surface .site-header { background: rgba(20, 24, 56, 0.95); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.nav-list { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { font-weight: 500; position: relative; }
.nav-link[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.dark-surface .nav-link[aria-current="page"] { color: var(--color-accent); }
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: currentColor;
  transition: width 0.2s;
}
.nav-link:hover::after { width: 100%; }

.site-footer {
  padding-block: 3rem;
  border-top: 1px solid rgba(120, 120, 140, 0.2);
  font-size: 0.9rem;
  color: rgba(21, 23, 35, 0.7);
}
.dark-surface .site-footer { color: rgba(252, 252, 253, 0.6); border-top-color: rgba(252, 252, 253, 0.15); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--gap); }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 0.8em; font-weight: 600; }
.footer-col ul li { margin-bottom: 0.5em; }
.footer-col a:hover { color: var(--color-brand); }
.dark-surface .footer-col a:hover { color: var(--color-accent); }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(120, 120, 140, 0.15); text-align: center; }

/* 场景走查与时间线特殊样式 */
.step-timeline { counter-reset: step; }
.step-item {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 1.5rem;
}
.step-num {
  position: absolute;
  left: 0; top: 0;
  width: 2.4rem; height: 2.4rem;
  background: var(--color-accent);
  color: var(--bg-dark);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.news-card { padding: 1.2rem; }
.news-card time { font-size: 0.8rem; color: rgba(120,120,140,0.8); display: block; margin-bottom: 0.5em; }
.news-card h4 { margin-top: 0; font-size: 1.1rem; }
.news-card p { font-size: 0.95rem; margin-bottom: 0; color: rgba(21,23,35,0.8); }
.dark-surface .news-card p { color: rgba(252,252,253,0.85); }

/* 定义列表紧凑排版 */
.dl-grid { display: grid; gap: 1.5rem; }
.dt { font-weight: 700; margin-bottom: 0.3em; display: flex; align-items: center; gap: 0.5em; }
.dd { margin: 0; line-height: var(--line-height); color: rgba(21,23,35,0.85); }
.dark-surface .dd { color: rgba(252,252,253,0.8); }
.icon-box { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
