/* Diagramas de arquitetura. */
.dg { position: relative; }
.dg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 10px; }
.dg-title { font: 600 17px/24px var(--font-sans); letter-spacing: -0.01em; color: var(--text); }
.dg-scope { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.dg-canvas { position: relative; border: 1px solid var(--line); border-radius: var(--radius-0); background-color: var(--bg); padding: 8px; }
.dg-canvas::before, .dg-canvas::after { content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--line-strong); border-style: solid; pointer-events: none; }
.dg-canvas::before { top: -5px; left: -5px; border-width: 1px 0 0 1px; }
.dg-canvas::after { bottom: -5px; right: -5px; border-width: 0 1px 1px 0; }
.dg-canvas > svg { display: block; width: 100%; height: auto; overflow: visible; }
.dg-shape { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.25; transition: stroke var(--dur-fast) var(--ease-standard), fill var(--dur-fast) var(--ease-standard); }
.dg-detail { fill: none; }
.dg-node--model .dg-shape { stroke: var(--text); }
.dg-node--agent .dg-shape { stroke: var(--live); }
.dg-node--consumer .dg-shape:not(.dg-detail) { fill: var(--bg-alt); }
.dg-icon { fill: none; stroke: var(--text-muted); stroke-width: 1.6; stroke-linecap: square; }
.dg-label { font: 600 12.5px var(--font-sans); fill: var(--text); }
.dg-tech { font: 500 9.5px var(--font-mono); letter-spacing: 0.06em; fill: var(--text-faint); }
.dg-node { cursor: crosshair; outline: none; transition: opacity var(--dur-base) var(--ease-standard); }
.dg-node.lit .dg-shape:not(.dg-detail) { stroke: var(--live); stroke-width: 2; }
.dg-node:focus-visible .dg-shape:not(.dg-detail) { stroke: var(--focus); stroke-width: 2.5; }
.dg-line { fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.dg-edge--control .dg-line { stroke-dasharray: 6 4; }
.dg-edge--event .dg-line { stroke-dasharray: 1 4; stroke-linecap: round; stroke-width: 2; }
.dg-edge { transition: opacity var(--dur-base) var(--ease-standard); }
.dg-edge.lit .dg-line { stroke: var(--live-text); stroke-width: 2; }
.dg-flow { fill: none; stroke: none; }
.dg-edge--data.lit .dg-flow { stroke: var(--text); stroke-width: 2.5; stroke-dasharray: 2 14; stroke-linecap: round; animation: dg-flow var(--dur-flow) linear infinite; }
@keyframes dg-flow { to { stroke-dashoffset: -32; } }
.dg-arrow { fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.dg-pillbg { fill: var(--bg); stroke: var(--line); }
.dg-pilltext { font: 500 10px var(--font-mono); fill: var(--text-muted); }
.dg-step { fill: var(--accent); }
.dg-stepn { font: 600 9.5px var(--font-mono); fill: var(--on-accent); text-anchor: middle; }
.dg-dim { opacity: var(--opacity-dimmed); }
.dg-band { fill: var(--bg); }
.dg-band--alt { fill: var(--bg-alt); }
.dg-rule { stroke: var(--line); }
.dg-bandlabel, .dg-boundlabel { font: 500 10px var(--font-mono); letter-spacing: 0.08em; fill: var(--text-faint); }
.dg-bound { fill: none; stroke: var(--line-strong); stroke-dasharray: 4 3; }
.dg-explain { min-height: 22px; margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.dg-explain b { color: var(--text); font-weight: 600; }
.dg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-muted); }
.dg-lg { display: inline-flex; align-items: center; gap: 6px; }
.dg-lgline { width: 28px; height: 8px; fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.dg-lgline--control { stroke-dasharray: 6 4; }
.dg-lgline--event { stroke-dasharray: 1 4; stroke-linecap: round; stroke-width: 2; }
.dg-stepsl { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 16px; font-size: 12.5px; line-height: 18px; color: var(--text-muted); }
.dg-stepsl b { font: 600 10px/16px var(--font-mono); color: var(--on-accent); background: var(--accent); border-radius: 999px; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; }
.dg-stepsl span { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; }

