Editorial Diagram Design
Generate clean, publication-grade diagrams as single, self-contained HTML files (inline SVG + CSS). Never use generic dark-cyan glows, default Mermaid layouts, or diagonal connector lines.
Visual DNA & Color Palette
- Paper (Background):
#f5f5f5(flat canvas). - Ink (Text & Dominant Strokes):
#2d3142. - Muted (Secondary Text & Standard Lines):
#4f5d75. - Borders & Dividers:
rgba(45, 49, 66, 0.12). - Accent (Bottlenecks / Critical Focus):
#eb6c36(coral/terracotta; max 1–2 focal nodes per diagram). - External / Loose Boundaries: Dashed stroke (
stroke-dasharray="4,4").
Typography (Google Fonts)
Embed in HTML header:
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
- Diagram Title:
Instrument Serif, 28px, normal weight. - Node Names:
Geist(sans), 12px, weight 600. - Sublabels & Metadata:
Geist Mono, 9px (ports, protocols, batch intervals). - Connector Badges / Eyebrows:
Geist Mono, 7–8px, uppercase, tracked (letter-spacing: 0.08em).
SVG Geometry & Layout Standards
- 4px Grid Discipline: All coordinates (
x,y), dimensions (width,height), paddings, and gaps must be multiples of 4. - Orthogonal Connectors Only: Never draw diagonal slanted lines between off-axis nodes. Every bend must be a right-angle elbow with rounded corner (
r=8). Reserve straight<line>strictly for nodes sharing identical axes. - Masked Connector Badges: Place protocol/data labels (e.g.,
CSV,XLSX,LOAD) inside an opaque<rect>filled with#f5f5f5(rx=2). Maintain a 6px–10px visible gap from the line stroke so the label never cuts through the arrow. - Zones & Functional Containers: Group steps into broad columns/areas (e.g.,
COLLECTION,PROCESSING,DISSEMINATION). Use a 1px border (rgba(45,49,66,0.12)), rounded corners (rx=8), and an uppercase mono title tab at the top-left. - Node Hierarchy:
- Standard:
#fffffffill, 1px#2d3142stroke, 6px radius (rx=6). - Bottleneck / Pain-point:
#fbeee8fill (rgba(235,108,54,0.08)),#eb6c36stroke. - External: Transparent or white fill, dashed border (
stroke-dasharray="4,4").
- Standard:
- Horizontal Bottom Legend: Position a horizontal legend strip below the diagram nodes, separated by a full-width hairline rule.
Structural SVG Template
Load references/template.md before writing the SVG (markers, zones, connectors, masked badge, node box).