.diagram-canvas { min-width: 0; }
.diagram-scroll { overflow-x: auto; padding: 3px; }
.diagram { display: block; width: 100%; }
.diagram--basic { max-width: 572px; }
.diagram--full { min-width: 680px; max-width: 720px; }
.diagram--narrow { max-width: 300px; }
.diagram .box { fill: var(--panel2); stroke: var(--border); stroke-width: 1; }
.diagram .label { fill: var(--text); font: 500 11px "Segoe UI", system-ui, sans-serif; }
.diagram .sub { fill: var(--muted); font: 9px "Segoe UI", system-ui, sans-serif; }
.diagram .wire { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.diagram .red { stroke: #ef8a83; }
.diagram .green { stroke: #8ddbc7; }
.diagram .port { fill: var(--panel); stroke-width: 1.5; }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.diagram-legend > span { display: inline-flex; align-items: baseline; gap: 7px; }
.wire-key { display: inline-block; flex: none; width: 14px; height: 2px; border-radius: 1px; transform: translateY(-3px); }
.wire-key.green { background: #8ddbc7; }
.wire-key.red { background: #ef8a83; }
