/* D2 editor — source-first: D2 lays the diagram out itself, so editing happens in the Properties
   panel, in a monospace textarea that does not wrap. */
.dia-d2 .flow-props .flow-panel-body { width: 340px; max-width: 80vw; }

.dia-d2 .d2-src {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 260px;
  resize: vertical;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.85rem;
  line-height: 1.35;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  outline: none;
}
.dia-d2 .d2-src:focus { border-color: var(--accent); }
