/* 工具门户 · 全站样式
   ------------------------------------------------------------------
   方向：仪表盘。浅色打底、发丝线分隔、等宽字承载所有技术性内容。
   只有一套配色，不做深浅色切换——工具是白天在办公室用的，多一个开关就多一套要维护的对比度。

   一条贯穿全站的纪律：**整套界面里唯一饱和的颜色是状态色**。
   绿 / 黄 / 红只编码健康、执行状态和风险等级，其余全是石墨到冰白的灰阶。
   所以健康点变红、记录那格写「缺」的时候，它在整个屏幕上无处可躲。
   交互态不靠颜色，靠反相（黑底白字）和发丝线。
   底也不做纹理——网格和噪点在数据密集的页面上是噪音，纸面就该是干净的。

   字体：拉丁文自带（Instrument Sans / IBM Plex Mono，OFL，见 fonts/README.md），
   中文走系统。技术性内容一律等宽，叙述性内容一律无衬线——这是两套字并存的理由。
*/

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-var.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- 色板 ---------- */

:root {
  --sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "Plex Mono", "PingFang SC", "Microsoft YaHei UI", ui-monospace, monospace;

  --shell: 1240px;
  --pad: 28px;
  --bar: 58px;
  --ease: cubic-bezier(.2,.6,.2,1);

  --void: #F4F5F6;     /* 页面底 */
  --panel: #FFFFFF;    /* 面板、表格、卡片 */
  --panel-2: #F1F2F4;  /* 表头、次级块 */
  --raised: #FFFFFF;   /* 浮层 */
  --rule: rgba(16,20,28,.10);
  --rule-2: rgba(16,20,28,.20);
  --ink: #101419;
  --ink-2: #4B525B;
  --ink-3: #838A94;
  --inverse-bg: #101419;
  --inverse-ink: #FFFFFF;

  --ok: #1F7A4C;      --ok-bg: rgba(31,122,76,.09);
  --warn: #8A6212;    --warn-bg: rgba(138,98,18,.10);
  --bad: #B02F22;     --bad-bg: rgba(176,47,34,.08);

  --shadow: 0 1px 2px rgba(16,20,28,.05), 0 16px 34px -24px rgba(16,20,28,.40);
}

/* ---------- 基础 ---------- */

*,*::before,*::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable }

/* 细滚动条：页面里局部滚动的表格、名单用（2026-09-24）。Windows 默认那种带上下箭头的 15px 灰条太重，
   把表格框住、戳进圆角。Chromium、Safari 用 ::-webkit-scrollbar 画（没有箭头、轨道透明、滑块圆头）；
   Firefox 不认它，用标准属性。Chromium 见到标准属性就不再用 ::-webkit-scrollbar，所以标准属性只给 Firefox。 */
.thin-scroll::-webkit-scrollbar { width: 10px; height: 10px }
.thin-scroll::-webkit-scrollbar-track, .thin-scroll::-webkit-scrollbar-corner { background: transparent }
.thin-scroll::-webkit-scrollbar-thumb { background: #d5d9df padding-box; border: 2px solid transparent; border-radius: 6px }
.thin-scroll::-webkit-scrollbar-thumb:hover { background-color: #b8bec7 }
@supports not selector(::-webkit-scrollbar) {
  .thin-scroll { scrollbar-width: thin; scrollbar-color: #d5d9df transparent }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none }
button, input, select, textarea { font: inherit; color: inherit }
[hidden] { display: none !important }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px }
svg { display: block; flex: none }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad) }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums }
.dim { color: var(--ink-3) }

/* 全站的小标签：等宽、大写、放开字距。它是「这是机器写的字段」的信号。 */
.label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.link {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-2);
  transition: border-color .14s var(--ease), color .14s var(--ease);
}
.link:hover { border-bottom-color: currentColor }

/* ---------- 入场 ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes wipe { from { transform: scaleX(0) } to { transform: scaleX(1) } }

.stagger > * { animation: rise .5s var(--ease) both }
.stagger > *:nth-child(1) { animation-delay: .02s }
.stagger > *:nth-child(2) { animation-delay: .05s }
.stagger > *:nth-child(3) { animation-delay: .08s }
.stagger > *:nth-child(4) { animation-delay: .11s }
.stagger > *:nth-child(5) { animation-delay: .14s }
.stagger > *:nth-child(6) { animation-delay: .17s }
.stagger > *:nth-child(7) { animation-delay: .20s }
.stagger > *:nth-child(8) { animation-delay: .23s }
.stagger > *:nth-child(n+9) { animation-delay: .26s }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
}

/* ---------- 账户菜单（新壳顶栏右上角） ---------- */

.whoami {
  flex: none; position: relative; display: flex; align-items: center; min-width: 0;
}
/* 原来左边还有一条 1px 竖线（padding-left 14px），顶栏左边只有 logo，这条线两边什么也没隔开，
   展开时又和按钮自己的边框挨在一起（第 2 轮收尾 C4），去掉。 */
/* 只剩内网直通那一档用它（顶栏写「当前身份」，不能切换）；dev 档 2026-09-24 起和生产同一个账户菜单 */
.whoami-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); border: 1px dashed var(--rule-2); padding: 3px 6px; margin-right: 8px;
  white-space: nowrap;
}

