/* 微信成交作业手册 · 样式
   颜色约定：绿色 = 可以直接发给客户；黄色 = 内部提示 / 待确认；红色 = 不能说 */

:root {
  --bg: #f4f2ec;
  --paper: #ffffff;
  --ink: #17212b;
  --muted: #5d6975;
  --faint: #8a949e;
  --line: #e1ddd2;
  --line-soft: #ece9e0;

  --nav: #0e2a21;
  --nav-2: #173a2e;
  --nav-ink: #cfe0d7;
  --nav-dim: #86a597;

  --go: #06894c;
  --go-deep: #05703e;
  --go-soft: #e3f5e9;
  --go-line: #b4e0c3;

  --amber: #8f5a00;
  --amber-soft: #fff6dd;
  --amber-line: #efd58d;
  --gold: #f7d560;

  --red: #b3261e;
  --red-soft: #fdefed;
  --red-line: #f1c3be;

  --blue: #1c5d87;
  --blue-soft: #e9f2f8;

  --glass: rgba(244,242,236,.92);   /* 顶栏、吸顶条的半透明底色（= --bg 加透明度） */
  --key-line: #06894c;              /* 重点下划线的颜色 */
  --mark: #ffe680;                  /* 荧光笔的颜色 */

  --num: "DIN Alternate", "Bahnschrift", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --side: 228px;
  --radius: 10px;

  /* 版心：正文最宽多少、左右留多少。顶栏、切换条、正文、搜索结果都用 --pad-x，所以四者的左右边永远对齐。
     屏幕越宽版心越宽（见文件最后“宽屏”一段），卡片跟着排成两列、三列，不留大片空白。 */
  --doc-w: 1200px;
  --gut: clamp(16px, 4vw, 44px);
  --pad-x: max(var(--gut), calc((100vw - var(--side) - var(--doc-w)) / 2));

  /* 顶部被占掉的高度。定位到锚点时按 --stuck 让位（见下面 .doc [id] 那一条），别的地方不要再单独写 scroll-margin-top */
  --top-h: 61px;      /* 顶栏的高度（脚本会按实际量一遍） */
  --qnav-h: 0px;      /* 顶栏下面那条“本页快捷切换条”的高度；这一页没有切换条就是 0（脚本设） */
  --stuck: calc(var(--top-h) + var(--qnav-h) + 12px);
}

* { box-sizing: border-box; }
/* 不用平滑滚动：页面很长，平滑滚动要走一两秒；而且浏览器自己的平滑滚动和脚本的定位会打架，落点偏十几像素 */
html { scroll-behavior: auto; }
/* 定位到锚点时，让出顶栏 + 切换条的高度。
   写在目标身上（scroll-margin-top），不写在 html 上（scroll-padding-top）：写在 html 上的话，
   点一下顶栏里的搜索框，浏览器会以为搜索框“被挡住了”，把正文往上滚一大截。
   正文里凡是带 id 的东西都可能被定位到；.sec-first 是每一节的开头（脚本标的，不一定有 id）；
   后面几个是用键盘 Tab 能走到的东西，往回走的时候别钻到顶栏底下。 */
.doc [id], .doc .sec-first, .doc [tabindex], .doc a[href], .doc button, .doc summary { scroll-margin-top: var(--stuck); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--go); outline-offset: 2px; }

/* ============ 整体布局 ============ */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: var(--nav); color: var(--nav-ink);
  display: flex; flex-direction: column;
  padding: 22px 14px 16px; overflow-y: auto; z-index: 30;
}
.side-brand { padding: 0 8px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.side-brand small { display: block; font-size: 11px; letter-spacing: .14em; color: var(--nav-dim); }
.side-brand strong { display: block; font-size: 19px; line-height: 1.4; color: #fff; margin-top: 4px; letter-spacing: .01em; }
.side-brand span { display: block; font-size: 12px; color: var(--nav-dim); margin-top: 6px; line-height: 1.55; }
.side nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.side nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  color: var(--nav-ink); text-decoration: none; font-size: 14px; line-height: 1.4;
}
.side nav a .no {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--num); font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.08); color: var(--nav-dim);
}
.side nav a:hover { background: var(--nav-2); color: #fff; }
.side nav a[aria-current="page"] { background: #1f4a3b; color: #fff; font-weight: 600; }
.side nav a[aria-current="page"] .no { background: var(--gold); color: #2a2108; }
.side-foot { margin-top: auto; padding: 14px 8px 0; font-size: 11.5px; line-height: 1.7; color: var(--nav-dim); }
.side-foot b { color: var(--nav-ink); font-weight: 600; }

.top {
  position: sticky; top: 0; z-index: 20;
  margin-left: var(--side);
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--pad-x);
  background: var(--glass); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; flex: none; white-space: nowrap; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.search { position: relative; flex: 1; min-width: 0; max-width: 640px; margin-right: auto; }   /* 搜索靠左，几个按钮靠右 */
.search input {
  width: 100%; height: 40px; padding: 0 44px 0 38px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--paper);
  font-size: 14px;
}
.search input:focus { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px rgba(6,137,76,.14); }
.search::before {
  content: ""; position: absolute; left: 13px; top: 12px; width: 11px; height: 11px;
  border: 2px solid var(--faint); border-radius: 50%;
}
.search::after {
  content: ""; position: absolute; left: 24px; top: 24px; width: 6px; height: 2px;
  background: var(--faint); transform: rotate(45deg); border-radius: 2px;
}
.search kbd {
  position: absolute; right: 10px; top: 9px; font-family: var(--num); font-size: 12px;
  border: 1px solid var(--line); border-radius: 5px; padding: 0 7px; color: var(--faint); background: var(--bg);
}
.top-btn {
  flex: none; height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--paper); font-size: 14px; white-space: nowrap;
}
.top-slot { flex: none; display: inline-flex; align-items: center; }
.top-slot:empty { display: none; }   /* 主题按钮还没放进来时不占地方 */
.top-btn:hover { border-color: var(--go); color: var(--go-deep); }
.top-btn b { font-weight: 600; }
.top-btn .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: 1px; }
.top-btn .dot.ok { background: var(--go); }

