/* ── Adding knowledge ─────────────────────────────────────
   The dropzone, the accepted-formats disclosure and the list of sources it
   produces. Split from builder.css because the dashboard's Knowledge section
   renders exactly the same surface -- it was never builder-specific, and the
   builder file had grown past the size budget carrying it. */

.dropzone {
  border: 1.5px dashed var(--line-hi);
  border-radius: var(--r-md);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 14.5px;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone strong { color: var(--text); font-weight: 600; }

/* Accepted formats, folded away. The dropzone says "drop files"; the exact
   forty extensions are for the one person in twenty who needs to check. */
.formats { font-size: 13px; color: var(--subtle); }

.formats > summary {
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
  transition: color 0.16s var(--ease);
}
.formats > summary::-webkit-details-marker { display: none; }
.formats > summary::after { content: "›"; display: inline-block; margin-left: 6px; transition: transform 0.16s var(--ease); }
.formats[open] > summary::after { transform: rotate(90deg); }
.formats > summary:hover { color: var(--text); }
.formats > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.formats-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.formats-group { display: flex; gap: 12px; align-items: baseline; }
.formats-label { flex: none; width: 108px; color: var(--text); font-weight: 500; }
/* word-spacing does the separating: HTML collapses the runs of spaces the
   markup would otherwise use, and a wrapped list needs the air to stay legible. */
.formats-exts { font-family: var(--font-mono); font-size: 12px; line-height: 1.75; word-spacing: 0.5em; }
.formats-foot { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); line-height: 1.55; }

@media (max-width: 560px) {
  .formats-group { flex-direction: column; gap: 2px; }
  .formats-label { width: auto; }
}

.source-list { display: flex; flex-direction: column; gap: 9px; }

.source-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  animation: rise 0.35s var(--ease);
}

.source-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.source-icon svg { width: 15px; height: 15px; }

.source-main { flex: 1; min-width: 0; }
.source-name { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-meta { font-size: 12.5px; color: var(--subtle); }

.icon-btn {
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.16s var(--ease);
  flex: none;
}
.icon-btn:hover { color: var(--danger); background: rgba(217, 128, 128, 0.1); }
.icon-btn svg { width: 14px; height: 14px; }
