/* "How it all connects" on the hub. Tokyo Night colors, dark in both themes like the other demos. */
.graph { border: 1px solid #292e42; border-radius: var(--radius-md); overflow: hidden; background: #1a1b26; color: #c0caf5; }
.graph-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; border-bottom: 1px solid #292e42; }
.graph-legend button {
    display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--font-body); color: #a9b1d6;
    background: transparent; border: 1px solid #292e42; border-radius: 999px; padding: 6px 12px; cursor: pointer;
    transition: background .2s, color .2s;
}
.graph-legend button:hover, .graph-legend button[aria-pressed="true"] { background: #292e42; color: #c0caf5; }
.graph-legend i { width: 9px; height: 9px; border-radius: 50%; }
#graphSvg { display: block; width: 100%; height: 660px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.graph-info { margin: 0; padding: 14px 16px; border-top: 1px solid #292e42; font-size: 14px; line-height: 1.5; color: #a9b1d6; min-height: 52px; }
.graph-info b { color: #c0caf5; margin-right: 4px; }
.graph-info a { color: #7aa2f7; font-weight: 600; white-space: nowrap; }

.gr-link { stroke: #565f89; stroke-opacity: .3; stroke-width: 1; transition: stroke-opacity .2s; }
.gr-node { cursor: pointer; text-decoration: none; transition: opacity .2s; touch-action: none; outline: none; }
.gr-hit { fill: transparent; }
.gr-label {
    font: 500 11px var(--font-body); fill: #a9b1d6; text-anchor: middle; pointer-events: none;
    paint-order: stroke; stroke: #1a1b26; stroke-width: 3px; stroke-linejoin: round;
}
.gr-group .gr-label { font-weight: 700; font-size: 13px; fill: #fff; }
.gr-project .gr-label { fill: #c0caf5; }
.gr-topic .gr-label { opacity: .75; }
.gr-node:focus-visible .gr-dot { stroke: #fff; stroke-width: 2.5; }
/* phones: only group names until something is picked */
.small .gr-label { display: none; }
.small .gr-group .gr-label, .small .gr-node.on .gr-label { display: block; }

.focus .gr-node { opacity: .15; }
.focus .gr-node.on { opacity: 1; }
.focus .gr-node.on .gr-label { opacity: 1; }
.focus .gr-link { stroke-opacity: .08; }
.focus .gr-link.on { stroke: #7aa2f7; stroke-opacity: .8; }
.gr-node.self .gr-dot { stroke: #fff; stroke-width: 2; }

@media (max-width: 640px) { #graphSvg { height: 520px; } }
