body {
  font-family: sans-serif;
}

/* CSV selector */
#csvSelectorContainer {
  position: fixed;
  width: 200px;
  top: 56px;
  left: 0px;
  background: rgba(58, 64, 88, 0.95);
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 12px;
  z-index: 1000;
}

/* Filters in top-left */
#filterContainer {
  position: fixed;
  width: 200px;
  top: 117px;
  left: 0px;
  background: rgba(58, 64, 88, 0.95);
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 12px;
  z-index: 1000;
}

#filterContainer h4 {
  margin: 5px 0;
}

/* Legend styling (bottom right rectangle) */
#legend {
  position: fixed;
  width: 200px;
  height: 275px;
  bottom: 92px;
  left: 0px;
  background: rgba(58, 64, 88, 0.95);
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 12px;
  z-index: 1000;
}

#legend h4 {
  margin: 5px 0;
}

#legend table {
  border-collapse: collapse;
  margin-bottom: 5px;
}

#legend th, #legend td {
  border: none;
  padding: 2px 5px;
  text-align: left;
}

.color-box {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}

.connector-box {
  width: 20px;
  height: 4px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}

/* Main SVG */
svg {
  width: 100%;
  height: 771px;
  display: block;
  background-color: #ffffff;
}

.links line {
  stroke-opacity: 0.8;
}

.nodes circle {
  stroke: #fff;
  stroke-width: 0px;
  cursor: pointer;
}

/* Node labels centered inside the node */
.labels text {
  pointer-events: none;
  text-anchor: middle;
  alignment-baseline: middle;
  font-size: 10px;
}

/* Connector labels at half the font size of node text */
.connectorLabels text {
  pointer-events: none;
  text-anchor: middle;
  alignment-baseline: middle;
  font-size: 5px;
}

/* Color helpers */
.color-grey { background: grey; }
.color-blue { background: blue; }
.color-cyan { background: cyan; }
.color-orange { background: orange; }
.color-red { background: red; }

.connector-black { background: black; }
.connector-blue { background: blue; }
.connector-cyan { background: cyan; }
.connector-red { background: red; }
