/* =========================================================
   久罗机电 · 官网建设方案 · 提案演示页
   设计令牌来自 00-config.md：浅蓝主导 / 深蓝功能 / 橙色点缀
   ========================================================= */

:root {
  /* 配置色（唯一事实源） */
  --config-accent: #2B6C9C;
  --config-accent-light: #EFF5F9;
  --config-accent-light-2: #F4F8FB;
  --config-gradient-light: #D9E7F1;
  --config-accent-shadow: rgba(43, 108, 156, 0.16);
  --config-primary: #78ABCE;
  --config-secondary-a: #2B6C9C;
  --config-secondary-b: #333333;
  --config-accent-light-swatch: #DD581B;

  /* 中性灰 */
  --gray-900: #1a1a1a;
  --gray-700: #333333;
  --gray-500: #666666;
  --gray-300: #cccccc;
  --gray-100: #f5f5f5;

  /* 品牌色 */
  --accent: var(--config-accent);
  --accent-light: var(--config-accent-light);
  --accent-light-2: var(--config-accent-light-2);
  --gradient-light: var(--config-gradient-light);
  --accent-shadow: var(--config-accent-shadow);
  --brand-orange: var(--config-accent-light-swatch);

  /* 间距 */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px var(--accent-shadow);

  /* 字体 */
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --font-mono: "SF Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--gray-700);
  background: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* =========================================================
   侧边栏 320px
   ========================================================= */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  background: #F7FAFC;
  border-right: 1px solid #E1EBF1;
  z-index: 50;
}

.sidebar-head {
  padding: 28px 26px 20px;
  border-bottom: 1px solid #E1EBF1;
}

.sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.45;
  letter-spacing: 0.2px;
}

.sidebar-sub {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--gray-500);
  text-transform: uppercase;
}

.sidebar-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-meta span {
  font-size: 11px;
  color: var(--accent);
  background: #E8F1F7;
  border-radius: 999px;
  padding: 2px 8px;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 24px;
}

.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: #D5E2EB; border-radius: 999px; }

.nav-item {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px 9px 14px;
  margin: 1px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gray-700);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item:hover { background: #EDF4F8; color: var(--accent); }

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.nav-num {
  flex: 0 0 24px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: #8FA5B5;
  letter-spacing: 0.5px;
}

.nav-item.active .nav-num { color: var(--accent); }

.nav-text {
  font-size: 14px;
  line-height: 1.4;
}

.sidebar-foot {
  padding: 14px 26px 20px;
  border-top: 1px solid #E1EBF1;
  font-size: 11px;
  line-height: 1.7;
  color: #8FA5B5;
}

/* =========================================================
   主内容区
   ========================================================= */

.main {
  margin-left: 320px;
  padding: 40px 80px 80px;
  max-width: none;
  min-height: 100vh;
}

.chapter { display: none; }
.chapter.active { display: block; }

/* =========================================================
   标题与正文
   ========================================================= */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.chapter-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.chapter-title .chapter-num {
  flex: none;
  font-size: 1em;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
}

.chapter-title .chapter-name {
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  border-radius: 2px;
}

.lead {
  margin: 0 0 28px;
  max-width: 880px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-500);
}

.section-title {
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 2px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--gray-900);
}

.section-title:first-of-type { margin-top: 26px; }

.sub-title {
  margin: 24px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
}

.prose {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-700);
}

.prose p { margin: 0 0 14px; }
.prose strong { color: var(--gray-900); }

.note {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--accent-light-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--gray-500);
}

.key-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.key-point .kp-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.key-point .kp-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--gray-700);
}

.key-point .kp-body strong { color: var(--gray-900); }

/* =========================================================
   表格（全局圆角）
   ========================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 8px 0 22px;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

th {
  background: var(--accent-light);
  color: var(--gray-900);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px solid var(--gray-300);
}

td {
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--gray-700);
  vertical-align: top;
  border-bottom: 1px solid var(--gray-300);
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FAFCFD; }

table.compact td, table.compact th { padding: 10px 14px; font-size: 13px; }

/* 推广渠道列不加粗 */
.promotion-table td:first-child { font-weight: 400; }