.account-trigger {
  min-width: 0; min-height: 42px; display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 7px 3px 9px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--ink); text-align: left; cursor: pointer;
  transition: background .14s var(--ease), border-color .14s var(--ease);
}
.account-trigger:hover { background: var(--panel); border-color: var(--rule) }
.account-trigger[aria-expanded="true"] { background: var(--panel); border-color: var(--rule-2) }
.account-trigger-static { cursor: default }
.account-trigger-static:hover { background: transparent; border-color: transparent }
.account-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.25 }
.account-name {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
}
.account-team {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
}
.account-chevron {
  width: 11px; height: 11px; margin-left: 5px; opacity: .72;
  transition: transform .16s var(--ease), opacity .14s var(--ease);
}
.account-trigger:hover .account-chevron { opacity: 1 }
.account-trigger[aria-expanded="true"] .account-chevron { transform: rotate(180deg) }

/* 圆角、柔和的影子，和页面里别的下拉菜单（权限表的格子菜单）同一个样子（2026-09-24 第 3 轮复核：
   原来是直角、硬灰边，和同一页上的格子菜单摆在一起像旧版）。 */
.account-menu {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 70;
  width: 230px; padding: 6px; background: var(--raised); border: 1px solid #e3e6eb; border-radius: 9px;
  box-shadow: 0 12px 32px -14px rgba(20,24,32,.30), 0 2px 6px rgba(20,24,32,.06);
  animation: account-menu-in .16s var(--ease) both;
}
@keyframes account-menu-in {
  from { opacity: 0; transform: translateY(-4px) }
  to { opacity: 1; transform: none }
}
/* 菜单顶上原来有「当前登录」小字＋姓名＋部门，和紧挨着的按钮写的是同一件事（第 2 轮收尾 C5），去掉；
   菜单直接从第一项开始，项与项之间留 2px。 */
.account-logout-form { margin: 0 }
.account-menu-action {
  width: 100%; min-height: 36px; margin-top: 2px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-2); text-align: left; cursor: pointer;
  font-family: var(--sans); font-size: 13px;
}
.account-menu-action[href] { display: flex; align-items: center; box-sizing: border-box; text-decoration: none }
.account-menu-action:hover, .account-menu-action:focus-visible { background: var(--panel-2); color: var(--ink) }
.account-menu-action:disabled { cursor: wait; color: var(--ink-3) }
.account-menu > :first-child { margin-top: 0 }

/* dev 档（测试环境的开发登录）：同一个菜单里多一段「切换身份」：搜索框＋按公司分组的名单，当前的人打勾。
   每人一行，姓名在左、部门在右；公司写在组标题上（滚动时贴在顶上）。已停用的和 dev 种子身份在最后的「其他」里，平时折起。
   生产（飞书登录）没有这一段。 */
.account-menu.has-switch { width: 296px }
.account-switch { padding: 0 0 6px; margin-bottom: 4px; border-bottom: 1px solid var(--rule) }
.account-switch-search {
  display: block; width: 100%; height: 34px; padding: 0 10px 0 31px;
  border: 1px solid #dfe4eb; border-radius: 7px; background: var(--panel) url("/static/icons/lucide/search.svg") 10px center / 14px 14px no-repeat;
  font-family: var(--sans); font-size: 13px; color: var(--ink); outline: none; appearance: none;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.account-switch-search::placeholder { color: var(--ink-3) }
/* 和权限页的搜索框同一套：7px 圆角，聚焦只把边框加深，不加光晕。 */
.account-switch-search:hover { border-color: #c6ccd4 }
.account-switch-search:focus { border-color: #8b97a7 }
/* Chrome 自带的蓝色清除「×」和整站的灰黑配色不搭；清空用 Esc 或删字。 */
.account-switch-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none }
/* 细滚动条（.thin-scroll），位置一直留着（scrollbar-gutter），名单伸进菜单右边的 6px 留白：
   每行右边 6px ＋ 滚动条 10px，部门的右边仍和搜索框里的字一样离框 10px，有没有滚动条都不动。 */
.account-switch-list {
  max-height: min(380px, calc(100vh - 250px)); min-height: 44px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable; margin: 4px -6px 0 0;
}
.account-switch-caption {
  position: sticky; top: 0; z-index: 1; margin: 0; padding: 9px 10px 4px; background: var(--raised);
  font-size: 11px; letter-spacing: .02em; color: var(--ink-3);
}
.account-switch-item {
  position: relative; width: 100%; min-height: 34px; display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink);
  font-family: var(--sans); text-align: left; cursor: pointer; line-height: 1.4;
}
.account-switch-item:hover, .account-switch-item:focus-visible { background: var(--panel-2); outline: none }
.account-switch-item:disabled { cursor: wait; opacity: .6 }
/* 当前的人：勾占掉这一行部门的位置（部门在菜单顶上写了），和别的行的部门同样贴右、和搜索框右边对齐；
   别的行不为它空出一列。 */
.account-switch-item[aria-current="true"] { padding-right: 28px }
.account-switch-item[aria-current="true"]::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: var(--ink);
  -webkit-mask: url("/static/icons/lucide/check.svg") center / 14px 14px no-repeat;
  mask: url("/static/icons/lucide/check.svg") center / 14px 14px no-repeat;
}
.account-switch-item[aria-current="true"] .account-switch-name { font-weight: 600 }
.account-switch-name {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 500;
}
.account-switch-where {
  flex: 0 1 auto; min-width: 0; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--ink-3);
}
.account-switch-tag {
  flex: none; padding: 0 5px; border-radius: 3px; background: var(--panel-2);
  font-size: 11px; color: var(--ink-3); line-height: 1.6;
}
.account-switch-item[data-status="disabled"] .account-switch-name { color: var(--ink-2) }
/* 「其他 N」：点开才列出已停用的人和 dev 种子身份 */
.account-switch-group.is-other { margin-top: 4px; border-top: 1px solid var(--rule) }
.account-switch-more {
  width: 100%; display: flex; align-items: center; gap: 6px; padding: 9px 6px 7px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-3); font-family: var(--sans); font-size: 11px; letter-spacing: .02em;
  text-align: left; cursor: pointer;
}
.account-switch-more::after {
  content: ""; width: 12px; height: 12px; margin-left: auto; background: currentColor;
  -webkit-mask: url("/static/icons/lucide/chevron-down.svg") center / 12px 12px no-repeat;
  mask: url("/static/icons/lucide/chevron-down.svg") center / 12px 12px no-repeat;
  transition: transform .14s var(--ease);
}
.account-switch-more[aria-expanded="true"]::after { transform: rotate(180deg) }
.account-switch-more:hover, .account-switch-more:focus-visible { background: var(--panel-2); color: var(--ink-2); outline: none }
.account-switch-empty, .account-switch-note { margin: 0; padding: 10px; font-size: 12px; color: var(--ink-3) }
.account-switch-note { color: var(--bad) }

