/* Ahamoment knowledge context UI — local-first framework, 2026-08-04. */

.app-shell[data-screen="knowledge"] .main-shell {
  right: 0;
}

.knowledge-screen {
  --copylibrary-list-width: 332px;
  /* 共享 Smart View hover 高亮变量（copylibrary.css 定义在 .copylibrary-screen，知识库需自带） */
  --copylibrary-hover-surface: color-mix(in srgb, var(--text-primary) 3.5%, transparent);
  --copylibrary-smart-view-active-surface: color-mix(in srgb, var(--text-primary) 14%, var(--page));
  position: absolute;
  /* 顶部结构统一：不再为全局页面标题栏预留 48px（2026-08-06 · codex） */
  inset: 0;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 7px;
  background: var(--page);
}

.knowledge-workbench-frame {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
  background: transparent;
}

.knowledge-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-card);
  z-index: 3;
}

/* Keep shared Smart View labels passive so the control remains keyboardable. */
.copylibrary-smart-view span,
.copylibrary-smart-view .icon,
.copylibrary-smart-view small {
  pointer-events: none !important;
}

.knowledge-screen .copylibrary-smart-view-switcher {
  position: relative;
  display: inline-flex;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 0;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-1) !important;
  box-shadow: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  z-index: 2;
}

.knowledge-screen .copylibrary-smart-view-switcher:hover,
.knowledge-screen .copylibrary-smart-view-switcher.is-expanded {
  background: var(--surface-hover) !important;
}

.knowledge-toolbar-leading {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 14px;
  overflow: visible;
}

.knowledge-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.knowledge-search,
.knowledge-context-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  min-width: 180px;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: .5px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  color: var(--text-faint);
  box-sizing: border-box;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast);
}

.knowledge-search:focus-within,
.knowledge-context-search:focus-within {
  border-color: color-mix(in srgb, var(--text-primary) 22%, var(--border));
  box-shadow: none;
}

.knowledge-search input,
.knowledge-context-search input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  line-height: normal;
  padding: 0;
  box-sizing: border-box;
  caret-color: var(--text-primary);
  transform: translateY(var(--ui-search-input-optical-shift-y));
}

.knowledge-search input:focus-visible,
.knowledge-context-search input:focus-visible {
  box-shadow: none;
}


.knowledge-list-panel {
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-right: .5px solid var(--border);
  background: color-mix(in srgb, var(--surface-1) 64%, var(--page));
}

.knowledge-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  height: 52px;
  padding: 10px 16px;
  border-bottom: .5px solid var(--border);
  box-sizing: border-box;
}


.knowledge-list-heading > div {
  display: grid;
  gap: 1px;
}

.knowledge-list-heading strong {
  font-size: 14px;
  font-weight: 560;
}

.knowledge-list-heading span {
  color: var(--text-faint);
  font-size: 12px;
}

.knowledge-document-list {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 6px;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
}

.knowledge-document-list::-webkit-scrollbar {
  display: none;
}

.knowledge-document-row {
  display: grid;
  width: 100%;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  margin: 0;
  box-sizing: border-box;
  text-align: left;
  transition: background var(--duration-fast);
}

.knowledge-document-row + .knowledge-document-row {
  margin-top: 2px;
}
.knowledge-document-row:hover {
  background: var(--surface-hover);
}

.knowledge-document-row.is-selected {
  background: var(--surface-selected);
  box-shadow: none;
}

.knowledge-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: var(--text-muted);
}

.knowledge-file-icon .icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.knowledge-document-row.is-disabled .knowledge-document-title {
  color: var(--text-faint);
}

.knowledge-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 11.5px;
}

.knowledge-row-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.knowledge-row-indicator .icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
}

.knowledge-document-title {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.knowledge-empty-list,
.knowledge-detail-empty,
.knowledge-context-empty {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  padding: 24px;
  color: var(--text-faint);
  text-align: center;
}

.knowledge-empty-list strong,
.knowledge-detail-empty strong,
.knowledge-context-empty strong {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 550;
}

.knowledge-detail-panel {
  display: flex;
  flex-direction: column;
}

.knowledge-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  height: 52px;
  padding: 10px 16px;
  border-bottom: .5px solid var(--border);
  box-sizing: border-box;
}
.knowledge-detail-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.knowledge-detail-title-row .knowledge-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
}

.knowledge-detail-title-row .knowledge-file-icon .icon {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.knowledge-detail-title-row > div {
  min-width: 0;
}

.knowledge-detail-title-row h2 {
  overflow: hidden;
  font-size: 16px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-detail-title-row p {
  overflow: hidden;
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-detail-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}
.knowledge-detail-scroll {
  min-height: 0;
  flex: 1;
  padding: 20px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  scrollbar-width: none;
}

.knowledge-detail-scroll::-webkit-scrollbar {
  display: none;
}

.knowledge-summary-block {
  width: 100%;
  padding-bottom: 16px;
  border-bottom: .5px solid var(--border);
}

.knowledge-summary-block p {
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.knowledge-detail-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-faint);
  font-size: 12px;
}

.knowledge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 520;
}

