.postmortem-tabs {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.postmortem-tabs .button { flex: 0 0 auto; }

.postmortem-search {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(135px, 1fr)) auto auto;
  gap: 10px;
  padding: 16px;
  align-items: end;
}

.postmortem-search label,
.postmortem-field,
.postmortem-form-section > label,
.quiz-editor {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.knowledge-card {
  min-height: 220px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-600);
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: left;
}

.knowledge-card:hover {
  border-color: #7fc6f4;
  transform: translateY(-1px);
}

.knowledge-card-top,
.postmortem-section-head,
.postmortem-work-card,
.learning-card,
.evaluation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-card-top strong { font-size: 16px; line-height: 1.45; }
.knowledge-card small,
.postmortem-work-card small,
.learning-card small,
.evaluation-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.knowledge-tags,
.knowledge-scope,
.cause-checks,
.learning-scope-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.postmortem-work-list,
.learning-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.postmortem-work-card,
.learning-card,
.evaluation-card {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fcff;
  color: var(--text);
  text-align: left;
}

.postmortem-work-card:hover,
.learning-card:hover { border-color: var(--blue-500); background: #f2f9ff; }

.evaluation-card > div:last-child { display: flex; gap: 8px; flex: 0 0 auto; }
.postmortem-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.postmortem-metrics { overflow: visible; }
.postmortem-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.postmortem-metric-grid > div {
  min-height: 96px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid #d9e8f3;
  border-radius: 13px;
  background: linear-gradient(145deg, #f7fbff, #eef7fd);
}

.postmortem-metric-grid small { color: var(--muted); }
.postmortem-metric-grid strong { color: var(--blue-700); font-size: 26px; }

.postmortem-summary { border-left: 4px solid var(--blue-600); }
.postmortem-section-head h3,
.postmortem-section-head p { margin: 0; }
.postmortem-section-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }

.postmortem-editor,
.postmortem-detail,
.knowledge-modal { width: min(1240px, 100%); }

.postmortem-editor .modal-body,
.postmortem-detail .modal-body,
.knowledge-modal .modal-body { display: grid; gap: 16px; }

.postmortem-form-section,
.knowledge-highlight,
.knowledge-feedback,
.learning-confirm-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.postmortem-form-section > h3,
.knowledge-highlight > h3,
.learning-confirm-form > h3 { margin: 0 0 14px; }

.postmortem-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.postmortem-field textarea { min-height: 88px; resize: vertical; }
.postmortem-field small { line-height: 1.55; color: #8a6419; }

/* 复盘精简编辑：审核必填项保持可见；独立知识只复用下方可选区样式。 */
[data-postmortem-form] .modal-body { min-width: 0; background: #f5f9fc; }
[data-postmortem-form] .postmortem-form-section { min-width: 0; box-shadow: 0 4px 12px rgba(27, 70, 107, .035); }
[data-postmortem-form] .postmortem-form-section > h3 { border-left: 4px solid var(--blue-600); padding-left: 10px; }
[data-postmortem-form] .postmortem-field,
[data-postmortem-form] .postmortem-form-grid > *,
[data-postmortem-form] .postmortem-cause-field { min-width: 0; margin-bottom: 0; }
[data-postmortem-form] textarea { font-weight: 400; }
.postmortem-form-guide { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid #cfe3f2; border-radius: 12px; background: #edf7ff; }
.postmortem-form-guide span { font-size: 13px; line-height: 1.7; color: var(--muted); }
.postmortem-optional,
.ai-metadata-details { min-width: 0; margin-top: 14px; border: 1px solid #dce7ef; border-radius: 10px; background: #f8fbfd; }
.postmortem-optional > summary,
.ai-metadata-details > summary { padding: 12px; cursor: pointer; color: #315b78; font-size: 13px; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.postmortem-optional > summary:focus-visible,
.ai-metadata-details > summary:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; border-radius: 9px; }
.postmortem-optional-body { display: grid; gap: 12px; min-width: 0; padding: 0 12px 12px; }
.postmortem-optional-body > * { min-width: 0; }
.postmortem-optional-body > label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.postmortem-optional-body .section-help { margin: 0; font-weight: 400; line-height: 1.65; }
.manual-knowledge-extra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manual-knowledge-extra-grid > label { min-width: 0; }
.manual-knowledge-optional { margin-top: 0; }
.manual-knowledge-optional > .postmortem-form-section { margin: 0 12px 12px; }
.postmortem-pending-notice { padding: 9px 12px; border-left: 3px solid #e79a25; border-radius: 6px; background: #fff7e9; color: #885700; font-size: 13px; line-height: 1.65; }
.postmortem-cause-changed { color: #885700; line-height: 1.65; }
.ai-metadata-details { grid-column: 1 / -1; }
.ai-metadata-details-body { padding: 0 12px 12px; overflow-wrap: anywhere; }
.ai-metadata-details-body p { white-space: normal; font-size: 13px; line-height: 1.7; }
[data-postmortem-form] .postmortem-action-card { min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; padding: 14px; border: 1px solid #dce7ef; }
[data-postmortem-form] .postmortem-action-card label { min-width: 0; margin: 0; }
[data-postmortem-form] .postmortem-action-card label:nth-child(2) { grid-column: span 2; }
[data-postmortem-form] [data-action-rows] { margin-top: 14px; }
[data-postmortem-form] input[type="checkbox"] { width: 18px; height: 18px; padding: 0; flex: 0 0 18px; margin: 0; }
[data-postmortem-form] .cause-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
[data-postmortem-form] .cause-checks label { white-space: nowrap; margin: 0; }
[data-postmortem-form] .learning-scope-options { display: flex; flex-wrap: wrap; gap: 10px 18px; }
[data-postmortem-form] .learning-scope-options label { white-space: nowrap; margin-bottom: 0; }
[data-postmortem-form] .postmortem-evidence-row { grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) 150px; }
[data-postmortem-form] .postmortem-evidence-row label { margin-bottom: 0; }
@media (max-width: 1000px) {
  [data-postmortem-form] .postmortem-evidence-row { grid-template-columns: minmax(0, 1fr) minmax(140px, 180px); }
  [data-postmortem-form] .postmortem-evidence-row > label { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  [data-postmortem-form] .postmortem-action-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-postmortem-form] .postmortem-action-card label:nth-child(2) { grid-column: 1 / -1; }
  [data-postmortem-form] .postmortem-evidence-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .manual-knowledge-extra-grid { grid-template-columns: 1fr; }
  [data-postmortem-form] .postmortem-action-card { grid-template-columns: minmax(0, 1fr); }
  [data-postmortem-form] .postmortem-evidence-choice { grid-template-columns: minmax(0, 1fr); }
  [data-postmortem-form] .postmortem-form-section { padding: 12px; }
}
.cause-checks,
.learning-scope-options { margin-top: 14px; }
.cause-checks label,
.learning-scope-options label,
.learning-confirm-form label { display: inline-flex; align-items: center; gap: 7px; }

.why-list { display: grid; gap: 10px; margin-top: 14px; }
.why-list label {
  display: grid;
  grid-template-columns: 90px minmax(220px, 1.5fr) minmax(180px, 1fr);
  gap: 9px;
  align-items: center;
}

.why-list label > span { font-weight: 700; color: var(--text); }

.postmortem-actions-head,
.postmortem-action-row {
  min-width: 1220px;
  display: grid;
  grid-template-columns: 120px minmax(240px, 1.5fr) 175px 140px minmax(200px, 1fr) 175px 105px;
  gap: 8px;
  align-items: center;
}

.postmortem-actions-head {
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 12px;
}

[data-action-rows] { display: grid; gap: 8px; overflow-x: auto; padding-bottom: 5px; }
.postmortem-action-row { padding: 10px; border-radius: 11px; background: #f5f9fc; }

.postmortem-evidence-list { display: grid; gap: 8px; margin-top: 14px; }
.postmortem-evidence-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 160px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #deebf4;
  border-radius: 10px;
  background: #f8fbfd;
}

.postmortem-evidence-row label { display: flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.postmortem-evidence-choice { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.postmortem-evidence-gallery { align-items: flex-start; }
.postmortem-evidence-gallery .attachment-image-button { width: 104px; border-radius: 8px; }
.postmortem-evidence-gallery .attachment-image-button img { height: 76px; }
.postmortem-evidence-gallery .attachment-image-button span { padding: 5px 7px; font-size: 11px; }
.postmortem-evidence-thumbnail { flex-wrap: nowrap; }
.postmortem-evidence-thumbnail .attachment-link { max-width: 180px; }
.ai-evidence-boundary { margin-top: 10px; padding: 10px; border: 1px solid #cfe3f2; border-radius: 10px; background: #f7fbfe; }
.ai-evidence-boundary > p { margin: 5px 0 9px; color: #466078; }
.ai-evidence-boundary > small { display: block; margin-top: 8px; color: #a15b00; }
.ai-evidence-gallery { margin-top: 8px; }

.quiz-editor {
  grid-template-columns: 1.3fr 1fr 1fr;
  margin-top: 14px;
}
.quiz-editor h4 { grid-column: 1 / -1; margin: 0; color: var(--text); }

.knowledge-highlight { border-color: #9bd9ee; background: linear-gradient(145deg, #f4fcff, #eef8fd); }
.knowledge-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.knowledge-detail-grid > div {
  padding: 13px;
  border: 1px solid #d8e8f2;
  border-radius: 11px;
  background: rgba(255,255,255,.88);
}
.knowledge-detail-grid p { margin: 7px 0 0; line-height: 1.65; }
.knowledge-detail-grid .danger-box { border-color: #efb2b2; background: #fff4f4; }
.knowledge-detail-grid .warning-box { border-color: #f4c482; background: #fff8ed; }

.knowledge-feedback { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.knowledge-feedback span { margin-right: auto; font-weight: 700; }

.knowledge-suggestions {
  padding: 14px;
  border: 1px dashed #a9cfe9;
  border-radius: 13px;
  background: #f8fcff;
}
.knowledge-suggestions h3,
.knowledge-suggestions p { margin: 0; }
.knowledge-suggestions p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.knowledge-suggestion-list { display: grid; gap: 8px; margin-top: 12px; }
.knowledge-suggestion-card {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d5e6f2;
  border-radius: 10px;
  background: #fff;
}
.knowledge-suggestion-card > label { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.knowledge-suggestion-card > button { display: grid; gap: 6px; border: 0; background: transparent; color: var(--text); text-align: left; }
.knowledge-suggestion-card > button:hover strong { color: var(--blue-700); }
.knowledge-suggestion-card small { color: var(--muted); }

.learning-confirm-form fieldset {
  margin: 0 0 12px;
  padding: 12px;
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.action-summary-list,
.review-history,
.version-history { display: grid; gap: 10px; }
.action-summary-list > div,
.review-history > div,
.version-history details { padding: 12px; border: 1px solid #dce9f2; border-radius: 10px; background: #f8fbfd; }
.version-history summary { cursor: pointer; font-weight: 700; }
.action-summary-list strong,
.review-history strong,
.review-history small { display: block; margin-top: 6px; }
.action-summary-list small,
.review-history small { color: var(--muted); }
.action-item-controls { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.postmortem-detail ol { padding-left: 22px; }
.postmortem-detail li { margin: 8px 0; line-height: 1.6; }
.postmortem-detail li small { display: block; color: var(--muted); }

.postmortem-page-actions {
  margin-bottom: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #cfe2f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcff, #edf7fd);
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.postmortem-page-actions > div { min-width: 0; }
.postmortem-page-actions > div:last-child,
.postmortem-inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.postmortem-page-actions strong,
.postmortem-page-actions small { display: block; }
.postmortem-page-actions small { margin-top: 4px; color: var(--muted); }

.draft-origin-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-right: 6px;
  padding: 4px 9px;
  border: 1px solid #b9d5ea;
  border-radius: 999px;
  background: #f4f9fd;
  color: #275f84;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.draft-origin-badge.ai { border-color: #86c5ef; background: #eaf6ff; color: #0874c9; }
.draft-origin-badge.manual { border-color: #dcc5f4; background: #f7f0ff; color: #7543a6; }

.ai-draft-modal { width: min(1180px, 100%); }
.ai-draft-modal .modal-body { display: grid; gap: 14px; }
.ai-draft-preview {
  display: grid;
  grid-template-columns: minmax(280px, 38fr) minmax(0, 62fr);
  gap: 14px;
  align-items: start;
}
.ai-draft-preview.is-preview:not(.comparison-open) { grid-template-columns: minmax(0, 1fr); }
.ai-draft-preview.is-preview:not(.comparison-open) .ai-source-panel { display: none; }
.ai-source-panel,
.ai-suggestion-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d7e6f1;
  border-radius: 14px;
  background: #f8fbfe;
}
.ai-source-panel { position: sticky; top: 86px; display: grid; gap: 11px; }
.ai-source-panel > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ai-source-panel h3,
.ai-source-panel h4,
.ai-suggestion-panel h3,
.ai-preview-sections h4 { margin: 0; }
.ai-source-panel > label { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.ai-source-attachments { display: grid; gap: 8px; }
.ai-source-attachments span { padding: 8px 10px; border-radius: 8px; background: #edf3f7; color: var(--muted); overflow-wrap: anywhere; }
.ai-text-only-notice { margin: 0; padding: 9px 11px; border-radius: 9px; background: #edf8ff; color: #155b88; font-weight: 700; line-height: 1.55; }
.ai-source-summary { display: grid; gap: 6px; padding: 12px; border-radius: 11px; background: #fff; }
.ai-source-summary span,
.ai-source-summary p { margin: 0; color: var(--muted); line-height: 1.6; }
.ai-source-provenance { min-width: 0; display: grid; gap: 8px; margin: 0; }
.ai-source-provenance > div { min-width: 0; padding: 9px 10px; border-radius: 9px; background: #fff; }
.ai-source-provenance dt { color: var(--blue-800); font-size: 12px; font-weight: 800; }
.ai-source-provenance dd { min-width: 0; margin: 4px 0 0; color: #314d61; line-height: 1.55; overflow-wrap: anywhere; }
.ai-source-hash { display: block; margin-top: 4px; color: #314d61; overflow-wrap: anywhere; word-break: break-all; }
.ai-review-banner,
.ai-safety-notice,
.publish-confirm-warning,
.self-review-warning {
  padding: 12px 14px;
  border: 1px solid #f1c676;
  border-left: 4px solid #e79516;
  border-radius: 11px;
  background: #fff9ed;
  color: #70490b;
}
.ai-review-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-review-banner span { color: #775b2e; font-size: 13px; }
.ai-safety-notice p,
.publish-confirm-warning p { margin: 6px 0 0; line-height: 1.6; }
.ai-safety-notice { min-width: 0; max-width: 100%; overflow-wrap: anywhere; box-sizing: border-box; }
.self-review-warning { border-color: #efb8b8; border-left-color: #d94747; background: #fff4f4; color: #9a2d2d; font-weight: 700; }
.ai-generation-state { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 11px; text-align: center; }
.ai-generation-state p { margin: 0; color: var(--muted); }
.ai-generation-state.failed { color: #a92e2e; }
.ai-generation-state.delayed { min-height: 190px; padding: 18px; border: 1px solid #e8bd65; border-radius: 12px; background: #fff9ec; color: #835500; }
.ai-spinner { width: 34px; height: 34px; border: 4px solid #d9eefb; border-top-color: var(--blue-700); border-radius: 50%; animation: ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-preview-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.ai-preview-sections > section { padding: 13px; border: 1px solid #dce9f2; border-radius: 11px; background: #fff; }
.ai-preview-sections > section > div { margin-top: 10px; }
.ai-preview-sections b { color: var(--blue-800); font-size: 12px; }
.ai-preview-sections p { margin: 4px 0 0; color: #314d61; line-height: 1.65; overflow-wrap: anywhere; }
.ai-owner-select { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 420px); align-items: center; gap: 10px; }
.ai-owner-select > span { min-width: 0; display: grid; gap: 3px; font-weight: 700; }
.ai-owner-select small { color: var(--muted); font-weight: 400; line-height: 1.45; }

.manual-knowledge-basics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.manual-knowledge-basics label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.manual-knowledge-basics .span-2 { grid-column: span 2; }
.manual-source-issues {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}
.manual-source-issues label {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #dce9f2;
  border-radius: 9px;
  background: #f8fbfd;
  line-height: 1.5;
}
.manual-source-issues span { min-width: 0; overflow-wrap: anywhere; }
.learning-users-field { display: grid; gap: 8px; margin-top: 14px; }
.learning-users-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.learning-users-head span { color: var(--muted); font-size: 12px; }
.learning-user-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 220px; overflow: auto; padding: 7px; border: 1px solid #cbdbe8; border-radius: 10px; background: #fff; }
.learning-user-options label { min-width: 0; display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border: 1px solid #dce9f2; border-radius: 8px; background: #f8fbfd; cursor: pointer; }
.learning-user-options label.selected { border-color: var(--blue-600); background: #eaf6ff; }
.learning-user-options input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.learning-user-options span { min-width: 0; overflow-wrap: anywhere; }
.review-field-error textarea,
.review-field-error input,
.review-field-error select { border-color: #d93025 !important; box-shadow: 0 0 0 3px rgba(217, 48, 37, .12) !important; }
.cause-checks.review-field-error,
.postmortem-form-section.review-field-error { border: 2px solid #d93025; border-radius: 10px; padding: 10px; background: #fff5f5; }
.review-error-summary { white-space: pre-line; padding: 10px 12px; border-left: 4px solid #d93025; border-radius: 7px; background: #fff1f0; color: #b42318; line-height: 1.65; }
.manual-evidence-toolbar { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); }
.manual-evidence-list { margin-top: 10px; display: grid; gap: 8px; }
.manual-evidence-row { display: grid; grid-template-columns: minmax(220px, 1fr) 170px 155px; gap: 9px; align-items: center; padding: 10px; border: 1px solid #dce9f2; border-radius: 10px; background: #f8fbfd; }
.manual-evidence-row span,
.manual-evidence-row small { min-width: 0; display: block; overflow-wrap: anywhere; }
.manual-evidence-row small { margin-top: 4px; color: var(--muted); }
.manual-evidence-row label { display: flex; align-items: center; gap: 7px; }

.publish-confirm-modal { width: min(900px, 100%); }
.publish-confirm-modal .modal-body { display: grid; gap: 14px; }
.publish-confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.publish-confirm-summary > div,
.publish-review-audit {
  min-width: 0;
  padding: 13px;
  border: 1px solid #d9e7f1;
  border-radius: 11px;
  background: #f8fbfd;
}
.publish-confirm-summary small,
.publish-confirm-summary strong { display: block; }
.publish-confirm-summary small { margin-bottom: 6px; color: var(--muted); }
.publish-confirm-summary strong { overflow-wrap: anywhere; line-height: 1.55; }
.publish-review-audit h3,
.publish-review-audit p { margin: 0; }
.publish-review-audit p { margin-top: 7px; color: var(--muted); line-height: 1.6; }
.publish-confirm-check { display: flex; align-items: flex-start; gap: 9px; min-width: 0; margin: 0; padding: 13px; border-radius: 11px; background: #eef7fd; line-height: 1.65; font-weight: 700; }
.publish-confirm-check input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; padding: 0; flex: 0 0 18px; }
.publish-confirm-check > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.publish-confirm-modal [data-publish-submit]:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
[aria-busy="true"] { cursor: progress; }

@media (max-width: 1180px) {
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .postmortem-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-keyword { grid-column: 1 / -1; }
  .postmortem-review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 914px) {
  .postmortem-page-actions,
  .postmortem-section-head,
  .ai-review-banner { align-items: stretch; flex-direction: column; }
  .postmortem-page-actions > div:last-child .button,
  .postmortem-inline-actions .button { flex: 1 1 180px; }
  .ai-draft-preview,
  .ai-draft-preview.is-preview:not(.comparison-open),
  .ai-preview-sections { grid-template-columns: 1fr; }
  .ai-source-panel { position: static; }
  .manual-knowledge-basics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-source-issues { grid-template-columns: 1fr; }
  .learning-user-options { grid-template-columns: 1fr; }
  .manual-knowledge-basics .span-2 { grid-column: 1 / -1; }
  .manual-evidence-row { grid-template-columns: 1fr; }
  .ai-draft-modal .modal-footer,
  .manual-knowledge-editor .modal-footer,
  .publish-confirm-modal .modal-footer { flex-wrap: wrap; }
  .ai-draft-modal .modal-footer .button,
  .manual-knowledge-editor .modal-footer .button,
  .publish-confirm-modal .modal-footer .button { flex: 1 1 180px; }
}

@media (max-width: 820px) {
  .postmortem-tabs { margin-inline: -2px; }
  .postmortem-search,
  .knowledge-grid,
  .postmortem-form-grid,
  .knowledge-detail-grid,
  .postmortem-metric-grid,
  .quiz-editor { grid-template-columns: 1fr; }
  .knowledge-keyword,
  .quiz-editor h4 { grid-column: auto; }
  .postmortem-search .button { width: 100%; }
  .postmortem-section-head,
  .postmortem-work-card,
  .learning-card,
  .evaluation-card,
  .knowledge-feedback { align-items: flex-start; flex-direction: column; }
  .evaluation-card > div:last-child { width: 100%; flex-wrap: wrap; }
  .why-list label { grid-template-columns: 1fr; }
  .postmortem-evidence-row { grid-template-columns: 1fr; }
  .postmortem-evidence-choice { grid-template-columns: auto minmax(0, 1fr); }
  .knowledge-suggestion-card { grid-template-columns: 1fr; }
  .postmortem-editor .modal-body,
  .postmortem-detail .modal-body,
  .knowledge-modal .modal-body { padding: 14px; }
  .postmortem-editor .modal-footer { flex-wrap: wrap; }
  .postmortem-editor .modal-footer .button { flex: 1 1 150px; }
}

@media (max-width: 390px) {
  .ai-draft-modal,
  .postmortem-editor,
  .postmortem-detail,
  .knowledge-modal,
  .publish-confirm-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .postmortem-page-actions { padding: 12px; }
  .postmortem-page-actions > div:last-child,
  .postmortem-inline-actions,
  .ai-owner-select { width: 100%; grid-template-columns: 1fr; }
  .postmortem-page-actions .button,
  .postmortem-inline-actions .button,
  .ai-owner-select select,
  .ai-draft-modal .modal-footer .button,
  .manual-knowledge-editor .modal-footer .button,
  .publish-confirm-modal .modal-footer .button {
    width: 100%;
    min-height: 44px;
    flex-basis: 100%;
  }
  .manual-knowledge-basics,
  .publish-confirm-summary { grid-template-columns: 1fr; }
  .manual-knowledge-basics .span-2 { grid-column: auto; }
  .manual-evidence-toolbar { align-items: stretch; flex-direction: column; }
  .manual-evidence-toolbar .button { width: 100%; min-height: 44px; }
  .ai-source-panel,
  .ai-suggestion-panel,
  .postmortem-form-section,
  .knowledge-highlight { padding: 12px; }
  .modal-header { padding: 14px; }
  .ai-draft-modal .modal-body,
  .postmortem-editor .modal-body,
  .postmortem-detail .modal-body,
  .knowledge-modal .modal-body,
  .publish-confirm-modal .modal-body { padding: 12px; }
  .ai-draft-modal .modal-footer,
  .manual-knowledge-editor .modal-footer,
  .publish-confirm-modal .modal-footer { padding: 10px 12px; }
  .postmortem-evidence-choice { grid-template-columns: 1fr; }
}

@media print {
  .postmortem-tabs,
  .postmortem-search,
  .knowledge-feedback,
  .modal-footer { display: none !important; }
  .modal-backdrop { position: static; display: block; padding: 0; background: #fff; }
  .postmortem-detail,
  .knowledge-modal { width: 100%; max-height: none; overflow: visible; box-shadow: none; }
}
