:root {
  --product-ink: #2b3032;
  --product-blue: #0078b8;
  --product-primary: #0078b8;
  --product-teal: #2f7d6b;
  --product-gold: #b96800;
  --product-red: #b42318;
  --product-line: #dfe4e1;
  --product-canvas: #f3f4f1;
}

body.product-ui { background: var(--product-canvas); }
body.product-ui [hidden] { display: none !important; }
body.product-ui .main { background: var(--product-canvas); }
body.product-ui .main__inner { max-width: 1540px; padding: 24px 32px 48px; }
body.product-ui .page-title { margin-bottom: 0; font-size: 24px; letter-spacing: 0; }
body.product-ui .card,
body.product-ui .table-wrap { border-radius: 8px; box-shadow: none; }

.product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.product-head__copy { flex: 1; min-width: 360px; }
.product-kicker {
  margin-bottom: 4px;
  color: var(--product-blue);
  font-size: 12px;
  font-weight: 800;
}
.product-desc { margin-top: 4px; color: #697386; font-size: 13px; }
.product-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; flex: none; flex-wrap: wrap; }
.product-utility-actions,
.product-task-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.product-utility-actions { flex-wrap: nowrap; }
.product-task-actions { justify-content: flex-end; flex-wrap: wrap; }

.surface-dropdown-switcher { position: relative; flex: none; }
.surface-dropdown-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  width: 108px;
  min-height: 36px;
  padding: 3px 8px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #fff;
  color: var(--product-ink);
  text-align: left;
  cursor: pointer;
}
.surface-dropdown-trigger:hover,
.surface-dropdown-switcher.open .surface-dropdown-trigger { border-color: #87b8c8; background: #f4faf9; }
.surface-dropdown-trigger:focus-visible { outline: 2px solid #84bfd3; outline-offset: 2px; }
.surface-dropdown-trigger__copy { display: grid; min-width: 0; }
.surface-dropdown-trigger__copy strong { overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.surface-dropdown-trigger__chevron { color: #7d8798; transition: transform .18s ease; }
.surface-dropdown-switcher.open .surface-dropdown-trigger__chevron { transform: rotate(180deg); }
.surface-dropdown-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 92;
  display: none;
  width: 268px;
  padding: 6px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 34, 52, .16);
}
.surface-dropdown-switcher.open .surface-dropdown-menu { display: grid; gap: 2px; }
.surface-dropdown-option { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: #384459; text-align: left; cursor: pointer; }
.surface-dropdown-option:hover { background: #f3f6fb; }
.surface-dropdown-option.active { background: #e8f4f8; }
.surface-dropdown-option.disabled { color: #9aa3b1; cursor: not-allowed; opacity: .72; }
.surface-dropdown-option.disabled:hover { background: transparent; }
.surface-dropdown-option__copy { display: grid; min-width: 0; gap: 3px; }
.surface-dropdown-option__copy strong { font-size: 12px; }
.surface-dropdown-option__copy small { color: #737d8e; font-size: 12px; line-height: 1.35; }
.surface-dropdown-option__check { visibility: hidden; color: var(--product-teal); }
.surface-dropdown-option.active .surface-dropdown-option__check { visibility: visible; }

.surface-access-guard { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px; background: #f5f7f8; }
.surface-access-denied > .app,
.surface-access-denied > .drawer,
.surface-access-denied > .drawer-mask,
.surface-access-denied > .modal,
.surface-access-denied > .modal-mask { display: none !important; }
.surface-access-guard > div { width: min(520px, 100%); padding: 32px; border: 1px solid #dce2e6; border-top: 4px solid var(--product-red); border-radius: 6px; background: #fff; box-shadow: 0 18px 48px rgba(21, 35, 42, .12); }
.surface-access-guard span { color: var(--product-red); font-size: 12px; font-weight: 800; }
.surface-access-guard h1 { margin: 10px 0 12px; color: var(--product-ink); font-size: 24px; letter-spacing: 0; }
.surface-access-guard p { margin: 0 0 22px; color: #65707d; font-size: 14px; line-height: 1.75; }

.demo-user-switcher { position: relative; flex: none; }
.demo-user-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  width: 210px;
  min-height: 36px;
  padding: 3px 8px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #fff;
  color: var(--product-ink);
  text-align: left;
  cursor: pointer;
}
.demo-user-trigger:hover,
.demo-user-switcher.open .demo-user-trigger { border-color: #87b8c8; background: #f4faf9; }
.demo-user-trigger:focus-visible { outline: 2px solid #84bfd3; outline-offset: 2px; }
.demo-user-trigger__copy { display: grid; min-width: 0; gap: 1px; }
.demo-user-trigger__copy strong,
.demo-user-trigger__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-user-trigger__copy strong { font-size: 13px; line-height: 1.35; }
.demo-user-trigger__copy small { color: #697386; font-size: 12px; line-height: 1.25; }
.demo-user-trigger__chevron { color: #7d8798; transition: transform .18s ease; }
.demo-user-switcher.open .demo-user-trigger__chevron { transform: rotate(180deg); }
.demo-user-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 90;
  display: none;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 34, 52, .16);
}
.demo-user-switcher.open .demo-user-menu { display: grid; gap: 2px; }
.demo-user-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #253047;
  text-align: left;
  cursor: pointer;
}
.demo-user-option:hover { background: #f5f7fb; }
.demo-user-option.active { background: #e8f4f8; }
.demo-user-option__copy { display: grid; min-width: 0; gap: 3px; }
.demo-user-option__copy strong { font-size: 12px; line-height: 1.35; }
.demo-user-option__copy small { color: #737d8e; font-size: 12px; line-height: 1.35; }
.demo-user-option__check { visibility: hidden; color: var(--product-teal); }
.demo-user-option.active .demo-user-option__check { visibility: visible; }
.product-actions .demo-action-limited,
.product-actions .demo-action-limited:hover {
  border-color: #d5dae3;
  background: #f3f4f6;
  color: #697386;
  box-shadow: none;
  cursor: pointer;
}
.demo-action-complete { border-color: #8bc4bc !important; background: #eef9f6 !important; color: var(--product-teal) !important; }
[data-writer-save-status].warn { color: var(--product-gold); font-weight: 700; }
.editor-tool.active { border-color: #aab8ef; background: #eaf0ff; color: var(--product-blue); }
.editor-page .clause.citation { padding: 9px 10px; border-left: 3px solid #88a0db; background: #f5f7fd; color: #4c5870; }

.context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  padding: 10px 0;
  margin-bottom: 16px;
  border: solid var(--product-line);
  border-width: 1px 0;
  border-radius: 0;
  background: transparent;
}
.context-path { display: flex; align-items: center; gap: 7px; min-width: 0; flex-wrap: wrap; }
.context-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #485267;
  font-size: 13px;
  font-weight: 600;
}
.context-node.current { color: var(--product-blue); }
.context-node .level-mark {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: #e8f4f8;
  color: var(--product-blue);
  font-size: 13px;
  font-weight: 800;
}
.context-arrow { color: #a1a9b8; font-size: 12px; }
.context-side { display: flex; align-items: center; gap: 10px; flex: none; }
.context-role { color: #697386; font-size: 12px; }
.review-relation-tabs { flex: 0 0 auto; }
.review-relation-tabs button { min-height: 28px; padding: 0 9px; font-size: 12px; }

.review-runbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border: 1px solid #ccd6ec;
  border-left: 3px solid var(--product-blue);
  border-radius: 8px;
  background: #f4faf9;
}
.review-runbar__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.review-runbar__title { color: var(--product-ink); font-size: 14px; font-weight: 800; }
.review-runbar__meta { margin-top: 3px; color: #738096; font-size: 13px; }
.review-runbar__stats { display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); min-width: 280px; }
.review-runbar__stats > div { padding: 0 12px; border-left: 1px solid #d9e0ef; text-align: right; }
.review-runbar__stats strong { display: block; color: var(--product-ink); font-size: 16px; }
.review-runbar__stats span { color: #7b8494; font-size: 12px; }

.review-baseline-panel { margin-bottom: 14px; }
.review-input-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.review-input-item { min-width: 0; padding: 10px; border: 1px solid #e1e5ec; border-radius: 6px; background: #fbfcfd; }
.review-input-item__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.review-input-item__index { color: #8490a4; font-size: 12px; font-weight: 800; }
.review-input-item strong { display: block; margin-top: 8px; color: var(--product-ink); font-size: 12px; }
.review-input-item > span:last-child { display: block; margin-top: 4px; color: #737e90; font-size: 12px; line-height: 1.5; }
.review-scope-line { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #e8ebf0; color: #657084; font-size: 13px; }
.review-scope-line b { margin-right: 5px; color: #334155; }

.module-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--product-line);
}
.module-subnav a,
.module-subnav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #687386;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.module-subnav a:hover,
.module-subnav button:hover { color: var(--product-ink); text-decoration: none; }
.module-subnav .active { color: var(--product-blue); }
.module-subnav .active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  background: var(--product-blue);
}

.stage-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 16px;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 10px 14px;
  border-right: 1px solid var(--product-line);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: #fff;
  color: #6f798b;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stage:last-child { border-right: 0; }
.stage:hover { background: #f8f9fc; }
.stage:focus-visible { z-index: 1; outline: 2px solid #84bfd3; outline-offset: -2px; }
.stage__num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #ced4df;
  border-radius: 50%;
  background: #fff;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  flex: none;
}
.stage__label { font-size: 13px; font-weight: 700; }
.stage.done { color: var(--product-teal); background: #f3faf8; }
.stage.done .stage__num { border-color: #9bd0c9; color: var(--product-teal); }
.stage.active { color: var(--product-blue); background: #f4f6ff; }
.stage.active .stage__num { border-color: var(--product-blue); background: var(--product-blue); color: #fff; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #fff;
}
.metric {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--product-line);
}
.metric:last-child { border-right: 0; }
.metric__label { color: #7b8494; font-size: 12px; }
.metric__line { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; }
.metric__value { color: var(--product-ink); font-size: 24px; font-weight: 800; line-height: 1.2; }
.metric__unit { color: #7b8494; font-size: 12px; }
.metric__hint { margin-top: 3px; color: #697386; font-size: 13px; }
.metric__hint.good { color: var(--product-teal); }
.metric__hint.warn { color: var(--product-gold); }
.metric__hint.danger { color: var(--product-red); }

.surface-panel {
  min-width: 0;
  border: 1px solid var(--product-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.surface-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--product-line);
}
.surface-panel__title { color: var(--product-ink); font-size: 14px; font-weight: 800; }
.surface-panel__meta { color: #7b8494; font-size: 13px; }
.surface-panel__body { padding: 14px; }
.surface-panel__body.flush { padding: 0; }

.workspace-3 {
  display: grid;
  grid-template-columns: 240px minmax(480px, 1fr) 330px;
  gap: 14px;
  align-items: start;
}
.workspace-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }

.org-tree { display: flex; flex-direction: column; gap: 3px; }
.org-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #465166;
  text-align: left;
  cursor: pointer;
}
.org-row:hover { background: #f3f5f8; }
.org-row.active { background: #e8f4f8; color: var(--product-blue); font-weight: 700; }
.org-row.level-1 { padding-left: 22px; }
.org-row.level-2 { padding-left: 38px; }
.org-row.level-3 { padding-left: 54px; }
.org-row__caret { color: #929bad; font-size: 12px; }
.org-row__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.org-row__count { color: #8a93a3; font-size: 12px; }
.org-row.active .org-row__count { color: var(--product-blue); }

.activity-head,
.activity-row {
  display: grid;
  grid-template-columns: minmax(115px, 1fr) minmax(125px, 1fr) minmax(140px, 1.1fr) minmax(145px, 1.15fr) 90px 76px;
  align-items: center;
}
.activity-head {
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--product-line);
  background: #f7f8fa;
  color: #7b8494;
  font-size: 13px;
  font-weight: 700;
}
.activity-row {
  min-height: 58px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf0f4;
  color: #3c4659;
  font-size: 12px;
  cursor: pointer;
}
.activity-row:last-child { border-bottom: 0; }
.activity-row:hover,
.activity-row.active { background: #f7f9ff; }
.activity-row > div { padding-right: 10px; }
.activity-main { color: var(--product-ink); font-weight: 700; }
.coverage { display: flex; align-items: center; gap: 7px; }
.coverage__bar { width: 48px; height: 5px; border-radius: 4px; background: #e6e9ef; overflow: hidden; }
.coverage__bar span { display: block; height: 100%; background: var(--product-teal); }
.coverage.warn .coverage__bar span { background: #d99a25; }
.coverage.danger .coverage__bar span { background: #d9544d; }

.review-activity-detail { min-height: 156px; padding: 13px 14px; border-top: 1px solid var(--product-line); background: #fbfcff; }
.review-activity-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-activity-detail__head strong { display: block; margin-top: 3px; color: var(--product-ink); font-size: 12px; line-height: 1.5; }
.review-activity-detail__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.review-activity-detail__grid > div { min-width: 0; padding: 8px 9px; border-left: 2px solid #c9d4ec; background: #fff; }
.review-activity-detail__grid span { display: block; color: #8490a3; font-size: 12px; }
.review-activity-detail__grid strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #3d475a; font-size: 13px; line-height: 1.45; }
.review-evidence-lines { display: grid; gap: 4px; margin-top: 9px; color: #6d7789; font-size: 12px; }
.review-evidence-lines span { display: block; }
.review-evidence-lines b { color: #46536a; }
.review-activity-detail__actions { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.review-relation-hint { padding: 9px 14px; border-bottom: 1px solid #edf0f4; background: #fafbfc; color: #727d90; font-size: 12px; line-height: 1.55; }

.status-chip,
.relation-chip,
.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.status-chip.ok,
.relation-chip.share { background: #eaf7f4; color: var(--product-teal); }
.status-chip.warn,
.relation-chip.gap { background: #fff5df; color: var(--product-gold); }
.status-chip.danger,
.relation-chip.conflict { background: #feeeee; color: var(--product-red); }
.status-chip.info,
.relation-chip.parent,
.level-chip { background: #e8f4f8; color: var(--product-blue); }
.relation-chip.sibling { background: #f0eefb; color: #6b4bb6; }

.relation-list { display: flex; flex-direction: column; }
.relation-item { padding: 12px 14px; border-bottom: 1px solid #edf0f4; }
.relation-item:last-child { border-bottom: 0; }
.relation-item__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.relation-item__title { margin-top: 7px; color: var(--product-ink); font-size: 12px; font-weight: 700; line-height: 1.5; }
.relation-item__desc { margin-top: 4px; color: #6f7888; font-size: 13px; line-height: 1.65; }
.relation-item__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: #6f7888; font-size: 12px; }
.relation-item__actions { display: flex; gap: 6px; margin-top: 9px; }
.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--product-blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.concept-block {
  min-height: 168px;
  padding: 16px;
  border: 1px solid var(--product-line);
  border-top: 3px solid var(--product-blue);
  border-radius: 8px;
  background: #fff;
}
.concept-block:nth-child(2) { border-top-color: var(--product-teal); }
.concept-block:nth-child(3) { border-top-color: #a16207; }
.concept-block__title { color: var(--product-ink); font-size: 15px; font-weight: 800; }
.concept-block__desc { margin-top: 5px; color: #6f7888; font-size: 13px; line-height: 1.6; }
.level-sequence { display: flex; gap: 6px; margin-top: 13px; flex-wrap: wrap; }
.level-node {
  flex: 1;
  min-width: 64px;
  padding: 7px 6px;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  background: #f8f9fb;
  text-align: center;
}
.level-node strong { display: block; color: #2e394d; font-size: 13px; }
.level-node span { display: block; margin-top: 2px; color: #8992a2; font-size: 12px; }

.matrix-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--product-line); }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--product-line); border-radius: 7px; background: #f7f8fa; }
.segmented button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #6d7686;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.segmented button.active { background: #fff; color: var(--product-blue); box-shadow: 0 1px 3px rgba(22, 32, 51, .08); }
.matrix-scroll { overflow-x: auto; }
.framework-matrix { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.framework-matrix th,
.framework-matrix td { padding: 10px 11px; border-right: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.framework-matrix th { background: #f7f8fa; color: #737d8e; font-size: 13px; text-align: left; }
.framework-matrix td { color: #3d4759; font-size: 13px; line-height: 1.55; }
.framework-matrix tr:last-child td { border-bottom: 0; }
.framework-matrix th:last-child,
.framework-matrix td:last-child { border-right: 0; }
.framework-matrix .cell-strong { color: var(--product-ink); font-weight: 700; }
.doc-pill { display: block; margin-bottom: 5px; padding: 6px 7px; border-radius: 5px; background: #f4f6f9; color: #445064; }
.doc-pill.missing { border: 1px dashed #d9a543; background: #fffaf0; color: #8c5b08; }
.doc-pill.borrow { border-left: 2px solid var(--product-teal); background: #f0f9f7; color: #0d665f; }
.framework-cube { border-color: #dce2e9; }
.framework-cube__head { min-height: 62px; padding: 11px 14px; background: #fff; }
.framework-cube__head-actions { display: flex; align-items: center; gap: 12px; }
.framework-cube__count { flex: none; padding-left: 12px; border-left: 1px solid #dfe4ea; color: #647084; font-size: 12px; font-weight: 700; }
.framework-cube__controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; border-bottom: 1px solid #dfe4ea; background: #f7f9fb; }
.framework-axis-control { display: grid; min-width: 0; gap: 5px; padding: 10px 12px 11px; border-right: 1px solid #dfe4ea; }
.framework-axis-control:last-child { border-right: 0; }
.framework-axis-control > span { color: #778294; font-size: 12px; font-weight: 700; }
.framework-axis-control select { width: 100%; height: 34px; padding: 0 30px 0 9px; border: 1px solid #d5dce6; border-radius: 4px; background: #fff; color: #2f3b50; font: inherit; font-size: 13px; cursor: pointer; }
.framework-axis-control select:focus { border-color: var(--product-blue); outline: 2px solid rgba(10, 132, 183, .12); }
.framework-cube__coordinate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #dfe4ea; background: #fff; }
.framework-cube__coordinate > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; min-width: 0; gap: 10px; padding: 8px 12px; border-right: 1px solid #dfe4ea; }
.framework-cube__coordinate > div:last-child { border-right: 0; }
.framework-cube__coordinate span { color: #8590a1; font-size: 12px; white-space: nowrap; }
.framework-cube__coordinate strong { overflow: hidden; color: #2d394d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.framework-cube .matrix-scroll { background: #fff; }
.framework-cube__matrix { min-width: 950px; }
.framework-cube__matrix th,
.framework-cube__matrix td { border-right-color: #e2e7ed; border-bottom-color: #e2e7ed; }
.framework-cube__matrix th { height: 40px; padding: 8px 10px; background: #f4f6f8; color: #626e80; font-size: 12px; font-weight: 700; vertical-align: middle; }
.framework-cube__matrix th.framework-dimension-col { width: 104px; }
.framework-cube__matrix th.framework-policy-col { width: 128px; }
.framework-cube__matrix th.framework-diagnosis-col { width: 118px; }
.framework-cube__matrix td { height: 76px; padding: 0; vertical-align: stretch; }
.framework-cube__matrix td.framework-dimension-cell { padding: 0; background: #fbfcfd; color: #465267; font-size: 12px; vertical-align: stretch; }
.framework-cube__matrix td.framework-dimension-cell.cell-strong { color: #253247; font-weight: 800; }
.framework-cube__matrix tbody tr:hover > td.framework-dimension-cell { background: #f5f8fa; }
.framework-activity-cell { display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 6px; width: 100%; min-height: 75px; height: 100%; padding: 10px; border: 0; border-left: 3px solid transparent; background: transparent; color: inherit; font: inherit; font-weight: inherit; line-height: 1.5; text-align: left; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.framework-activity-cell span { overflow-wrap: anywhere; }
.framework-activity-cell .icon { width: 14px; height: 14px; opacity: 0; color: var(--product-blue); transition: opacity .15s ease; }
.framework-activity-cell:hover { background: #eaf4f7; box-shadow: inset 0 0 0 1px #a8c5cf; }
.framework-activity-cell:hover .icon,
.framework-activity-cell:focus-visible .icon { opacity: 1; }
.framework-activity-cell:focus-visible { position: relative; outline: 2px solid rgba(10, 132, 183, .4); outline-offset: -2px; }
.framework-activity-cell.edited { border-left-color: var(--product-blue); background: #f1f8fa; }
.framework-cell { display: grid; align-content: center; width: 100%; min-height: 75px; height: 100%; padding: 10px; border: 0; border-left: 3px solid transparent; border-radius: 0; background: #fff; color: #354155; text-align: left; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.framework-cell:hover { background: #eef6f9; box-shadow: inset 0 0 0 1px #9ebdca; }
.framework-cell:focus-visible { position: relative; outline: 2px solid rgba(10, 132, 183, .4); outline-offset: -2px; }
.framework-cell strong { overflow-wrap: anywhere; color: inherit; font-size: 12px; line-height: 1.45; }
.framework-cell small { margin-top: 5px; overflow: hidden; color: #8791a0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.framework-cell.missing { border-left-color: #c88b24; background: #fff9ed; color: #805613; }
.framework-cell.borrow { border-left-color: #2f8b7f; background: #f0f8f6; color: #23675e; }
.framework-cell.edited { border-left-color: #1684a7; background: #f1f8fa; }
.framework-cube__matrix td:last-child { padding: 10px; background: #fafbfc; vertical-align: middle; }
.framework-cube__matrix td:last-child .status-chip { border-radius: 3px; white-space: normal; line-height: 1.35; text-align: center; }
.framework-cube-empty { padding: 28px !important; color: #7d8797 !important; text-align: center; }
.framework-cell-drawer { width: min(540px, 100vw); }
.framework-cell-drawer form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.framework-cell-editor { display: grid; align-content: start; gap: 16px; }
.framework-cell-editor__eyebrow { margin-bottom: 3px; color: var(--product-blue); font-size: 12px; font-weight: 800; }
.framework-cell-editor__coordinate { padding: 11px 12px; border-left: 3px solid var(--product-blue); background: #f4f7fa; color: #536073; font-size: 12px; font-weight: 700; line-height: 1.55; }
.framework-cell-field { display: grid; gap: 7px; }
.framework-cell-field > span { color: #536073; font-size: 12px; font-weight: 800; }
.framework-cell-field select.select { appearance: auto; }
.framework-cell-editor__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; color: #87909d; font-size: 12px; }
.framework-cell-editor__meta strong { color: #687386; font-size: 12px; }
.framework-activity-drawer { width: min(540px, 100vw); }
.framework-activity-drawer form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.framework-activity-editor { display: grid; align-content: start; gap: 16px; }
.framework-activity-fields { display: grid; gap: 14px; }
.framework-hierarchy-drawer { width: min(680px, 100vw); }
.framework-hierarchy-drawer form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.framework-hierarchy-editor { display: grid; align-content: start; gap: 14px; }
.framework-hierarchy-context { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 12px; border-left: 3px solid var(--product-blue); background: #f4f7fa; }
.framework-hierarchy-context span { color: #778294; font-size: 12px; }
.framework-hierarchy-context strong { color: #344156; font-size: 13px; text-align: right; }
.framework-hierarchy-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #dfe4ea; }
.framework-hierarchy-tabs button { min-height: 40px; border: 0; border-bottom: 2px solid transparent; background: #fff; color: #6c7788; font-size: 13px; font-weight: 700; cursor: pointer; }
.framework-hierarchy-tabs button:hover { background: #f7f9fb; color: #344156; }
.framework-hierarchy-tabs button.active { border-bottom-color: var(--product-blue); color: var(--product-blue); }
.framework-hierarchy-list { border-top: 1px solid #e1e6ec; }
.framework-hierarchy-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 70px; align-items: center; gap: 12px; min-height: 84px; padding: 12px 0; border-bottom: 1px solid #e1e6ec; }
.framework-hierarchy-index { color: #9aa3b1; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.framework-hierarchy-fields { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(150px, 1.2fr); gap: 10px; }
.framework-hierarchy-fields label { display: grid; gap: 5px; }
.framework-hierarchy-fields label > span { color: #6e798b; font-size: 11px; font-weight: 700; }
.framework-hierarchy-fields .input { min-width: 0; height: 36px; }
.framework-level-switch { display: inline-flex; align-items: center; gap: 6px; color: #5f6b7d; font-size: 12px; font-weight: 700; cursor: pointer; }
.framework-level-switch input { appearance: none; position: relative; width: 34px; height: 19px; margin: 0; border: 1px solid #bbc4d0; border-radius: 10px; background: #d5dbe3; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.framework-level-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(31, 42, 61, .22); transition: transform .15s ease; }
.framework-level-switch input:checked { border-color: var(--product-blue); background: var(--product-blue); }
.framework-level-switch input:checked::after { transform: translateX(15px); }
.framework-level-switch input:focus-visible { outline: 2px solid rgba(10, 132, 183, .28); outline-offset: 2px; }
.framework-hierarchy-order { display: flex; justify-content: flex-end; gap: 4px; }
.framework-hierarchy-order .icon-btn { width: 32px; height: 32px; }
.framework-hierarchy-order .icon-btn:disabled { opacity: .32; cursor: not-allowed; }
.framework-hierarchy-order .hierarchy-move-up .icon { transform: rotate(180deg); }

@media (max-width: 720px) {
  .framework-cube__head { align-items: flex-start; flex-direction: column; }
  .framework-cube__head-actions { width: 100%; justify-content: space-between; }
  .framework-cube__count { padding-left: 0; border-left: 0; }
  .framework-cube__controls,
  .framework-cube__coordinate { grid-template-columns: 1fr; }
  .framework-axis-control { border-right: 0; border-bottom: 1px solid #dfe4ea; }
  .framework-axis-control:last-child { border-bottom: 0; }
  .framework-cube__coordinate > div { border-right: 0; border-bottom: 1px solid var(--product-line); }
  .framework-cube__coordinate > div:last-child { border-bottom: 0; }
  .framework-cell-drawer .drawer__foot { display: grid; grid-template-columns: 1fr; }
  .framework-activity-drawer .drawer__foot { display: grid; grid-template-columns: 1fr; }
  .framework-cell-editor__meta { align-items: flex-start; flex-direction: column; }
  .framework-hierarchy-row { grid-template-columns: 24px minmax(0, 1fr) 64px; align-items: start; gap: 8px; }
  .framework-hierarchy-fields { grid-template-columns: 1fr; }
  .framework-level-switch { padding-top: 21px; }
  .framework-hierarchy-order { grid-column: 2 / -1; justify-content: flex-end; }
  .framework-hierarchy-drawer .drawer__foot { display: grid; grid-template-columns: 1fr; }
}

.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.rule-block { min-height: 108px; padding: 16px; border-right: 1px solid var(--product-line); }
.rule-block:nth-child(3) { border-right: 0; }
.rule-block.priority { grid-column: 1 / -1; min-height: auto; border-top: 1px solid var(--product-line); border-right: 0; background: #f7f9ff; }
.rule-block strong { display: block; color: var(--product-ink); font-size: 13px; }
.rule-block span { display: block; margin-top: 6px; color: #697386; font-size: 13px; line-height: 1.65; }

.builder-flow { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--product-line); border-radius: 8px; background: #fff; overflow: hidden; }
.builder-step { min-height: 98px; padding: 14px; border-right: 1px solid var(--product-line); }
.builder-step:last-child { border-right: 0; }
.builder-step__code { color: var(--product-blue); font-size: 13px; font-weight: 800; }
.builder-step__title { margin-top: 6px; color: var(--product-ink); font-size: 13px; font-weight: 800; }
.builder-step__desc { margin-top: 4px; color: #768092; font-size: 12px; line-height: 1.6; }

.review-plan-panel { margin-top: 16px; }
.review-outcome-strip { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--product-line); background: #fafbfc; }
.review-outcome-strip > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; padding: 10px 14px; border-right: 1px solid #e8ebf0; }
.review-outcome-strip > div:last-child { border-right: 0; }
.review-outcome-strip span { color: #778295; font-size: 13px; }
.review-outcome-strip strong { color: var(--product-ink); font-size: 17px; }
.review-plan-head,
.review-plan-row { display: grid; grid-template-columns: minmax(170px, 1.35fr) minmax(110px, .9fr) 72px minmax(130px, 1fr) 106px 78px; align-items: center; }
.review-plan-head { min-height: 38px; padding: 0 14px; border-bottom: 1px solid var(--product-line); background: #f6f8fa; color: #788396; font-size: 12px; font-weight: 700; }
.review-plan-row { min-height: 54px; padding: 9px 14px; border-bottom: 1px solid #edf0f4; color: #4b5669; font-size: 13px; }
.review-plan-row:last-child { border-bottom: 0; }
.review-plan-row > div { min-width: 0; padding-right: 8px; }
.review-plan-row strong { display: block; overflow-wrap: anywhere; color: var(--product-ink); font-size: 13px; }
.review-plan-row > div:first-child span { display: block; margin-top: 3px; color: #8a93a3; font-size: 12px; }
.review-plan-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 9px 14px; border-top: 1px solid var(--product-line); background: #fbfcfd; color: #687386; font-size: 13px; }

.writer-layout { display: grid; grid-template-columns: 250px minmax(480px, 1fr) 310px; gap: 14px; align-items: start; }
.task-row { width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid #edf0f4; background: #fff; text-align: left; cursor: pointer; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover,
.task-row.active { background: #f4f7ff; }
.task-row__title { color: var(--product-ink); font-size: 12px; font-weight: 700; }
.task-row__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; color: #818a9a; font-size: 12px; }
.editor-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--product-line); background: #f8f9fb; }
.editor-tool {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #576174;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.editor-tool:hover { background: #e9edf3; }
.editor-page { min-height: 560px; padding: 34px 48px; background: #fff; }
.editor-title { text-align: center; color: var(--product-ink); font-size: 20px; font-weight: 800; }
.editor-meta { margin: 8px 0 28px; text-align: center; color: #8a93a3; font-size: 13px; }
.clause { margin-bottom: 17px; color: #313c50; font-size: 13px; line-height: 1.9; }
.clause strong { color: var(--product-ink); }
.clause.flag { margin-right: -12px; margin-left: -12px; padding: 10px 12px; border-left: 3px solid #d49a28; background: #fff9eb; }
.assistant-section { padding: 12px 14px; border-bottom: 1px solid #edf0f4; }
.assistant-section:last-child { border-bottom: 0; }
.assistant-title { color: var(--product-ink); font-size: 12px; font-weight: 800; }
.assistant-copy { margin-top: 5px; color: #6f7888; font-size: 13px; line-height: 1.65; }
.source-line { margin-top: 8px; padding: 7px 8px; border-left: 2px solid var(--product-blue); background: #f5f7ff; color: #4d5870; font-size: 12px; line-height: 1.55; }
.knowledge-line { display: flex; align-items: flex-start; gap: 7px; margin-top: 8px; padding: 8px; border: 1px solid #e3e0f3; border-radius: 6px; background: #f8f7fc; color: #5e5871; font-size: 12px; line-height: 1.55; }

.query-layout { display: grid; grid-template-columns: minmax(520px, 1fr) 390px; gap: 14px; align-items: start; }
.conversation { min-height: 620px; display: flex; flex-direction: column; }
.question-block { padding: 16px 18px; border-bottom: 1px solid var(--product-line); background: #f8f9fb; }
.question-label { color: #7d8696; font-size: 12px; font-weight: 700; }
.question-text { margin-top: 5px; color: var(--product-ink); font-size: 14px; font-weight: 700; line-height: 1.65; }
.answer-block { flex: 1; padding: 20px 22px; }
.answer-summary { padding-left: 12px; border-left: 3px solid var(--product-blue); color: #273246; font-size: 14px; font-weight: 700; line-height: 1.75; }
.answer-section { margin-top: 18px; }
.answer-section__title { color: var(--product-ink); font-size: 12px; font-weight: 800; }
.answer-section p { margin-top: 6px; color: #525d70; font-size: 12px; line-height: 1.8; }
.query-composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--product-line); }
.query-composer textarea { min-height: 40px; max-height: 100px; resize: vertical; }
.query-closure-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 12px 12px; }
.trace-list { display: flex; flex-direction: column; }
.trace-step { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 9px; align-items: start; padding: 12px 14px; border-bottom: 1px solid #edf0f4; }
.trace-step:last-child { border-bottom: 0; }
.trace-step__dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #d7dce5; border-radius: 50%; color: #8690a1; font-size: 12px; font-weight: 800; }
.trace-step.done .trace-step__dot { border-color: #9bcfc8; background: #eaf7f4; color: var(--product-teal); }
.trace-step.running .trace-step__dot { border-color: var(--product-blue); background: #e8f4f8; color: var(--product-blue); }
.trace-step__title { color: #344055; font-size: 13px; font-weight: 700; }
.trace-step__desc { margin-top: 3px; color: #7b8494; font-size: 12px; line-height: 1.55; }
.trace-step__count { color: #7b8494; font-size: 12px; }
.evidence-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.evidence-item { padding: 9px 10px; border: 1px solid #e2e6ed; border-radius: 6px; background: #fafbfc; }
.evidence-item__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evidence-item__title { margin-top: 5px; color: #364155; font-size: 13px; font-weight: 700; line-height: 1.55; }
.evidence-item__meta { margin-top: 3px; color: #8790a0; font-size: 12px; }
.evidence-item.knowledge { border-color: #ded9ef; background: #faf9fd; }
.knowledge-panel .surface-panel__head { background: #faf9fd; }

/* Query workbench */
body.product-ui.query-page .main { background: #fff; }
body.query-page [hidden] { display: none !important; }
.query-page .query-workbench { display: flex; min-height: 100vh; max-width: none; flex-direction: column; padding: 18px 28px 32px; }
.query-head { align-items: center; margin-bottom: 12px; }
.query-head .page-title { font-size: 19px; }
.query-head .product-kicker { margin-bottom: 2px; font-size: 12px; }
.query-context { min-height: 50px; margin-bottom: 0; }

.query-side-tools { display: grid; gap: 2px; padding: 4px 12px 2px; }
.query-side-action {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4d576a;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.query-side-action:hover { background: #f0f3f7; color: var(--product-ink); text-decoration: none; }
.query-side-action.primary { background: #e9edf3; color: #293348; }
.query-side-action .icon { width: 16px; height: 16px; color: #7a8497; }
.query-history { flex: 1; min-height: 96px; padding-bottom: 8px; }
.query-history-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4e596c;
  text-align: left;
  cursor: pointer;
}
.query-history-item:hover { background: #f0f3f7; }
.query-history-item.active { background: #e8f4f8; color: var(--product-blue); }
.query-history-item span,
.query-history-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-history-item span { font-size: 13px; font-weight: 700; }
.query-history-item small { color: #8a93a2; font-size: 12px; }
.query-history-item.active small { color: #6679bd; }

.query-start {
  flex: 1;
  min-height: calc(100vh - 154px);
  padding: 78px 20px 48px;
}
.query-start__core { width: min(800px, 100%); margin: 0 auto; text-align: center; }
.query-start__mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border: 1px solid #d7dff4;
  border-radius: 8px;
  background: #e8f4f8;
  color: var(--product-blue);
}
.query-start__mark .icon { width: 20px; height: 20px; }
.query-start h2 { color: var(--product-ink); font-size: 24px; font-weight: 700; line-height: 1.35; }
.query-start__org { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 7px; color: #818b9b; font-size: 13px; }
.query-composer-home { margin-top: 24px; }
.query-composer-shell {
  position: relative;
  width: 100%;
  border: 1px solid #d6dce6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(34, 46, 68, .06);
  text-align: left;
  transition: border-color .16s, box-shadow .16s;
}
.query-composer-shell:focus-within { border-color: #8fa3e6; box-shadow: 0 8px 26px rgba(49, 87, 213, .10); }
.query-composer-shell textarea {
  display: block;
  width: 100%;
  min-height: 74px;
  padding: 15px 16px 6px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--product-ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
}
.query-composer-shell textarea::placeholder { color: #a1a9b7; }
.query-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 10px; }
.query-composer-tools,
.query-composer-scope { display: flex; align-items: center; gap: 7px; min-width: 0; }
.query-popover { position: relative; }
.query-icon-button,
.query-send-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dce1e9;
  border-radius: 50%;
  background: #fff;
  color: #586477;
  cursor: pointer;
}
.query-icon-button:hover { border-color: #aeb9cf; background: #f7f9fc; color: var(--product-blue); }
.query-send-button { border-color: var(--product-blue); background: var(--product-blue); color: #fff; }
.query-send-button:hover { background: #2749b9; }
.query-send-button:disabled { border-color: #9ba9d8; background: #9ba9d8; cursor: wait; }
.query-send-button.loading .icon { animation: query-pulse .8s ease-in-out infinite alternate; }
.query-mode-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #dce1e9;
  border-radius: 6px;
  background: #f8f9fc;
  color: var(--product-blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.query-mode-button:hover { border-color: #b8c4e8; background: #f2f5ff; }
.query-composer-scope select {
  max-width: 116px;
  min-height: 34px;
  padding: 0 24px 0 8px;
  border: 0;
  outline: 0;
  background: #fff;
  color: #596477;
  font-size: 13px;
  cursor: pointer;
}
.query-tool-menu,
.query-mode-menu,
.query-more-menu {
  position: absolute;
  z-index: 88;
  display: grid;
  min-width: 230px;
  padding: 6px;
  border: 1px solid #d9dfe8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 32, 51, .16);
}
.query-tool-menu,
.query-mode-menu { bottom: calc(100% + 8px); left: 0; }
.query-more-menu { top: calc(100% + 7px); right: 0; min-width: 176px; }
.query-tool-menu button,
.query-mode-menu button,
.query-more-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #344055;
  text-align: left;
  cursor: pointer;
}
.query-tool-menu button:hover,
.query-mode-menu button:hover,
.query-mode-menu button.active,
.query-more-menu button:hover { background: #f2f5fa; }
.query-tool-menu button > span,
.query-mode-menu button { min-width: 0; }
.query-tool-menu strong,
.query-tool-menu small,
.query-mode-menu strong,
.query-mode-menu small { display: block; }
.query-tool-menu strong,
.query-mode-menu strong { font-size: 13px; }
.query-tool-menu small,
.query-mode-menu small { margin-top: 2px; color: #8a93a3; font-size: 12px; }
.query-more-menu button { min-height: 34px; font-size: 13px; }
.query-attachment-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 4px 16px 0;
  padding: 6px 8px;
  border: 1px solid #dbe2f1;
  border-radius: 6px;
  background: #f6f8fc;
  color: #536078;
  font-size: 12px;
}
.query-attachment-summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-attachment-summary button { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; background: transparent; color: #8a94a5; cursor: pointer; }
.query-attachment-summary button:hover { color: var(--product-red); }
.query-attachment-summary .icon,
.query-attachment-summary button .icon { width: 14px; height: 14px; }
.query-quick-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.query-quick-actions > button,
.query-quick-actions > .query-popover > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f4f6f9;
  color: #455166;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.query-quick-actions button:hover { border-color: #d9e0eb; background: #eef1f6; color: var(--product-blue); }

.query-session { display: grid; grid-template-columns: minmax(520px, 1fr) 360px; gap: 22px; align-items: start; padding-top: 18px; }
.query-thread { width: min(860px, 100%); justify-self: center; }
.query-question-message { padding: 14px 16px; border: 1px solid #e0e4eb; border-radius: 8px; background: #f7f8fa; }
.query-question-message__meta { display: flex; align-items: center; gap: 6px; color: #7e8796; font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.query-question-message__text { margin-top: 6px; color: var(--product-ink); font-size: 14px; font-weight: 700; line-height: 1.65; }
.query-question-attachment { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 5px 7px; border-radius: 5px; background: #e8f4f8; color: #3c7184; font-size: 12px; }
.query-question-attachment .icon { width: 13px; height: 13px; }
.query-thinking { display: flex; align-items: center; gap: 10px; min-height: 62px; margin-top: 12px; padding: 10px 4px; border-bottom: 1px solid #e7eaf0; }
.query-thinking__indicator { width: 18px; height: 18px; flex: none; border: 2px solid #cad4f2; border-top-color: var(--product-blue); border-radius: 50%; animation: query-spin .8s linear infinite; }
.query-thinking strong,
.query-thinking span { display: block; }
.query-thinking strong { color: #354158; font-size: 13px; }
.query-thinking div > span { margin-top: 3px; color: #8992a1; font-size: 12px; }
.query-answer { padding: 20px 4px 8px; }
.query-answer__head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.query-answer__avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #e8f4f8; color: var(--product-blue); }
.query-answer__head div { display: grid; gap: 2px; }
.query-answer__head strong { color: var(--product-ink); font-size: 13px; }
.query-answer__head div span { color: #818a9a; font-size: 12px; }
.query-answer .answer-summary { padding: 12px 14px; border: 0; border-left: 3px solid var(--product-blue); border-radius: 0 6px 6px 0; background: #f5f7fd; }
.query-answer__boundary { padding: 11px 12px; border: 1px solid #eadfca; border-radius: 6px; background: #fffbf2; }
.query-answer__boundary p { margin-bottom: 0; }
.query-session .query-closure-actions { padding: 14px 4px; border-top: 1px solid #e7eaf0; }
.query-followups { display: flex; align-items: center; gap: 7px; padding: 12px 4px 4px; flex-wrap: wrap; }
.query-followups > span { color: #8992a2; font-size: 12px; font-weight: 700; }
.query-followups button { min-height: 30px; padding: 0 9px; border: 1px solid #dfe4ec; border-radius: 6px; background: #fff; color: #5e697c; font-size: 12px; cursor: pointer; }
.query-followups button:hover { border-color: #b9c5e6; background: #f6f8fd; color: var(--product-blue); }
.query-composer-dock { position: sticky; bottom: 0; z-index: 12; padding: 14px 4px 6px; background: #fff; }
.query-composer-dock .query-composer-shell textarea { min-height: 44px; padding-top: 10px; }
.query-evidence-rail { position: sticky; top: 14px; display: grid; gap: 14px; }
.query-evidence-rail > .surface-panel { margin-top: 0 !important; }
.query-evidence-pending { padding: 18px 8px; color: #929baa; font-size: 12px; text-align: center; }

@keyframes query-spin { to { transform: rotate(360deg); } }
@keyframes query-pulse { from { opacity: .45; } to { opacity: 1; } }

.lifecycle-track { display: grid; grid-template-columns: repeat(8, 1fr); border: 1px solid var(--product-line); border-radius: 8px; background: #fff; overflow: hidden; margin-bottom: 16px; }
.life-step { min-height: 72px; padding: 12px 10px; border: 0; border-right: 1px solid var(--product-line); background: #fff; text-align: left; cursor: pointer; }
.life-step:last-child { border-right: 0; }
.life-step:hover { background: #f7f8fa; }
.life-step.active { background: #e8f4f8; }
.life-step__num { color: #8b94a4; font-size: 12px; font-weight: 800; }
.life-step__name { margin-top: 5px; color: #3a4558; font-size: 12px; font-weight: 700; }
.life-step.active .life-step__num,
.life-step.active .life-step__name { color: var(--product-blue); }
.management-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.queue-row { display: grid; grid-template-columns: minmax(220px, 1fr) 130px 120px 100px 120px; gap: 10px; align-items: center; min-height: 54px; padding: 9px 14px; border-bottom: 1px solid #edf0f4; font-size: 13px; color: #566174; }
[data-life-queue] .queue-row { grid-template-columns: minmax(180px, 1fr) 88px 84px 68px 62px 90px; gap: 6px; padding-right: 10px; padding-left: 10px; }
.queue-row.head { min-height: 36px; background: #f7f8fa; color: #7b8494; font-weight: 700; }
.queue-row:last-child { border-bottom: 0; }
.queue-title { color: var(--product-ink); font-weight: 700; }
.queue-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.workflow-events-panel { margin-top: 14px; }
.workflow-event-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workflow-event { min-width: 0; padding: 12px 14px; border-right: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.workflow-event:nth-child(3n) { border-right: 0; }
.workflow-event__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.workflow-event__title { margin-top: 5px; color: var(--product-ink); font-size: 13px; font-weight: 700; }
.workflow-event__meta { margin-top: 3px; color: #828b9a; font-size: 12px; }
.life-gate-drawer { width: min(540px, 94vw); }
.life-gate-drawer__eyebrow { margin-bottom: 3px; color: var(--product-blue); font-size: 12px; font-weight: 800; }
.life-gate-summary { padding: 11px 12px; border-left: 3px solid var(--product-blue); border-radius: 4px; background: #f4f6fc; }
.life-gate-summary strong, .life-gate-summary span { display: block; }
.life-gate-summary strong { color: #28354a; font-size: 13px; }
.life-gate-summary span { margin-top: 4px; color: #6f7b8f; font-size: 12px; line-height: 1.5; }
.life-gate-form { display: grid; gap: 12px; margin-top: 16px; }
.life-gate-field { display: grid; gap: 6px; }
.life-gate-field > span { color: #606c80; font-size: 12px; font-weight: 700; }
.life-gate-field input[type="text"],
.life-gate-field input[type="number"],
.life-gate-field input[type="date"],
.life-gate-field select,
.life-gate-field textarea { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d8dee8; border-radius: 6px; background: #fff; color: #303c51; font: inherit; font-size: 13px; }
.life-gate-field textarea { min-height: 74px; resize: vertical; line-height: 1.5; }
.life-gate-check { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border: 1px solid #dde3ec; border-radius: 6px; color: #465268; font-size: 12px; }
.life-gate-check input { width: 15px; height: 15px; }
.life-gate-errors { margin-top: 12px; padding: 10px 12px; border: 1px solid #efcaca; border-radius: 6px; background: #fff5f5; color: #9d2c27; font-size: 12px; line-height: 1.55; }
.life-gate-history { margin-top: 18px; }
.life-gate-history h3 { margin: 0 0 8px; color: #2d394e; font-size: 13px; }
.life-gate-history-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 9px; padding: 8px 0; border-bottom: 1px solid #edf0f4; }
.life-gate-history-row span { color: #8a94a3; font-size: 12px; }
.life-gate-history-row strong { display: block; color: #445066; font-size: 12px; }
.life-gate-history-row small { display: block; margin-top: 3px; color: #818b9a; font-size: 12px; }
.life-gate-drawer__foot { flex-wrap: wrap; }

.library-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 14px; align-items: start; }
.library-import-banner { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; margin-bottom: 14px; padding: 11px 13px; border: 1px solid #d8e4e3; border-left: 3px solid var(--product-blue); border-radius: 6px; background: #fff; }
.library-import-banner__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; background: #e8f4f8; color: var(--product-blue); }
.library-import-banner__mark .icon { width: 16px; height: 16px; }
.library-import-banner__copy { display: grid; min-width: 0; gap: 2px; }
.library-import-banner__copy strong { overflow: hidden; color: #2f3638; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.library-import-banner__copy span { color: #7a8486; font-size: 12px; }
.library-import-banner__status { display: flex; align-items: center; gap: 6px; }
.library-axis-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--product-line); border-radius: 6px; background: #fafbfc; }
.library-axis-bar__control { display: flex; align-items: center; gap: 10px; color: #667085; font-size: 12px; font-weight: 700; }
.library-axis-bar__hint { color: #7d8797; font-size: 12px; text-align: right; }
.library-modebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--product-line); background: #fbfcfd; }
.library-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.library-filters .searchbox { flex: 1; min-width: 260px; }
[data-category-filter] .select__menu { width: 230px; max-height: 340px; overflow-y: auto; }
.policy-table { min-width: 1180px; }
.policy-table th:nth-child(1) { width: 24%; }
.policy-name { color: var(--product-ink); font-size: 12px; font-weight: 700; }
.policy-name-button { max-width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.policy-name-button:hover { color: var(--product-primary); }
.policy-meta { margin-top: 3px; color: #8790a0; font-size: 12px; }
.policy-version { display: inline-block; margin-right: 6px; color: #344055; font-size: 12px; }
.org-path-mini { color: #586376; font-size: 12px; line-height: 1.55; }
.org-path-mini strong { display: block; color: #344055; font-size: 13px; }
.relation-summary { display: flex; gap: 5px; flex-wrap: wrap; }
.library-row-actions { display: flex; align-items: center; gap: 8px; }
.table tbody tr[data-hidden="true"] { display: none; }
.library-results-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--product-line); background: #fbfcfb; }
.library-pagination { display: flex; align-items: center; gap: 6px; color: #657174; font-size: 12px; }
.library-pagination [data-library-page="prev"] .icon { transform: rotate(180deg); }
.library-pagination .icon-btn:disabled { opacity: .35; cursor: not-allowed; }

.library-check-panel { padding: 0 14px 14px; }
.library-check-overview { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -14px 2px; border-bottom: 1px solid var(--product-line); background: #fbfcfd; }
.library-check-overview > div { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 13px 10px; border-right: 1px solid var(--product-line); }
.library-check-overview > div:last-child { border-right: 0; }
.library-check-overview span { color: #778194; font-size: 12px; }
.library-check-overview strong { color: #283449; font-size: 18px; }
.library-check-list { display: flex; flex-direction: column; }
.library-check-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 15px 0; border-bottom: 1px solid #edf0f4; }
.library-check-row:last-child { border-bottom: 0; }
.library-check-row__severity { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.library-check-row__severity.danger { background: #fff1f0; color: #b93831; }
.library-check-row__severity.warn { background: #fff7e8; color: #9a6412; }
.library-check-row__severity.info { background: #edf5ff; color: #3567a8; }
.library-check-row__meta { margin-bottom: 4px; color: #7f8999; font-size: 12px; }
.library-check-row__content strong { color: #29364b; font-size: 12px; }
.library-check-row__content p { margin: 5px 0 0; color: #697487; font-size: 12px; line-height: 1.6; }
.library-check-row__actions { display: flex; align-items: center; gap: 7px; padding-top: 4px; }

.knowledge-grid { padding: 14px; }
.knowledge-grid > div { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 10px; }
.knowledge-item { padding: 14px; border: 1px solid #ded9ef; border-radius: 7px; background: #faf9fd; }
.knowledge-item__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.knowledge-item__head > div { display: flex; gap: 6px; flex-wrap: wrap; }
.knowledge-item__title { margin-top: 10px; color: var(--product-ink); font-size: 13px; font-weight: 800; }
.knowledge-item__meta { margin-top: 5px; color: #6f7888; font-size: 12px; line-height: 1.6; }
.knowledge-item__scope { display: flex; flex-direction: column; gap: 3px; margin-top: 9px; padding: 8px; border-radius: 5px; background: #fff; color: #6f7888; font-size: 12px; }

.library-policy-drawer { width: min(620px, 100vw); }
.library-drawer__eyebrow { color: var(--product-blue); font-size: 12px; font-weight: 800; }
.library-detail-summary { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #e2e6ed; border-radius: 6px; background: #fafbfc; }
.library-detail-summary > div { padding: 11px 12px; border-right: 1px solid #e2e6ed; }
.library-detail-summary > div:last-child { border-right: 0; }
.library-detail-summary span { display: block; color: #858e9e; font-size: 12px; }
.library-detail-summary strong { display: block; margin-top: 4px; color: #2d394d; font-size: 12px; }
.library-detail-section { margin-top: 20px; }
.library-detail-section h3 { margin: 0 0 9px; color: #2e3a4e; font-size: 13px; }
.library-detail-list { margin: 0; border-top: 1px solid #e9ecf1; }
.library-detail-list > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #e9ecf1; }
.library-detail-list dt { color: #8992a1; font-size: 12px; }
.library-detail-list dd { margin: 0; color: #425067; font-size: 12px; text-align: right; }
.library-related-list { display: flex; flex-direction: column; border-top: 1px solid #e9ecf1; }
.library-related-list button { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #e9ecf1; background: transparent; text-align: left; cursor: pointer; }
.library-related-list button:hover strong { color: var(--product-primary); }
.library-related-list strong { align-self: center; color: #3c495f; font-size: 12px; }
.library-related-list small { grid-column: 2; color: #8a93a2; font-size: 12px; }
.library-version-list { border-left: 2px solid #dfe4ec; }
.library-version-list > div { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; padding: 0 0 14px 14px; }
.library-version-list > div::before { position: absolute; top: 3px; left: -5px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #a9b2c0; content: ""; }
.library-version-list > div.active::before { background: var(--product-blue); }
.library-version-list span { color: #59657a; font-size: 12px; font-weight: 800; }
.library-version-list strong { display: block; color: #3e4a60; font-size: 12px; }
.library-version-list small { display: block; margin-top: 3px; color: #8a93a2; font-size: 12px; }

.library-workspace-tabs { display: flex; align-items: stretch; min-height: 40px; margin: 12px 0; border-bottom: 1px solid var(--product-line); background: #fff; }
.library-workspace-tabs button { position: relative; display: flex; align-items: center; gap: 7px; min-width: 126px; min-height: 40px; padding: 0 15px; border: 0; background: transparent; color: #687486; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.library-workspace-tabs button::after { position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: transparent; content: ""; }
.library-workspace-tabs button:hover { color: var(--product-primary); background: #f7faf9; }
.library-workspace-tabs button.active { color: var(--product-primary); }
.library-workspace-tabs button.active::after { background: var(--product-primary); }
.library-workspace-tabs small { display: grid; place-items: center; min-width: 19px; height: 17px; padding: 0 5px; border-radius: 7px; background: #edf1f1; color: #748084; font-size: 12px; }
.library-workspace-tabs button.active small { background: #e5f2ef; color: #176f65; }
.library-metric-strip { margin-bottom: 14px; }
.library-access-note { display: grid; gap: 5px; padding: 12px 14px; border-top: 1px solid var(--product-line); background: #f7faf9; }
.library-access-note strong { color: #3b4b4c; font-size: 12px; }
.library-access-note span { color: #758285; font-size: 12px; line-height: 1.55; }
.library-view-heading { display: grid; gap: 2px; min-width: 0; }
.library-view-heading strong { color: #2c393e; font-size: 12px; }
.library-view-heading span { overflow: hidden; color: #7c878b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.library-search-state { display: flex; align-items: center; gap: 7px; margin-top: -5px; color: #627488; font-size: 12px; }
.library-search-state.done { color: #237668; }
.library-search-state.error { color: #9b5f20; }
.spinner-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--product-blue); animation: library-pulse 1.2s ease-in-out infinite; }
.library-search-state.done .spinner-dot { background: #2d8879; animation: none; }
.library-search-state.error .spinner-dot { background: #c4873e; animation: none; }
@keyframes library-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.library-batch-panel { min-width: 0; }
.library-batch-summary { display: grid; gap: 7px; padding: 28px 24px; text-align: left; }
.library-batch-summary strong { color: #263133; font-size: 14px; }
.library-batch-summary span { color: #4f5b5d; font-size: 12px; line-height: 1.6; }
.library-batch-summary small { color: #7c8789; font-size: 13px; line-height: 1.6; }

/* 制度详情：同一制度对象的元数据、关系证据与治理链路 */
.policy-detail-page .product-actions > .btn:first-of-type .icon { transform: rotate(180deg); }
.policy-detail-context { margin-bottom: 14px; }
.policy-detail-state { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 28px; border: 1px solid #e4d8ca; border-left: 3px solid var(--product-gold); border-radius: 6px; background: #fff; }
.policy-detail-state > .icon { width: 22px; height: 22px; color: var(--product-gold); }
.policy-detail-state div { display: grid; gap: 4px; }
.policy-detail-state strong { color: var(--product-ink); font-size: 15px; }
.policy-detail-state span { color: #6b7476; font-size: 12px; }
.policy-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.policy-detail-main,
.policy-detail-aside { display: grid; min-width: 0; gap: 14px; }
.policy-object-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--product-line); border-radius: 6px; background: #fff; overflow: hidden; }
.policy-object-strip > div { display: grid; min-width: 0; gap: 5px; padding: 13px 15px; border-right: 1px solid var(--product-line); }
.policy-object-strip > div:last-child { border-right: 0; }
.policy-object-strip span { color: #778183; font-size: 12px; }
.policy-object-strip strong { overflow: hidden; color: var(--product-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.policy-detail-workspace { min-width: 0; overflow: hidden; }
.policy-detail-tabs { display: flex; gap: 0; min-height: 42px; padding: 0 16px; border-bottom: 1px solid var(--product-line); }
.policy-detail-tabs button { position: relative; min-width: 94px; padding: 0 14px; border: 0; background: transparent; color: #697476; font-size: 12px; cursor: pointer; }
.policy-detail-tabs button::after { position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: transparent; content: ""; }
.policy-detail-tabs button.active { color: var(--product-blue); font-weight: 700; }
.policy-detail-tabs button.active::after { background: var(--product-blue); }
.policy-detail-panel { min-height: 390px; padding: 22px; }
.policy-detail-section + .policy-detail-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--product-line); }
.policy-detail-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.policy-detail-section__head > div { display: grid; gap: 3px; }
.policy-detail-section__head span:not(.status-chip) { color: var(--product-blue); font-size: 12px; font-weight: 700; }
.policy-detail-section__head h2 { margin: 0; color: var(--product-ink); font-size: 16px; letter-spacing: 0; }
.policy-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.policy-detail-list > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0ee; }
.policy-detail-list dt { color: #778183; font-size: 13px; }
.policy-detail-list dd { margin: 0; color: #364043; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.policy-detail-callout { padding: 15px 16px; border-left: 3px solid var(--product-teal); background: #f3f8f5; }
.policy-detail-callout strong { color: var(--product-teal); font-size: 13px; }
.policy-detail-callout p { margin: 5px 0 3px; color: #364442; font-size: 12px; line-height: 1.65; }
.policy-detail-callout small { color: #78827f; font-size: 12px; line-height: 1.55; }
.policy-detail-summary-note { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; padding: 11px 12px; border: 1px solid #dce7e3; background: #f7faf8; color: #62716d; font-size: 13px; line-height: 1.6; }
.policy-detail-summary-note .icon { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--product-teal); }
.policy-detail-summary-grid { display: grid; }
.policy-detail-summary-grid article { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 16px 2px; border-bottom: 1px solid var(--product-line); }
.policy-detail-summary-grid article b { color: #94a09e; font-size: 13px; }
.policy-detail-summary-grid article div { display: grid; gap: 5px; }
.policy-detail-summary-grid article strong { color: var(--product-ink); font-size: 13px; }
.policy-detail-summary-grid article p { margin: 0; color: #586365; font-size: 12px; line-height: 1.7; }
.policy-relation-list { display: grid; }
.policy-relation-list button { display: grid; grid-template-columns: 96px minmax(0, 1fr) 18px; gap: 12px; align-items: center; min-height: 66px; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--product-line); background: transparent; text-align: left; cursor: pointer; }
.policy-relation-list button:hover { background: #f7f9f8; }
.policy-relation-list button > span:nth-child(2) { display: grid; min-width: 0; gap: 4px; }
.policy-relation-list button strong { overflow: hidden; color: var(--product-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.policy-relation-list button small { color: #778183; font-size: 12px; }
.policy-relation-list button > .icon { color: #8d989a; }
.policy-version-timeline { display: grid; }
.policy-version-timeline article { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--product-line); }
.policy-version-timeline article > b { color: #657174; font-size: 12px; }
.policy-version-timeline article.current > b { color: var(--product-blue); }
.policy-version-timeline article div { display: grid; gap: 4px; }
.policy-version-timeline article strong { color: var(--product-ink); font-size: 12px; }
.policy-version-timeline article span { color: #7a8587; font-size: 12px; }
.policy-detail-aside .surface-panel__body { padding: 14px; }
.policy-detail-aside .policy-detail-list { grid-template-columns: 1fr; }
.policy-detail-aside .policy-detail-list > div { grid-template-columns: 88px minmax(0, 1fr); }
.policy-loop-list { display: grid; }
.policy-loop-list a { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--product-line); text-decoration: none; }
.policy-loop-list a:last-child { border-bottom: 0; }
.policy-loop-list a span { color: var(--product-blue); font-size: 12px; font-weight: 700; }
.policy-loop-list a strong { color: var(--product-ink); font-size: 13px; line-height: 1.45; }
.policy-loop-list a small { color: #7b8688; font-size: 12px; }
.policy-detail-empty { display: grid; place-items: center; min-height: 240px; padding: 30px; text-align: center; }
.policy-detail-empty.compact { min-height: 120px; padding: 18px 8px; }
.policy-detail-empty strong { color: #4e595b; font-size: 13px; }
.policy-detail-empty span { max-width: 430px; margin-top: 5px; color: #7b8587; font-size: 13px; line-height: 1.6; }

@media (max-width: 1180px) {
  .policy-detail-layout { grid-template-columns: minmax(0, 1fr); }
  .policy-detail-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .policy-object-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .policy-object-strip > div:nth-child(3) { border-right: 0; }
  .policy-object-strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--product-line); }
}

@media (max-width: 760px) {
  .policy-detail-state { grid-template-columns: 26px minmax(0, 1fr); }
  .policy-detail-state > .btn { grid-column: 2; justify-self: start; }
  .policy-detail-aside { grid-template-columns: 1fr; }
  .policy-object-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-object-strip > div { border-right: 1px solid var(--product-line); border-bottom: 1px solid var(--product-line); }
  .policy-object-strip > div:nth-child(2n) { border-right: 0; }
  .policy-object-strip > div:nth-last-child(-n+2) { border-bottom: 0; }
  .policy-detail-tabs { overflow-x: auto; }
  .policy-detail-tabs button { min-width: 88px; }
  .policy-detail-panel { padding: 16px; }
  .policy-detail-list { grid-template-columns: 1fr; }
}
.batch-gate-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border-bottom: 1px solid var(--product-line); background: #f8faf9; }
.batch-gate-head > div:first-child { display: grid; gap: 3px; }
.batch-gate-head strong { color: #324044; font-size: 13px; }
.batch-gate-head span { color: #7d898c; font-size: 12px; }
.batch-gate-actions { display: flex; align-items: center; gap: 7px; }
.batch-gate-track { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); overflow-x: auto; border-bottom: 1px solid var(--product-line); background: #fff; }
.batch-gate-track button { display: grid; grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 7px; min-height: 60px; padding: 10px 11px; border: 0; border-right: 1px solid var(--product-line); background: transparent; text-align: left; cursor: pointer; }
.batch-gate-track button:last-child { border-right: 0; }
.batch-gate-track button:hover { background: #f8faf9; }
.batch-gate-track button > span { grid-row: 1 / 3; display: grid; place-items: center; align-self: center; width: 23px; height: 23px; border-radius: 50%; background: #edf0f2; color: #68747b; font-size: 12px; font-weight: 800; }
.batch-gate-track button > strong { overflow: hidden; align-self: end; color: #39464c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.batch-gate-track button > small { overflow: hidden; align-self: start; color: #879195; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.batch-gate-track button.done > span { background: #e5f3ef; color: #1b7668; }
.batch-gate-track button.blocked > span { background: #fff0ee; color: #b74439; }
.batch-gate-track button.pending > span { background: #fff5e8; color: #9a6a23; }
.batch-table { min-width: 1160px; }
.batch-table th:nth-child(1) { width: 28%; }
.batch-table th:nth-child(2) { width: 13%; }
.batch-table th:nth-child(3) { width: 13%; }
.batch-table th:nth-child(4) { width: 10%; }
.batch-table th:nth-child(5) { width: 16%; }
.batch-table th:nth-child(6) { width: 14%; }
.batch-search-excerpt { display: -webkit-box; overflow: hidden; margin-top: 6px; padding-left: 7px; border-left: 2px solid #6d9fc1; color: #657681; font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.governance-gate-note { display: flex; align-items: center; gap: 8px; margin: 0 -14px; padding: 10px 14px; border-bottom: 1px solid #eadfc7; background: #fffaf0; color: #7b663d; font-size: 12px; }
.governance-gate-note .icon { flex: 0 0 auto; width: 14px; height: 14px; }
.library-check-overview { grid-template-columns: repeat(4, 1fr); }

.batch-create-form { display: grid; gap: 14px; }
.batch-create-form > label { display: grid; gap: 6px; }
.batch-create-form > label > span { color: #58656a; font-size: 12px; font-weight: 700; }
.batch-create-form select.input { appearance: auto; }
.batch-file-picker { display: grid; place-items: center; min-height: 142px; padding: 20px; border: 1px dashed #9bb9b5; border-radius: 6px; background: #f7faf9; color: #3e6f69; cursor: pointer; }
.batch-file-picker:hover { border-color: var(--product-primary); background: #f1f8f6; }
.batch-file-picker .icon { width: 24px; height: 24px; }
.batch-file-picker strong { margin-top: 9px; font-size: 13px; }
.batch-file-picker span { margin-top: 4px; color: #7e8b8d; font-size: 12px; }
.batch-create-preview { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--product-line); border-radius: 6px; }
.batch-create-preview span { padding: 10px 6px; border-right: 1px solid var(--product-line); color: #68767b; font-size: 12px; text-align: center; }
.batch-create-preview span:last-child { border-right: 0; }

@media (max-width: 900px) {
  .library-workspace-tabs { overflow-x: auto; }
  .library-workspace-tabs button { flex: 0 0 auto; min-width: 112px; padding: 0 12px; }
  .batch-gate-head { align-items: flex-start; flex-direction: column; }
  .batch-gate-actions { width: 100%; }
  .batch-gate-actions .btn { flex: 1; }
  .library-check-overview { grid-template-columns: repeat(2, 1fr); }
  .library-check-overview > div:nth-child(2) { border-right: 0; }
  .library-check-overview > div:nth-child(-n+2) { border-bottom: 1px solid var(--product-line); }
}

@media (max-width: 560px) {
  .library-workspace-tabs button { min-width: 104px; }
  .batch-create-preview { grid-template-columns: repeat(2, 1fr); }
  .batch-create-preview span:nth-child(2) { border-right: 0; }
  .batch-create-preview span:nth-child(-n+2) { border-bottom: 1px solid var(--product-line); }
}
.library-task-link { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 16px; padding: 10px 12px; border-left: 3px solid var(--product-blue); background: #edf7f8; }
.library-task-link span { color: #817a9d; font-size: 12px; }
.library-task-link strong { color: #4d4860; font-size: 12px; }
.library-task-link a { color: var(--product-blue); font-size: 12px; font-weight: 700; }

.empty-inline { padding: 22px; text-align: center; color: #80899a; font-size: 12px; }
.muted-note { color: #818a9a; font-size: 13px; line-height: 1.65; }
.divider { width: 1px; height: 20px; background: var(--product-line); }
.nowrap { white-space: nowrap; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #edf0f5; color: #5f697a; font-size: 12px; font-weight: 800; }

@media (max-width: 1360px) {
  .product-head { flex-wrap: wrap; }
  .query-session { grid-template-columns: minmax(460px, 1fr) 330px; gap: 16px; }
  .query-start { padding-top: 56px; }
  .review-input-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-3,
  .writer-layout { grid-template-columns: 220px minmax(420px, 1fr); }
  .workspace-3 > :last-child,
  .writer-layout > :last-child { grid-column: 1 / -1; }
  .query-layout { grid-template-columns: minmax(460px, 1fr) 340px; }
  .lifecycle-track { grid-template-columns: repeat(4, 1fr); }
  .life-step:nth-child(4) { border-right: 0; }
  .life-step:nth-child(-n+4) { border-bottom: 1px solid var(--product-line); }
}

@media (max-width: 980px) {
  body.product-ui .main__inner { padding: 20px; }
  .product-head { flex-wrap: wrap; }
  .product-head__copy { min-width: min(360px, 100%); }
  .product-actions { flex-wrap: wrap; }
  .workspace-3,
  .workspace-2,
  .writer-layout,
  .query-layout,
  .management-grid,
  .library-layout { grid-template-columns: 1fr; }
  .query-page .query-workbench { padding: 20px; }
  .query-session { grid-template-columns: 1fr; }
  .query-thread { width: 100%; }
  .query-evidence-rail { position: static; grid-template-columns: 1fr; }
  .query-start { min-height: calc(100vh - 180px); padding: 52px 0 36px; }
  .workspace-3 > :last-child,
  .writer-layout > :last-child { grid-column: auto; }
  .concept-grid { grid-template-columns: 1fr; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-block { border-right: 0; border-bottom: 1px solid var(--product-line); }
  .rule-block.priority { grid-column: auto; border-top: 0; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--product-line); }
  .builder-flow { grid-template-columns: 1fr; }
  .builder-step { min-height: auto; border-right: 0; border-bottom: 1px solid var(--product-line); }
  .builder-step:last-child { border-bottom: 0; }
  .workflow-event-list { grid-template-columns: 1fr; }
  .workflow-event { border-right: 0; }
  .review-runbar { align-items: stretch; flex-direction: column; }
  .review-runbar__stats { width: 100%; min-width: 0; }
  .review-runbar__stats > div:first-child { border-left: 0; }
  .context-side:has(.review-relation-tabs) { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; }
  .review-relation-tabs { order: 3; width: 100%; }
  .review-relation-tabs button { flex: 1 1 auto; }
  .review-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-outcome-strip { grid-template-columns: repeat(3, 1fr); }
  .review-outcome-strip > div:nth-child(3n) { border-right: 0; }
  .review-outcome-strip > div:nth-child(-n+3) { border-bottom: 1px solid #e8ebf0; }
}

@media (max-width: 720px) {
  .product-head,
  .context-bar { align-items: stretch; flex-direction: column; }
  .product-actions { display: grid; width: 100%; margin-left: 0; justify-content: stretch; }
  .product-utility-actions {
    display: grid;
    grid-template-columns: 36px minmax(82px, .7fr) minmax(0, 1.3fr);
    width: 100%;
  }
  .product-task-actions { width: 100%; justify-content: flex-start; }
  .product-task-actions > .btn-primary { flex: 1 1 150px; }
  .product-head__copy { min-width: 0; }
  .module-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; overflow: visible; }
  .module-subnav a,
  .module-subnav button { justify-content: center; min-width: 0; height: auto; min-height: 42px; padding: 6px 8px; line-height: 1.3; text-align: center; white-space: normal; }
  .module-subnav > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .query-page .query-workbench { padding: 16px 14px 28px; }
  .query-head { gap: 10px; }
  .query-head .page-title { font-size: 18px; }
  .query-context { gap: 8px; }
  .query-context .context-side { align-items: flex-start; flex-direction: column; }
  .query-start { min-height: calc(100vh - 230px); padding: 38px 0 28px; }
  .query-start h2 { font-size: 21px; }
  .query-composer-home { margin-top: 20px; }
  .query-composer-footer { align-items: stretch; flex-direction: column; }
  .query-composer-tools,
  .query-composer-scope { justify-content: space-between; width: 100%; }
  .query-composer-scope select { flex: 1; max-width: none; }
  .query-mode-menu { left: -44px; width: min(250px, calc(100vw - 42px)); }
  .query-tool-menu { width: min(238px, calc(100vw - 42px)); }
  .query-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .query-quick-actions > button,
  .query-quick-actions > .query-popover > button { justify-content: center; width: 100%; padding: 0 8px; }
  .query-quick-actions > .query-popover { min-width: 0; }
  .query-more-menu { right: 0; width: min(190px, calc(100vw - 42px)); }
  .query-session { gap: 16px; padding-top: 12px; }
  .query-question-message { padding: 12px; }
  .query-question-message__text { font-size: 13px; }
  .query-answer { padding-right: 0; padding-left: 0; }
  .query-session .query-closure-actions { align-items: flex-start; flex-direction: column; }
  .query-composer-dock { padding-right: 0; padding-left: 0; }
  .surface-dropdown-switcher,
  .surface-dropdown-trigger,
  .demo-user-switcher,
  .demo-user-trigger { width: 100%; min-width: 0; }
  .surface-dropdown-trigger,
  .demo-user-trigger { min-height: 36px; }
  .surface-dropdown-trigger__copy strong,
  .demo-user-trigger__copy strong { font-size: 12px; }
  .demo-user-trigger__copy small { display: none; }
  .surface-dropdown-menu { width: min(268px, calc(100vw - 40px)); }
  .demo-user-menu { right: auto; left: 0; width: min(360px, calc(100vw - 40px)); }
  .context-side { display: grid; width: 100%; justify-content: stretch; }
  .context-side .segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .context-side .segmented button { min-width: 0; padding: 6px 4px; line-height: 1.25; white-space: normal; }
  .stage-track { grid-template-columns: 1fr; }
  .stage { border-right: 0; border-bottom: 1px solid var(--product-line); }
  .stage:last-child { border-bottom: 0; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { border-right: 1px solid var(--product-line); border-bottom: 1px solid var(--product-line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }
  .review-runbar__main { align-items: flex-start; flex-direction: column; }
  .review-runbar__stats > div { padding: 0 7px; text-align: left; }
  .review-input-grid { grid-template-columns: 1fr; }
  .review-scope-line { flex-direction: column; }
  .activity-head,
  .activity-row { grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.25fr) 82px; }
  .activity-head > :nth-child(2),
  .activity-row > :nth-child(2),
  .activity-head > :nth-child(3),
  .activity-row > :nth-child(3),
  .activity-head > :nth-child(5),
  .activity-row > :nth-child(5) { display: none; }
  .review-activity-detail__grid { grid-template-columns: 1fr; }
  .review-activity-detail__actions { align-items: flex-start; flex-direction: column; }
  .review-plan-head,
  .review-plan-row { grid-template-columns: minmax(150px, 1fr) 72px 74px; }
  .review-plan-head > :nth-child(2),
  .review-plan-row > :nth-child(2),
  .review-plan-head > :nth-child(4),
  .review-plan-row > :nth-child(4),
  .review-plan-head > :nth-child(5),
  .review-plan-row > :nth-child(5) { display: none; }
  .review-plan-footer { align-items: flex-start; flex-direction: column; }
  .lifecycle-track { grid-template-columns: repeat(2, 1fr); }
  .life-step:nth-child(even) { border-right: 0; }
  .life-step { border-bottom: 1px solid var(--product-line); }
  .life-step:nth-last-child(-n+2) { border-bottom: 0; }
  .queue-row { grid-template-columns: 1fr 90px; }
  [data-life-queue] .queue-row { grid-template-columns: 1fr 90px; }
  .queue-row > :nth-child(3),
  .queue-row > :nth-child(4),
  .queue-row > :nth-child(5) { display: none; }
  .editor-page { padding: 26px 22px; }
  .library-axis-bar { align-items: stretch; flex-direction: column; }
  .library-axis-bar__control { align-items: stretch; flex-direction: column; }
  .library-axis-bar__control .segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .library-axis-bar__control .segmented button { min-width: 0; padding: 6px 4px; line-height: 1.25; white-space: normal; }
  .library-axis-bar__hint { text-align: left; }
  .library-import-banner { grid-template-columns: 30px minmax(0, 1fr); }
  .library-import-banner__status,
  .library-import-banner > .btn { grid-column: 2; justify-self: start; }
  .library-modebar { align-items: stretch; flex-direction: column; }
  .library-results-footer { align-items: flex-start; flex-direction: column; }
  .library-pagination { align-self: flex-end; }
  .library-check-row { grid-template-columns: 34px minmax(0, 1fr); }
  .library-check-row__actions { grid-column: 2; flex-wrap: wrap; }
  .library-detail-summary { grid-template-columns: 1fr; }
  .library-detail-summary > div { border-right: 0; border-bottom: 1px solid #e2e6ed; }
  .library-detail-summary > div:last-child { border-bottom: 0; }
  .library-task-link { grid-template-columns: 1fr; }
  .library-workspace-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .library-workspace-tabs button { justify-content: center; min-width: 0; padding: 0 8px; line-height: 1.3; text-align: center; white-space: normal; }
  .knowledge-grid > div { grid-template-columns: 1fr; }
}