.knowledge-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}

.knowledge-status[data-status="ready"] i {
  background: var(--success);
}

.knowledge-status[data-status="processing"] i,
.knowledge-status[data-status="waiting"] i {
  background: var(--warning);
}

.knowledge-status[data-status="failed"] i {
  background: var(--danger);
}

.knowledge-metadata {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.knowledge-metadata div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.knowledge-metadata dt {
  color: var(--text-faint);
  font-size: 11.5px;
}

.knowledge-metadata dd {
  overflow: hidden;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-preview-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.knowledge-editor-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--knowledge-editor-height, 340px);
  min-height: 240px;
  max-height: 640px;
  box-sizing: border-box;
}

.knowledge-text-preview,
.knowledge-text-editor {
  flex: 1;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  border: .5px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  resize: none;
  overflow-y: auto;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast);
}

.knowledge-text-editor::-webkit-resizer {
  display: none;
}

[data-theme="dark"] .knowledge-text-editor {
  background: var(--surface-1);
}

.knowledge-text-editor:hover {
  border-color: color-mix(in srgb, var(--border-strong) 60%, var(--border));
}

.knowledge-text-editor:focus,
.knowledge-text-editor:focus-visible {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 18%, transparent);
  background: #ffffff;
}

[data-theme="dark"] .knowledge-text-editor:focus,
[data-theme="dark"] .knowledge-text-editor:focus-visible {
  background: var(--surface-1);
}

.knowledge-editor-resize-rail {
  position: relative;
  width: 100%;
  height: 10px;
  margin-top: -3px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  user-select: none;
  touch-action: none;
}

.knowledge-editor-resize-handle-bar {
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text-primary) 12%, transparent);
  transition: background var(--duration-fast), width var(--duration-fast);
}

.knowledge-editor-resize-rail:hover .knowledge-editor-resize-handle-bar,
.knowledge-editor-resize-rail:focus-visible .knowledge-editor-resize-handle-bar {
  background: color-mix(in srgb, var(--text-primary) 36%, transparent);
  width: 48px;
}

.knowledge-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  border: .5px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.knowledge-status-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-top: 2px;
}

.knowledge-status-banner h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 560;
  color: var(--text-primary);
}

.knowledge-status-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.knowledge-tags {
  max-width: 820px;
  margin-top: 24px;
}

.knowledge-tags > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.knowledge-tags span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11.5px;
}

div.knowledge-compact-switcher,
.knowledge-screen .knowledge-compact-switcher,
.knowledge-compact-switcher.segmented {
  display: none !important;
}

/* Add content */
.knowledge-dialog-backdrop,
.knowledge-context-backdrop {
  z-index: var(--z-modal);
}