/* ---------- 页面骨架 ---------- */

main { padding-bottom: 80px }

.masthead-side { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap }

.figure { display: flex; flex-direction: column; gap: 4px; align-items: flex-start }
.figure-v {
  font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.figure[data-tone="bad"] .figure-v { color: var(--bad) }
.figure[data-tone="warn"] .figure-v { color: var(--warn) }
.figure[data-tone="ok"] .figure-v { color: var(--ok) }
.figure[data-quiet="1"] .figure-v { color: var(--ink-3) }
.figure-note {
  font-family: var(--mono); font-size: 10.5px; line-height: 1.4; color: var(--ink-3);
  white-space: nowrap;
}

.sec {
  display: flex; align-items: center; gap: 12px;
  margin: 40px 0 14px;
}
.sec::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--rule) }
.sec h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .01em }
.sec > div { min-width: 0; max-width: 760px }
.section-lede { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.55 }

.backlink { margin: 40px 0 0; font-family: var(--mono); font-size: 12px }

/* ---------- 搜索与筛选 ---------- */

.toolbar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.searchbox { position: relative; flex: 1 1 300px; min-width: 220px; display: flex; align-items: center; gap: 10px }
.searchbox svg { color: var(--ink-3) }
.searchbox input {
  flex: 1 1 auto; height: 30px; padding: 0; min-width: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  font-size: 14px; transition: border-color .16s var(--ease);
}
.searchbox input::placeholder { color: var(--ink-3) }
.searchbox input:focus { outline: none; border-bottom-color: var(--ink) }
.searchbox kbd {
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  border: 1px solid var(--rule); padding: 1px 5px;
}

.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.chips .label { margin-right: 4px }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: border-color .14s var(--ease), color .14s var(--ease), background .14s var(--ease);
}
.chip:hover { border-color: var(--rule-2); color: var(--ink) }
/* 选中态用反相，不用颜色——颜色留给状态 */
.chip[aria-pressed="true"], .chip[aria-current="true"] {
  background: var(--inverse-bg); border-color: var(--inverse-bg); color: var(--inverse-ink);
}

/* ---------- 工具目录 ---------- */

.rows { border-top: 1px solid var(--rule) }

.row-link {
  position: relative; display: grid; align-items: center; gap: 18px;
  grid-template-columns: minmax(220px,1.15fr) minmax(0,1.5fr) 92px 96px 92px 20px;
  grid-template-areas: "head purpose owner risk health go";
  padding: 16px 14px 16px 16px; border-bottom: 1px solid var(--rule);
  transition: background .16s var(--ease);
}
.row-link[data-live="1"] {
  grid-template-columns: minmax(200px,1fr) minmax(0,1.2fr) 82px 82px minmax(230px,1fr) 92px 20px;
  grid-template-areas: "head purpose owner risk live health go";
}
/* 左侧那道竖线平时是透明的，hover 时按风险等级亮起来 */
.row-link::before {
  content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px;
  background: var(--rule-2); opacity: 0; transition: opacity .16s var(--ease);
}
.row-link[data-risk="read_only"]::before { background: var(--ok) }
.row-link[data-risk="write_param"]::before { background: var(--warn) }
.row-link[data-risk="write_money"]::before { background: var(--bad) }
.row-link:hover { background: var(--panel) }
.row-link:hover::before { opacity: 1 }
.row-link:hover .row-go { opacity: 1; transform: none }

.row-head { grid-area: head; display: flex; flex-direction: column; gap: 5px; min-width: 0 }
.row-name { display: flex; align-items: center; gap: 9px; min-width: 0 }
.row-name span {
  font-size: 15.5px; font-weight: 600; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .02em }
.row-purpose {
  grid-area: purpose;
  min-width: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-owner { grid-area: owner; font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap }
.row-risk { grid-area: risk }
.row-live {
  grid-area: live; min-width: 0;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.6; color: var(--ink-3);
}
.row-live-item { white-space: nowrap }
.row-live-value { color: var(--ink) }
.row-live-value[data-tone="ok"] { color: var(--ok) }
.row-live-value[data-tone="warn"] { color: var(--warn) }
.row-live-value[data-tone="bad"] { color: var(--bad) }
.row-live-value[data-missing="1"] { color: var(--ink-3) }
.row-live-sep { color: var(--ink-3) }
.row-health { grid-area: health; font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap;
  display: flex; align-items: center; gap: 7px }
.row-go { grid-area: go; color: var(--ink-3); opacity: 0; transform: translateX(-4px);
  transition: opacity .16s var(--ease), transform .16s var(--ease) }

/* ---------- 状态原子 ---------- */

.dot {
  position: relative; display: inline-block; flex: none;
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3);
}
.dot[data-h="ok"] { background: var(--ok) }
.dot[data-h="slow"] { background: var(--warn) }
.dot[data-h="down"] { background: var(--bad) }
/* 挂了的那个点自己会呼吸。全站只有这一处主动动，所以它扫一眼就能看见。 */
.dot[data-h="down"]::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid var(--bad); animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { 0% { opacity: .8; transform: scale(.6) } 100% { opacity: 0; transform: scale(1.5) } }
.dot-lg { width: 9px; height: 9px }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; white-space: nowrap;
}
.tag[data-risk="read_only"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent) }
.tag[data-risk="write_param"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent) }
.tag[data-risk="write_money"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }
.tag[data-kind="incident"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }
.tag[data-kind="record_gap"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent) }

