:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #e3e8ef;
  --line-strong: #cfd8e3;
  --ink: #0f1720;
  --ink-2: #55616f;
  --ink-3: #8794a3;
  /* 与 kcgeo.net 同一套：藏青主色 + 品牌蓝强调 */
  --brand: #0a2540;
  --brand-2: #14375a;
  --brand-soft: #eaf1f8;
  --accent: #1f6feb;
  --accent-soft: #eaf2fe;
  /* 语义色只有一套：绿 = 正常/好/涨，红 = 问题/差/跌，橙 = 警告。
     品牌色不参与"好坏"判断，避免同一屏里红色既表示"涨"又表示"需处理"。 */
  --pos: #1f7a4d;
  --pos-soft: #e7f4ed;
  --neg: #c0392b;
  --neg-soft: #fbeae7;
  /* 旧变量名保留为别名：--up 实际是"问题色"，--down 是"正常色" */
  --up: var(--neg);
  --up-soft: var(--neg-soft);
  --down: var(--pos);
  --down-soft: var(--pos-soft);
  --warn: #b7791f;
  --warn-soft: #fdf3e2;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 版式：左侧 176px 导航 + 右侧内容
   侧栏比早期的 224px 窄 48px，正文因此还能保持 1200 宽——"左导航"和"正文被挤窄"
   是两个问题，不该因为前者放弃后者。 */
.app { display: grid; grid-template-columns: 176px minmax(0, 1fr); min-height: 100vh; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 10px 12px;
  /* 窗口很矮时导航不该被裁掉，让它自己滚 */
  overflow-y: auto;
  background: #f9fbfd;
  border-right: 1px solid var(--line);
}

.brand { padding: 0 8px; display: flex; align-items: center; gap: 9px; flex: none; }
.brand img { border-radius: 8px; flex-shrink: 0; }
/* 字标与官网一致：口传 + GEO，GEO 用品牌蓝，字重 800 */
.brand h1 { font-size: 15px; margin: 0; letter-spacing: -.01em; font-weight: 800; color: var(--ink); }
.brand h1 b { color: var(--accent); font-weight: 800; }
.brand .sub { font-size: 10px; color: var(--ink-3); letter-spacing: .2px; margin-top: 1px; }

/* 作用域：项目切换放在最上面，它决定下面整组"项目"内容属于谁。
   不用原生 select：系统下拉会盖住 logo、字号不受控，项目名还会被截断。 */
.scope { position: relative; padding: 14px 4px 0; }
.proj-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 7px 8px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.proj-trigger:hover { border-color: var(--line-strong); background: #fbfcfe; }
.scope.open .proj-trigger { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 111, 235, .1); }
/* 不留头像位：176px 里多一个 22px 方块，项目名就会被拆成"云雀笔记（示 / 例）" */
.proj-meta { min-width: 0; flex: 1; }
.proj-label {
  display: block; font-size: 9.5px; color: var(--ink-3);
  letter-spacing: .08em; line-height: 1.3;
}
/* 项目名最多两行，不截成"云雀笔记（…" */
.proj-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12.5px; font-weight: 650; color: var(--ink);
  line-height: 1.35; word-break: break-word;
}
.proj-trigger .caret {
  width: 12px; height: 12px; flex: none; color: var(--ink-3);
  transition: transform .15s;
}
.scope.open .proj-trigger .caret { transform: rotate(180deg); }

.proj-pop {
  position: absolute;
  left: 4px; right: 4px; top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 32, .16);
  padding: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .13s ease, transform .13s ease, visibility .13s;
  z-index: 60;
}
.scope.open .proj-pop { opacity: 1; visibility: visible; transform: none; }

