.connections h1 { margin-bottom: 8px; }
.graph-intro { color: var(--muted); margin-bottom: 24px; }
.graph-toolbar { display: flex; gap: 16px; margin-bottom: 16px; }
.graph-toolbar > div { width: min(100%, 300px); }
.graph-toolbar label { display: block; margin: 0 0 5px; font-size: 13px; color: var(--muted); }
.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 29%); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fffefa; }
.graph-stage { position: relative; min-width: 0; background-color: #f4f4ed; background-image: radial-gradient(#586c631f 1px, transparent 1px); background-size: 15px 15px; }
#network { width: 100%; height: clamp(430px, 58vh, 630px); display: block; touch-action: none; cursor: grab; }
.graph-key, .graph-tools { position: absolute; left: 15px; display: flex; align-items: center; padding: 6px; gap: 4px; background: #fffefaf5; border: 1px solid var(--line); border-radius: 12px; }
.graph-key { top: 15px; pointer-events: none; padding: 6px 12px; gap: 15px; font-size: 12px; }
.graph-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; background: #386078; border-radius: 50%; margin-right: 6px; }
.graph-key span + span::before { border-radius: 2px; background: #ba784f; transform: rotate(45deg); }
.graph-tools { bottom: 15px; }
.graph-tools button, #graph-info button { color: var(--navy); background: transparent; border: none; border-radius: 8px; padding: 3px 9px; }
.graph-tools button:hover, #graph-info button:hover, #person-results button:focus, #person-results button:hover { background: #e9efee; }
.graph-node { cursor: pointer; }
.graph-node .shape { stroke: white; stroke-width: 2; }
.graph-node.selected .shape, .graph-node:focus-visible .shape { stroke: #113651; stroke-width: 4; }
.graph-node text { fill: #304656; font: 600 13px Arial, sans-serif; paint-order: stroke; stroke: #f5f6ef; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.graph-node .initials { fill: white; stroke: none; font-size: 12px; }
.graph-node.dimmed, .graph-edge.dimmed { opacity: .38; }
.graph-edge { stroke: #96a39d; stroke-width: 1.7; }
.graph-edge.active { stroke: #9b603d; stroke-width: 2.4; }
#graph-info { padding: 24px; border-left: 1px solid var(--line); overflow-y: auto; max-height: max(430px, 58vh); }
#graph-info h2 { font-size: 29px; margin: 7px 0 14px; }
#graph-info h3 { font: 600 15px Arial,sans-serif; margin: 22px 0 8px; }
#graph-info p, #graph-info small { color: var(--muted); }
#graph-info ul { list-style: none; padding: 0; }
#graph-info li { margin: 7px 0; }
#graph-info button { text-align: left; padding: 4px 0; }
#graph-info li small { display: block; }
.person-search { position: relative; }
#person-results { position: absolute; inset: 100% 0 auto; z-index: 3; background: white; padding: 5px; border: 1px solid var(--line); border-radius: 14px; max-height: 260px; overflow: auto; box-shadow: 0 8px 20px #15354a18; }
#person-results button { display: block; width: 100%; background: none; border: none; text-align: left; padding: 5px 9px; border-radius: 8px; }
@media(max-width: 760px) {
  .graph-layout { grid-template-columns: 1fr; }
  #network { height: 390px; }
  #graph-info { border-left: 0; border-top: 1px solid var(--line); }
  .graph-toolbar { flex-wrap: wrap; gap: 8px; }
  .graph-toolbar > div { width: 100%; }
}