/* =========================================================
   标签
   ========================================================= */

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.tag.orange {
  background: #FBEDE5;
  color: #B94713;
}

.tag.gray {
  background: #F0F0F0;
  color: #666;
}

/* =========================================================
   卡片 / 网格
   ========================================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 10px 0 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card h3, .card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--gray-900);
}

.card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-500);
}

.card.accent-card {
  border-color: #BFD6E4;
  background: var(--accent-light-2);
}

/* =========================================================
   指标卡（固定 4 列）
   ========================================================= */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  margin: 10px 0 24px;
}

.metric-card {
  background: var(--accent-light-2);
  border: 1px solid #DCE8F0;
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.metric-value {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.metric-label {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* =========================================================
   中英文结构总览（lang-grid 两栏）
   ========================================================= */

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 14px;
}

.lang-col {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.lang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--accent-light);
  border-bottom: 1px solid var(--gray-300);
}

.lang-head strong {
  font-size: 13px;
  color: var(--accent);
}

.lang-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-col li {
  display: grid;
  grid-template-columns: 1fr auto 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #EEF2F5;
  font-size: 12.5px;
  color: var(--gray-700);
}

.lang-col li:last-child { border-bottom: none; }

.lang-col code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-light-2);
  border-radius: 4px;
  padding: 1px 5px;
}

.lang-col b {
  font-size: 12px;
  color: var(--gray-900);
  text-align: right;
}

.lang-total {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-light-2);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  color: var(--gray-700);
}

.lang-total strong { color: var(--accent); }

/* =========================================================
   深色块 / 逻辑链
   ========================================================= */

.dark-block {
  margin: 18px 0 26px;
  padding: 26px 30px;
  background: var(--gray-900);
  border-radius: var(--radius-md);
  color: #fff;
}

.dark-block p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #F2F2F2;
}

.dark-block strong { color: #fff; }

.dark-block .chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.dark-block .chain span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12.5px;
  color: #fff;
}

.dark-block .chain i {
  font-style: normal;
  color: var(--config-primary);
  font-size: 14px;
}

/* =========================================================
   首页 8 模块 / 模块卡
   ========================================================= */

.module-list {
  display: grid;
  gap: 14px;
  margin: 12px 0 24px;
}

.module {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 6px;
  padding: 20px 22px 18px 18px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.module-num {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.module-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.module-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--gray-900);
}

.module-body p {
  margin: 0 0 5px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--gray-700);
}

.module-body p:last-child { margin-bottom: 0; }
.module-body strong { color: var(--gray-900); }

/* =========================================================
   STEP 流程
   ========================================================= */

.step-group { margin: 16px 0 30px; }

.step-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
}

.step-group-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.step-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

.step-card {
  position: relative;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.step-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -21px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.step-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

.step-head h4 {
  margin: 0;
  font-size: 14.5px;
  color: var(--gray-900);
}

.step-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-500);
}

/* =========================================================
   信息架构思维导图
   ========================================================= */

.mindmap {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 18px 0 8px;
  margin: 8px 0 18px;
  overflow-x: auto;
}

.mind-root {
  flex: 0 0 auto;
  padding: 14px 18px;
  background: var(--gray-900);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.mind-rail {
  flex: 0 0 64px;
  align-self: stretch;
  position: relative;
  min-height: 320px;
}

.mind-rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 30px;
  height: 1px;
  background: #C6D6E0;
}

.mind-rail::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: #C6D6E0;
}

.mind-branches {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 560px;
}

.mind-branch {
  position: relative;
  padding-left: 28px;
}

.mind-branch::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 28px;
  height: 1px;
  background: #C6D6E0;
}