.proj-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
}
.proj-item:hover { background: #eef3f9; color: var(--ink); }
.proj-item.on { color: var(--brand); font-weight: 650; }
.proj-item .ck { width: 12px; height: 12px; flex: none; margin-top: 3px; opacity: 0; }
.proj-item.on .ck { opacity: 1; }

.proj-pop-foot {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proj-pop-foot button {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-2);
  text-align: left;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.proj-pop-foot button:hover { background: #eef3f9; color: var(--ink); }
.proj-pop-foot button#projDel:hover { background: #fdf2f0; color: var(--neg); }

/* 导航分两组：项目（随项目变）/ 系统（全局，固定底部） */
/* 第一组不再加分组标签：上面的「当前品牌」卡片已经声明了作用域，再标一次只是重复 */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; margin-top: 14px; }
.nav-label {
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ink-3);
  font-weight: 700;
  padding: 0 10px;
  margin: 16px 0 4px;
}
/* 系统组沉到底部：它不是流程的一步，而是"一直在这儿"的入口 */
.nav-label.sys { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.nav button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav button svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.nav button:hover { background: #eef3f9; color: var(--ink); }
/* 选中态用浅底 + 藏青字：导航是配角，不该抢走标题和分数的主次 */
.nav button.on { background: #e2ebf7; color: var(--brand); font-weight: 650; }
.nav button.on svg { opacity: 1; }
.nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* AI 平台：不是"设置"，是"跳出去提问"。做成菜单而不是下拉框：
   悬停即展开，点名字直接开新标签，不用先点开再选一次。 */
.plat-row { position: relative; }
.plat-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  padding: 8px 24px 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  position: relative;
  transition: background .12s, color .12s;
}
.plat-trigger:hover,
.plat-row.open .plat-trigger { background: #eef3f9; color: var(--ink); }
.plat-trigger .ico { width: 16px; height: 16px; flex: none; opacity: .7; }
.plat-trigger .caret {
  position: absolute; right: 10px; top: 50%;
  width: 12px; height: 12px; color: var(--ink-3);
  transform: translateY(-50%);
  transition: transform .15s;
}
.plat-row:hover .plat-trigger .caret,
.plat-row.open .plat-trigger .caret { transform: translateY(-50%) rotate(180deg); }

/* 贴住触发项上沿，不留缝：留缝的话鼠标移动途中会丢失 hover，浮层闪一下就没 */
.plat-pop {
  position: absolute;
  left: 0; right: 0; bottom: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 32, .14);
  padding: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .13s ease, transform .13s ease, visibility .13s;
  z-index: 60;
}
.plat-row:hover .plat-pop,
.plat-row.open .plat-pop,
.plat-row:focus-within .plat-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.plat-pop a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
}
.plat-pop a:hover,
.plat-pop a:focus-visible { background: #eef3f9; color: var(--ink); outline: 0; }
.plat-pop a .go { margin-left: auto; font-size: 11px; color: var(--ink-3); }

/* 最底下只有一句状态：数据从哪来、有多少条 */
.side-foot { padding: 10px 10px 2px; border-top: 1px solid var(--line); }
.foot-stats { margin: 0; font-size: 11px; color: var(--ink-3); line-height: 1.5; }

/* ---------- 主区 ---------- */
main { padding: 26px 32px 72px; max-width: 1200px; margin: 0 auto; width: 100%; }
.view { display: none; }
.view.on { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hd { margin-bottom: 20px; }
.hd h2 { margin: 0 0 4px; font-size: 20px; font-weight: 650; letter-spacing: -.2px; }
.hd p { margin: 0; color: var(--ink-2); font-size: 13px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.card.tight { padding: 14px 16px; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 650; }
.card h3 .hint { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 8px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---------- 表单 ---------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 84, 74, .09);
}
textarea { resize: vertical; min-height: 90px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
input:disabled, select:disabled { background: #f5f5f2; color: var(--ink-3); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .12s;
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); background: #fbfbf9; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.btn.danger { color: var(--up); border-color: #e2c4bd; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 11.5px;
  background: #eef2f7; color: var(--ink-2); white-space: nowrap;
}
.badge.b-up { background: var(--up-soft); color: var(--up); }
.badge.b-down { background: var(--down-soft); color: var(--down); }
.badge.b-pos { background: var(--pos-soft); color: var(--pos); }
.badge.b-neg { background: var(--neg-soft); color: var(--neg); }
.badge.b-warn { background: var(--warn-soft); color: var(--warn); }
.badge.b-brand { background: var(--brand-soft); color: var(--brand); }
.badge.b-gray { background: #eef2f7; color: var(--ink-3); }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: none; letter-spacing: .3px; }
tbody tr:hover { background: #fbfbf9; }
td.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }
.up { color: var(--up); }
.down { color: var(--down); }
/* 涨跌用独立类：不再复用 .up/.down（那两个已经被「✕ 失败 / ✓ 通过」占用） */
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--ink-3); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k { font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.kpi .v { font-size: 24px; font-weight: 620; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .d { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------- 引擎卡 ---------- */
.engine {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.engine.on { border-color: #bcd3ce; box-shadow: 0 0 0 1px #bcd3ce inset; }
.engine .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.engine .name { font-weight: 650; font-size: 14.5px; }
.engine .vendor { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.engine .note { font-size: 12px; color: var(--ink-2); line-height: 1.55; background: #fafaf7; border-radius: 7px; padding: 8px 10px; }
.engine .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.engine .keys { display: flex; gap: 8px; }
.engine .keys input { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { width: auto; }

/* ---------- 进度 ---------- */
.bar { height: 6px; background: #eeede8; border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s; }
.log { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: #fafaf7; border-radius: 7px; padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; }

/* ---------- 诊断项 ---------- */
.finding { border-left: 3px solid var(--line-strong); padding: 10px 0 10px 14px; margin-bottom: 12px; }
.finding.fail { border-color: var(--up); }
.finding.warn { border-color: var(--warn); }
.finding.pass { border-color: var(--down); }
.finding .ft { font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.finding .fm { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.finding ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; }
.finding .act { margin-top: 6px; font-size: 12.5px; color: var(--brand); }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0f1720; color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .22s; z-index: 99;
  max-width: 70vw;
}
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: #8c2f24; }

.empty { text-align: center; color: var(--ink-3); padding: 40px 20px; font-size: 13px; }
code.inline { font-family: var(--mono); background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 项目切换器 */
.proj-switch { display: flex; gap: 4px; margin-top: 10px; }
.proj-switch select {
  flex: 1; min-width: 0;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 4px 6px; font-size: 12px;
}
.proj-switch button { flex: 0 0 auto; padding: 4px 6px; }

/* ---------- 权重档位 ----------
 * 店主不理解 1.2 和 0.8 的差别，但理解「核心/重要/一般」。
 * 数字仍然显示在右边，是给懂的人核对用的，不作为输入项。 */
.tier { display: flex; align-items: center; gap: 6px; }
.tier select { width: auto; padding: 4px 6px; font-size: 12px; }
.tier span { font-size: 11.5px; font-variant-numeric: tabular-nums; min-width: 22px; }

/* ---------- AI 推荐健康分 ---------- */
.scorecard { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.score-left { min-width: 176px; }
.score-big { font-size: 46px; font-weight: 650; letter-spacing: -2px; line-height: 1.06; font-variant-numeric: tabular-nums; }
.score-big span { font-size: 14px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.score-right { flex: 1; min-width: 320px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
@media (max-width: 980px) { .score-right { grid-template-columns: 1fr; } }
.score-part .sp-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; margin-bottom: 4px; }
.score-part .sp-h .muted { font-variant-numeric: tabular-nums; font-size: 12px; }
.score-part .sp-t { height: 6px; background: #eeede8; border-radius: 4px; overflow: hidden; }
.score-part .sp-t i { display: block; height: 100%; background: var(--brand); opacity: .82; border-radius: 4px; }
.score-part .sp-n { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------- 上期诊断对比 ---------- */
.dgroup { margin-bottom: 12px; }
.dgroup:last-of-type { margin-bottom: 4px; }
.dg-h { font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.dg-h .muted { font-weight: 400; font-size: 11.5px; margin-left: 4px; }
.drow {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 5px 0 5px 2px; border-top: 1px dashed #eceae3; font-size: 12.5px;
}
.drow .dname { font-weight: 550; }
.drow .dnote { flex: 1; min-width: 180px; font-size: 11.5px; line-height: 1.5; }

/* ---------- 发布要点（体检通过后、按下发布前） ---------- */
.pt-card {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid #cfdcf0; border-left: 3px solid var(--accent);
  border-radius: 10px; background: #fff;
}
.pt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-head b { font-size: 13px; }
.pt-head .btn { margin-left: auto; }
.pt-list {
  margin: 8px 0 0; padding-left: 20px;
  font-size: 12.5px; line-height: 1.65;
}
.pt-list li { margin-bottom: 6px; }
.pt-list li b { font-weight: 600; }
.pt-list .pt-why { color: var(--ink-3); font-size: 11.5px; line-height: 1.55; }
.pt-common { margin-top: 8px; }
.pt-common > summary {
  cursor: pointer; font-size: 12px; color: var(--ink-2);
  padding: 4px 0; list-style: none;
}
.pt-common > summary::-webkit-details-marker { display: none; }
.pt-common > summary::before { content: "▸ "; color: var(--ink-3); }
.pt-common[open] > summary::before { content: "▾ "; }

/* ---------- 转载 / 同步地址 ---------- */
.au-row { display: flex; gap: 6px; margin-bottom: 6px; }
.au-row input { flex: 1; min-width: 0; }
.au-row .btn { flex: none; padding: 0 10px; }
.au-tag {
  margin-left: 6px; font-size: 10.5px; color: var(--accent);
  background: var(--accent-soft); border-radius: 10px; padding: 0 6px;
  white-space: nowrap; cursor: help;
}

/* ---------- 信源对照清单（模块级合格度，不是单篇流水线） ---------- */
.src-audit {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 0 14px; margin-bottom: 10px;
}
.src-audit > summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 0; cursor: pointer; list-style: none; font-size: 13.5px;
}
.src-audit > summary::-webkit-details-marker { display: none; }
.src-audit .sa-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
}
.sa-dot.todo { background: var(--neg); box-shadow: 0 0 0 3px var(--neg-soft); }
.sa-dot.ok { background: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }
.src-audit .sa-meta { color: var(--ink-3); font-size: 12px; }
.src-audit .sa-arrow {
  margin-left: auto; font-size: 11.5px; color: var(--ink-3);
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px;
}
.sa-body { padding: 2px 0 10px; }
.sa-group + .sa-group { margin-top: 4px; }
.sa-glabel {
  font-size: 11px; letter-spacing: .06em; color: var(--ink-3);
  padding: 6px 0 2px;
}
.sa-row {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 6px 0; border-top: 1px dashed #eceae3; font-size: 12.5px;
}
.sa-row .sa-ico {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; align-self: center;
  background: var(--neg-soft); color: var(--neg);
}
.sa-row.ok .sa-ico { background: var(--pos-soft); color: var(--pos); }
.sa-row .sa-title { min-width: 72px; }
.sa-row .sa-now { color: var(--ink); font-variant-numeric: tabular-nums; }
.sa-row.ok .sa-now { color: var(--ink-2); }
.sa-row .sa-why { flex: 1; min-width: 220px; color: var(--ink-3); font-size: 11.5px; line-height: 1.55; }
.sa-foot { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- 平台推荐：按类型分组（可折叠） ---------- */
.adv-groups { display: grid; gap: 8px; }
.adv-group {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 0 12px;
}
.adv-group > summary {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; cursor: pointer; list-style: none;
}
.adv-group > summary::-webkit-details-marker { display: none; }
.adv-group > summary::before {
  content: "▸"; color: var(--ink-3); font-size: 11px; transition: transform .15s;
  /* 折叠标记与标题基线对齐，避免整行高度抖动 */
  display: inline-block;
}
.adv-group[open] > summary::before { transform: rotate(90deg); }
.adv-group > summary b { font-size: 13.5px; }
.adv-group .adv-meta { font-size: 11.5px; color: var(--ink-3); }
.adv-group .adv-desc { font-size: 11.5px; color: var(--ink-3); flex: 1; min-width: 200px; }
.adv-rows { padding-bottom: 6px; }
.adv-empty {
  font-size: 12px; line-height: 1.65; color: var(--ink-2);
  background: #f8fafd; border: 1px solid #e3eaf4; border-radius: 8px;
  padding: 7px 10px; margin-bottom: 2px;
}
.adv-rows .drow:first-child { border-top: 1px solid #f0eee8; }
.adv-others { margin-top: 10px; background: #f8fafd; border-color: #dbe3ee; }
.adv-others table { margin-top: 2px; }
.adv-others td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 同平台重复登记的软提示：跟着平台下拉走，不挡保存 */
.plat-hint {
  display: block; margin-top: 4px;
  font-size: 11.5px; line-height: 1.55; color: var(--warn);
}
.plat-hint[hidden] { display: none; }

/* 剪贴板不可用时的退路：把纯文本摊出来手动复制 */
.plain-fallback { margin: 8px 0 0; }
.plain-fallback textarea { width: 100%; min-height: 220px; font-size: 12.5px; line-height: 1.7; }

/* ---------- 状态带：就绪度 / 计数 / 下一步 收进一条 ---------- */
.status-band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 14px 10px;
  margin-bottom: 14px;
}
/* 带子里的三段不再各自带边框：它们是一条带子的三行，不是三张卡 */
.status-band .src-audit { border: 0; border-radius: 0; padding: 0; margin: 0; }
.status-band .flow { border: 0; border-radius: 0; margin: 0; padding: 4px 0 6px; background: transparent; }
.status-band .a-next {
  margin: 0; padding: 8px 10px;
  border: 0; border-radius: 8px;
  background: var(--accent-soft);
}
.status-band > * + * { border-top: 1px solid var(--line); }
.status-band .sa-arrow { margin-left: auto; }
/* 带子里的"本期被引"不要再画一个方框：它在一条横向计数里，画框会像另一个卡片 */
.status-band .flow-step.result { background: transparent; border: 0; }

/* 导航末尾的工具入口：与主流程隔开，视觉上也要弱一档 */
.src-nav .nav-sep {
  width: 1px; align-self: center; height: 14px;
  background: var(--line-strong); margin: 0 8px 0 4px;
}
.src-nav button.tool { color: var(--ink-3); font-size: 12px; }
.src-nav button.tool .nav-note {
  margin-left: 5px; font-size: 10.5px; color: var(--ink-3); opacity: .75;
}
.src-nav button.tool.on { color: var(--ink-2); border-bottom-color: var(--line-strong); }

/* ---------- 内容页工作台（右侧抽屉，四个模式互斥） ---------- */
.side-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 640px; max-width: 94vw;
  display: flex; flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line-strong);
  box-shadow: -10px 0 30px rgba(15, 23, 32, .10);
  z-index: 80;
}
.side-drawer[hidden] { display: none; }
.sd-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.sd-head b { font-size: 14px; font-weight: 600; }
.sd-body { flex: 1; overflow-y: auto; padding: 14px 16px 48px; }
/* 抽屉本身就是容器，里面的面板不要再套一层卡片 */
.sd-body > .card {
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; background: transparent !important;
}
.sd-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 32, .30);
  z-index: 70;
}
.sd-mask[hidden] { display: none; }
body.drawer-open { overflow: hidden; }
/* 抽屉头已经有标题和统一出口，面板内不要再重复一遍标题与「收起」 */
.sd-body #wPanel .spread h3,
.sd-body #aImpact .spread h3 { display: none; }
.sd-body .spread > #qClose,
.sd-body .spread > #wClose,
.sd-body #aImpact .spread > .btn { display: none; }
/* 标题长时截断，不要撑破抽屉头 */
.sd-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .side-drawer { width: 100%; max-width: 100%; border-left: 0; }
  /* 窄屏先砍「发布账号」：多数行是「—」，留着会把动作列挤到屏幕外 */
  .a-acct { display: none; }
  .a-main { min-width: 0; }
}

/* ---------- 内容列表：4 列，身份压到标题下面一行 ---------- */
/* 自动列宽 + 容器兜底滚动：fixed 布局在"窄屏隐藏某列"时会把剩余列算错，
   实测会出现状态与动作两列直接消失。 */
#aList { overflow-x: auto; }
.a-table { width: 100%; }
.a-table td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.a-table td.a-main { word-break: break-word; }
.a-main { min-width: 260px; }
.a-title { font-weight: 500; line-height: 1.5; }
.a-sub {
  display: block;
  font-size: 11.5px; color: var(--ink-3);
  margin-top: 3px; line-height: 1.9;
}
.a-sub .badge { margin-left: 6px; vertical-align: 1px; }
.a-url { font-size: 11.5px; color: var(--ink-3); word-break: break-all; }
.a-acct { min-width: 92px; font-size: 12.5px; }
.a-state { white-space: nowrap; }
.a-act { white-space: nowrap; text-align: right; }
.a-act .btn { margin-left: 4px; }
.a-foot { font-size: 11.5px; margin-top: 8px; }
.a-foot span { text-decoration: underline dotted; cursor: help; }

/* 结果区的折叠块：主位只留当下该做的那一件事 */
.a-more {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.a-more > summary {
  cursor: pointer; padding: 10px 14px; list-style: none;
  font-size: 12.5px; color: var(--ink-2);
}
.a-more > summary::-webkit-details-marker { display: none; }
.a-more > summary::before { content: "▸ "; color: var(--ink-3); }
.a-more[open] > summary::before { content: "▾ "; }
.a-more-body { padding: 0 14px 12px; }
.a-more-body > .rw-card, .a-more-body > .ex-card { margin-top: 0; margin-bottom: 8px; }

/* 导出到平台：标题 / 首段 + 三种格式 */
.ex-card {
  margin-top: 10px; padding: 12px 14px;
  border: 1px solid #cfdcf0; border-left: 3px solid var(--accent);
  border-radius: 10px; background: #f8fafd;
}
.ex-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ex-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.ex-label {
  flex: 0 0 34px; font-size: 12px; color: var(--ink-3);
  padding-top: 7px;
}
.ex-row input, .ex-row textarea { flex: 1; min-width: 0; }
.ex-row textarea { min-height: 52px; }
.ex-row .btn { flex: 0 0 auto; margin-top: 1px; }

/* 体检没过：定点改稿卡。用警示色，与"可以发布"的绿边卡区分开 */
.fix-card {
  margin-top: 10px; padding: 12px 14px;
  border: 1px solid #f0dcc0; border-left: 3px solid var(--warn);
  border-radius: 10px; background: #fffdf9;
}
.fix-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fix-head .btn { margin-left: auto; }
.fix-card textarea { min-height: 240px; }

/* 一稿多发：改标题与首段的提示词卡 */
.rw-card {
  margin-top: 10px; padding: 12px 14px;
  border: 1px solid #d9e6d4; border-left: 3px solid var(--pos);
  border-radius: 10px; background: #fff;
}
.rw-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rw-warn {
  font-size: 11.5px; line-height: 1.6; color: var(--warn);
  background: var(--warn-soft); border-radius: 6px;
  padding: 5px 8px; margin-bottom: 6px;
}
.rw-head .btn { margin-left: auto; }

/* 自动通道的产物：不自动入库，先摆在这里让人核对。
   刻意用中性色，不要绿色——生成成功不等于体检通过。 */
.ai-out {
  margin-top: 8px; padding: 10px 12px;
  border: 1px solid #d8dde5; border-left: 3px solid #7a869a;
  border-radius: 8px; background: #fbfcfd;
}
.ai-out-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ai-out-head b { font-size: 12.5px; }
.ai-warn {
  font-size: 11.5px; line-height: 1.7; color: var(--warn);
  background: var(--warn-soft); border-radius: 6px;
  padding: 6px 8px; margin: 6px 0;
}
.ai-warn b { font-weight: 650; }
.ai-pend { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 6px; }
.ai-pend span {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: #fff3e2; color: #8a5a12; border: 1px solid #f0dcc0;
}
.ai-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ai-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* 体检结论：主结论是"能不能发"，不是分数 */
.lint-head {
  font-size: 17px; font-weight: 650; letter-spacing: -.01em; line-height: 1.4;
}
.lint-head.bad { color: var(--neg); }
.lint-head.warn { color: var(--warn); }
.lint-head.ok { color: var(--pos); }

/* 自定义平台登记表单：内嵌在"未归类来源"里，不弹窗 */
.cp-form {
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid #cfdcf0; border-left: 3px solid var(--accent);
  border-radius: 8px; background: #fff;
}
.cp-form .cp-head { font-size: 12.5px; margin-bottom: 8px; }
.cp-form .cp-head b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.link-del {
  border: 0; background: none; cursor: pointer; padding: 0 2px;
  color: var(--ink-3); font-size: 11px; text-decoration: underline;
}
.link-del:hover { color: var(--neg); }

.comp-flag {
  color: var(--neg); font-size: 11.5px; font-weight: 600;
}

/* 同层其余平台：推荐只露前 3 条，其余折在这里 */
.adv-more { margin: 2px 0 6px; }
.adv-more > summary {
  cursor: pointer; font-size: 11.5px; color: var(--ink-3);
  padding: 3px 0 3px 2px; list-style: none;
}
.adv-more > summary::-webkit-details-marker { display: none; }
.adv-more > summary::before { content: "▾ "; }
.adv-more[open] > summary::before { content: "▴ "; }
.adv-more .adv-rows { padding-bottom: 2px; }

/* 「这次先不做」：不隐藏，但也不占推荐位 */
.adv-blocked {
  margin-top: 10px; border: 1px dashed var(--line-strong); border-radius: 10px;
  padding: 0 12px; background: #fbfcfd;
}
.adv-blocked > summary {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 9px 0; cursor: pointer; list-style: none; font-size: 12.5px; color: var(--ink-2);
}
.adv-blocked > summary::-webkit-details-marker { display: none; }
.adv-blocked > summary::before { content: "▸"; color: var(--ink-3); font-size: 11px; }
.adv-blocked[open] > summary::before { content: "▾"; }
.adv-blocked .adv-meta { color: var(--ink-3); font-size: 11.5px; }
.adv-blocked-body { padding-bottom: 6px; }
.adv-blocked-body .drow { font-size: 12px; }
.adv-blocked-body .dnote { color: var(--ink-3); }

/* ---------- 问题 → 内容出稿列表 ---------- */
.qrow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px dashed #eceae3;
}
.qrow:first-child { border-top: 0; padding-top: 2px; }
.qrow .qtext { flex: 1; min-width: 240px; font-size: 13px; line-height: 1.5; }
.qrow .qmeta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 采集引擎选择 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 12.5px; line-height: 1; cursor: pointer;
  padding: 7px 11px; border-radius: 999px;
  border: 0.5px solid var(--line, #e2e0d8); background: #fff; color: var(--ink-2, #5f5e5a);
}
.chip:hover { border-color: var(--ink-3, #8794a3); }
.chip.on { background: #eef2f7; border-color: #c3d2e6; color: var(--ink, #2b2a26); font-weight: 550; }
.chip.off { opacity: .72; }
.chip[disabled] { cursor: not-allowed; opacity: .4; text-decoration: line-through; }
.ehint { font-style: normal; font-size: 11.5px; color: var(--ink-3, #8794a3); margin-left: 6px; }

/* ---------- 旧设置齿轮样式（页脚已改为统计信息） ---------- */
.proj-switch button.icon {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 7px;
}
.proj-switch button.icon.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.proj-switch button.icon.on svg { stroke: #fff; }

/* ---------- 单题详情：回答原文 ---------- */
.ans {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.78;
  color: var(--ink, #2b2a26);
  background: #faf9f6;
  border: 0.5px solid var(--line, #e2e0d8);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  max-height: 560px;
  overflow: auto;
}
.ans mark.bh {
  background: #ffe6a3;
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

.ans .ah {
  font-weight: 650;
  margin: 10px 0 4px;
  color: var(--ink, #2b2a26);
}

/* ---------- 资产素材包 ---------- */
.kitblock {
  font-size: 12.5px;
  line-height: 1.55;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0.5px solid #cfdcf0;
  background: #fdfaf3;
  margin-bottom: 6px;
  color: var(--ink-2);
}
.kitblock b { display: block; font-size: 11.5px; color: var(--warn); margin-bottom: 2px; }
.kitblock.hard { border-color: #efd3cc; background: var(--up-soft); }
.kitblock.hard b { color: var(--up); }
.kitblock.ok { border-color: #cfe6da; background: var(--down-soft); }
.kitblock.ok b { color: var(--down); }

.kitreq {
  font-size: 10.5px;
  color: var(--up);
  border: 0.5px solid #efd3cc;
  border-radius: 4px;
  padding: 0 3px;
  margin-left: 4px;
  white-space: nowrap;
}

.kitpre {
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.7 var(--mono);
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  max-height: 420px;
  overflow: auto;
  margin: 0;
  color: var(--ink);
}

.kitrule { margin-bottom: 12px; font-size: 12.5px; line-height: 1.65; }
.kitrule > b { display: block; margin-bottom: 4px; color: var(--ink); }
.kitrule ol, .kitrule ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.kitrule li { margin-bottom: 3px; }

/* ==========================================================================
   概览页 v2：结论优先 + 三条证据 + 下一步动作
   与旧版并存，仅作用于 .ov2 容器内，避免影响其他视图
   ========================================================================== */
.ov2 { --good:var(--pos); --bad:var(--neg); --warm:var(--warn); }
.ov2 .ov-sec { margin-top:34px; }
.ov2 .ov-sec-head { display:flex; align-items:baseline; gap:12px; margin-bottom:14px; }
.ov2 .ov-sec-head h3 { font-size:15px; font-weight:700; margin:0; letter-spacing:.02em; }
.ov2 .ov-sec-head span { font-size:12.5px; color:var(--ink-3); }

/* 长任务条 */
.ov-task {
  display:flex; align-items:center; gap:12px;
  background:var(--accent-soft); border:1px solid #d5e4f7; border-radius:10px;
  padding:9px 14px; font-size:12.5px; color:#1c4a80; margin-bottom:16px;
}
.ov-task .bar { flex:1; height:4px; background:#d3e0f2; border-radius:99px; overflow:hidden; max-width:360px; }
.ov-task .bar i { display:block; height:100%; background:var(--brand); border-radius:99px; transition:width .4s; }
.ov-task .eta { margin-left:auto; color:#4a6c93; }

/* 结论卡 */
.ov-verdict {
  display:grid; grid-template-columns:190px minmax(0,1fr); gap:28px;
  background:var(--panel); border:1px solid var(--line); border-radius:14px;
  padding:26px 28px;
  box-shadow:0 1px 2px rgba(15,23,32,.03);
}
.ov-score { display:flex; flex-direction:column; justify-content:center; gap:6px;
  border-right:1px solid var(--line); padding-right:24px; }
.ov-score .lab { font-size:11.5px; letter-spacing:.1em; color:var(--ink-3); font-weight:600; }
.ov-score .num { font-size:58px; line-height:1; letter-spacing:-2.5px; font-weight:700; font-variant-numeric:tabular-nums; }
.ov-score .num span { font-size:14px; color:var(--ink-3); letter-spacing:0; margin-left:2px; }
.ov-score .row { display:flex; align-items:center; gap:8px; margin-top:2px; }
.ov-grade { padding:2px 8px; border-radius:6px; font-size:11.5px; font-weight:700; background:var(--warn-soft); color:var(--warm); }
.ov-delta { font-size:12.5px; font-weight:600; color:var(--good); }
.ov-delta.bad { color:var(--bad); }
.ov-delta.flat { color:var(--ink-3); }

.ov-headline { font-size:22px; line-height:1.5; font-weight:650; letter-spacing:-.02em; margin-bottom:8px; max-width:760px; }
.ov-headline em { font-style:normal; background:linear-gradient(transparent 55%, #dbe8fb 55%); }
.ov-sub { color:var(--ink-2); font-size:14.5px; line-height:1.8; max-width:740px; }
.ov-chips { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.ov-chip { font-size:12px; color:var(--ink-2); background:#f7f9fc; border:1px solid var(--line); border-radius:999px; padding:4px 10px; }
.ov-chip b { color:var(--ink); font-weight:650; }
.ov-why {
  margin-top:12px; background:none; border:0; padding:0; color:var(--brand);
  font-size:13px; font-weight:600; cursor:pointer; text-decoration:underline; text-underline-offset:3px;
}
.ov-why-panel { display:none; margin-top:12px; }
.ov-why-panel.open { display:block; }

/* 三条证据 */
.ov-evs { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; }
.ov-ev {
  background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:18px 20px; display:flex; flex-direction:column; gap:6px;
  position:relative; overflow:hidden;
}
.ov-ev::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--line-strong); }
.ov-ev.good::before { background:var(--good); }
.ov-ev.bad::before { background:var(--bad); }
.ov-ev.warn::before { background:var(--warm); }
.ov-ev .tag { font-size:11.5px; letter-spacing:.08em; color:var(--ink-3); font-weight:600; }
.ov-ev h4 { font-size:14.5px; font-weight:650; line-height:1.5; margin:0; }
.ov-ev .big { font-size:30px; font-weight:700; letter-spacing:-1px; line-height:1.15; font-variant-numeric:tabular-nums; }
.ov-ev .big small { font-size:13px; font-weight:600; color:var(--ink-3); letter-spacing:0; margin-left:4px; }
.ov-ev p { font-size:13px; color:var(--ink-2); line-height:1.7; margin:0; }
.ov-ev .go { margin-top:auto; padding-top:8px; font-size:12.5px; font-weight:600; color:var(--brand); text-decoration:none; }
.ov-ev .go:hover { text-decoration:underline; }

/* 下一步 */
.ov-next { background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.ov-next-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:14px; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); }
.ov-next-row:last-child { border-bottom:0; }
.ov-next-n { width:24px; height:24px; border-radius:50%; background:var(--brand-soft); color:var(--brand); display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:700; }
.ov-next-row b { display:block; font-size:14.5px; font-weight:650; margin-bottom:2px; }
.ov-next-row .d { font-size:12.8px; color:var(--ink-2); line-height:1.65; }
.ov-next-row .w { font-size:11.5px; color:var(--ink-3); margin-top:3px; }

/* 折叠明细 */
.ov-details { background:var(--panel); border:1px solid var(--line); border-radius:12px; margin-top:10px; overflow:hidden; }
.ov-details summary { cursor:pointer; list-style:none; padding:13px 16px; display:flex; align-items:center; gap:10px; font-size:13px; font-weight:600; }
.ov-details summary::-webkit-details-marker { display:none; }
.ov-details summary::after { content:"›"; margin-left:auto; color:var(--ink-3); transform:rotate(90deg); transition:.2s; }
.ov-details[open] summary::after { transform:rotate(-90deg); }
.ov-details summary .hint { font-weight:400; color:var(--ink-3); font-size:11.5px; }
.ov-details-body { padding:0 16px 16px; }
.ov-details-body .card { border:0; padding:0; }

.ov-note { margin-top:20px; font-size:11.5px; color:var(--ink-3); line-height:1.8; border-top:1px dashed var(--line); padding-top:12px; }
.ov-note b { color:var(--ink-2); font-weight:600; }

@media (max-width: 900px) {
  .ov-verdict { grid-template-columns:1fr; gap:16px; }
  .ov-score { border-right:0; border-bottom:1px solid var(--line); padding:0 0 14px; }
  .ov-evs { grid-template-columns:1fr; }
  .ov-next-row { grid-template-columns:26px minmax(0,1fr); row-gap:10px; }
  .ov-next-row .btn { grid-column:2; justify-self:start; }
}

/* 窄屏：侧栏折成顶部横条（176px 固定宽在手机上会把正文挤没） */
@media (max-width: 720px) {
  /* minmax(0,1fr) 而不是 1fr：1fr 的最小值是 min-content，
     宽表格会把整列撑到 789px，页面横向溢出、表格也滚不起来 */
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .brand { padding: 0; }
  /* 作用域与导航在顶栏里并排，分组标签和小字状态收起来 */
  .scope { order: 2; margin-left: auto; padding: 0; flex-direction: row; align-items: center; gap: 4px; }
  .scope #projSel { width: auto; max-width: 140px; }
  .proj-actions { display: none; }
  .nav {
    order: 3; width: 100%; flex: 0 0 auto;
    flex-direction: row; margin-top: 0;
    overflow-x: auto; scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  /* 移动端把侧栏压成一行导航条。底部统计可以省，但「退出」不能省——
     否则登录之后就再也没有入口退出了。 */
  .nav-label, .plat-row, .foot-stats { display: none; }
  .side-foot { padding: 4px 8px 0; border-top: 1px solid var(--line); order: 4; flex: 0 0 auto; }
  .foot-user { border-bottom: 0; margin-bottom: 0; padding: 4px 0 6px; }
  .nav button { width: auto; padding: 7px 10px; }
  .nav button svg { display: none; }
  main { padding: 18px 14px 56px; }
}

/* 结论卡底部：左侧解释、右侧交付入口 */
.ov-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.ov-export {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--brand);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}
.ov-export:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 问题库：未保存提醒 / 回声预警 / 删除撤销 ---------- */
.q-dirty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--warn);
}
.q-dirty[hidden] { display: none; }
.q-dirty::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
}

.q-alert {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #fdf7ea;
  border: 1px solid #ecd9b4;
  color: #7a5416;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.q-alert b { color: #6b470f; }
.q-alert[hidden] { display: none; }

.q-undo {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eef3f9;
  border: 1px solid #d8e3f2;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.q-undo[hidden] { display: none; }
.q-undo button {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 行内说明：只在有回声问题时出现，不占其他行的高度 */
.q-warn {
  margin-top: 4px;
  font-size: 11px;
  color: #a06a12;
  line-height: 1.5;
}
tr.q-echo td:first-child { box-shadow: inset 3px 0 0 #e0b256; }

/* ---------- 工单：关联问题选择器 ---------- */
.qp-pick {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.qp-pick > input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  background: #fbfcfe;
}
.qp-pick > input:focus { outline: none; background: #fff; }

/* 列表限高：几十道题不能把整张表单顶到屏幕外 */
.qp-list { max-height: 178px; overflow-y: auto; padding: 4px; }
.qp-group {
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
  font-weight: 700;
  padding: 6px 8px 3px;
}
.qp-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.5;
}
.qp-item:hover { background: #eef3f9; }
.qp-item.on { color: var(--brand); font-weight: 600; }
.qp-item input { margin-top: 3px; flex: none; }

.qp-sel {
  border-top: 1px solid var(--line);
  padding: 7px 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  background: #fbfcfe;
  min-height: 31px;
}

/* 已选标签 / 表格里的关联问题 */
.qp-tag {
  display: inline-block;
  max-width: 100%;
  font-size: 11.5px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 5px;
  padding: 1px 7px;
  line-height: 1.6;
}
.qp-tag.sm { font-size: 11px; padding: 0 6px; }
.qp-cell { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- 行内「⋯」菜单 ---------- */
.btn.icon {
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-3);
}
.btn.icon:hover { color: var(--ink); }

.row-menu {
  position: fixed;
  z-index: 90;
  min-width: 132px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(15, 23, 32, .16);
  padding: 4px;
}
.row-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.row-menu button:hover { background: #eef3f9; color: var(--ink); }
.row-menu button.on { color: var(--ink); font-weight: 600; background: #f2f6fb; }

/* 状态徽标可点：长得像徽标，但要让人知道能点 */
.badge-btn {
  border: 0; font: inherit; font-size: 11.5px; cursor: pointer;
  padding: 2px 8px; border-radius: 20px;
}
.badge-btn:hover { outline: 1px solid var(--line-strong); outline-offset: 1px; }

/* 同题空工单：整行弱化，让"真正在写的那篇"更显眼 */
.a-dup .a-title { color: var(--ink-2); font-weight: 500; }
.a-dup:hover { background: #fcfbf7; }
.row-menu button.danger { color: var(--neg); }
.row-menu button.danger:hover { background: var(--neg-soft); }

/* 表格里的关联问题标签：单行截断，避免每行被撑成两行高 */
.qp-cell .qp-tag {
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   信源：流水线 + 次级视图
   ========================================================================== */
.flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.flow::-webkit-scrollbar { display: none; }

/* 每一步是一个可点的方块：数字大、标签小，箭头在方块之间 */
.flow-step {
  flex: 1 1 0;
  min-width: 118px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.flow-step:hover { background: #eef3f9; }
.flow-step.on { background: var(--brand-soft); }
.flow-step.on .fs-n { color: var(--brand); }
.flow-step .fs-n {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.flow-step .fs-n small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.flow-step .fs-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 1px; }
.flow-step .fs-h { font-size: 11px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }

/* 终点：被引不是"待办"，视觉上要和前四步区分开 */
.flow-step.result {
  cursor: default;
  background: #f8fafd;
  border: 1px solid var(--line);
}
.flow-step.result:hover { background: #f8fafd; }
.flow-step.result .fs-n { color: var(--accent); }



.flow-arrow {
  align-self: center;
  color: var(--ink-3);
  font-size: 12px;
  padding: 0 2px;
  flex: none;
  opacity: .6;
}

/* 次级视图：比主流水线轻一档，避免两套导航争注意力 */
.src-nav {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.src-nav::-webkit-scrollbar { display: none; }
.src-nav button {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.src-nav button:hover { color: var(--ink); }
.src-nav button.on { color: var(--brand); font-weight: 650; border-bottom-color: var(--brand); }

/* 表头上方的「下一步」提示 */
.a-next {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 10px;
  font-size: 12.8px;
  color: var(--ink-2);
}
.a-next b { color: var(--ink); }
.a-next .btn { margin-left: auto; }
.a-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 2px 4px 2px 9px;
}
.a-filter button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0 4px;
}

@media (max-width: 720px) {
  .flow-step { min-width: 104px; padding: 8px 10px; }
  .flow-step .fs-n { font-size: 17px; }
  .flow-step .fs-h { display: none; }
}

/* 窄屏：宽表格横向滚动，不要一列一列挤成竖排文字 */
@media (max-width: 720px) {
  #aList, #asList, #oList { overflow-x: auto; }
  /* 7 列在 430px 里怎么分都不够：给足最小宽度让它横向滚，
     同时钉住「信源」列，否则那一列会被压成一字一行 */
  /* 内容表已从 7 列砍到 4 列，900px 是老值：留着会让动作列跑到视口外
     （看起来像"按钮没了"）。520px 是 4 列的最小可读宽度。 */
  #aList > table { min-width: 520px; }
  #asList > table, #oList > table { min-width: 760px; }
  /* 提示条里的按钮换行后不要在右边悬空 */
  .a-next .btn { margin-left: 0; }
  .a-next { padding: 8px 10px; }
}

/* 窄屏：这句说明占两行、还把两个按钮挤到右边，直接收掉——导航已经说明这是「内容」 */
@media (max-width: 720px) {
  .a-desc { display: none; }
}

/* 待办标签：阻断 / 优先 / 常规，一眼看出这条能不能拖 */
.ov-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: 2px;
  margin-left: 6px;
}
.ov-tag.blocker { background: var(--neg-soft); color: var(--neg); }
.ov-tag.high { background: #fdf7ea; color: #a06a12; }
.ov-tag.mid { background: var(--brand-soft); color: var(--brand); }

/* ---------------- 分模型成绩单 ----------------
   一个模型一张卡，卡片之间不排序（按样本量排，不是按分数排）：
   按分数排会让客户先看到"最差的那个"，而多数情况下样本最少的那个分最不可信。 */
.sb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 188px)); justify-content: start; gap: 10px; }
.sb-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--panel); }
.sb-card.off { background: #faf9f6; }
.sb-name { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.sb-rank { font-size: 11px; font-weight: 400; color: var(--ink-3); }
.sb-score { font-size: 26px; font-weight: 600; line-height: 1.15; margin-top: 2px; }
.sb-score span { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.sb-score.na { color: var(--ink-3); font-size: 20px; }
.sb-meta { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin-top: 2px; }
.sb-w { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.sb-note { font-size: 11px; color: var(--warn); margin-top: 4px; line-height: 1.6; }
.sb-sum { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.75; padding: 9px 11px; background: #faf9f6; border-radius: 8px; }
.sb-sum b { color: var(--ink); }

/* ---------------- 写作向导：三步一次只显示一步 ----------------
   原来三步 + 改稿 + 导出 + 一稿多发全堆在一列，一屏六七个区块，
   用户看不出"现在该干哪件"。现在用步骤条切换，改稿留在第 3 步，
   导出与一稿多发移到独立的工具抽屉。 */
.wsteps { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.wsteps button {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 8px 10px 10px; font-size: 12.5px; color: var(--ink-3);
  border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.wsteps button i {
  font-style: normal; width: 17px; height: 17px; border-radius: 50%;
  background: var(--line); color: var(--ink-2); font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wsteps button.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.wsteps button.on i { background: var(--brand); color: #fff; }
.wsteps button.done i { background: var(--pos-soft); color: var(--pos); }
.wstep[hidden] { display: none; }
.w-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.w-or { font-size: 11.5px; color: var(--ink-3); padding: 0 2px; }
.w-next { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; justify-content: flex-end; }

/* 出稿选题：主区视图，一行一条，右侧是状态与动作 */
#view-pick .qrow { padding: 11px 0; align-items: flex-start; }
#view-pick .qrow .qtext { font-size: 13.5px; }

/* ---------------- 侧栏底部：当前账号 + 退出 ----------------
   邮箱可能很长（公司域名），用 ellipsis 截断并靠 title 显示全量；
   退出按钮不抢视觉重量，hover 才变红。 */
.foot-user {
  /* 侧栏只有 176px：一行放「邮箱 + 按钮」时邮箱必然被截成 tim@kcgeo....
     两行更稳，邮箱独占一行能完整显示。 */
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 6px 2px 8px; margin-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.foot-mail {
  width: 100%; font-size: 11.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.foot-out {
  flex: none; border: 1px solid var(--line); background: transparent;
  color: var(--ink-3); font-size: 11.5px; padding: 3px 10px;
  border-radius: 6px; cursor: pointer; line-height: 1.4;
}
.foot-out:hover { color: var(--up); border-color: var(--up); }

/* ---------------- 游客横条里的微信号 ----------------
   做成按钮而不是纯文本：手机上长按复制号码很别扭，
   点一下直接进剪贴板更符合"加微信咨询"这个动作。 */
.guest-wx {
  border: 0; background: transparent; padding: 0; margin: 0 2px;
  font: inherit; color: inherit; font-weight: 650;
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.guest-wx:hover { opacity: .75; }
