/* ---- Flows (wallet map) ------------------------------------------------- */

.net-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.net-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: clamp(14px, 1.6vw, 22px);
}
.net-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.net-controls .spacer {
  flex: 1;
}
.net-legend {
  gap: 4px 4px;
  font-size: 13px;
}
.net-legend button {
  padding: 4px 9px 4px 7px;
}
.net-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font: 400 13px var(--font-sans);
  color: var(--text-4);
}
.net-key > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.key-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream-hot);
  box-shadow: 0 0 8px 2px rgba(255, 214, 128, 0.8);
}
.fm-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--night-5) transparent;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(93, 139, 255, 0.07), transparent 60%),
    rgba(4, 6, 13, 0.5);
  border: 1px solid var(--line-1);
}
.fm-inner {
  position: relative;
}
.fm-links,
.fm-top,
.fm-particles {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.fm-top .fm-node,
.fm-top .fm-hit {
  pointer-events: auto;
}
.fm-link,
.fm-chev {
  transition: opacity 180ms ease, filter 220ms ease;
}
.fm-node {
  cursor: pointer;
  outline: none;
  transition: opacity 180ms ease;
}
.fm-card {
  transition: stroke 140ms ease, stroke-width 140ms ease, fill 160ms ease, filter 220ms ease;
}
.fm-node:hover .fm-card {
  fill: #0e1428;
}
.fm-node:focus-visible .fm-card {
  stroke: var(--cream);
  stroke-width: 2.4;
}
.fm-name {
  fill: var(--text);
  font: 600 12.5px var(--font-sans);
  pointer-events: none;
}
.fm-sub {
  fill: var(--text-4);
  font: 400 10.5px var(--font-sans);
  pointer-events: none;
}
.fm-val {
  fill: var(--text-3);
  font: 500 10.5px var(--font-sans);
  pointer-events: none;
}
.fm-colhead {
  fill: var(--text-3);
  font: 500 12.5px var(--font-sans);
}
.fm-cap {
  fill: var(--text);
  font: 600 11px var(--font-sans);
}
.fm-hint {
  display: none;
  align-items: center;
  gap: 8px;
  font: 400 13px var(--font-sans);
  color: var(--text-4);
}
.fm-hint svg {
  width: 14px;
  height: 14px;
}
.net-table .tbl-wrap {
  max-height: 70vh;
}
.cell-g {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* The panel under the diagram: three columns on a glass slab */
.net-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 32px;
  padding: clamp(18px, 2vw, 26px);
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.net-panel > .np-head {
  grid-column: 1 / -1;
}
.np-col {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}
.np-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.np-head > div {
  flex: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.np-head h3 {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.25;
}
.np-fam {
  font: 400 13px var(--font-sans);
  color: var(--text-4);
}
.np-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.np-howto {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-3);
}
.np-howto b {
  color: var(--text);
  font-weight: 600;
}
.np-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font: 500 14px var(--font-sans);
  color: var(--cream);
  border-bottom: 1px solid var(--line-cream-2);
  padding-bottom: 2px;
  transition: gap 160ms var(--ease-out), color 160ms ease;
}
.np-more-link svg {
  width: 14px;
  height: 14px;
}
.np-more-link:hover {
  color: var(--cream-hot);
  gap: 12px;
}
.np-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}
.np-stats div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-1);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 200ms ease, background-color 200ms ease;
}
.np-stats div:hover {
  border-color: var(--line-cream);
  background: rgba(255, 230, 168, 0.03);
}
.np-stats dt {
  font: 400 13px var(--font-sans);
  color: var(--text-4);
}
.np-stats dd {
  margin: 0;
  font: 600 16px var(--font-sans);
  color: var(--text);
}
.np-flows h4,
.np-addrs h4 {
  margin-bottom: 8px;
  font: 600 14px var(--font-sans);
  color: var(--text-3);
}
.np-flow {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: left;
  transition: background-color 140ms ease;
}
.np-flow:hover {
  background: rgba(255, 255, 255, 0.04);
}
.np-fl-name {
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-fl-val {
  font: 500 13.5px var(--font-sans);
  color: var(--text);
}
.np-fl-bar {
  grid-column: 2 / 4;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.np-fl-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.np-more {
  padding: 2px 8px;
  font-size: 13px;
  color: var(--text-4);
}
.np-addrs {
  display: grid;
  gap: 10px;
}
.np-addr {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-1);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 200ms ease, box-shadow 260ms ease, background-color 200ms ease;
}
.np-addr:hover {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}
.np-addr.is-sel {
  border-color: var(--cream);
  background: rgba(255, 230, 168, 0.06);
  box-shadow: 0 0 22px -8px rgba(255, 214, 128, 0.6);
}
.np-a-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.np-a-bal {
  font: 600 13.5px var(--font-sans);
  color: var(--text);
}
.np-a-role {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-3);
}
.np-a-meta {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-4);
}
.np-showall {
  justify-self: start;
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .net-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1120px) {
  .fm-hint {
    display: flex;
  }
}
