/* 人体专业知识 · 身体部位（body）路由样式
   来源：素材/Human-Professional-Knowledge modules/body.css 全部 body- 规则，
        已并入 styles/95-brand-visual-unification.css 中 body- 相关最终覆盖（圆角统一/徽章配色/详情边距）。
   适配：模块 monochrome-dark-v1 灰阶体系（--hk-panel/--hk-panel-secondary/--hk-border/--hk-border-strong/--hk-muted/--hk-faint/--hk-strong）。
   映射约定：面板/边框/正文墨色 → --hk-*；原版自洽的浅底强调色对（徽章/序号/chip 的底色+文字色）
        成对保留原值，以维持主责/配合、警示等语义区分。 */

.body-workspace {
  min-height: 100%;
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 0;
  background: transparent;
  color: var(--hk-strong, #e5e5e5);
}

/* 模块约定：暗色主题下图标反色；原文本按钮改为锚点后统一去下划线并保持按钮外观 */
.body-workspace img { filter: invert(1); height: 1.1rem; opacity: .72; width: 1.1rem; }
.body-workspace a { color: inherit; cursor: pointer; text-decoration: none; }

/* ── 左侧部位浏览器 ─────────────────────────────────── */
.body-browser {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--hk-border, #303030);
  background: var(--hk-panel, #141414);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 10px;
}

.body-browser-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}

.body-browser-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  color: var(--hk-strong, #e5e5e5);
}

.body-browser-head p {
  margin: 4px 0 0;
  color: var(--hk-muted, #b3b3b3);
  font-size: 13px;
}

.body-browser-head > span,
.body-section-head > span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  font-size: 13px;
  font-weight: 900;
}

/* 层级 tabs：真筛选已还原（human-knowledge.js:424-485，原版 body.js:1338-1363） */
.body-layer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.body-layer-tabs button {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 999px;
  background: var(--hk-panel-secondary, #242424);
  color: var(--hk-muted, #b3b3b3);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.body-layer-tabs button.active,
.body-layer-tabs button:hover,
.body-layer-tabs button:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
}

.body-part-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 7px;
  align-content: start;
  padding-right: 2px;
}

.body-list-item {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  color: var(--hk-strong, #e5e5e5);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px;
}

.body-list-item:hover,
.body-list-item:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.body-list-item.selected {
  border-color: rgba(255, 255, 255, 0.42);
  background: var(--hk-panel-secondary, #242424);
  box-shadow: inset 3px 0 0 #e5e5e5;
}

.body-list-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  font-weight: 900;
}

.body-list-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.body-list-copy strong,
.body-list-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-list-copy small {
  color: var(--hk-muted, #b3b3b3);
}

.body-list-count {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

/* ── 详情区外壳 ─────────────────────────────────────── */
.body-detail-view {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 34px;
}

.body-detail-view.blank-detail {
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--hk-muted, #b3b3b3);
}

.body-detail-view.blank-detail h2 {
  margin: 0 0 6px;
  color: var(--hk-strong, #e5e5e5);
}

/* ── 工作台头 ───────────────────────────────────────── */
.body-workbench-head {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  padding: 16px;
  margin-bottom: 12px;
}

.body-workbench-head-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.body-workbench-head-main h2 {
  margin: 4px 0 6px;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
  color: var(--hk-strong, #e5e5e5);
}

.body-workbench-head-main p {
  max-width: 760px;
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  font-size: 16px;
  font-weight: 700;
}

.body-workbench-head-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 330px;
}

.body-workbench-head-meta span,
.body-workbench-head-meta a {
  border: 0;
  border-radius: 8px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 8px 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.body-workbench-head-meta a:hover,
.body-workbench-head-meta a:focus-visible {
  background: var(--hk-chip-bg);
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}

/* ── 身份三卡 / 知识卡 ──────────────────────────────── */
.body-identity-grid,
.body-learning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.body-knowledge-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 12px;
}

.body-identity-grid .body-knowledge-card {
  background: var(--hk-panel-secondary, #242424);
}

.body-knowledge-card small {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.body-knowledge-card strong {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  margin-bottom: 7px;
}

.body-knowledge-card p,
.body-section-copy {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.7;
}

/* ── 详情区段 ───────────────────────────────────────── */
.body-detail-section,
.body-database-details {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.body-detail-section {
  padding: 14px;
  margin-bottom: 12px;
}

.body-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.body-section-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--hk-strong, #e5e5e5);
}

.body-section-head.compact {
  margin-bottom: 6px;
}

.body-section-head.compact h3 {
  font-size: 16px;
}

.body-section-copy {
  margin-bottom: 10px;
}

/* 区段性质边框（原版浅色调底色在暗色下降为面板色，彩色边框保留语义） */
.body-micro-section { border-color: rgba(255, 255, 255, 0.35); }
.body-normal-section { border-color: rgba(255, 255, 255, 0.3); }
.body-working-section { border-color: rgba(255, 255, 255, 0.32); }
.body-failure-section { border-color: rgba(255, 255, 255, 0.38); }
.body-olp-section { border-color: rgba(255, 255, 255, 0.3); }
.body-deep-panel { background: var(--hk-panel, #141414); }

/* ── 微观结构 ───────────────────────────────────────── */
.body-micro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.body-micro-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  padding: 12px;
}

.body-micro-card strong {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  margin-bottom: 7px;
}

.body-micro-card p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.65;
}

/* ── 它怎么工作：机制卡 ─────────────────────────────── */
.body-mechanism-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.body-mechanism-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  padding: 11px;
}

.body-mechanism-card.high {
  border-color: rgba(255, 255, 255, 0.45);
  background: var(--hk-chip-bg);
}

.body-mechanism-card div {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.body-mechanism-card span {
  border-radius: 8px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 900;
}

.body-mechanism-card small {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 900;
}

.body-mechanism-card p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.6;
}

/* ── 常见失效与误区 ─────────────────────────────────── */
.body-failure-learning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.body-failure-learning-grid > article {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  padding: 12px;
}

.body-failure-learning-grid > article > strong {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  margin-bottom: 7px;
}

.body-failure-learning-grid p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.65;
}

.body-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.body-chip-list span {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--hk-panel, #141414);
  color: var(--hk-muted, #b3b3b3);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.body-chip-list.strong span {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
}

.body-chip-list.warning span {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
}

.body-more-details {
  margin-top: 10px;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  overflow: hidden;
}

.body-more-details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 11px 12px;
}

.body-more-details > summary::-webkit-details-marker { display: none; }

.body-more-details > summary strong {
  color: var(--hk-strong, #e5e5e5);
}

.body-more-details > summary span {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.body-more-details .body-observation-grid,
.body-more-details .body-boundary-grid {
  border-top: 1px solid var(--hk-border, #303030);
  padding: 10px;
}

.body-boundary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
}

.body-boundary-grid > article {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 12px;
}

.body-boundary-grid > article > strong {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  margin-bottom: 7px;
}

.body-boundary-grid p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.7;
}

.body-boundary-grid ol,
.body-practice-list {
  margin: 0;
  padding-left: 20px;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.75;
}

.body-rule-list {
  display: grid;
  gap: 8px;
}

.body-rule-list article {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 10px;
}

.body-rule-list strong {
  color: var(--hk-strong, #e5e5e5);
}

.body-rule-list p {
  margin: 5px 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.55;
}

.body-rule-list small {
  color: var(--hk-muted, #b3b3b3);
  font-size: 12px;
}

/* ── 判断入口折叠区（deep details） ─────────────────── */
.body-deep-details {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  overflow: hidden;
}

.body-deep-details + .body-deep-details {
  margin-top: 10px;
}

.body-deep-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.body-deep-details > summary::-webkit-details-marker { display: none; }

.body-deep-details > summary strong,
.body-deep-details > summary small {
  display: block;
}

.body-deep-details > summary strong {
  color: var(--hk-strong, #e5e5e5);
}

.body-deep-details > summary small {
  color: var(--hk-muted, #b3b3b3);
  margin-top: 3px;
  line-height: 1.45;
}

.body-deep-details > summary b {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 5px 9px;
  white-space: nowrap;
}

.body-deep-body {
  border-top: 1px solid var(--hk-border, #303030);
  background: var(--hk-panel-secondary, #242424);
  display: grid;
  gap: 10px;
  padding: 10px;
}

.body-deep-body > .body-detail-section {
  margin-bottom: 0;
  box-shadow: none;
}

/* ── 问题线索与采证 ─────────────────────────────────── */
.body-interface-bridge {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.body-interface-bridge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.body-interface-bridge-head strong {
  color: var(--hk-strong, #e5e5e5);
}

.body-interface-bridge-head span {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.body-interface-bridge-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.body-interface-bridge-row {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}

.body-interface-bridge-row span,
.body-interface-bridge-row em {
  min-width: 0;
  color: var(--hk-muted, #b3b3b3);
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
}

.body-interface-bridge-row b {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
  padding: 3px 7px;
  font-size: 12px;
}

.body-interface-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.body-interface-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.body-interface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.body-interface-head strong {
  color: var(--hk-strong, #e5e5e5);
}

.body-interface-head span {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.body-interface-card p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.7;
}

.body-interface-related {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.body-interface-related > strong {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  margin-bottom: 7px;
}

.body-interface-card .body-observation-grid {
  grid-template-columns: 1fr;
}

/* ── 表象卡 / 素材卡 / 主链卡 ───────────────────────── */
.body-observation-grid,
.body-chain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.body-observation-card,
.body-chain-card,
.body-material-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  color: var(--hk-strong, #e5e5e5);
  text-align: left;
  display: block;
}

.body-observation-card:hover,
.body-observation-card:focus-visible,
.body-chain-card:hover,
.body-chain-card:focus-visible,
.body-material-card:hover,
.body-material-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.body-observation-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 11px;
}

.body-observation-card > span {
  grid-row: 1 / span 3;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.body-observation-card strong,
.body-chain-card strong,
.body-material-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-observation-card small,
.body-chain-card small,
.body-material-card small {
  color: var(--hk-muted, #b3b3b3);
}

.body-observation-card p,
.body-chain-card p {
  grid-column: 2;
  margin: 4px 0 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.55;
}

.body-material-grid {
  display: grid;
  gap: 8px;
}

.body-material-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 10px;
}

.body-material-card > span {
  grid-row: 1 / span 2;
  width: 50px;
  height: 36px;
  border-radius: 8px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

/* ── 上下游传导 ─────────────────────────────────────── */
.body-transmission-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
}

.body-transmission-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.body-transmission-card span {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  width: fit-content;
}

.body-transmission-card p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.7;
}

/* ── OLP 承担关系 ───────────────────────────────────── */
.body-olp-lead {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  margin-bottom: 10px;
}

.body-olp-lead strong,
.body-olp-summary-grid strong,
.body-olp-score-panel > strong,
.body-olp-role-list-panel > strong,
.body-olp-role-card strong {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  line-height: 1.35;
}

.body-olp-lead p,
.body-olp-summary-grid p,
.body-olp-score-panel p,
.body-olp-role-card p {
  margin: 5px 0 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.65;
}

.body-olp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.body-olp-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 7px 11px;
  font-weight: 900;
  cursor: pointer;
}

.body-olp-actions a:hover,
.body-olp-actions a:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: var(--hk-chip-bg);
}

.body-olp-summary-grid,
.body-olp-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.body-olp-summary-grid {
  margin-bottom: 10px;
}

.body-olp-summary-grid article,
.body-olp-score-panel,
.body-olp-role-list-panel {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 12px;
}

.body-olp-summary-grid article > span,
.body-olp-role-card span,
.body-olp-support-details summary span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.body-olp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.body-olp-chip-row span {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.body-olp-chip-row.primary span {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
}

.body-olp-chip-row.support span {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
}

.body-olp-score-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.body-olp-score-row div {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  text-align: center;
  padding: 9px 6px;
}

.body-olp-score-row div.strong {
  border-color: rgba(255, 255, 255, 0.36);
  background: var(--hk-chip-bg);
}

.body-olp-score-row b {
  display: block;
  color: var(--hk-strong, #e5e5e5);
  font-size: 22px;
  line-height: 1;
}

.body-olp-score-row span {
  display: block;
  margin-top: 6px;
  color: var(--hk-muted, #b3b3b3);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.body-olp-role-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.body-olp-role-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  padding: 10px;
}

.body-olp-role-card.primary {
  border-left: 4px solid #16a34a;
}

.body-olp-role-card.support {
  border-left: 4px solid #94a3b8;
}

.body-olp-role-card div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.body-olp-role-card small {
  color: var(--hk-muted, #b3b3b3);
  font-weight: 800;
  white-space: nowrap;
}

.body-olp-support-details {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  margin-top: 10px;
  overflow: hidden;
}

.body-olp-support-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.body-olp-support-details summary::-webkit-details-marker { display: none; }

.body-olp-support-details .body-olp-role-list {
  border-top: 1px solid var(--hk-border, #303030);
  margin-top: 0;
  padding: 10px;
}

/* ── 验证入口 / 主链面板 ────────────────────────────── */
.body-validation-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
}

.body-validation-card {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.body-validation-card.primary {
  border-color: rgba(255, 255, 255, 0.38);
  background: var(--hk-panel-secondary, #242424);
}

.body-validation-card span,
.body-route-panel span.body-section-head > span {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  width: fit-content;
}

.body-validation-card p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.7;
}

.body-route-panel {
  min-width: 0;
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 12px;
  margin-top: 10px;
}

.body-route-panel > p {
  margin: 0;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.7;
}

.body-chain-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 11px;
}

.body-chain-card > span {
  grid-row: 1 / span 5;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--hk-chip-bg);
  color: var(--hk-muted, #b3b3b3);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.body-chain-next-actions {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  margin-top: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.body-chain-next-actions > strong {
  color: var(--hk-muted, #b3b3b3);
  font-size: 13px;
}

.body-chain-next-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.body-chain-next-actions a {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  color: var(--hk-strong, #e5e5e5);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
}

.body-chain-next-actions a:hover,
.body-chain-next-actions a:focus-visible {
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.body-chain-next-actions span {
  color: var(--hk-muted, #b3b3b3);
  font-size: 12px;
  font-weight: 900;
}

.body-chain-next-actions b {
  color: var(--hk-strong, #e5e5e5);
  font-size: 13px;
  line-height: 1.35;
}

/* ── 完整数据库资料折叠 ─────────────────────────────── */
.body-database-details {
  margin-top: 14px;
  overflow: hidden;
}

.body-database-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.body-database-details > summary::-webkit-details-marker { display: none; }

.body-database-details > summary strong,
.body-database-details > summary small {
  display: block;
}

.body-database-details > summary strong {
  font-size: 17px;
  color: var(--hk-strong, #e5e5e5);
}

.body-database-details > summary small {
  color: var(--hk-muted, #b3b3b3);
  margin-top: 3px;
}

.body-database-details > summary b {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 6px 10px;
  white-space: nowrap;
}

.body-database-groups {
  border-top: 1px solid var(--hk-border, #303030);
  background: var(--hk-panel-secondary, #242424);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.body-database-group {
  border: 1px solid var(--hk-border, #303030);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  overflow: hidden;
}

.body-database-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--hk-border, #303030);
  background: var(--hk-panel-secondary, #242424);
  padding: 10px 12px;
}

.body-database-head strong {
  color: var(--hk-strong, #e5e5e5);
}

.body-database-head span {
  border-radius: 999px;
  background: var(--hk-chip-bg);
  color: var(--hk-strong, #e5e5e5);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.body-source-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.body-source-list article {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: var(--hk-panel, #141414);
  padding: 10px;
}

.body-source-list small,
.body-source-list em {
  display: block;
  color: var(--hk-muted, #b3b3b3);
  font-size: 12px;
  font-style: normal;
}

.body-source-list strong {
  display: block;
  margin: 4px 0;
  color: var(--hk-strong, #e5e5e5);
}

.body-source-list p {
  margin: 0 0 5px;
  color: var(--hk-muted, #b3b3b3);
  line-height: 1.6;
}

/* ── 空态 ───────────────────────────────────────────── */
.body-empty-note,
.body-muted-inline {
  color: var(--hk-muted, #b3b3b3);
}

.body-empty-note {
  border: 1px dashed var(--hk-border-strong, #3a3a3a);
  border-radius: 8px;
  background: var(--hk-panel-secondary, #242424);
  padding: 12px;
}

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .body-identity-grid,
  .body-learning-grid,
  .body-failure-learning-grid {
    grid-template-columns: 1fr;
  }

  .body-mechanism-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .body-olp-score-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .body-workspace {
    grid-template-columns: 1fr;
  }

  .body-browser,
  .body-detail-view {
    height: auto;
    overflow: visible;
  }

  .body-browser {
    border-right: 0;
    border-bottom: 1px solid var(--hk-border, #303030);
  }

  .body-detail-grid,
  .body-observe-panel,
  .body-material-panel,
  .body-boundary-grid,
  .body-observation-map,
  .body-interface-grid,
  .body-transmission-grid,
  .body-validation-grid,
  .body-learning-grid,
  .body-failure-learning-grid,
  .body-observation-grid,
  .body-chain-grid,
  .body-olp-lead,
  .body-olp-summary-grid,
  .body-olp-map-grid {
    grid-template-columns: 1fr;
  }

  .body-workbench-head-main,
  .body-role-map-head,
  .body-database-details > summary {
    display: grid;
  }

  .body-workbench-head-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .body-flow-steps,
  .body-decision-gate-grid,
  .body-interface-bridge-row,
  .body-mechanism-grid,
  .body-olp-score-row,
  .body-olp-role-card div {
    grid-template-columns: 1fr;
  }

  .body-olp-actions {
    justify-content: flex-start;
  }

  .body-olp-role-card small {
    white-space: normal;
  }
}

/* 窄屏：侧导航折为顶部横排条，栅格全部降单列 */
@media (max-width: 760px) {
  .body-workspace {
    grid-template-columns: 1fr;
  }

  .body-browser {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 8px;
    padding: 10px;
  }

  .body-browser-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 8px;
  }

  .body-browser-head p {
    display: none;
  }

  .body-layer-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .body-part-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 7px;
    padding: 0 0 4px;
  }

  .body-list-item {
    flex: 0 0 200px;
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .body-list-count {
    display: none;
  }

  .body-list-copy small {
    white-space: nowrap;
  }

  .body-detail-view {
    padding: 14px;
  }

  .body-identity-grid,
  .body-learning-grid,
  .body-failure-learning-grid,
  .body-interface-grid,
  .body-transmission-grid,
  .body-validation-grid,
  .body-observation-grid,
  .body-chain-grid,
  .body-olp-summary-grid,
  .body-olp-map-grid,
  .body-olp-lead,
  .body-mechanism-grid,
  .body-micro-grid,
  .body-boundary-grid,
  .body-interface-bridge-row,
  .body-olp-score-row {
    grid-template-columns: 1fr;
  }

  .body-workbench-head-main {
    display: grid;
  }

  .body-workbench-head-meta {
    justify-content: flex-start;
  }

  .body-deep-details > summary,
  .body-database-details > summary,
  .body-more-details > summary,
  .body-olp-support-details summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .body-detail-view {
    padding: 10px;
  }

  .body-detail-section {
    padding: 12px;
  }

  .body-observation-grid,
  .body-chain-grid {
    grid-template-columns: 1fr;
  }
}