.knowledge-add-dialog {
  width: min(560px, calc(100vw - 28px)) !important;
  min-width: min(560px, calc(100vw - 28px)) !important;
  max-width: 560px !important;
  height: 500px !important;
  min-height: 500px !important;
  max-height: min(500px, calc(100vh - 32px)) !important;
  padding: 20px 24px 18px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.knowledge-context-dialog {
  width: min(660px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 24px;
}

.knowledge-dialog-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.knowledge-add-dialog > p,
.knowledge-context-dialog > p {
  max-width: 520px;
  margin-top: 5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.knowledge-add-body {
  flex: 1 1 auto;
  min-height: 0;
  height: 270px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.knowledge-add-panel {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.knowledge-add-tabs {
  width: fit-content;
  margin: 16px 0 14px;
}

.knowledge-dropzone {
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 54%, transparent);
  color: var(--text-faint);
  text-align: center;
  box-sizing: border-box;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.knowledge-dropzone:hover,
.knowledge-dropzone:focus-within {
  border-color: var(--text-faint);
  background: var(--surface-2);
}

.knowledge-dropzone strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 560;
}

.knowledge-dropzone span {
  max-width: 420px;
  font-size: 12px;
  line-height: 1.55;
}

.knowledge-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.knowledge-form-field {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.knowledge-form-field:first-child {
  margin-top: 0;
}

.knowledge-form-field input,
.knowledge-form-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: .5px solid var(--border);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-1);
}

.knowledge-form-field input {
  min-height: 36px;
  padding: 0 11px;
}

.knowledge-form-field--content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.knowledge-form-field--content textarea {
  flex: 1 1 auto;
  min-height: 140px;
  height: 140px;
  resize: none;
  padding: 9px 11px;
  line-height: 1.5;
}

.knowledge-form-field input:focus-visible,
.knowledge-form-field textarea:focus-visible {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 18%, transparent);
}

.knowledge-add-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.knowledge-dialog-actions {
  margin-top: 14px;
  flex: 0 0 auto;
}

/* Composer context */
.composer-knowledge-context {
  display: inline-flex;
  max-width: min(360px, 100%);
  align-items: center;
  align-self: flex-start;
  margin-top: 8px;
  border: .5px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-secondary);
}

.composer-knowledge-context-main,
.composer-knowledge-context-remove {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: transparent;
  color: inherit;
}

.composer-knowledge-context-main {
  min-width: 0;
  gap: 7px;
  padding: 0 8px 0 9px;
}

.composer-knowledge-context-main span:not(.icon) {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-knowledge-context-remove {
  width: 28px;
  border-left: .5px solid var(--border);
  border-radius: 0 9px 9px 0;
}

.composer-knowledge-context-main:hover,
.composer-knowledge-context-remove:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.knowledge-context-search {
  width: 100%;
  margin: 18px 0 10px;
}

.knowledge-context-list {
  max-height: min(390px, 48vh);
  padding: 4px;
  border: .5px solid var(--border);
  border-radius: 11px;
  background: var(--surface-1);
}

.knowledge-context-option {
  display: grid;
  width: 100%;
  grid-template-columns: 22px 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 7px 9px;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.knowledge-context-option:hover {
  background: var(--surface-hover);
}

.knowledge-context-option.is-selected {
  background: var(--surface-selected);
}

.knowledge-context-check {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: .5px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text-primary);
}

.knowledge-context-option.is-selected .knowledge-context-check {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--page);
}

.knowledge-context-option > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.knowledge-context-option strong,
.knowledge-context-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-context-option strong {
  font-size: 13px;
  font-weight: 550;
}

.knowledge-context-option small {
  color: var(--text-faint);
  font-size: 11.5px;
}

.knowledge-context-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.knowledge-context-footer > span {
  color: var(--text-faint);
  font-size: 12px;
  text-align: right;
}

/* Message source disclosure */
.message-knowledge-sources {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin-top: 14px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 520;
}

.message-knowledge-sources:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.thread-knowledge-inspector .thread-reference-body {
  gap: 20px;
}

.thread-knowledge-source-list {
  display: grid;
  gap: 3px;
}

.thread-knowledge-source {
  display: grid;
  width: 100%;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 8px;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.thread-knowledge-source:hover,
.thread-knowledge-source.is-selected {
  background: var(--surface-hover);
}

.thread-knowledge-source.is-selected {
  background: var(--surface-selected);
}

.thread-knowledge-source > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.thread-knowledge-source strong,
.thread-knowledge-source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-knowledge-source strong {
  font-size: 12.5px;
  font-weight: 540;
}

.thread-knowledge-source small,
.thread-knowledge-location {
  color: var(--text-faint);
  font-size: 11px;
}

.thread-knowledge-excerpt {
  padding-top: 18px;
  border-top: .5px solid var(--border);
}

.thread-knowledge-excerpt > span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: .04em;
}

.thread-knowledge-excerpt h3 {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 560;
}

.thread-knowledge-excerpt blockquote {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-left: 2px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

@media (max-width: 1023px) {
  .knowledge-screen {
    padding: 8px 7px 10px;
  }

  .knowledge-toolbar {
    justify-content: stretch;
  }

  .knowledge-search {
    width: auto;
    flex: 1;
  }

  div.knowledge-compact-switcher,
  .knowledge-screen .knowledge-compact-switcher,
  .knowledge-compact-switcher.segmented {
    display: grid !important;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .knowledge-layout {
    display: block;
    min-height: 0;
  }

  .knowledge-workbench-grid,
  .library-workbench-shell.knowledge-workbench-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .knowledge-screen[data-knowledge-compact-pane="list"] .knowledge-detail-panel,
  .knowledge-screen[data-knowledge-compact-pane="detail"] .knowledge-list-panel {
    display: none;
  }

  .knowledge-list-panel,
  .knowledge-detail-panel {
    height: 100%;
  }

  .knowledge-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .knowledge-detail-actions {
    width: 100%;
  }

  .knowledge-detail-actions .button--primary {
    flex: 1;
  }

  .knowledge-detail-scroll {
    padding: 18px 16px 34px;
  }

  .knowledge-metadata {
    grid-template-columns: 1fr 1fr;
  }

  .knowledge-text-preview {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .knowledge-status-tabs {
    margin-inline: -2px;
  }

  .knowledge-toolbar .button span:not(.icon) {
    display: none;
  }

  .knowledge-detail-title-row h2 {
    white-space: normal;
  }

  .knowledge-context-footer {
    grid-template-columns: 1fr auto;
  }

  .knowledge-context-footer > .button--ghost {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .knowledge-context-footer > span {
    text-align: left;
  }
}

.knowledge-dropzone[data-dragging="true"] {
  border-color: var(--text-muted);
  background: var(--surface-selected);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-primary) 8%, transparent);
}
