/* Vermögeninsider · Beziehungsnetz (Canvas). Nutzt die Variablen aus register.css, mit Rückfallwerten. */
.vi-netz {
  --n-grund: #0d1015;
  --n-flaeche: #161c25;
  --n-linie: #2c323b;
  --n-text: #e4e7eb;
  --n-text-2: #9aa3ad;
  position: relative; height: 560px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--n-linie); border-radius: 2px;
  background: radial-gradient(90% 85% at 50% 45%, var(--n-flaeche) 0%, #11161e 55%, var(--n-grund) 100%);
  color: var(--n-text); font-family: var(--sans, "Archivo", "Helvetica Neue", Arial, sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.vi-netz.hoch { height: min(78vh, 760px); }
.vi-netz.profil { height: 440px; }
@media (max-width: 640px) { .vi-netz { height: 480px; } .vi-netz.hoch { height: 72vh; } }

.vi-netz .netz-flaeche { position: absolute; inset: 0; touch-action: none; transition: opacity var(--d3, 320ms) var(--kurve, ease); }
.vi-netz .netz-flaeche canvas { display: block; }
.vi-netz.laedt .netz-flaeche { opacity: .45; }

.vi-netz .netz-status { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  color: var(--n-text-2); font-size: var(--t-s, .9375rem); }
.vi-netz.fertig .netz-status { inset: auto 0 1rem; }
.vi-netz .netz-status[hidden] { display: none; }

/* Tooltip */
.vi-netz .netz-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; max-width: 280px;
  display: grid; gap: .1rem; padding: .55rem .7rem .6rem; border-radius: 2px;
  background: var(--druck, #101318); border: 1px solid #333a44; border-top: 2px solid var(--signal, #e0522a);
  box-shadow: 0 14px 34px -14px rgba(0,0,0,.7); font-size: var(--t-xs, .8125rem); line-height: 1.35; color: #fff; }
.vi-netz .netz-tip[hidden] { display: none; }
.vi-netz .netz-tip strong { font-weight: 640; font-size: var(--t-s, .9375rem); }
.vi-netz .netz-tip .nt-wert { font-weight: 800; font-stretch: 118%; font-size: var(--t-m, 1.0625rem); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.vi-netz .netz-tip .nt-meta { color: #b9bec6; display: flex; align-items: center; gap: .45rem; }
.vi-netz .nt-art { width: 18px; flex: none; border-top: 2px solid #d6dbe2; }
.vi-netz .nt-art.k-ehe { border-color: var(--signal, #e0522a); }
.vi-netz .nt-art.k-firma { border-top-style: dashed; border-color: #96a2b2; }

/* Steuerknöpfe */
.vi-netz .netz-steuer { position: absolute; right: .75rem; top: .75rem; z-index: 3; display: flex; flex-direction: column;
  border: 1px solid var(--n-linie); border-radius: 4px; background: rgba(13,16,21,.82); overflow: hidden; }
.vi-netz .netz-steuer button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; margin: 0;
  border: 0; border-top: 1px solid var(--n-linie); background: none; color: var(--n-text); cursor: pointer;
  transition: background var(--d1, 120ms) var(--kurve, ease), color var(--d1, 120ms) var(--kurve, ease); }
.vi-netz .netz-steuer button:first-child { border-top: 0; }
.vi-netz .netz-steuer button:hover { background: #1f2630; color: #fff; }
.vi-netz .netz-steuer button:focus-visible { outline: 2px solid var(--signal, #e0522a); outline-offset: -2px; }
.vi-netz .netz-steuer svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }

/* Legende */
.vi-netz .netz-legende-box { position: absolute; left: .75rem; bottom: .75rem; z-index: 3; max-width: min(300px, calc(100% - 1.5rem));
  border: 1px solid var(--n-linie); border-radius: 4px; background: rgba(13,16,21,.86); font-size: var(--t-xs, .8125rem); }
.vi-netz .netz-legende-box summary { list-style: none; cursor: pointer; padding: .45rem .7rem; color: var(--n-text); font-weight: 600;
  display: flex; align-items: center; gap: .5rem; user-select: none; }
.vi-netz .netz-legende-box summary::-webkit-details-marker { display: none; }
.vi-netz .netz-legende-box summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(-135deg) translate(-1px, -1px); transition: transform var(--d2, 200ms) var(--kurve, ease); }
.vi-netz .netz-legende-box[open] summary::after { transform: rotate(45deg); }
.vi-netz .netz-legende-box summary:focus-visible { outline: 2px solid var(--signal, #e0522a); outline-offset: -2px; }
.vi-netz .nl-punkte { display: inline-flex; gap: 3px; }
.vi-netz .nl-punkte i { width: 7px; height: 7px; border-radius: 50%; background: var(--f); }
.vi-netz .netz-legende-box[open] .nl-punkte { display: none; }
.vi-netz .netz-legende-inhalt { padding: 0 .7rem .6rem; color: var(--n-text-2); }
.vi-netz .netz-legende-inhalt p { margin: .2rem 0 .4rem; line-height: 1.35; }
.vi-netz .nl-titel { color: var(--n-text); }
.vi-netz .netz-legende-inhalt ul { list-style: none; margin: 0 0 .45rem; padding: 0; display: grid; gap: .18rem; }
.vi-netz .nl-stufen { grid-template-columns: 1fr 1fr; column-gap: .8rem; }
.vi-netz .netz-legende-inhalt li { display: flex; align-items: center; gap: .45rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vi-netz .nl-stufen i { width: 9px; height: 9px; border-radius: 50%; background: var(--f); flex: none; }
.vi-netz .nl-kanten i { width: 20px; flex: none; border-top: 2px solid #d6dbe2; opacity: .8; }
.vi-netz .nl-kanten i.k-ehe { border-color: var(--signal, #e0522a); opacity: 1; }
.vi-netz .nl-kanten i.k-firma { border-top-style: dashed; border-color: #96a2b2; }
.vi-netz .nl-hilfe { margin-bottom: 0 !important; }

/* Suche im Netz-Abschnitt: Trefferliste im CI */
.netz-suche .suche-treffer [aria-selected="true"] button { background: var(--papier, #f4f4f0); }
.netz-suche .suche-treffer small { color: var(--text-3, #6b717b); font-variant-numeric: tabular-nums; margin-left: .35rem; }

@media (prefers-reduced-motion: reduce) {
  .vi-netz .netz-flaeche, .vi-netz .netz-steuer button, .vi-netz .netz-legende-box summary::after { transition: none; }
}

/* Weitere Verbindungsarten (Geschwister, Gründung, Beteiligung) und zuschaltbare Ebene (Arbeitgeber, Team, Label) */
.vi-netz .k-geschwister { border-color: #baa0e4 !important; }
.vi-netz .k-gruendung { border-color: #d8a840 !important; }
.vi-netz .k-beteiligung { border-color: #68b284 !important; border-top-style: dashed !important; }
.vi-netz .k-arbeitgeber { border-color: #709cde !important; border-top-style: dotted !important; }
.vi-netz .k-team { border-color: #54bac4 !important; border-top-style: dotted !important; }
.vi-netz .k-label { border-color: #da80b2 !important; border-top-style: dotted !important; }
.vi-netz .nl-kanten { grid-template-columns: 1fr 1fr; column-gap: .8rem; }
.vi-netz .nl-ebenen i { width: 20px; flex: none; border-top: 2px solid; }
.vi-netz .nl-ebenen label { display: flex; align-items: center; gap: .45rem; cursor: pointer; color: var(--n-text-2); }
.vi-netz .nl-ebenen input { appearance: none; width: 14px; height: 14px; margin: 0; flex: none; border: 1px solid #5b636e; border-radius: 2px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.vi-netz .nl-ebenen input::after { content: ""; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.vi-netz .nl-ebenen input:checked { background: var(--signal, #e0522a); border-color: var(--signal, #e0522a); }
.vi-netz .nl-ebenen input:checked::after { opacity: 1; }
.vi-netz .nl-ebenen input:focus-visible { outline: 2px solid var(--signal, #e0522a); outline-offset: 2px; }
.vi-netz .nl-ebenen label:hover { color: var(--n-text); }
.vi-netz .netz-tip .nt-ueber { color: #8f96a0; }
.vi-netz .netz-legende-box { max-width: min(340px, calc(100% - 1.5rem)); }
