/* A quiet projected floor and separate visual weights for the graph's depth layers. */
#graphWrap.spatial-canvas {
  border-color: #d8e7e2;
  background-color: #f7fbf9;
  background-image:
    radial-gradient(ellipse at 50% 44%, #fff 10%, #fbfdfa 49%, #edf5f3 100%);
  box-shadow: inset 0 1px 0 #fff;
}

.spatial-canvas #graph {
  position: relative;
  cursor: grab;
}

.spatial-canvas #graph.dragging {
  cursor: grabbing;
}

.spatial-canvas .spatial-field {
  pointer-events: none;
}

.spatial-canvas .spatial-edge:not([opacity]) {
  opacity: .25;
}

.spatial-canvas .spatial-edge:is(:hover, :focus-visible, .near-node, .is-highlighted) {
  opacity: .94;
}

.spatial-canvas .spatial-context-node {
  cursor: pointer;
  outline: none;
}

.spatial-canvas .spatial-context-node:not([opacity]) {
  opacity: .68;
}

.spatial-canvas .spatial-context-disc {
  stroke: #fbfefc;
  stroke-width: .65;
  vector-effect: non-scaling-stroke;
}

.spatial-canvas .spatial-context-node:is(:hover, :focus-visible, .is-highlighted) {
  opacity: 1;
}

.spatial-canvas .spatial-context-node:is(:hover, :focus-visible, .is-highlighted) .spatial-context-disc {
  stroke: #25483e;
  stroke-width: 1.5;
}

.spatial-canvas .spatial-foreground .canvas-node-disc {
  fill: color-mix(in srgb, var(--node-ink) 8%, white);
  filter: drop-shadow(0 3px 5px #294e4323);
}

.spatial-canvas .spatial-foreground .focus-core .canvas-node-disc {
  fill: color-mix(in srgb, var(--node-ink) 11%, white);
  filter: drop-shadow(0 6px 10px #23584b2b);
}

.spatial-canvas .spatial-foreground .canvas-name {
  fill: #24483b;
  stroke: #fff;
  paint-order: stroke fill;
  stroke-width: 4.5px;
  stroke-linejoin: round;
}

.spatial-canvas .spatial-near-edge .canvas-edge-line {
  opacity: .86;
}

.spatial-canvas .spatial-near-edge:is(:hover, :focus-visible, .near-node) .canvas-edge-line {
  opacity: 1;
}

.spatial-canvas .spatial-caption {
  font: 12px Arial, Helvetica, sans-serif;
  fill: #536f65;
  pointer-events: none;
  paint-order: stroke fill;
  stroke: #fbfdfa;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.spatial-canvas .graph-hint {
  background: #fbfdfbef;
  color: #456459;
}

.spatial-canvas #graph { touch-action: none; }
.spatial-canvas #graph:focus-visible { outline: 2px solid #46877a; outline-offset: -3px; }
.spatial-canvas .spatial-edge,
.spatial-canvas .spatial-edge .edge-count { pointer-events: none; }
.spatial-canvas #graph.show-zoomed-relations .spatial-edge-line { pointer-events: stroke; cursor: pointer; }
.spatial-canvas .spatial-edge .edge-count { visibility: hidden; }
.spatial-canvas .spatial-edge:is(:hover,:focus-visible) .edge-count { visibility: visible; }
.spatial-canvas #graph.show-zoomed-relations .spatial-edge:hover .edge-count { pointer-events: all; }
.spatial-canvas #graph.hover-connections .spatial-edge:not(.near-node):not(:hover) { opacity: .055; }
.spatial-canvas .spatial-edge.near-node:not(:hover) { opacity: .47; }
.spatial-canvas .spatial-context-hit { pointer-events: fill; }
.spatial-canvas #graph.dragging .spatial-context-node { cursor: grabbing; }

/* Connected neighbors keep their illustrations in a smaller, middle layer. */
.spatial-canvas .spatial-nearby-node {
  cursor: pointer;
}

.spatial-canvas .spatial-nearby-disc {
  fill: color-mix(in srgb, var(--node-ink, #46877a) 8%, white);
  stroke: color-mix(in srgb, var(--node-ink, #46877a) 58%, white);
  stroke-width: 1.05;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 3px #294e431b);
}

.spatial-canvas .spatial-nearby-glyph {
  color: var(--node-ink, #46877a);
  pointer-events: none;
}

.spatial-canvas .spatial-nearby-name {
  visibility: hidden;
  pointer-events: none;
  font: 600 12px Arial, Helvetica, sans-serif;
  fill: #24483b;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

.spatial-canvas .spatial-nearby-node:focus-visible {
  outline: none;
}

.spatial-canvas .spatial-nearby-node:is(:hover,:focus-visible) .spatial-nearby-disc {
  stroke: var(--node-ink, #46877a);
  stroke-width: 2.15;
}

.spatial-canvas .spatial-nearby-node:is(:hover,:focus-visible) .spatial-nearby-name {
  visibility: visible;
}

.spatial-canvas .spatial-nearby-edge {
  opacity: .29;
}

.spatial-canvas .spatial-nearby-edge .spatial-edge-line {
  pointer-events: stroke;
  cursor: pointer;
}

.spatial-canvas .spatial-nearby-edge .edge-count {
  visibility: hidden;
  pointer-events: none;
}

.spatial-canvas .spatial-nearby-edge:is(:hover,:focus-visible,.near-node,.selected-edge) {
  opacity: .86;
}

.spatial-canvas .spatial-nearby-edge:is(:hover,:focus-visible) .edge-count {
  visibility: visible;
  pointer-events: all;
}

.spatial-canvas #graph.hover-connections .spatial-nearby-edge:not(.near-node):not(:hover) {
  opacity: .16;
}

.spatial-canvas #graph.dragging .spatial-nearby-node {
  cursor: grabbing;
}