/* 执行状态：实心小方块 + 文字 */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; white-space: nowrap;
  color: var(--ink-2);
}
.pill::before { content: ""; width: 6px; height: 6px; background: currentColor }
.pill[data-s="done"] { color: var(--ok) }
.pill[data-s="failed"] { color: var(--bad) }
.pill[data-s="running"] { color: var(--warn) }
.pill[data-s="running"]::before { animation: blink 1.2s steps(2) infinite }
.pill[data-s="pending"] { color: var(--ink-3) }
@keyframes blink { 50% { opacity: .25 } }

/* 记录质量跟执行状态是两件事，所以长得完全不同：方括号包起来的等宽字 */
.qmark {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-3);
  white-space: nowrap;
}
.qmark::before { content: "[" ; opacity: .5 }
.qmark::after { content: "]"; opacity: .5 }
.qmark[data-q="complete"] { color: var(--ok) }
.qmark[data-q="incomplete"] { color: var(--bad); font-weight: 600 }
.qmark[data-q="n/a"] { color: var(--ink-3) }

.who { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap }
.who-agent {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  padding: 1px 5px; border: 1px solid var(--rule-2); color: var(--ink-3);
}
.who[data-kind="agent"] .who-name { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2) }

/* ---------- 面板 ---------- */

.spec {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.spec > div {
  padding: 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.spec dt { margin: 0 }
.spec dd { margin: 0; font-size: 13.5px; word-break: break-all; line-height: 1.5 }
.spec dd.mono { font-size: 12.5px }

/* ---------- 工具详情 ---------- */

.hero { padding: 44px 0 24px; border-bottom: 1px solid var(--rule) }
.hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap }
.hero h1 {
  margin: 0; font-size: clamp(28px, 4vw, 42px); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.05;
}
.hero p { margin: 14px 0 0; max-width: 64ch; color: var(--ink-2); font-size: 14.5px; line-height: 1.75 }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap }

/* 活体值是一组同批采集的事实，用一条连续发丝线带把它们拢在一起。 */
.live-band { border: 1px solid var(--rule); background: var(--panel) }
.live-band[data-stale="1"] { border-left: 2px solid var(--warn) }
.live-warning {
  padding: 8px 14px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; color: var(--warn);
}
.live-values {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 1px; background: var(--rule);
}
.live-kv { min-width: 0; padding: 13px 15px; background: var(--panel) }
.live-value {
  margin-top: 4px; font-family: var(--mono); font-size: 14px; line-height: 1.45;
  font-variant-numeric: tabular-nums; word-break: break-word;
}
.live-value[data-tone="ok"] { color: var(--ok) }
.live-value[data-tone="warn"] { color: var(--warn) }
.live-value[data-tone="bad"] { color: var(--bad) }
.live-value[data-missing="1"] { color: var(--ink-3) }
.live-age { margin-top: 2px; font-family: var(--mono); font-size: 9.5px; color: var(--ink-3) }

/* 能力卡按工具自己给的分组排；悬停只压深边线，颜色仍然留给状态。 */
.cap-groups { display: flex; flex-direction: column; gap: 26px }
.cap-group-title { margin: 0 0 10px }
.cap-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px;
}
.cap-card {
  min-height: 176px; display: flex; flex-direction: column; padding: 17px 18px;
  background: var(--panel); border: 1px solid var(--rule);
  transition: border-color .14s var(--ease);
}
.cap-card[data-linked="1"]:hover { border-color: var(--ink) }
.cap-name { font-size: 15px; font-weight: 600; line-height: 1.45 }
.cap-question { margin: 8px 0 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.7 }
.cap-go {
  margin-top: auto; align-self: flex-end;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

.card-title h3 { margin: 3px 0 0; font-size: 15px; font-weight: 600; line-height: 1.45 }

.connection-state {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px;
  border: 1px solid var(--rule-2); color: var(--ink-2);
  font-family: var(--mono); font-size: 10.5px; line-height: 1.4; white-space: nowrap;
}
.connection-state[data-tone="ok"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 42%, transparent) }
.connection-state[data-tone="warn"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 42%, transparent) }
.connection-state[data-tone="bad"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }

/* ---------- 表单元件与按钮 ---------- */

/* 工具详情页曾经有一个「门户代发动作」的控制台（.console / .action* / .field-choice /
   .action-msg），2026-08-31 连页面带样式一起删了，理由见 docs/collab/DECISIONS.md。
   下面这些是权限工作台、工单页、筛选条还在用的通用元件，跟那个控制台没关系。 */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.field-name { display: flex; align-items: baseline; gap: 6px }
.field-name i { color: var(--bad); font-style: normal }
.field-name em { font-family: var(--mono); font-size: 10px; font-style: normal; color: var(--ink-3) }
.field input, .field select {
  height: 32px; padding: 0 2px; min-width: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule-2);
  font-family: var(--mono); font-size: 13px;
  transition: border-color .16s var(--ease);
}
.field input::placeholder { color: var(--ink-3); font-size: 12px }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--ink) }
.field select { appearance: none; cursor: pointer }
.field-help { color: var(--ink-3); font-size: 11.5px; line-height: 1.55 }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px;
  background: var(--inverse-bg); border: 1px solid var(--inverse-bg); color: var(--inverse-ink);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.btn:hover { opacity: .84 }
