/* diagram/diagram.css - chrome for diagram/diagram.js. The drawing itself is
   SVG from lib/diagram-2d.js, which carries its own ink and its own font;
   everything here is the paper it sits on and the type around it. */

.diagram {
  width: 100%;
  color: var(--text-body);
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.diagram-title {
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-strong);
  margin: 0;
}

.diagram-panel svg { display: block; max-width: 100%; height: auto }

/* A molecule neither projection can draw leaves an empty box, which reads as a
   drawing that failed to load. Collapse it instead. */
.diagram.is-empty .diagram-panel { display: none }

.diagram-caption {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim, var(--muted));
  margin: 0;
  max-width: 34em;
  text-align: center;
}
