.header-tool { height: 34px; padding: 0 10px; font-size: 12px; gap: 6px; background: #fce8f0; }
.header-tool img { width: 15px; height: 15px; flex-basis: 15px; }
#knowledge-dialog { width: min(calc(100% - 28px), 880px); padding: 22px; height: min(760px, calc(100dvh - 36px)); }
#knowledge-dialog input, #knowledge-dialog select { font: inherit; color: inherit; max-width: 100%; border: 1px solid #edc3d3; border-radius: 6px; background: #fff; padding: 8px 10px; font-size: 14px; }
#knowledge-dialog :is(input, select, a, summary):focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
#knowledge-dialog h3 { margin: 10px 0 6px; font-size: 16px; overflow-wrap: anywhere; }
#knowledge-dialog .icon-button img { width: 17px; height: 17px; opacity: .6; }
.knowledge-heading { margin-bottom: 3px; }
.knowledge-heading > div:first-child { min-width: 0; }
.knowledge-heading-tools, .knowledge-inline-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.knowledge-muted { color: #987582; font-size: 11px; overflow-wrap: anywhere; line-height: 1.7; }
p.knowledge-muted { margin: 4px 0 8px; }
.knowledge-feedback { min-height: 18px; margin: 6px 0 10px; color: #527568; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; }
.knowledge-feedback.is-error { color: #b32c55; }
#knowledge-login { display: grid; gap: 12px; max-width: 350px; margin: 38px auto; }
#knowledge-login label { margin-bottom: -6px; }
#knowledge-login input { width: 100%; min-height: 42px; font-size: 16px; }
#knowledge-login .button-primary { justify-self: start; margin-top: 4px; }
.knowledge-tabs { display: flex; gap: 22px; border-bottom: 1px solid #efd2df; margin-bottom: 17px; }
.knowledge-tabs [role="tab"] { position: relative; min-width: 44px; min-height: 40px; padding: 0 2px 10px; color: #947180; border: 0; background: transparent; font-size: 14px; }
.knowledge-tabs [aria-selected="true"] { color: #b42f65; font-weight: 700; }
.knowledge-tabs [aria-selected="true"]::after { content: ""; position: absolute; height: 3px; inset: auto 0 -1px; background: #d9437c; border-radius: 3px 3px 0 0; }
.knowledge-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.knowledge-toolbar > .knowledge-muted { min-width: 0; flex: 1 1 90px; }
.knowledge-toolbar > .knowledge-inline-actions { margin-left: auto; }
.knowledge-list { min-width: 0; }
.knowledge-empty { padding: 34px 12px; color: #a98998; text-align: center; font-size: 13px; }
.knowledge-document { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; column-gap: 9px; align-items: center; border-bottom: 1px solid #f0dfe7; padding: 12px 0; }
.knowledge-document > img { width: 21px; height: 21px; opacity: .48; }
.knowledge-document-main { min-width: 0; }
.knowledge-document-open { text-align: left; border: 0; padding: 0; background: transparent; color: #684250; font-size: 13px; font-weight: 650; line-height: 1.65; overflow-wrap: anywhere; }
.knowledge-document-open:hover { color: #c0356c; text-decoration: underline; }
.knowledge-document-meta { margin-top: 3px; font-size: 10px; color: #997989; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.knowledge-state { color: #547868; }
.knowledge-state.is-pending { color: #937234; }
.knowledge-state.is-error { color: #b32c55; }
.knowledge-document-actions { display: flex; align-items: center; gap: 3px; }
.knowledge-delete-confirm { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 10px; font-size: 12px; color: #a7365e; }
.knowledge-delete-confirm span { margin-right: auto; }
.knowledge-delete-confirm button { height: 30px; padding: 0 10px; font-size: 12px; }
.knowledge-upload-progress { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 10px 0; border-left: 3px solid #d9779c; background: #fff0f6; font-size: 12px; color: #995675; }
.knowledge-upload-progress > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.knowledge-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 0 0; }
.knowledge-pagination button { height: 32px; font-size: 12px; }
.knowledge-back-icon { transform: rotate(-90deg); }
.knowledge-point, .knowledge-result { border-top: 1px solid #f0dfe7; padding: 13px 0; }
.knowledge-point-heading, .knowledge-result-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; margin-bottom: 7px; font-size: 11px; color: #967585; }
.knowledge-result-heading strong { color: #765361; font-size: 12px; overflow-wrap: anywhere; }
.knowledge-content-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; line-height: 1.8; }
.knowledge-load-more { display: flex; margin: 16px auto 0; }
#knowledge-search-form > label { display: block; margin-bottom: 8px; }
#knowledge-query { min-height: 78px; font-size: 16px; }
.knowledge-result-source { display: inline-block; margin-top: 8px; color: #a92d5d; text-decoration-color: #dfadc0; font-size: 11px; overflow-wrap: anywhere; }
.knowledge-job { border-bottom: 1px solid #efd2df; padding-bottom: 12px; }
.knowledge-job-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.knowledge-job-title strong { font-size: 13px; color: #765264; }
.knowledge-job-times { display: flex; flex-wrap: wrap; gap: 9px 26px; margin: 9px 0 0; font-size: 11px; color: #987582; }
.knowledge-job-times > div { display: flex; gap: 8px; flex-wrap: wrap; }
.knowledge-job-times dd { margin: 0; color: #725365; }
.knowledge-record { border-top: 1px solid #f0dfe7; }
.knowledge-record summary { cursor: pointer; padding: 13px 2px; color: #634450; font-size: 13px; overflow-wrap: anywhere; line-height: 1.7; }
.knowledge-record summary::marker { color: #c47d98; }
.knowledge-record-type { color: #a17d8c; font-size: 10px; margin-right: 8px; }
.knowledge-record-fields { margin: 0 0 16px 15px; font-size: 12px; }
.knowledge-record-fields dt { font-weight: 700; color: #926477; margin-top: 11px; }
.knowledge-record-fields dd { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; color: #755967; line-height: 1.8; }
.knowledge-record-fields .knowledge-evidence-list { white-space: normal; }
.knowledge-evidence { margin-top: 9px; border-left: 2px solid #e8b6ca; padding-left: 11px; }
.knowledge-evidence blockquote { margin: 0 0 5px; white-space: pre-wrap; }
.knowledge-evidence .knowledge-result-source { margin-top: 0; }
#knowledge-dialog [aria-busy="true"] > img { animation: spin 1.5s linear infinite; }
.history-knowledge-save { margin-top: 10px; height: 31px; font-size: 11px; }
@media (max-width: 460px) {
  .site-header { flex-wrap: wrap; }
  .header-actions { flex: 1 0 100%; justify-content: flex-end; gap: 7px; }
  #knowledge-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); height: calc(100dvh - 16px); padding: 15px 12px; }
  .knowledge-tabs { gap: 24px; margin-bottom: 12px; }
  .knowledge-heading h2 { font-size: 17px; }
  .knowledge-document { grid-template-columns: 20px minmax(0, 1fr) 28px; column-gap: 7px; }
  .knowledge-document-actions > button { width: 28px; }
  .knowledge-document-meta { gap: 3px 6px; }
  .knowledge-toolbar { gap: 8px; }
  #knowledge-dialog .button-secondary, #knowledge-dialog .button-primary { padding: 0 10px; font-size: 12px; }
  .knowledge-job-times { gap: 6px; flex-direction: column; }
  #knowledge-search-library { width: 133px; }
}