.mind-node {
  display: inline-block;
  padding: 7px 13px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.mind-children {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.mind-children li {
  padding: 3px 9px;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 0 8px;
  font-size: 12px;
  color: var(--gray-500);
}

.legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* =========================================================
   配色色块
   ========================================================= */

.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 12px 0 22px;
}

.color-card {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.color-swatch { height: 80px; }

.color-info { padding: 14px 16px 16px; }

.color-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.color-hex {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  letter-spacing: 0.4px;
}

.color-ratio {
  display: inline-block;
  margin-top: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 11px;
  font-weight: 600;
}

.color-use {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--gray-500);
}

.swatch-primary { background: var(--config-primary); }
.swatch-secondary-a { background: var(--config-secondary-a); }
.swatch-secondary-b { background: var(--config-secondary-b); }
.swatch-orange { background: var(--config-accent-light-swatch); }
.swatch-neutral-100 { background: #F5F5F5; border-bottom: 1px solid #E4E4E4; }
.swatch-neutral-white { background: #FFFFFF; border-bottom: 1px solid #E4E4E4; }
.swatch-neutral-300 { background: #CCCCCC; }

.color-grid.neutral-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: -4px;
}

/* =========================================================
   对比卡（灰=旧 / 品牌蓝=新）
   ========================================================= */

.compare-grid {
  display: grid;
  gap: 24px;
  margin: 14px 0 2px;
}

.compare-dim {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}

.compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compare-card {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
}

.compare-card.before {
  background: #F5F5F5;
  border-color: #DDDDDD;
}

.compare-card.after {
  background: var(--accent-light);
  border-color: #BFD6E4;
}

.compare-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.compare-card.before .compare-label { color: #777; }
.compare-card.after .compare-label { color: var(--accent); }

.compare-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.compare-card.before .compare-label i { background: #999; }
.compare-card.after .compare-label i { background: var(--accent); }

.compare-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-700);
}

/* =========================================================
   价值行 / 范围
   ========================================================= */

.value-list { display: grid; gap: 12px; margin: 12px 0 20px; }

.value-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.value-row .value-key {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.value-row .value-body {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--gray-700);
}

.value-row .value-body strong { color: var(--gray-900); }

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 22px;
}

.scope-card {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.scope-card.included { border-top: 4px solid var(--accent); }
.scope-card.excluded { border-top: 4px solid #9AA7B0; }

.scope-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--gray-900);
}

.scope-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope-card li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--gray-700);
}

.scope-card li:last-child { margin-bottom: 0; }

.scope-card.included li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.scope-card.excluded li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: #8A969F;
  font-weight: 700;
}

/* =========================================================
   列表
   ========================================================= */

.clean-list {
  margin: 8px 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.clean-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--gray-700);
}

.clean-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.clean-list li strong { color: var(--gray-900); }

.number-list {
  margin: 8px 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: num;
}

.number-list li {
  position: relative;
  padding-left: 40px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--gray-700);
  counter-increment: num;
}

.number-list li::before {
  content: counter(num);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.number-list li strong { color: var(--gray-900); }

/* =========================================================
   代码 / URL 表
   ========================================================= */

.code-block {
  margin: 10px 0 22px;
  padding: 18px 20px;
  background: #F7FAFC;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--gray-700);
  white-space: pre;
}

/* =========================================================
   封面
   ========================================================= */

.cover {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding: 24px 0 40px;
}

.cover-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.cover-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.cover h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.18;
  letter-spacing: -1px;
  color: var(--gray-900);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cover-copy, .cover-panel { min-width: 0; }
.cover-lead, .cover-panel-text { overflow-wrap: anywhere; }

.cover h1 .cover-sub {
  display: block;
  margin-top: 8px;
  font-size: 0.62em;
  letter-spacing: 0;
  color: var(--accent);
}

.cover-lead {
  margin: 22px 0 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--gray-500);
}