.btn:active { transform: translateY(1px) }
.btn:disabled { background: transparent; border-color: var(--rule); color: var(--ink-3); cursor: not-allowed; opacity: 1 }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad) }
.btn-danger:hover { background: var(--bad-bg); opacity: 1 }
.btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-2) }
.btn-ghost:hover { border-color: var(--rule-2); color: var(--ink); opacity: 1 }

/* ---------- 动态、接入与权限 ---------- */

.activity-panel { background: var(--panel); border: 1px solid var(--rule) }
.activity-channels { display: flex; align-items: center; gap: 8px; padding: 12px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--rule) }
.activity-disclaimer { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 12px; line-height: 1.6 }
.activity-feed { display: flex; flex-direction: column }
.activity-item {
  position: relative; display: grid; grid-template-columns: minmax(160px, .7fr) minmax(220px, 1.6fr) minmax(220px, 2fr) auto;
  align-items: center; gap: 14px; min-width: 0; padding: 14px 16px;
  border-bottom: 1px solid var(--rule); transition: background .14s var(--ease);
}
.activity-item:last-child { border-bottom: 0 }
a.activity-item:hover { background: var(--panel-2) }
.activity-item[data-tone="bad"] { border-left: 2px solid var(--bad) }
.activity-item[data-tone="warn"] { border-left: 2px solid var(--warn) }
.activity-meta { display: flex; align-items: center; gap: 7px; min-width: 0; flex-wrap: wrap; color: var(--ink-3); font-family: var(--mono); font-size: 10.5px }
.activity-meta > :not(.tag) { min-width: 0; overflow-wrap: anywhere; word-break: break-word }
.activity-title { min-width: 0; overflow-wrap: anywhere; word-break: break-word; font-size: 13.5px; font-weight: 600; line-height: 1.5 }
.activity-item > p {
  margin: 0; min-width: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55;
  white-space: pre-line; overflow-wrap: anywhere; word-break: break-word;
}
.activity-go { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); white-space: nowrap }

.connection-card { min-width: 0; background: var(--panel); border: 1px solid var(--rule) }
.card-title { padding: 16px 18px; border-bottom: 1px solid var(--rule) }
.connection-row { display: grid; grid-template-columns: minmax(110px, .65fr) 80px minmax(180px, 1.5fr); gap: 14px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--rule) }
.connection-row:last-child { border-bottom: 0 }
.connection-row > strong { font-size: 12.5px; font-weight: 600 }
.connection-row-head { padding-top: 8px; padding-bottom: 8px; background: var(--panel-2); color: var(--ink-3); font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase }
.connection-detail { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); font-size: 12px; line-height: 1.5 }
.permission-list { margin: 0 }
.permission-list > div { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--rule) }
.permission-list dt { color: var(--ink-3); font-size: 11.5px }
.permission-list dd { margin: 0; min-width: 0; font-size: 12.5px; word-break: break-word }
.empty-compact { padding: 28px 20px }

/* 权限工作台与飞书首次登录。沿用工具详情的线框、等宽元数据和原生表单语言。 */
.section-block { margin-top: 40px }
.section-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.section-head::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--rule) }
.section-head > div { display: flex; align-items: center; gap: 10px }
.section-head h2 { margin: 0; font-size: 13px; font-weight: 600 }
.section-num { font-family: var(--mono); font-size: 10px; color: var(--ink-3) }

.permission-people { border-top: 1px solid var(--rule) }
.permission-person { border-bottom: 1px solid var(--rule); background: var(--panel) }
.permission-person summary { list-style: none; cursor: pointer }
.permission-person summary::-webkit-details-marker { display: none }
.permission-person-summary {
  position: relative; display: grid; grid-template-columns: minmax(190px,1.2fr) 76px 120px 140px minmax(130px,.7fr);
  align-items: center; gap: 14px; padding: 14px 16px 14px 30px; font-size: 12.5px;
}
.permission-person-summary::before {
  content: "+"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); color: var(--ink-3);
}
.permission-person[open] .permission-person-summary::before { content: "−" }
.permission-person-summary:hover { background: var(--panel-2) }
.permission-person-name { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.permission-person-name strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px }
.permission-person-name code { min-width: 0; overflow-wrap: anywhere; word-break: break-word; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3) }
.permission-person-body { padding: 4px 16px 18px 30px; border-top: 1px solid var(--rule) }
.permission-edit-form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px }
.permission-form-grid { display: grid; grid-template-columns: repeat(5,minmax(130px,1fr)); gap: 16px }
.permission-visible-tools { padding: 11px 13px; border: 1px solid var(--rule); background: var(--panel-2) }
.permission-visible-tools p { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.6 }
.permission-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.department-map-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 12px }

.pending-card { width: min(680px,100%); box-shadow: var(--shadow) }
.pending-card h1 { margin: 4px 0 12px; font-size: clamp(24px,4vw,38px); letter-spacing: -.035em }
.pending-card > p:not(.label) { color: var(--ink-2); line-height: 1.75 }
.pending-card .permission-list { margin: 22px 0; border: 1px solid var(--rule) }
.pending-actions { display: flex; gap: 10px; flex-wrap: wrap }

/* ---------- 表格 ---------- */

.table-wrap { border: 1px solid var(--rule); background: var(--panel); overflow-x: auto }
table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13.5px }
thead th {
  position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap;
  padding: 11px 14px; background: var(--panel-2);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle }
