/* Radar's existing palette and typography, organized around the source-evidence rail. */
.knowledge { min-width: 0; }
.knowledge h1 { margin-bottom: 6px; }
.knowledge h2 { margin-top: 0; }
.knowledge-intro { color: var(--ink-2); margin: 4px 0 18px; max-width: 80ch; }
.knowledge-nav { flex: initial; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 22px; }
.knowledge-nav a { border-radius: 4px; padding: 7px 10px; }
.knowledge-nav a[aria-current] { color: var(--accent); box-shadow: inset 0 -2px var(--accent); background: var(--surface-2); }
.knowledge-counts { border-left: 3px solid var(--accent); padding: 7px 12px; color: var(--ink-2); }
.knowledge-counts strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.knowledge-filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(130px, 1fr)); gap: 12px; margin: 20px 0; }
.knowledge .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.knowledge .field input, .knowledge .field select, .knowledge-dialog .field input,
.knowledge-dialog .field select, .knowledge-dialog textarea { width: 100%; min-width: 0; }
.knowledge-filters .actions { align-self: end; min-height: 34px; }
.knowledge-pagination { margin-block: 18px; flex-wrap: wrap; }
.knowledge-directory td, .knowledge-assertions td { max-width: 340px; overflow-wrap: anywhere; }
.knowledge-profile-title { align-items: start; flex-wrap: wrap; gap: 16px; }
.knowledge-profile-title h1 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.knowledge-profile-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.knowledge-profile-main { min-width: 0; grid-column: 1; grid-row: 1; }
.knowledge-evidence { grid-column: 2; grid-row: 1; border-top: 3px solid var(--accent); position: sticky; top: 74px; max-height: calc(100vh - 100px); overflow: auto; }
.knowledge-evidence h2 { font-size: 17px; }
.knowledge-assertion-label { overflow-wrap: anywhere; color: var(--ink-2); }
.knowledge-citation { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.knowledge-citation blockquote { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--line); background: var(--surface-2); white-space: pre-wrap; line-height: 1.6; }
.knowledge-citation > a { display: block; font-size: 12px; }
.knowledge-evidence-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; font-size: 12px; }
.knowledge-evidence-meta dt { color: var(--ink-2); }
.knowledge-evidence-meta dd { margin: 0; }
.knowledge-citation code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; word-break: break-all; }
.knowledge-review-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.knowledge-review-actions h3 { margin-bottom: 0; }
.knowledge-graph { display: block; width: 100%; height: auto; max-height: 650px; }
.knowledge-edge { stroke: var(--line); stroke-width: 2; color: var(--ink-3); }
.knowledge-edge.disputed { stroke: var(--warning); stroke-dasharray: 5 4; }
.knowledge-node { text-decoration: none; }
.knowledge-node circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.knowledge-node.current circle { fill: var(--accent); }
.knowledge-node text { fill: var(--ink); font: 12px system-ui, sans-serif; }
.knowledge-graph.dense .knowledge-node:not(.current) text { opacity: 0; }
.knowledge-graph.dense .knowledge-node:hover text, .knowledge-graph.dense .knowledge-node:focus-visible text {
  opacity: 1; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round;
}
.knowledge-node:focus-visible { outline: none; }
.knowledge-node:focus-visible circle, .knowledge-node:hover circle { stroke: var(--ink); stroke-width: 4; }
.knowledge-assertions { margin-top: 24px; }
.knowledge-history { margin-top: 26px; }
.knowledge-identifiers { margin: 20px 0; }
.knowledge-identifiers summary, .knowledge-citation summary { cursor: pointer; padding: 7px 0; }
.knowledge-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.knowledge-dialog::backdrop { background: #0008; }
.knowledge-dialog .title-row { gap: 12px; margin-bottom: 14px; }
.knowledge-dialog h2 { margin: 0; font-size: 18px; }
.knowledge-form { max-width: none; }
.knowledge-form > button { align-self: start; }
.knowledge-raw { max-height: 65vh; }
.knowledge-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 16px; }
.knowledge-suggestion h2 { font-size: 16px; overflow-wrap: anywhere; }
.knowledge-suggestion .title-row { align-items: start; gap: 10px; }
.knowledge-suggestion .actions { margin-top: 16px; flex-wrap: wrap; }
.knowledge-suggestion select { min-width: 0; max-width: 100%; }
.knowledge-backfill { margin: 20px 0; }
.knowledge-backfill .actions { align-items: end; gap: 12px; flex-wrap: wrap; }
.knowledge-progress { display: flex; flex-direction: column; min-width: 100px; gap: 4px; font-variant-numeric: tabular-nums; }
.knowledge-progress progress { width: 120px; accent-color: var(--accent); }
.knowledge-settings { max-width: 1100px; }
.knowledge-toggles { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0; }
.knowledge-checkbox { display: inline-flex; gap: 8px; align-items: center; }
.knowledge-limits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.knowledge-taxonomy { margin: 26px 0; }
.knowledge-taxonomy-row { display: grid; grid-template-columns: 1fr 1.4fr 2fr 1fr auto; align-items: end; gap: 10px; border-top: 1px solid var(--line); padding: 12px 0; }
.knowledge button:focus-visible, .knowledge a:focus-visible, .knowledge-dialog button:focus-visible,
.knowledge input:focus-visible, .knowledge select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1100px) {
  .knowledge-profile-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 12px; }
  .knowledge-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-taxonomy-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .knowledge-profile-grid { display: flex; flex-direction: column; }
  .knowledge-evidence, .knowledge-profile-main { width: 100%; }
  .knowledge-evidence { position: static; max-height: none; }
  .knowledge-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge .actions { flex-wrap: wrap; }
  .knowledge button, .knowledge-nav a { min-height: 42px; }
  .knowledge-profile-title h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .knowledge *, .knowledge-dialog * { scroll-behavior: auto; transition: none; }
}
