/* GemSignal Visual Intelligence + GemMap + Organism v1 */
:root{--vi-green:#91ffbb;--vi-red:#ff9f9f;--vi-amber:#e4ca8b;--vi-panel:#081710}
.gs-chain-logo,
.gs-chain-button[data-chain="arc"] .gs-chain-logo,
.gs-chain-option[data-chain="arc"] .gs-chain-logo{
  width:22px!important;height:22px!important;object-fit:contain!important;flex:0 0 22px!important
}
.vi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.vi-card{border:1px solid rgba(145,255,187,.18);border-radius:12px;padding:14px;background:rgba(5,17,11,.72)}
.vi-card h3{margin:0 0 7px}.vi-card strong{font-size:19px}
.vi-stage{position:relative;overflow:hidden}
.vi-stage::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:var(--health,0%);background:var(--vi-green)}
.vi-stage.warn::after{background:var(--vi-amber)}.vi-stage.bad::after{background:var(--vi-red)}
.vi-mini{font-size:11px;color:var(--muted)}
.vi-chart{width:100%;min-height:220px;display:block;overflow:visible}
.vi-chart text{font:11px ui-monospace,monospace;fill:#99b2a4}
.vi-chart .axis{stroke:#385447;stroke-width:1}.vi-chart .grid{stroke:#1f382c;stroke-width:1;stroke-dasharray:3 5}
.vi-chart .line{fill:none;stroke:#91ffbb;stroke-width:2.5}
.vi-chart .point{fill:#09170f;stroke:#91ffbb;stroke-width:2}
.vi-chart .bar-pos{fill:#7edba0}.vi-chart .bar-neg{fill:#d9878c}.vi-chart .bar-neutral{fill:#809b8d}
.vi-chart .dot{fill:#91ffbb;fill-opacity:.58;stroke:#d8ffe7;stroke-width:.6}
.vi-chart-note{font-size:12px;color:var(--muted);margin-top:8px}
.vi-ratios{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;margin:10px 0}
.vi-ratio{border:1px solid var(--line);border-radius:8px;padding:10px;background:#07130e}
.vi-ratio span{display:block;color:var(--muted);font-size:11px}.vi-ratio strong{display:block;margin-top:4px;font-size:17px}
.vi-gemmap-wrap{position:relative;border:1px solid var(--line);border-radius:12px;background:radial-gradient(circle at center,#10271a,#06100c 68%);overflow:hidden}
.vi-gemmap{width:100%;height:min(68vh,650px);display:block;touch-action:pan-x pan-y}
.vi-gemmap .edge{stroke:#476d58;stroke-width:1.2;opacity:.72}
.vi-gemmap .edge.association{stroke-dasharray:5 5;opacity:.55}.vi-gemmap .edge.funding{stroke:#d5b66c;opacity:.82}
.vi-gemmap .node circle{stroke:#b9ffd2;stroke-width:1.2;fill:#12301f}
.vi-gemmap .node.token circle{fill:#7ee7a5;stroke:#e7fff0;stroke-width:2}.vi-gemmap .node.creator circle{fill:#7f5f24;stroke:#ffda83}
.vi-gemmap .node.funder circle{fill:#243a55;stroke:#9cc9ff}.vi-gemmap .node.cluster circle{fill:#442f51;stroke:#d9a9ff}
.vi-gemmap .node{cursor:pointer}.vi-gemmap .node:hover circle,.vi-gemmap .node:focus circle{stroke:#fff;stroke-width:2.4}
.vi-gemmap .node-label{font:10px ui-monospace,monospace;fill:#dcebe3;pointer-events:none}
.vi-map-legend{display:flex;gap:12px;flex-wrap:wrap;padding:10px 12px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.vi-map-legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:5px;background:#12301f;border:1px solid #b9ffd2}
.vi-map-legend i.funder{background:#243a55;border-color:#9cc9ff}.vi-map-legend i.cluster{background:#442f51;border-color:#d9a9ff}.vi-map-legend i.creator{background:#7f5f24;border-color:#ffda83}
.vi-map-detail{margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:8px;background:#07130e}
.vi-portfolio-donut{width:min(280px,80vw);height:auto;display:block;margin:auto}
.vi-portfolio-legend{display:grid;gap:6px}
.vi-portfolio-legend div{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #1f382c;padding:6px 0}
.vi-live-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--vi-green);box-shadow:0 0 10px var(--vi-green);margin-right:7px}
.vi-pipeline{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));gap:9px;overflow-x:auto;padding-bottom:5px}
.vi-pipeline .vi-card{min-width:130px}
@media(max-width:760px){
 .vi-grid{grid-template-columns:1fr}.vi-chart{min-height:190px}
 .vi-gemmap{height:54vh;min-height:380px}
 .vi-pipeline{grid-template-columns:repeat(7,145px);-webkit-overflow-scrolling:touch}
 .vi-ratios{grid-template-columns:1fr 1fr}
}
@media(max-width:420px){.vi-ratios{grid-template-columns:1fr}}

/* GemMap V2 interaction layer */
.vi-map-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0 16px}
.vi-map-controls button.active{background:#173c29;border-color:#91ffbb;color:#caffd9}
.vi-map-controls label{display:flex;align-items:center;gap:7px;min-height:40px;padding:5px 8px;border:1px solid #294036;border-radius:6px;background:#07130e}
.vi-map-controls input[type=range]{width:120px;min-height:auto}
.vi-gemmap{cursor:grab;touch-action:none;user-select:none}
.vi-gemmap:active{cursor:grabbing}
.vi-gemmap .node{cursor:move}
.vi-gemmap .node circle{fill:var(--vi-node-color,#173d29);stroke:color-mix(in srgb,var(--vi-node-color,#91ffbb) 80%,#fff);stroke-width:1.5}
.vi-gemmap .node.token circle{fill:#173d29;stroke:#d8ffe6;stroke-width:2}
.vi-gemmap .node.funder circle{fill:#123b49;stroke:#8ddff6}
.vi-gemmap .node.cluster circle{fill:var(--vi-node-color,#513e1d);stroke:var(--vi-node-color,#f5d68c);stroke-width:2}
.vi-gemmap .edge.funding{stroke:#8ddff6;stroke-dasharray:5 4;opacity:.75}
.vi-gemmap .edge.association{stroke:#f5d68c;stroke-dasharray:2 5;opacity:.65}
.vi-gemmap .edge.holding{opacity:.38}
.vi-gemmap marker path{fill:#8ddff6}
@media(max-width:760px){.vi-map-controls label{width:100%;justify-content:space-between}.vi-map-controls input[type=range]{width:45%}}

.vi-map-empty{min-height:320px;display:grid;place-content:center;text-align:center;gap:10px;padding:32px;border:1px dashed rgba(145,255,187,.35);border-radius:12px;background:rgba(5,17,12,.75)}
.vi-map-empty strong{font-size:18px;color:#dfffea}.vi-map-empty p{max-width:680px;color:var(--muted)}

/* Relationship-based GemMap, not an index-position ring. */
.gm2-map{min-height:430px;touch-action:none}.gm2-map .node-label{opacity:0;paint-order:stroke;stroke:#06120d;stroke-width:4px;stroke-linejoin:round;font-size:12px}.gm2-map .node:hover .node-label,.gm2-map .node:focus .node-label,.gm2-map .node.is-selected .node-label{opacity:1}.gm2-map .gm2-hit{fill:transparent!important;stroke:none!important}.gm2-map .node[data-component="-1"] .gm2-visible{fill:#17221e;stroke:#81998a}.gm2-map .node[data-component="0"] .gm2-visible,.gm2-map .node[data-component="6"] .gm2-visible{fill:#12422d;stroke:#92edba}.gm2-map .node[data-component="1"] .gm2-visible,.gm2-map .node[data-component="7"] .gm2-visible{fill:#153c42;stroke:#8cd8d8}.gm2-map .node[data-component="2"] .gm2-visible,.gm2-map .node[data-component="8"] .gm2-visible{fill:#453a20;stroke:#dfca86}.gm2-map .node[data-component="3"] .gm2-visible{fill:#25364d;stroke:#9abedb}.gm2-map .node[data-component="4"] .gm2-visible{fill:#413245;stroke:#ccb0d4}.gm2-map .node .unknown-share{fill:url(#gm2unknown)!important}.gm2-map .node.is-selected .gm2-visible{stroke:#fff;stroke-width:3}.gm2-map .is-dim{opacity:.22}.gm2-map .edge{pointer-events:stroke}.gm2-map .edge.transfer{stroke:#6caf91;opacity:.6}.gm2-toolbar{display:flex;gap:8px;flex-wrap:wrap;padding:12px 0}.gm2-toolbar button[aria-pressed="true"]{border-color:var(--green);background:#193827}.gm2-address-field{min-width:220px;flex:1}.gm2-address-field input{width:100%}.gm2-layout-summary{line-height:1.65}.vi-map-detail{max-height:340px;overflow:auto;overflow-wrap:anywhere}.vi-map-detail code{overflow-wrap:anywhere}.gm2-map .node:focus{outline:none}.gm2-map .node:focus .gm2-visible{stroke:#fff;stroke-width:3}@media(max-width:650px){.gm2-map{min-height:360px;height:55vh}.gm2-toolbar button{min-height:42px}.gm2-address-field{min-width:100%;width:100%}}