tbody tr:last-child td { border-bottom: 0 }
.row { cursor: pointer; transition: background .14s var(--ease) }
.row:hover { background: var(--panel-2) }
.c-mono { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap }
/* 名字列也不许折行。窄屏下整张表横向滚，好过把「千川投流工作台」竖着排成一列 */
.c-name { white-space: nowrap }
.c-id { color: var(--ink-2) }
.row:hover .c-id { color: var(--ink) }

/* 就地展开的行（单列表）。三角朝右是收着，朝下是开着——不用点开才知道有没有东西。 */
.caret {
  display: inline-block; width: 0; height: 0; margin-right: 8px;
  border-left: 4px solid var(--ink-3);
  border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
  transform: translateY(-1px); transition: transform .14s var(--ease);
}
.row-toggle[aria-expanded="true"] { background: var(--panel-2) }
.row-toggle[aria-expanded="true"] .caret { transform: translateY(-1px) rotate(90deg) }
.ticket-detail td { padding: 0; background: var(--panel-2) }
.ticket-detail-box {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px;
  padding: 16px 14px 18px 36px; border-left: 2px solid var(--rule-2);
}
.ticket-body {
  flex: 1 1 420px; margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--ink-2);
}
.ticket-jump { display: flex; flex-wrap: wrap; gap: 8px }
.ticket-closure {
  flex: 1 1 100%; display: grid; grid-template-columns: 110px 1fr auto; gap: 12px;
  align-items: baseline; padding: 12px 14px; background: var(--ok-bg); border-left: 2px solid var(--ok);
}
.ticket-closure strong { font-size: 12.5px; font-weight: 600 }
.ticket-close-form {
  flex: 1 1 100%; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(280px, 1.5fr) auto;
  align-items: end; gap: 16px; padding: 14px; background: var(--panel); border: 1px solid var(--rule);
}
.ticket-close-copy p, .ticket-close-disabled p { margin: 3px 0 0; color: var(--ink-3); font-size: 11.5px; line-height: 1.55 }
.ticket-close-form textarea {
  width: 100%; min-height: 58px; resize: vertical; padding: 9px 10px;
  border: 1px solid var(--rule-2); background: var(--void); font-size: 12.5px; line-height: 1.5;
}
.ticket-close-form textarea:focus { outline: 0; border-color: var(--ink) }
.ticket-close-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 5px }
.ticket-close-msg { min-height: 17px; max-width: 220px; font-family: var(--mono); font-size: 10.5px; line-height: 1.45; color: var(--ink-3) }
.ticket-close-msg[data-tone="bad"] { color: var(--bad) }
.ticket-close-msg[data-tone="wait"] { color: var(--warn) }
.ticket-close-msg[data-tone="good"] { color: var(--ok) }
.ticket-close-disabled { flex: 1 1 100%; padding: 12px 14px; border: 1px dashed var(--rule-2) }

/* ---------- 人话结论 ---------- */

/* 详情页第一眼看到的是这句话，不是 JSON。左边那道竖线按结论好坏变色。 */
.verdict {
  padding: 18px 20px 16px; background: var(--panel);
  border: 1px solid var(--rule); border-left: 3px solid var(--ink-3);
}
.verdict[data-tone="ok"] { border-left-color: var(--ok) }
.verdict[data-tone="bad"] { border-left-color: var(--bad); background: var(--bad-bg) }
.verdict[data-tone="quiet"] { border-left-color: var(--rule-2) }
.verdict-line {
  margin: 0; font-size: 16px; line-height: 1.75; letter-spacing: -.005em; max-width: 76ch;
}
.verdict-line b, .verdict-line strong { font-weight: 600 }
.difftable { min-width: 720px }
.difftable td.is-new { color: var(--ink); font-weight: 500 }
.difftable td { color: var(--ink-2) }
/* 字段列写中文名，原始键名跟在后面用小字——中文给人看，键名给对着接口排查的人看 */
.c-field { white-space: nowrap }
.c-field b { font-weight: 600; color: var(--ink) }
.c-field em {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 10.5px; font-style: normal; color: var(--ink-3);
}
.verdict-mark {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; white-space: nowrap;
  padding: 2px 7px; border: 1px solid var(--rule-2); color: var(--ink-3);
}
.verdict-mark[data-v="ok"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent) }
.verdict-mark[data-v="mismatch"] {
  color: var(--bad); border-color: var(--bad); background: var(--bad-bg); font-weight: 600;
}
.verdict-mark[data-v="gap"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent) }
.verdict-mark[data-v="same"] { border-style: dashed }

/* ---------- 三件套 ---------- */

.triple {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  border: 1px solid var(--rule); background: var(--panel);
}
.tri { position: relative; padding: 16px 18px 18px; border-right: 1px solid var(--rule); min-width: 0 }
.tri:last-child { border-right: 0 }
/* 三格之间的箭头，钉在分隔线上——它在说「这三个值是一条链」 */
.tri:not(:last-child)::after {
  content: "→"; position: absolute; right: -8px; top: 22px; z-index: 1;
  width: 16px; height: 16px; display: grid; place-items: center;
  background: var(--panel); color: var(--ink-3);
  font-family: var(--mono); font-size: 11px;
}
.tri-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px }
.tri-val {
  margin: 0; padding: 12px 13px; background: var(--panel-2); border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
/* 缺的那一格必须刺眼，绝不留白——留白会被读成「这次没改」而不是「没记」 */
.tri-miss {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 13px; background: var(--bad-bg); border: 1px solid var(--bad); color: var(--bad);
  font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .3em;
}
.seal {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
}
.na-block {
  padding: 26px 20px; border: 1px dashed var(--rule-2); background: var(--panel);
  color: var(--ink-3); font-size: 13.5px; text-align: center;
}
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7 }