.cover-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.cover-chips span {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.cover-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn:hover { background: #235C86; border-color: #235C86; transform: translateY(-1px); }

.btn.secondary {
  background: #fff;
  color: var(--accent);
}

.btn.secondary:hover { background: var(--accent-light); }

.cover-panel {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--config-primary);
  padding: 34px 30px 30px;
  color: var(--gray-900);
  box-shadow: 0 18px 48px rgba(43, 108, 156, 0.18);
  overflow: hidden;
}

.cover-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.cover-panel-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1F4F73;
}

.cover-panel-title {
  margin: 10px 0 2px;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 700;
  color: #102E42;
}

.cover-panel-text {
  margin: 0 0 22px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #1F4F73;
}

.cover-chain {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.cover-chain div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  font-weight: 600;
  color: #1F4F73;
}

.cover-chain div b {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.cover-panel-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(16, 46, 66, 0.18);
  font-size: 11.5px;
  color: #1F4F73;
}

.cover-panel-foot strong {
  display: block;
  font-size: 20px;
  color: #102E42;
  line-height: 1.2;
}

.cover-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.cover-metrics div {
  padding: 14px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #fff;
}

.cover-metrics strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  color: var(--accent);
}

.cover-metrics span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--gray-500);
}

/* =========================================================
   页脚 / 结论
   ========================================================= */

.chapter-footer {
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-300);
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.end-mark {
  margin-top: 32px;
  padding: 26px 30px;
  border-radius: var(--radius-md);
  background: var(--gray-900);
  color: #fff;
}

.end-mark p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #E8E8E8;
}

.end-mark strong { color: #fff; }

.end-mark .end-line {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
  color: #B9C6CE;
}

/* =========================================================
   移动端
   ========================================================= */

.menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 80;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  background: #fff;
  color: var(--gray-900);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 30, 40, 0.36);
}

@media (max-width: 1279px) {
  .main { padding: 40px 48px 70px; }
  .cover { gap: 36px; }
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .main { margin-left: 0; padding: 76px 32px 64px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .cover { grid-template-columns: 1fr; min-height: auto; }
  .cover-panel { order: 2; }
  .cover-metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .color-grid { grid-template-columns: repeat(2, 1fr); }
  .step-flow { grid-template-columns: 1fr; gap: 14px; }
  .step-card:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -21px;
    transform: translateX(-50%);
  }
  .scope-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: 1fr; }
  .compare-pair { grid-template-columns: 1fr; }
  .mindmap { overflow-x: auto; }
}

@media (max-width: 767px) {
  .main { padding: 72px 18px 48px; }
  .chapter-title { font-size: 27px; gap: 10px; }
  .cover h1 { font-size: 28px; letter-spacing: 0; }
  .cover-metrics { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .color-grid { grid-template-columns: 1fr; }
  .color-grid.neutral-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .module { grid-template-columns: 36px 1fr; padding: 16px; }
  .value-row { grid-template-columns: 1fr; gap: 6px; }
  .step-flow { grid-template-columns: 1fr; }
  .compare-pair { grid-template-columns: 1fr; }
  table { min-width: 560px; }
}

/* =========================================================
   打印：A4 / 显示全部章节
   ========================================================= */

@media print {
  @page { size: A4; margin: 16mm; }

  html, body { background: #fff; }
  .sidebar, .menu-toggle, .sidebar-backdrop, .cover-actions { display: none !important; }
  .main { margin-left: 0; padding: 0; max-width: none; }
  .chapter { display: block !important; animation: none; }
  .chapter { break-before: page; }
  #cover { break-after: page; min-height: auto; padding: 0; grid-template-columns: 1.1fr 0.9fr; }
  .cover-metrics { grid-template-columns: repeat(4, 1fr); }
  .cover-panel { box-shadow: none; }
  .section-title { break-after: avoid; }
  .card, .module, .step-card, .metric-card, .compare-card, .value-row, .scope-card, .color-card {
    break-inside: avoid;
    box-shadow: none;
  }
  table { min-width: 0; font-size: 11px; }
  td, th { padding: 7px 9px; font-size: 11px; }
  .dark-block, .end-mark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tag { border: 1px solid #D5E2EB; }
  a { color: inherit; text-decoration: none; }
}