.gr-legend{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:12px;font-size:12px;color:var(--muted)}
.gr-key{display:inline-flex;align-items:center;gap:5px}
.gr-swatch{width:14px;height:3px;border-radius:2px;background:var(--fam-other)}
.gr-classification .gr-swatch{background:var(--fam-classification)}
.gr-composition   .gr-swatch{background:var(--fam-composition)}
.gr-association   .gr-swatch{background:var(--fam-association)}
.gr-packaging     .gr-swatch{background:var(--fam-packaging)}

.gr-wrap{padding:16px;overflow:auto;max-height:70vh}
.gr-svg{display:block;max-width:100%;height:auto}

.gr-edge{fill:none;stroke:var(--fam-other);stroke-width:1.5;opacity:.75}
.gr-edge.gr-classification{stroke:var(--fam-classification)}
.gr-edge.gr-composition{stroke:var(--fam-composition)}
.gr-edge.gr-association{stroke:var(--fam-association)}
.gr-edge.gr-packaging{stroke:var(--fam-packaging)}
marker.gr-other path{fill:var(--fam-other)}
marker.gr-classification path{fill:var(--fam-classification)}
marker.gr-composition path{fill:var(--fam-composition)}
marker.gr-association path{fill:var(--fam-association)}
marker.gr-packaging path{fill:var(--fam-packaging)}

.gr-node rect{fill:var(--panel);stroke:var(--border);stroke-width:1.5}
.gr-node text{font:600 12px var(--mono);fill:var(--text)}
.gr-node{cursor:pointer}
.gr-node:hover rect{stroke:var(--accent);fill:var(--accent-soft)}
.gr-node.gr-k-module rect{fill:var(--green-soft);stroke:#a7f3d0}
.gr-node.gr-self rect{stroke:var(--accent);stroke-width:2.5}