.main { margin-left: var(--side); padding: 30px var(--pad-x) 80px; }
.doc { max-width: var(--doc-w); margin: 0 auto; }
/* 版心宽了以后，成段的字不跟着拉满，一行太长不好读；表格、卡片、图照样用满宽度 */
.doc p, .doc li { max-width: 70em; }

/* 搜索结果面板 */
.results {
  position: fixed; z-index: 25; top: var(--top-h); left: var(--side); right: 0; bottom: 0;
  background: rgba(23,33,43,.28); display: none; padding: 0 var(--pad-x);
}
.results.on { display: block; }
.results-box {
  max-width: 900px; margin: 0; max-height: calc(100vh - 80px); overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 14px 14px; padding: 14px clamp(14px, 3vw, 26px) 22px;
  box-shadow: 0 18px 40px rgba(23,33,43,.2);
}
.results-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.results-head button { border: 0; background: none; color: var(--blue); font-size: 13px; padding: 4px; }
.results-empty { padding: 26px 6px; color: var(--muted); }
.results-empty b { color: var(--ink); }

/* 填空面板 */
.vars {
  position: fixed; z-index: 40; top: 58px; right: max(12px, var(--pad-x)); width: 310px; max-width: calc(100vw - 24px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 16px 14px; box-shadow: 0 16px 36px rgba(23,33,43,.18); display: none;
}
.vars.on { display: block; }
.vars h3 { margin: 0 0 2px; font-size: 15px; }
.vars p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.vars label { display: block; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.vars input { width: 100%; height: 36px; margin-top: 3px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.vars input:focus { outline: none; border-color: var(--go); }
.vars-actions { display: flex; gap: 8px; margin-top: 14px; }
.vars-actions button { flex: 1 1 auto; white-space: nowrap; padding: 0 12px; height: 36px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; }
.vars-actions .primary { background: var(--go); border-color: var(--go); color: #fff; font-weight: 600; }

/* 提示条 */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
  background: #14251e; color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4fd88d; margin-right: 8px; vertical-align: 1px; }

/* ============ 文字排版 ============ */
.page-head { border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 26px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--go-deep); }
h1 { font-size: 30px; line-height: 1.35; margin: 6px 0 8px; letter-spacing: -.01em; }
.lead { font-size: 16.5px; margin: 0; color: #2d3945; max-width: 46em; }
h2 { font-size: 22px; line-height: 1.45; margin: 44px 0 6px; padding-top: 4px; }
h2 .h-no { font-family: var(--num); color: var(--go-deep); margin-right: 8px; }
h3 { font-size: 17px; line-height: 1.5; margin: 28px 0 8px; }
h4 { font-size: 15px; line-height: 1.5; margin: 0; }
p { margin: 8px 0; }
.sub { color: var(--muted); margin: 0 0 12px; }
.small { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
ul, ol { margin: 8px 0; padding-left: 1.35em; }
li { margin: 4px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
strong.r { color: var(--red); }

/* ============ 重点标记（四种，别的写法不要用） ============
   加粗 <strong>      结论、动作            数据里写 **文字**
   下划线 <u class="key">   判断条件、客户的信号   数据里写 ==文字==
   红字 <em class="red">    不能说、不能做、风险   数据里写 !!文字!!
   荧光 <mark class="hl">   价格、数字            数据里写 ^^文字^^ */
strong { font-weight: 700; }
u.key { text-decoration: underline; text-decoration-color: var(--key-line); text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 600; }
em.red { font-style: normal; font-weight: 700; color: var(--red); }
mark.hl { background: linear-gradient(transparent 38%, var(--mark) 38%); color: inherit; font-weight: 700; padding: 0 2px; border-radius: 2px; font-family: inherit; }

/* ============ 通用块 ============ */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.box { border-radius: var(--radius); padding: 13px 16px; margin: 14px 0; border: 1px solid; }
.box > :first-child { margin-top: 0; } .box > :last-child { margin-bottom: 0; }
.box h4 { margin-bottom: 4px; }
.box.info { background: var(--blue-soft); border-color: #c4dbea; }
.box.tip { background: var(--amber-soft); border-color: var(--amber-line); }
.box.no { background: var(--red-soft); border-color: var(--red-line); }
.box.yes { background: var(--go-soft); border-color: var(--go-line); }
.box .lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; display: block; margin-bottom: 2px; }
.box.tip .lbl { color: var(--amber); } .box.no .lbl { color: var(--red); } .box.yes .lbl { color: var(--go-deep); } .box.info .lbl { color: var(--blue); }

.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.65; }
th, td { text-align: left; vertical-align: top; padding: 10px 13px; border-bottom: 1px solid var(--line-soft); }
thead th { background: #efece3; font-weight: 700; white-space: nowrap; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
td.k { font-weight: 700; white-space: nowrap; }
td.n, th.n { font-family: var(--num); font-size: 15px; white-space: nowrap; }
.price thead th { background: var(--gold); color: #2a2108; }
td.hl { background: var(--go-soft); }

.tag { display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 5px; vertical-align: 2px; white-space: nowrap; }
.tag.go { background: var(--go-soft); color: var(--go-deep); }
.tag.am { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); }
.tag.rd { background: var(--red-soft); color: var(--red); }
.tag.gy { background: #ecebe6; color: var(--muted); }
.tag.dk { background: var(--ink); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.chip {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 5px 13px; font-size: 13.5px; line-height: 1.5; text-decoration: none; color: var(--ink);
}
.chip:hover { border-color: var(--go); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip em { font-style: normal; font-family: var(--num); color: var(--faint); margin-left: 5px; }
.chip.on em { color: #b8c2cb; }

.filter { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; }
.filter input { flex: 1; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.filter input:focus { outline: none; border-color: var(--go); }
.count { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ============ 话术卡 / 问答卡 ============ */
.say, .qa {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 14px; margin: 12px 0;
}
.say.flash, .qa.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 3px transparent; } }
.say-head, .qa-head { display: flex; align-items: flex-start; gap: 8px; }
.say-head h4, .qa-head h4 { flex: 1; font-size: 15.5px; }
.qa-head h4::before { content: "客户问："; color: var(--faint); font-weight: 500; }
.qa-head h4.plain::before { content: none; }
.fav { border: 0; background: none; font-size: 18px; line-height: 1; padding: 2px 4px; color: #c9c4b6; }
.fav:hover { color: var(--amber); }
.fav.on { color: #e0a100; }
.meta { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.65; }
.meta b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.alt { font-size: 12.5px; color: var(--faint); margin: 2px 0 0; }

.bubble-lbl { font-size: 12px; font-weight: 700; color: var(--go-deep); letter-spacing: .04em; margin: 12px 0 4px; display: flex; gap: 8px; align-items: center; }
.bubble-lbl.push { color: var(--blue); }
.bubble {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--go-soft); border: 1px solid var(--go-line); border-radius: 4px 12px 12px 12px;
  padding: 11px 76px 11px 14px; margin: 6px 0; white-space: pre-wrap; word-break: break-word;
  font-size: 15px; line-height: 1.75; color: #10261b; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.bubble:hover { background: #d5f0de; border-color: #8fd1a6; }
.bubble::after {
  content: "复制"; position: absolute; right: 10px; top: 10px;
  font-size: 12px; font-weight: 700; color: var(--go-deep);
  border: 1px solid var(--go-line); background: #fff; border-radius: 6px; padding: 1px 9px; line-height: 1.7;
}
.bubble.done::after { content: "已复制"; background: var(--go); border-color: var(--go); color: #fff; }
.bubble.push { background: var(--blue-soft); border-color: #c4dbea; color: #12283a; }
.bubble.push:hover { background: #dcebf5; }
.bubble.push::after { color: var(--blue); border-color: #c4dbea; }
.bubble.push.done::after { background: var(--blue); border-color: var(--blue); color: #fff; }
.bubble.blocked { background: #fbf7ea; border-color: var(--amber-line); border-style: dashed; }
.bubble.blocked::after { content: "待确认"; color: var(--amber); border-color: var(--amber-line); }
.seq { font-family: var(--num); font-size: 12px; color: var(--faint); margin-right: 2px; }

.ph { background: #ffe1dc; color: var(--red); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.ph.me { background: #fff0c2; color: var(--amber); }
.soft { border-bottom: 2px dotted #d9a400; cursor: help; }
.v { border-bottom: 1px solid var(--go-line); }

.note, .dont, .warn { font-size: 13px; line-height: 1.7; margin: 10px 0 0; padding: 8px 11px; border-radius: 7px; }
.note { background: #f6f4ee; color: #3d4852; }
.note b { color: var(--amber); margin-right: 6px; }
.dont { background: var(--red-soft); color: #5d1b16; }
.dont b { color: var(--red); margin-right: 6px; }
.warn { background: var(--amber-soft); border: 1px solid var(--amber-line); color: #5a3a00; }
.warn b { margin-right: 6px; }
.warn a { color: inherit; font-weight: 600; }
.card-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }

/* ============ 首页 ============ */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: end; }
.hero-side { background: var(--nav); color: var(--nav-ink); border-radius: 14px; padding: 18px 20px; }
.hero-side .big { font-family: var(--num); font-size: 44px; line-height: 1; color: var(--gold); }
.hero-side p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.65; }
.hero-side b { color: #fff; }

.steps { counter-reset: st; display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; }
.step {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px 14px;
  transition: border-color .12s, transform .12s;
}
.step:hover { border-color: var(--go); transform: translateY(-2px); }
.step .no { font-family: var(--num); font-size: 26px; font-weight: 700; line-height: 1; color: var(--go-deep); }
.step b { display: block; font-size: 15.5px; margin-top: 6px; }
.step span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 3px; }
.step small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--amber); font-weight: 600; }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick a {
  display: block; text-decoration: none; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-left: 4px solid var(--go); border-radius: 8px; padding: 10px 13px; font-size: 14px; line-height: 1.5;
}
.quick a:hover { border-color: var(--go); }
.quick a small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ============ 流程页 ============ */
.stage { border-top: 2px solid var(--ink); margin-top: 46px; padding-top: 16px; }
.stage-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.stage-no { font-family: var(--num); font-size: 52px; font-weight: 700; line-height: .95; color: var(--go-deep); grid-row: span 2; }
.stage-head h2 { margin: 0; padding: 0; font-size: 24px; }
.stage-goal { margin: 0; color: var(--muted); font-size: 14px; }
.stage-goal b { color: var(--ink); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.pill { font-size: 12.5px; background: #ecebe6; border-radius: 6px; padding: 3px 9px; color: #3d4852; }
.pill b { color: var(--ink); }
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.do-dont > div { border-radius: var(--radius); padding: 12px 15px; font-size: 14px; }
.do-dont .do { background: var(--go-soft); border: 1px solid var(--go-line); }
.do-dont .dn { background: var(--red-soft); border: 1px solid var(--red-line); }
.do-dont h4 { font-size: 13px; letter-spacing: .06em; margin-bottom: 4px; }
.do-dont .do h4 { color: var(--go-deep); } .do-dont .dn h4 { color: var(--red); }
.do-dont ul { margin: 0; padding-left: 1.2em; }
.gate { display: flex; gap: 10px; align-items: baseline; background: var(--ink); color: #fff; border-radius: 9px; padding: 10px 15px; margin: 16px 0 0; font-size: 14px; }
.gate b { color: var(--gold); white-space: nowrap; }
.more { margin: 8px 0 0; font-size: 13.5px; }
details.fold { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; }
details.fold > summary { cursor: pointer; padding: 11px 16px; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "展开"; font-size: 12.5px; font-weight: 500; color: var(--blue); }
details.fold[open] > summary::after { content: "收起"; }
details.fold > .fold-body { padding: 0 16px 14px; border-top: 1px solid var(--line-soft); }

.rhythm { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.rhythm a { text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 10px 10px 11px; }
.rhythm a:hover { border-color: var(--go); }
.rhythm b { display: block; font-family: var(--num); font-size: 18px; color: var(--go-deep); line-height: 1.2; }
.rhythm span { display: block; font-size: 12.5px; line-height: 1.5; margin-top: 4px; color: #3d4852; }

/* ============ 示范对话 ============ */
.case { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin: 22px 0; overflow: hidden; }
.case-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line-soft); }
.case-head h3 { margin: 0 0 6px; font-size: 18px; }
.case-head p { margin: 2px 0; font-size: 13.5px; color: var(--muted); }
.case-head p b { color: var(--ink); margin-right: 6px; }
.chat { background: #ededed; padding: 16px clamp(12px, 3vw, 22px) 18px; }
.msg { display: flex; margin: 9px 0; }
.msg.me { justify-content: flex-end; }
.msg .who {
  flex: none; width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #cfd4d8; color: #49535c; margin-right: 9px;
}
.msg.me .who { order: 2; margin: 0 0 0 9px; background: var(--go); color: #fff; }
.msg .b {
  max-width: min(78%, 520px); border-radius: 8px; padding: 9px 12px; white-space: pre-wrap; word-break: break-word;
  font-size: 14.5px; line-height: 1.7; background: #fff; text-align: left; border: 0;
}
.msg.me .b { background: #95ec69; color: #0c1a08; cursor: pointer; position: relative; }
.msg.me .b:hover { background: #86e158; }
.msg.me .b.done { background: #6fd441; }
.chat-time { text-align: center; font-size: 12px; color: #8b8b8b; margin: 16px 0 8px; }
.chat-note {
  margin: 8px auto; max-width: 560px; font-size: 13px; line-height: 1.65;
  background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 8px; padding: 7px 12px; color: #5a3a00;
}
.chat-note::before { content: "讲解　"; font-weight: 700; color: var(--amber); }
.learn { padding: 14px 20px 16px; }
.learn h4 { font-size: 13px; letter-spacing: .06em; color: var(--go-deep); margin-bottom: 4px; }
.learn ul { margin: 0; }

/* ============ 计算器 ============ */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-in { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.calc-in h4, .calc-out h4 { font-size: 13px; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px; align-items: center; margin: 7px 0; font-size: 14px; }
.field small { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.45; }
.field input, .field select { height: 36px; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; background: #fff; font-family: var(--num); font-size: 15px; text-align: right; }
.field select { font-family: var(--sans); font-size: 14px; text-align: left; }
.field input:focus, .field select:focus { outline: none; border-color: var(--go); }
.calc-sep { border-top: 1px dashed var(--line); margin: 12px 0 8px; }
.calc-out { background: var(--nav); color: var(--nav-ink); border-radius: var(--radius); padding: 14px 16px 16px; }
.calc-out h4 { color: var(--nav-dim); }
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi div { background: rgba(255,255,255,.06); border-radius: 8px; padding: 9px 11px; }
.kpi span { display: block; font-size: 12px; color: var(--nav-dim); line-height: 1.4; }
.kpi b { display: block; font-family: var(--num); font-size: 25px; color: #fff; line-height: 1.25; }
.kpi b small { font-size: 13px; font-family: var(--sans); font-weight: 500; color: var(--nav-dim); margin-left: 3px; }
.kpi .big { grid-column: span 2; background: rgba(247,213,96,.13); }
.kpi .big b { color: var(--gold); font-size: 32px; }
.calc-out .small { color: var(--nav-dim); margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--go); background: var(--go); color: #fff;
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.btn:hover { background: var(--go-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2a2108; }
.btn.block { width: 100%; margin-top: 12px; }

/* ============ 杂项 ============ */
.src { font-size: 12.5px; color: var(--muted); }
.src a { color: var(--muted); }
.fig { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 12px 0; text-align: center; }
.fig img { max-height: 620px; border-radius: 4px; }
.fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
figure { margin: 0; }
.cfg-val { white-space: pre-wrap; }
.cfg-empty { color: var(--red); font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 14px 0 0; }
.toc a { font-size: 13px; text-decoration: none; background: #ecebe6; color: #33404b; padding: 3px 10px; border-radius: 6px; }
.toc a:hover { background: var(--ink); color: #fff; }
.empty { padding: 18px; text-align: center; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: #ecebe6; padding: 1px 5px; border-radius: 4px; }
pre.code { background: #14251e; color: #d8e7df; border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; }

/* ============ 窄屏 ============ */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rhythm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: none; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .top, .main { margin-left: 0; }
  .results { left: 0; }
  .menu-btn { display: block; }
  .search kbd { display: none; }
  .calc, .g2, .g3, .do-dont, .quick { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
  .stage-head { grid-template-columns: 46px minmax(0, 1fr); }
  .stage-no { font-size: 38px; }
  .bubble { padding-right: 14px; padding-bottom: 34px; }
  .bubble::after { top: auto; bottom: 8px; }
  .top-btn span.long { display: none; }
}

/* ============ 导航分组（第二版） ============ */
.side nav .grp { font-size: 11px; letter-spacing: .16em; color: var(--nav-dim); padding: 13px 10px 4px; opacity: .8; }
.side nav a { padding: 6px 10px; }
.side nav a.sub { padding: 4px 10px 4px 18px; font-size: 13px; color: #b5cbc0; }
.side nav a.sub .no { width: 22px; height: 6px; background: none; position: relative; }
.side nav a.sub .no::after { content: ""; position: absolute; left: 8px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.22); }
.side nav a.sub[aria-current="page"] .no { background: none; }
.side nav a.sub[aria-current="page"] .no::after { background: var(--gold); }
.side nav a em { font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--gold); color: #2a2108; border-radius: 4px; padding: 0 5px; margin-left: auto; line-height: 1.6; }

/* ============ 图：外框 ============ */
.diagram { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin: 14px 0 18px; overflow: hidden; }
.diagram-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 14px; padding: 12px 18px 10px; border-bottom: 1px solid var(--line-soft); }
.diagram-head h4 { font-size: 15px; }
.diagram-head span { font-size: 12px; color: var(--faint); }
.diagram-body { overflow-x: auto; padding: 22px 20px 22px; }
.diagram-foot { padding: 9px 18px 11px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg i { display: inline-block; width: 18px; height: 12px; border-radius: 4px; border: 1.5px solid #cfd6d2; background: #fff; }
.lg i.k-step { border-color: var(--go); border-left-width: 5px; }
.lg i.k-ask { background: var(--amber-soft); border-color: #dcae2c; border-radius: 7px; }
.lg i.k-say { background: #eef0f1; border-color: #d3d8dc; }
.lg i.k-prod { background: var(--go-soft); border-color: var(--go-line); }
.lg i.k-ref { border-style: dashed; border-color: #b3bdb8; }

/* ============ 流程图 ============ */
.flowc { position: relative; display: grid; column-gap: 48px; row-gap: 40px; align-items: stretch; justify-content: center; }   /* 图比框窄时居中，不贴在左边 */
.fl-node {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; text-align: center;
  background: #fff; border: 1.5px solid #cfd6d2; border-radius: 10px; padding: 9px 12px; min-height: 48px;
  font-size: 13.5px; line-height: 1.5; color: var(--ink); text-decoration: none;
}
.fl-node b { font-weight: 700; }
.fl-in { display: block; }
.fl-node small { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
a.fl-node { transition: box-shadow .12s, border-color .12s, transform .12s; }
a.fl-node:hover { border-color: var(--go); box-shadow: 0 4px 14px rgba(14,42,33,.13); transform: translateY(-1px); }
a.fl-node::after { content: "›"; position: absolute; right: 7px; top: 3px; font-size: 14px; color: var(--faint); line-height: 1; }
.fl-node .no {
  position: absolute; left: -1.5px; top: -11px; font-style: normal; font-family: var(--num); font-size: 12px; font-weight: 700; line-height: 1;
  background: var(--go); color: #fff; border-radius: 6px; padding: 3px 7px;
}
.fl-node.k-start { background: var(--nav); border-color: var(--nav); color: #fff; border-radius: 999px; }
.fl-node.k-start small { color: var(--nav-dim); }
.fl-node.k-step { border-color: var(--go); border-left-width: 5px; }
.fl-node.k-ask { background: var(--amber-soft); border-color: #dcae2c; border-radius: 24px; }
.fl-node.k-ask b::before { content: "？"; color: var(--amber); margin-right: 2px; }
.fl-node.k-say { background: #eef0f1; border-color: #d3d8dc; }
.fl-node.k-prod { background: var(--go-soft); border-color: var(--go-line); }
.fl-node.k-prod b { color: var(--go-deep); }
.fl-node.k-ref { background: transparent; border-style: dashed; border-color: #b3bdb8; }
.fl-node.k-ref b { font-weight: 600; color: #3d4852; }
.fl-node.k-warn { background: var(--red-soft); border-color: var(--red-line); }
.fl-node.k-end { background: var(--gold); border-color: #e3bd38; color: #2a2108; border-radius: 999px; }
.fl-node.k-end small { color: #6a5512; }
.fl-node .fl-tag { position: absolute; right: -1.5px; top: -11px; font-style: normal; font-size: 11px; font-weight: 700; line-height: 1; background: var(--gold); color: #2a2108; border-radius: 6px; padding: 3px 6px; }
.fl-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 0; }
.fl-svg path.ed { fill: none; stroke: #7c8a84; stroke-width: 1.6; }
.fl-svg path.ed.dash { stroke: #aab4af; stroke-dasharray: 5 4; }
.fl-svg path.ah { fill: #7c8a84; stroke: none; }
.fl-svg text { font-size: 12px; font-weight: 700; fill: var(--amber); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; font-family: var(--sans); }

/* ============ 思维导图 ============ */
.mm, .mm ul { list-style: none; margin: 0; padding: 0; }
.mm { display: inline-flex; min-width: max-content; }
.mm li { position: relative; display: flex; align-items: center; margin: 0; padding: 3px 0 3px 18px; }
.mm > li { padding: 0; }
.mm li > ul { position: relative; display: flex; flex-direction: column; justify-content: center; margin-left: 18px; }
.mm li > ul::before { content: ""; position: absolute; left: -18px; top: 50%; width: 18px; border-top: 1.5px solid var(--c, #b3bdb8); }
.mm ul > li::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; border-top: 1.5px solid var(--c, #b3bdb8); }
.mm ul > li::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px solid var(--c, #b3bdb8); }
.mm ul > li:first-child::after { top: 50%; }
.mm ul > li:last-child::after { bottom: 50%; }
.mm ul > li:only-child::after { display: none; }
.mm > li > ul > li::after { border-color: #b3bdb8; }
.mm-node {
  display: inline-block; max-width: 268px; padding: 3px 4px 2px; font-size: 13px; line-height: 1.5; color: var(--ink);
  text-decoration: none; border-bottom: 1.5px solid var(--c, #b3bdb8); white-space: normal; margin-top: -1px;
}
.mm-node small { display: block; font-size: 11.5px; font-weight: 400; opacity: .82; line-height: 1.45; }
a.mm-node:hover { background: var(--cs, #eef0f1); border-radius: 5px 5px 0 0; }
.mm > li > .mm-node { background: var(--nav); color: #fff; border: 0; border-radius: 12px; padding: 11px 16px; font-size: 16px; font-weight: 700; max-width: 168px; text-align: center; margin: 0; }
.mm > li > .mm-node small { color: var(--nav-dim); opacity: 1; margin-top: 2px; }
.mm > li > ul > li > .mm-node { background: var(--c); color: #fff; border: 0; border-radius: 8px; padding: 5px 12px; font-size: 14px; font-weight: 700; max-width: 190px; margin: 0; }
.mm > li > ul > li > a.mm-node:hover { background: var(--c); filter: brightness(1.12); border-radius: 8px; }
.mm > li > ul > li > ul > li > .mm-node { background: var(--cs); border: 1px solid var(--c); border-radius: 7px; padding: 3px 9px; font-weight: 600; margin: 0; }
.mm > li > ul > li > ul > li > a.mm-node:hover { border-radius: 7px; filter: brightness(.97); }
.mm-node i { font-style: normal; opacity: .55; margin-left: 4px; }

/* ============ 产品页 ============ */
.p-lines { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.p-line { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c, var(--go)); border-radius: var(--radius); padding: 13px 15px 14px; }
.p-line .st { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--c, var(--go-deep)); }
.p-line h4 { font-size: 16.5px; margin: 3px 0 4px; }
.p-line p { font-size: 13px; line-height: 1.65; color: #3d4852; margin: 0 0 8px; }
.p-line .pr { font-family: var(--num); font-size: 19px; font-weight: 700; margin-top: auto; }
.p-line .pr small { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.p-line .go { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.p-line .go a { font-size: 12.5px; font-weight: 600; text-decoration: none; background: #ecebe6; color: #33404b; border-radius: 6px; padding: 3px 9px; }
.p-line .go a:hover { background: var(--ink); color: #fff; }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 14px; }
.path span { background: var(--paper); border: 1px solid var(--go-line); border-radius: 7px; padding: 4px 11px; font-size: 13.5px; }
.path span b { font-family: var(--num); color: var(--go-deep); margin-right: 6px; }
.path i { font-style: normal; color: var(--faint); }
.pt-no { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--ink); color: #fff; font-family: var(--num); font-size: 13px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.pt-benefit { font-size: 14px; margin: 6px 0 0; }
.pt-benefit b { color: var(--go-deep); margin-right: 6px; }
.p-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.p-nav a { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 15px; }
.p-nav a:hover { border-color: var(--go); }
.p-nav a small { display: block; font-size: 12px; color: var(--muted); }
.p-nav a b { font-size: 15px; }
.p-nav a.next { text-align: right; }
.gate6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.gate6 .card { border-top: 4px solid var(--c, var(--go)); }
.gate6 .card h4 { font-size: 16px; }
.gate6 .card h4 span { font-family: var(--num); color: var(--c, var(--go-deep)); margin-right: 7px; }
.gate6 .card p { font-size: 13.5px; margin: 5px 0 0; line-height: 1.65; }
.gate6 .card .lk { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.gate6 .card .lk a { font-size: 12px; text-decoration: none; background: #ecebe6; color: #33404b; border-radius: 5px; padding: 2px 8px; }
.gate6 .card .lk a:hover { background: var(--ink); color: #fff; }
.check { list-style: none; padding: 0; margin: 8px 0; }
.check li { position: relative; padding: 3px 0 3px 26px; margin: 0; }
.check li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 13px; height: 13px; border: 1.5px solid #9aa5ae; border-radius: 3px; background: #fff; }

@media (max-width: 980px) {
  .p-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .p-lines, .gate6, .p-nav { grid-template-columns: 1fr; }
  .diagram-body { padding: 18px 14px; }
  .fl-wide .fl-in { position: sticky; left: 6px; right: 6px; align-self: center; max-width: calc(100vw - 96px); }
}

/* ============ 本页快捷切换条（吸在顶栏正下面） ============
   页面太长时用：滚过页头那排目录之后出现，横着一行，多了左右滑。
   有目录的页面放目录那几项；话术库、问答库放阶段 / 分类的筛选标签。
   颜色全部走变量，换主题自动跟着变。 */
.qnav {
  position: fixed; z-index: 18; top: var(--top-h); left: var(--side); right: 0; height: 42px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--pad-x);
  background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  /* 平时缩在顶栏后面，加上 .on 才滑出来 */
  transform: translateY(-100%); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .16s ease, opacity .16s ease, visibility 0s linear .16s;
}
.qnav.on { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform .16s ease, opacity .16s ease; }
.qnav[hidden], .qnav-mode[hidden] { display: none; }
/* 最左边：页面名（点一下回到本页开头） */
.qnav-page {
  flex: none; max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0; border-right: 1px solid var(--line); background: none; padding: 0 12px 0 0;
  font-size: 13px; font-weight: 700; line-height: 20px; color: var(--ink);
}
/* 强调色写成 var(--brand, var(--go))：themes.css 里的主题点缀色有就用它，没有就是原来的绿色 */
.qnav-page:hover { color: var(--brand-ink, var(--go-deep)); }
/* 问答库：最左边是筛选框 */
.qnav-q {
  flex: none; width: 168px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 13px;
}
.qnav-q:focus { outline: none; border-color: var(--brand, var(--go)); }
/* 中间：一行标签，左右滑 */
.qnav-rail { position: relative; flex: 1; min-width: 0; height: 100%; }
.qnav-list {
  position: relative; display: flex; align-items: center; gap: 2px; height: 100%;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.qnav-list::-webkit-scrollbar { display: none; }
.qnav-i {
  flex: none; height: 28px; padding: 0 10px; line-height: 26px;
  border: 1px solid transparent; border-radius: 7px; background: none;
  font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap;
  max-width: 15em; overflow: hidden; text-overflow: ellipsis;   /* 标签太长（聊天示范的标题）就省略，鼠标放上去看全名 */
}
.qnav-i:hover { color: var(--ink); background: var(--line-soft); }
.qnav-i em { font-style: normal; font-family: var(--num); font-size: 12px; color: var(--faint); margin-left: 4px; }
/* on = 现在在这一节（筛选页：选中的筛选）；at = 筛选页“全部”视图里滚到了这一类 */
.qnav-i.on { color: var(--ink); font-weight: 700; background: var(--paper); border-color: var(--line); box-shadow: inset 0 -2px 0 var(--brand, var(--go)); }
.qnav-i.at { color: var(--brand-ink, var(--go-deep)); font-weight: 700; box-shadow: inset 0 -2px 0 var(--brand, var(--go)); }
/* 两头的小箭头：那边还有内容才出来，后面带一段渐隐 */
.qnav-arr {
  display: none; position: absolute; z-index: 1; top: 0; bottom: 0; width: 34px;
  border: 0; padding: 0; font-size: 18px; line-height: 1; color: var(--muted);
}
.qnav-arr:hover { color: var(--ink); }
.qnav-arr.l { left: 0; text-align: left; background: linear-gradient(90deg, var(--bg) 50%, transparent); }
.qnav-arr.r { right: 0; text-align: right; background: linear-gradient(270deg, var(--bg) 50%, transparent); }
.qnav-rail.can-l .qnav-arr.l, .qnav-rail.can-r .qnav-arr.r { display: block; }
/* 最右边：整页 / 分节 */
.qnav-mode { flex: none; display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.qnav-mode button {
  height: 24px; padding: 0 9px; border: 0; border-radius: 6px; background: none;
  font-size: 12.5px; line-height: 24px; color: var(--muted); white-space: nowrap;
}
.qnav-mode button:hover { color: var(--ink); }
.qnav-mode button.on { background: var(--ink); color: var(--paper); font-weight: 600; }

/* ============ 只看本节（分节模式） ============
   脚本给每一块内容打记号 data-sec；不是当前这一节的带 .sec-off。 */
@media screen {
  body.sec-on .sec-off { display: none !important; }
  body.sec-on .doc .toc { display: none; }                      /* 切换条一直在，页面里那排目录就不重复了 */
  body.sec-on .main { padding-top: calc(30px + var(--qnav-h)); }
  body.sec-on .sec-first, body.sec-on .sec-first > h2:first-child { margin-top: 0; }
  body.sec-on .stage.sec-first { border-top: 0; padding-top: 0; }
}
.sec-pager { display: none; grid-template-columns: 1fr 1fr; gap: 12px; margin: 34px 0 0; }
body.sec-on .sec-pager { display: grid; }
.sec-pager a { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 15px; }
.sec-pager a:hover { border-color: var(--brand, var(--go)); }
.sec-pager a small { display: block; font-size: 12px; color: var(--muted); }
.sec-pager a b { font-size: 15px; }
.sec-pager a.next { text-align: right; }
.sec-pager + .p-nav { margin-top: 12px; }

/* ============ 回到顶部 ============ */
.to-top {
  position: fixed; z-index: 17; right: 18px; bottom: 22px; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink);
  font-size: 17px; line-height: 1;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s, transform .16s, visibility 0s linear .16s;
}
.to-top.on { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
.to-top:hover { border-color: var(--brand, var(--go)); color: var(--brand-ink, var(--go-deep)); }

a.top-btn { line-height: 38px; }   /* “待确认”是个链接，让字在按钮里上下居中 */

@media (max-width: 820px) {
  .qnav { left: 0; gap: 8px; padding: 0 12px; }
  .qnav-page { display: none; }
  .qnav-q { width: 104px; }
  .qnav-i { padding: 0 9px; }
  .qnav-mode button { padding: 0 7px; }
  .to-top { right: 12px; bottom: 16px; }
}
/* 手机宽度：顶栏收紧，保证“目录 + 搜索 + 填空 + 待确认 + 主题按钮”排在一行里 */
@media (max-width: 560px) {
  .top { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .menu-btn { padding: 6px 8px; }
  .top-btn { padding: 0 10px; }
  .top-btn .mid { display: none; }
  .top-btn .who { display: inline-block; max-width: 4.5em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .search input { padding-right: 10px; }
}

/* ============ 宽屏：版心放宽，卡片排成多列 ============
   手册是在电脑浏览器里当系统用的，不是一篇从上读到下的文档。屏幕够宽时：
   1360 以上：版心 1440，话术 / 问答 / 套路 / 卖点 / 示范卡片排两列；
   1680 以上：首页八个步骤排成一行；
   2100 以上：版心 1760，卡片排三列。
   做法：把装卡片的容器变成网格，标题、说明、表格这些照旧占满一整行，只有卡片各占一格。 */
@media (max-width: 820px) {
  :root { --pad-x: var(--gut); }
  /* 手机上三列以上的表格不硬挤（一格只剩两三个字、一行拉得老长），保持一个能读的宽度，左右滑着看 */
  .table-wrap table:has(tr > :nth-child(3)) { min-width: 560px; }
  .table-wrap table:has(tr > :nth-child(4)) { min-width: 700px; }
  .table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
}
@media (min-width: 1360px) {
  :root { --doc-w: 1440px; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  #scripts-list > section, #tactics-root > section, #faq-list, #product-root, #cases-root, .stage {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-items: start;
  }
  #scripts-list > section > *, #tactics-root > section > *, #faq-list > *, #product-root > *, #cases-root > *, .stage > * {
    grid-column: 1 / -1; min-width: 0;
  }
  #scripts-list > section > article, #tactics-root > section > article, #faq-list > article,
  #product-root > article, #product-root > .bubble, #cases-root > .case,
  .stage > [data-say], .stage > [data-faq], .stage > [data-tactic] { grid-column: auto; }   /* 成交流程里嵌进来的话术卡 */
  #scripts-list > section > article, #tactics-root > section > article, #faq-list > article, #product-root > article { margin: 0 0 14px; }
  #product-root > .bubble { margin: 0 0 10px; }
  #cases-root > .case { margin: 18px 0 0; }
  /* 分节模式下一次只看一段示范，占半边太空，放回一整行、限个宽度 */
  body.sec-on #cases-root > .case { grid-column: 1 / -1; max-width: 900px; }
}
@media (min-width: 1680px) {
  .steps { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (min-width: 2100px) {
  :root { --doc-w: 1760px; }
  .quick { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #scripts-list > section, #tactics-root > section, #faq-list, #product-root, .stage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============ 不提供打印和导出 ============
   手册只在浏览器里看。按打印（也就是“另存为 PDF”）只会得到下面这一句话。 */
@media print {
  body > * { display: none !important; }
  body::before { content: "本手册只在浏览器里查看，不提供打印和导出。"; display: block; padding: 48px; font-size: 16px; color: #000; }
}