.err {
  padding: 14px 16px; background: var(--bad-bg); border-left: 2px solid var(--bad);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink);
}
.codeblock {
  margin: 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}

.metaline {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
}
.metaline b { font-weight: 500; color: var(--ink-2) }

.badges { display: flex; align-items: center; gap: 16px; flex-wrap: wrap }

.ticket-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px }
.ticket-list li { display: flex; align-items: center; gap: 10px; font-size: 13px }

/* ---------- 空态 ---------- */

.empty {
  padding: 56px 24px; border: 1px dashed var(--rule-2); text-align: center;
  color: var(--ink-2); font-size: 13.5px; line-height: 1.9;
}
.empty .label { display: block; margin-bottom: 10px }
.empty p { margin: 4px auto 0; max-width: 76ch }
.empty code {
  font-family: var(--mono); font-size: 12px; padding: 1px 5px;
  border: 1px solid var(--rule); color: var(--ink);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .permission-form-grid { grid-template-columns: repeat(3,minmax(150px,1fr)) }
  .permission-person-summary { grid-template-columns: minmax(180px,1.2fr) 76px 110px 130px }
  .permission-person-summary > :last-child { display: none }
  .row-link {
    grid-template-columns: minmax(200px,1.2fr) minmax(0,1.4fr) 90px 90px;
    grid-template-areas: "head purpose owner risk";
    row-gap: 8px;
  }
  .row-link[data-live="1"] {
    grid-template-columns: minmax(200px,1.2fr) minmax(0,1.4fr) 90px 90px;
    grid-template-areas: "head purpose owner risk" "live live live live";
  }
  .row-health, .row-go { display: none }
}

@media (max-width: 1080px) {
  .whoami { order: 2 }
  .cap-grid { grid-template-columns: 1fr }
}

@media (max-width: 860px) {
  :root { --pad: 20px }
  .masthead-side { gap: 20px }
  .row-link {
    grid-template-columns: 1fr; grid-template-areas: "head" "purpose" "risk";
    gap: 8px; padding: 16px 12px 16px 14px;
  }
  .row-link[data-live="1"] {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "live" "purpose" "risk";
  }
  .row-purpose { -webkit-line-clamp: 3 }
  .row-owner, .row-health { display: none }
  .activity-item { grid-template-columns: 1fr; gap: 6px }
  .activity-go { margin-top: 2px }
  .ticket-close-form { grid-template-columns: 1fr }
  .ticket-closure { grid-template-columns: 1fr; gap: 4px }
  .permission-person-summary { grid-template-columns: minmax(180px,1fr) 80px 120px }
  .permission-person-summary > :nth-child(4) { display: none }
  .triple { grid-template-columns: 1fr }
  .tri { border-right: 0; border-bottom: 1px solid var(--rule) }
  .tri:last-child { border-bottom: 0 }
  .tri:not(:last-child)::after { content: "↓"; right: auto; left: 20px; top: auto; bottom: -8px }
}

@media (max-width: 560px) {
  .whoami-tag { display: none }
  .account-name, .account-team { max-width: 96px }
  .account-team { display: none }
  .account-trigger { min-height: 36px; gap: 7px; padding: 3px 6px 3px 8px }
  .account-chevron { margin-left: 0 }
  .figure-v { font-size: 24px }
  .connection-row { grid-template-columns: 1fr auto; gap: 5px 10px }
  .connection-row .connection-detail { grid-column: 1 / -1 }
  .connection-row-head { display: none }
  .permission-form-grid { grid-template-columns: 1fr }
  .permission-person-summary { grid-template-columns: 1fr auto; gap: 6px 10px }
  .permission-person-summary > :nth-child(n+3) { display: none }
  .permission-person-body { padding-left: 16px }
}

/* ---------- 布局零件 ----------
   页面由 JS 渲染，而 CSP 里没有 style-src 'unsafe-inline'——内联 style 属性一律失效，
   所以过去写在模板里的那几处行内样式都收在这里。 */

.small { font-size: 11px }
.metaline-top { margin-top: 16px }
.table-block { margin-top: 20px }
.table-wrap-tight { margin-top: 14px }

/* 执行记录详情页的大编号，和 404 那个更大的数字 */
.id-big { font-size: clamp(24px, 3.4vw, 34px) }
.code-404 { font-size: clamp(48px, 9vw, 110px); letter-spacing: -.05em }

/* ---------- 执行记录的筛选栏 ----------
   这里的控件长得跟动作表单里的输入框不一样，是故意的：动作表单是「填东西」，
   一条下划线就够；筛选栏是「从已有的值里挑一个」，下划线会让人以为要往里打字，
   所以给足边框和一个箭头——一眼看出这是下拉，不用点开才知道。
   选完立刻筛，没有提交按钮，正在筛的那一格边框会变深。 */

.filters { align-items: flex-end; gap: 14px }
.filters .field { gap: 7px }
.filters .field input, .filters .field select {
  height: 32px; padding: 0 10px;
  background: var(--panel); border: 1px solid var(--rule-2); border-radius: 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
  transition: border-color .14s var(--ease);
}
.filters .field input:hover, .filters .field select:hover { border-color: var(--ink-3) }
.filters .field input:focus, .filters .field select:focus {
  outline: none; border-color: var(--ink); border-bottom-color: var(--ink);
}
.filters .field input[data-on], .filters .field select[data-on] { border-color: var(--ink) }

.filters .field-select { position: relative }
.filters .field-select select { padding-right: 26px; cursor: pointer }
.filters .field-select::after {
  content: ""; position: absolute; right: 11px; bottom: 13px; pointer-events: none;
  width: 6px; height: 6px;
  border-right: 1px solid var(--ink-2); border-bottom: 1px solid var(--ink-2);
  transform: rotate(45deg);
}

.field-wide { flex: 0 1 240px }
.field-mid { flex: 0 1 150px }
.field-sm { flex: 0 1 140px }
.filter-buttons { display: flex; align-items: center; gap: 8px; height: 32px }
.filters .filter-buttons { margin-left: auto }

/* 换筛选条件时表格淡一下，别让人以为点了没反应 */
.table-block[data-busy="1"] { opacity: .45; transition: opacity .12s var(--ease) }

/* 文字按钮：清空这种「撤销一下」的动作，不值得占一个实心按钮 */
.link-btn {
  padding: 0 2px; background: none; border: 0;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  color: var(--ink-3); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink) }

/* ===== [claude] 工具详情页瘦身（2026-08-31） =====
   用户原话：「点开一个工具的时候信息太多了」。详情页收成五段——
   描述 / 状态 / 能做什么 / 最近的操作记录 / 登记信息，
   门户代发、接入情况、我的权限收进页底两个折叠抽屉。
   这里只补瘦身之后新出现的那几个类，上面任何一段都没有动。 */

/* 一句人话结论 + 下面那排数字，是同一件事的两层，中间给一个呼吸位 */
.stack { display: flex; flex-direction: column; gap: 12px }

/* 结论条原来只有 ok / bad / quiet 三档。「能打开但慢」「数字过期了」
   既不是好也不是坏，压进 quiet 会被读成「没事」，所以补第四档。 */
.verdict[data-tone="warn"] { border-left-color: var(--warn) }

/* 动态列表底下那行：左边一句「这里全不全」，右边去执行记录页 */
.feed-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 11px 14px; border-top: 1px solid var(--rule);
  font-size: 12px; line-height: 1.6;
}

/* live 值原来靠 gap:1px + 容器底色画分隔线。事实数不是列数的整数倍时
   （千川那个工具是 9 个，一行排 8 个），最后一行剩下的空位会整块变灰，
   看着像少了一格数据。改成让格子自己用 box-shadow 画右、下两条线：
   不占布局，空位就还是面板底色。 */
.live-values { background: transparent }
.live-kv { box-shadow: 1px 1px 0 0 var(--rule) }

/* 场景卡原来是「名字 + 描述 + 三条推荐问题 + 入口」，176px 是按那个高度定的。
   现在卡上只有名字和它能回答的那个问题（契约里本来就只有这两项），
   176px 会在问题下面留出一大块空白，看着像少了内容。 */
.cap-card { min-height: 132px }

.action-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 32px));
  padding: 0; border: 1px solid var(--rule-2); border-radius: 0;
  background: var(--raised); color: var(--ink); box-shadow: var(--shadow); overflow: auto;
}
.action-dialog::backdrop { background: rgba(16,20,25,.34); backdrop-filter: blur(2px) }
.action-dialog-form { padding: 22px }
.action-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px }
.action-dialog-head h2 { margin: 4px 0 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em }
.dialog-close {
  width: 32px; height: 32px; flex: none; padding: 0; border: 1px solid var(--rule);
  background: transparent; color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer;
}
.dialog-close:hover { border-color: var(--rule-2); color: var(--ink) }
.action-dialog-context {
  margin: 16px 0 18px; padding: 10px 12px; border-left: 2px solid var(--rule-2);
  background: var(--panel-2); color: var(--ink-2); font-size: 12.5px; line-height: 1.6;
}

/* 我的连接器弹窗。配置整段要能一眼看全并选中复制，所以不折行、横向滚。 */
.connector-config {
  margin: 14px 0 0; padding: 12px 14px; overflow-x: auto;
  border: 1px solid var(--rule); background: var(--panel-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.55; white-space: pre; color: var(--ink);
}
.action-dialog-context code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px }
.connector-row-end { display: flex; justify-content: flex-end; margin-top: 8px }
.connector-help { margin-top: 12px }
.connector-help > summary { cursor: pointer; font-size: 13px; color: var(--ink-2) }
/* 选客户端的那一排：按下的那个描黑。 */
.connector-clients { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px }
.connector-client { padding: 4px 10px; font-size: 12px }
.connector-client[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600 }
.connector-token-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px;
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.connector-token-who { font-weight: 400; color: var(--ink-3) }
.connector-token-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap }
.connector-token-field {
  flex: 1 1 300px; min-width: 0; display: flex; align-items: center; gap: 2px;
  padding: 3px 3px 3px 12px; border: 1px solid var(--rule-2); background: var(--panel);
}
.connector-token {
  flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--ink);
}
.connector-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.connector-icon:hover { color: var(--ink); background: var(--panel-2) }
.connector-icon:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px }
.connector-token-empty { flex: 1 1 auto; margin: 0; font-size: 13px; color: var(--ink-2) }
.connector-note { min-height: 1.2em; margin: 8px 0 0; font-size: 12px; color: var(--ink-2) }
.connector-steps { margin: 12px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--ink-2) }
.connector-fine { margin: 10px 0 0; font-size: 12px; color: var(--ink-3) }
.connector-warn {
  margin: 12px 0 0; padding: 10px 12px; border-left: 2px solid var(--bad);
  background: var(--bad-bg); font-size: 12px; line-height: 1.6; color: var(--ink-2);
}

@media (max-width: 620px) {
  .action-dialog-form { padding: 18px }
}

/* 回流「通了但不全」的那句话。用 warn 色而不是 dim：
   它不是脚注，是「这一段的内容是缺的」。 */
.warn-note { color: var(--warn) }
