/* NYX Graph CSS Surface
   This file is the visual law. Keep semantics in data attributes. */

:root {
  color-scheme: dark;
}

.nyx-graph {
  --nyx-graph-bg: #060814;
  --nyx-panel-bg: rgba(12, 15, 27, 0.86);
  --nyx-panel-bg-2: rgba(16, 20, 35, 0.84);
  --nyx-node-bg: rgba(17, 22, 39, 0.92);
  --nyx-node-bg-hot: rgba(26, 31, 55, 0.96);
  --nyx-node-border: rgba(132, 145, 255, 0.34);
  --nyx-node-border-hot: rgba(170, 155, 255, 0.78);
  --nyx-text: rgba(231, 235, 255, 0.92);
  --nyx-muted: rgba(169, 178, 220, 0.62);
  --nyx-faint: rgba(130, 138, 180, 0.32);
  --nyx-accent: rgba(150, 130, 255, 0.9);
  --nyx-cyan: rgba(95, 220, 255, 0.86);
  --nyx-violet: rgba(174, 105, 255, 0.86);
  --nyx-green: rgba(110, 255, 210, 0.82);
  --nyx-danger: rgba(255, 100, 145, 0.82);
  --nyx-edge: rgba(118, 135, 210, 0.28);
  --nyx-edge-hot: rgba(160, 145, 255, 0.82);
  --nyx-radius: 18px;
  --nyx-graph-height: 720px;
  --nyx-graph-side-width: 320px;
  --nyx-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nyx-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: var(--nyx-graph-height);
  min-height: 420px;
  max-height: calc(100vh - 18px);
  overflow: hidden;
  border: 1px solid rgba(130, 145, 255, 0.22);
  border-radius: var(--nyx-radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(84, 76, 255, 0.22), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(42, 170, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(20, 23, 39, 0.94), var(--nyx-graph-bg));
  box-shadow:
    inset 0 1px 0 rgba(210, 220, 255, 0.10),
    inset 0 -1px 0 rgba(110, 100, 255, 0.18),
    0 18px 60px rgba(0, 0, 0, 0.38);
  color: var(--nyx-text);
  font-family: var(--nyx-font);
  overscroll-behavior: contain;
  user-select: none;
}

.nyx-graph::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 78%);
  opacity: 0.28;
}

body.nyx-graph-window-fill-active {
  overflow: hidden;
}

.demo-shell.nyx-graph-window-fill-host {
  position: fixed;
  inset: 8px;
  z-index: 10000;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(130, 145, 255, 0.26);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(84, 76, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(8, 11, 22, 0.96), rgba(3, 5, 12, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(210, 220, 255, 0.10),
    0 20px 70px rgba(0, 0, 0, 0.58);
}

.demo-shell.nyx-graph-window-fill-host .demo-head {
  margin: 0;
  align-items: center;
}

.demo-shell.nyx-graph-window-fill-host .demo-title {
  font-size: 18px;
}

.demo-shell.nyx-graph-window-fill-host .demo-sub {
  margin-top: 4px;
}

.demo-shell.nyx-graph-window-fill-host #nyx-atlas {
  min-height: 0;
  display: grid;
}

.demo-shell.nyx-graph-window-fill-host .nyx-graph[data-window-fill="true"] {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.nyx-graph.nyx-graph-window-fill-host[data-window-fill="true"] {
  position: fixed;
  inset: 8px;
  z-index: 10000;
  width: auto;
  height: auto;
  max-height: none;
  min-height: 0;
  border-radius: 12px;
}

.nyx-graph[data-window-fill="true"] .nyx-graph__height-resize {
  display: none;
}

.nyx-graph__chrome {
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 12px 9px;
  border-bottom: 1px solid rgba(130, 145, 255, 0.18);
  background: linear-gradient(180deg, rgba(22, 25, 43, 0.92), rgba(10, 13, 24, 0.80));
  backdrop-filter: blur(10px);
}

.nyx-graph__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nyx-muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nyx-graph__sigil {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(150, 130, 255, 0.38);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.64);
  color: rgba(225, 226, 255, 0.96);
  font-weight: 700;
  letter-spacing: 0.18em;
  box-shadow: 0 0 18px rgba(116, 90, 255, 0.22);
}

.nyx-graph__toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(6, auto);
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.nyx-graph__toolbar button,
.nyx-graph__search {
  height: 30px;
  border: 1px solid rgba(130, 145, 255, 0.22);
  border-radius: 999px;
  background: rgba(8, 11, 21, 0.72);
  color: rgba(226, 231, 255, 0.86);
  font: 500 11px/1 var(--nyx-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  outline: none;
}

.nyx-graph__toolbar button {
  --nyx-control-rgb: 95, 220, 255;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  cursor: pointer;
}

.nyx-graph__toolbar button[data-control-tone="blue"] { --nyx-control-rgb: 105, 155, 255; }
.nyx-graph__toolbar button[data-control-tone="cyan"] { --nyx-control-rgb: 95, 220, 255; }
.nyx-graph__toolbar button[data-control-tone="teal"] { --nyx-control-rgb: 90, 245, 212; }
.nyx-graph__toolbar button[data-control-tone="green"] { --nyx-control-rgb: 112, 245, 160; }
.nyx-graph__toolbar button[data-control-tone="violet"] { --nyx-control-rgb: 174, 120, 255; }
.nyx-graph__toolbar button[data-control-tone="gold"] { --nyx-control-rgb: 255, 202, 92; }
.nyx-graph__toolbar button[data-control-tone="amber"] { --nyx-control-rgb: 255, 158, 64; }
.nyx-graph__toolbar button[data-control-tone="rose"] { --nyx-control-rgb: 255, 96, 150; }

.nyx-control-glyph {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(var(--nyx-control-rgb), 0.28);
  border-radius: 7px;
  background:
    radial-gradient(circle at 40% 30%, rgba(var(--nyx-control-rgb), 0.24), transparent 58%),
    rgba(3, 7, 16, 0.58);
  color: rgba(var(--nyx-control-rgb), 0.92);
  font: 800 12px/1 var(--nyx-mono);
  text-transform: none;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nyx-control-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nyx-graph__tool-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 32px;
  padding: 3px 4px 3px 7px;
  border: 1px solid rgba(130, 145, 255, 0.12);
  border-radius: 10px;
  background: rgba(4, 7, 15, 0.50);
}

.nyx-graph__tool-group::before {
  content: attr(data-label);
  flex: 0 0 auto;
  margin-right: 3px;
  color: rgba(145, 155, 200, 0.54);
  font: 700 9px/1 var(--nyx-mono);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.nyx-graph__tool-group[data-group="view"] button {
  min-width: 30px;
  padding: 0 9px;
}

.nyx-graph__tool-group[data-group="lens"] {
  overflow-x: auto;
  scrollbar-width: none;
}

.nyx-graph__tool-group[data-group="lens"]::-webkit-scrollbar {
  display: none;
}

.nyx-graph__tool-group[data-group="camera"] {
  border-color: rgba(220, 150, 255, 0.14);
}

.nyx-graph:not([data-layout="space"]):not([data-layout="planes"]) .nyx-graph__tool-group[data-group="camera"] {
  display: none;
}

.nyx-graph:not([data-lens="blast"]) .nyx-graph__tool-group[data-group="blast-radius"] {
  display: none;
}

/* Far-zoom edge dimming: edges aren't readable below ~0.48 zoom, so dim them
   so the operator can see node structure without visual interference. */
.nyx-graph[data-zoom-band="far"] .nyx-edge {
  opacity: 0.32;
}

.nyx-graph[data-zoom-band="far"][data-bigGraph="true"] .nyx-edge {
  opacity: 0.18;
}

/* Notice button used by the big-graph "render all anyway" escape hatch. */
.nyx-graph__notice-button {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: rgba(255, 200, 110, 0.16);
  border: 1px solid rgba(255, 200, 110, 0.36);
  border-radius: 4px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.nyx-graph__notice-button:hover {
  background: rgba(255, 200, 110, 0.28);
}

.nyx-graph__tool-group[data-group="camera"] button {
  min-width: 30px;
  padding: 0 8px;
}

.nyx-graph__tool-group[data-group="layers"] {
  border-color: rgba(110, 255, 210, 0.12);
}

.nyx-graph__tool-group[data-group="layout"] {
  border-color: rgba(95, 220, 255, 0.14);
}

.nyx-graph__tool-group[data-group="actions"] {
  border-color: rgba(255, 190, 100, 0.12);
}

.nyx-graph__toolbar button:hover,
.nyx-graph__search:focus {
  border-color: rgba(170, 155, 255, 0.72);
  box-shadow: 0 0 18px rgba(130, 100, 255, 0.22);
}

.nyx-graph__toolbar button:hover .nyx-control-glyph,
.nyx-graph__toolbar button:focus-visible .nyx-control-glyph {
  border-color: rgba(var(--nyx-control-rgb), 0.64);
  color: rgba(220, 252, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 0 14px rgba(var(--nyx-control-rgb), 0.20);
}

.nyx-graph__toolbar button[data-active="true"] {
  border-color: rgba(95, 220, 255, 0.72);
  color: rgba(210, 250, 255, 0.96);
  background: rgba(31, 120, 150, 0.20);
  box-shadow: inset 0 1px 0 rgba(220, 250, 255, 0.10), 0 0 18px rgba(60, 190, 255, 0.18);
}

.nyx-graph__toolbar button[data-active="true"] .nyx-control-glyph {
  border-color: rgba(var(--nyx-control-rgb), 0.76);
  color: rgba(202, 255, 244, 0.98);
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--nyx-control-rgb), 0.36), transparent 60%),
    rgba(8, 36, 38, 0.72);
  box-shadow: inset 0 1px 0 rgba(220, 255, 248, 0.12), 0 0 16px rgba(var(--nyx-control-rgb), 0.25);
}

.nyx-graph__search {
  width: 100%;
  min-width: 0;
  padding: 0 13px;
  text-transform: none;
  letter-spacing: 0.02em;
}

@media (max-width: 1220px) {
  .nyx-graph__toolbar {
    grid-template-columns: minmax(180px, 1fr) repeat(3, auto);
  }

  .nyx-graph__tool-group[data-group="lens"] {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

.nyx-graph__planes {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nyx-graph__planes button {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid rgba(130, 145, 255, 0.18);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(5, 8, 16, 0.58);
  color: rgba(180, 190, 225, 0.74);
  font: 700 10px/1 var(--nyx-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nyx-graph__planes button span:last-child {
  color: rgba(120, 230, 255, 0.80);
}

.nyx-graph__planes button[data-active="true"] {
  border-color: rgba(110, 255, 210, 0.56);
  color: rgba(215, 255, 246, 0.94);
  background: rgba(20, 184, 166, 0.15);
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.14);
}

.nyx-graph__body {
  z-index: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px var(--nyx-graph-side-width);
}

.nyx-graph__viewport {
  position: relative;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  isolation: isolate;
  overscroll-behavior: contain;
  touch-action: none;
}

.nyx-graph__viewport[data-panning="true"] {
  cursor: grabbing;
}

.nyx-graph__side-resize {
  z-index: 3;
  position: relative;
  cursor: col-resize;
  background: linear-gradient(180deg, rgba(130, 145, 255, 0.10), rgba(130, 145, 255, 0.03));
  border-left: 1px solid rgba(130, 145, 255, 0.10);
  border-right: 1px solid rgba(130, 145, 255, 0.10);
}

.nyx-graph__side-resize::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 18px;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(130, 145, 255, 0.18);
  transition: background 140ms ease, box-shadow 140ms ease;
}

.nyx-graph__side-resize:hover::before,
.nyx-graph__side-resize.dragging::before {
  background: var(--nyx-cyan);
  box-shadow: 0 0 0 1px rgba(95, 220, 255, 0.22), 0 0 16px rgba(95, 220, 255, 0.20);
}

.nyx-graph__height-resize {
  z-index: 4;
  height: 16px;
  min-height: 16px;
  display: grid;
  place-items: center;
  cursor: row-resize;
  border-top: 1px solid rgba(130, 145, 255, 0.16);
  background: linear-gradient(180deg, rgba(12, 15, 27, 0.74), rgba(5, 7, 14, 0.94));
}

.nyx-graph__height-resize::before {
  content: "";
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(130, 145, 255, 0.24);
  transition: background 140ms ease, box-shadow 140ms ease;
}

.nyx-graph__height-resize:hover::before,
.nyx-graph__height-resize.dragging::before {
  background: var(--nyx-cyan);
  box-shadow: 0 0 0 1px rgba(95, 220, 255, 0.22), 0 0 16px rgba(95, 220, 255, 0.20);
}

.nyx-graph__grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(140, 130, 255, 0.10), transparent 42%),
    linear-gradient(90deg, rgba(120, 130, 220, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 130, 220, 0.042) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  opacity: 0.7;
}

.nyx-graph[data-layout="field"] .nyx-graph__grid {
  background:
    radial-gradient(circle at 44% 48%, rgba(95, 220, 255, 0.12), transparent 28%),
    radial-gradient(circle at 58% 52%, rgba(170, 120, 255, 0.11), transparent 34%),
    conic-gradient(from 215deg at 50% 50%, transparent, rgba(120, 105, 255, 0.09), transparent 32%),
    linear-gradient(90deg, rgba(120, 130, 220, 0.052) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 130, 220, 0.04) 1px, transparent 1px);
  background-size: auto, auto, auto, 32px 32px, 32px 32px;
  opacity: 0.82;
}

.nyx-graph[data-layout="planes"] .nyx-graph__grid {
  background:
    linear-gradient(90deg, rgba(110, 145, 220, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(110, 145, 220, 0.04) 1px, transparent 1px),
    repeating-linear-gradient(180deg, transparent 0 116px, rgba(95, 220, 255, 0.09) 117px 119px, transparent 120px 224px);
  background-size: 36px 36px, 36px 36px, auto;
  opacity: 0.78;
}

.nyx-graph[data-layout="space"] .nyx-graph__viewport {
  perspective: 1100px;
}

.nyx-graph[data-layout="space"] .nyx-graph__grid {
  background:
    radial-gradient(ellipse at 35% 28%, rgba(95, 220, 255, 0.14), transparent 24%),
    radial-gradient(ellipse at 72% 74%, rgba(170, 120, 255, 0.13), transparent 32%),
    linear-gradient(120deg, transparent 0 44%, rgba(120, 100, 255, 0.08) 45%, transparent 52%),
    linear-gradient(90deg, rgba(120, 130, 220, 0.050) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 130, 220, 0.038) 1px, transparent 1px);
  background-size: auto, auto, auto, 36px 36px, 36px 36px;
  opacity: 0.86;
}

.nyx-graph[data-layout="space"] .nyx-graph__world {
  transform-style: preserve-3d;
}

.nyx-graph__world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.nyx-graph__notice {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 52px;
  max-width: min(620px, calc(100% - 64px));
  transform: translateX(-50%);
  padding: 9px 13px;
  border: 1px solid rgba(255, 190, 100, 0.24);
  border-radius: 10px;
  background: rgba(10, 13, 24, 0.82);
  color: rgba(255, 220, 165, 0.88);
  font: 700 11px/1.35 var(--nyx-mono);
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

.nyx-graph__notice[hidden] {
  display: none;
}

.nyx-graph__edges,
.nyx-graph__nodes {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.nyx-graph__edges {
  z-index: 1;
  pointer-events: none;
}

.nyx-graph__nodes {
  z-index: 2;
  pointer-events: none;
}

.nyx-edge {
  fill: none;
  stroke: var(--nyx-edge);
  stroke-width: var(--edge-width, 1.55px);
  vector-effect: non-scaling-stroke;
  transition: stroke 160ms ease, opacity 160ms ease, filter 160ms ease;
  opacity: var(--edge-opacity, 0.78);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nyx-graph[data-has-focus="true"] .nyx-edge[data-active="false"] {
  opacity: 0.13;
  stroke: rgba(105, 118, 170, 0.38);
  filter: none;
}

.nyx-edge[data-active="true"] {
  stroke: var(--nyx-edge-hot);
  stroke-width: calc(var(--edge-width, 1.75px) + 0.52px);
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(150, 130, 255, 0.54));
}

.nyx-edge[data-weight="strong"] {
  filter: drop-shadow(0 0 3px rgba(145, 130, 255, 0.16));
}

.nyx-edge[data-weight="heavy"] {
  filter: drop-shadow(0 0 5px rgba(145, 130, 255, 0.22));
}

.nyx-edge[data-path-relation="upstream"][data-active="true"] {
  stroke: rgba(76, 221, 255, 0.92);
  filter: drop-shadow(0 0 7px rgba(48, 202, 255, 0.42));
}

.nyx-edge[data-path-relation="downstream"][data-active="true"] {
  stroke: rgba(189, 132, 255, 0.94);
  filter: drop-shadow(0 0 7px rgba(164, 104, 255, 0.46));
}

.nyx-edge[data-path-relation="lineage"][data-active="true"] {
  stroke: rgba(120, 255, 214, 0.88);
  filter: drop-shadow(0 0 6px rgba(72, 230, 190, 0.34));
}

.nyx-graph[data-has-focus="true"] .nyx-edge[data-active="true"][data-focus-edge="false"] {
  opacity: 0.52;
  stroke-width: calc(var(--edge-width, 1.55px) + 0.08px);
  stroke-dasharray: 7 7;
  filter: drop-shadow(0 0 4px rgba(145, 130, 255, 0.24));
}

.nyx-graph[data-has-focus="true"] .nyx-edge[data-active="true"][data-focus-edge="true"] {
  opacity: 1;
  stroke-width: calc(var(--edge-width, 1.75px) + 0.74px);
  stroke-dasharray: none;
  filter: drop-shadow(0 0 9px rgba(164, 104, 255, 0.56));
}

.nyx-edge[data-role="hierarchy"] {
  stroke: rgba(112, 128, 190, 0.24);
}

.nyx-edge[data-role="flow"] {
  stroke: rgba(83, 215, 255, 0.44);
}

.nyx-edge[data-role="bridge"],
.nyx-edge[data-bridge="true"] {
  stroke: rgba(255, 190, 100, 0.54);
}

.nyx-edge[data-role="knowledge"] {
  stroke: rgba(190, 130, 255, 0.52);
}

.nyx-edge[data-truth="visual_hint"],
.nyx-edge[data-truth="proposed"],
.nyx-edge[data-truth="stale"] {
  stroke-dasharray: 6 6;
}

.nyx-edge[data-truth="conflict"] {
  stroke: rgba(255, 100, 145, 0.88);
  stroke-dasharray: 8 5;
}

.nyx-edge[data-truth="witnessed"] {
  stroke-width: calc(var(--edge-width, 1.85px) + 0.12px);
}

.nyx-graph[data-edge-style^="pcb"] .nyx-edge,
.nyx-graph[data-edge-style="bundle"] .nyx-edge {
  stroke-linecap: square;
  stroke-linejoin: round;
}

.nyx-graph[data-edge-style="pcb-lanes"] .nyx-edge,
.nyx-graph[data-edge-style="bundle"] .nyx-edge {
  filter: drop-shadow(0 0 2px rgba(145, 130, 255, 0.14));
}

.nyx-graph[data-edge-style="bundle"] .nyx-edge {
  stroke-width: calc(var(--edge-width, 1.9px) + 0.22px);
}

.nyx-graph[data-layout="space"] .nyx-edge[data-depth="front"] {
  opacity: var(--edge-opacity, 0.92);
  stroke-width: var(--edge-width, 1.95px);
}

.nyx-graph[data-layout="planes"] .nyx-edge[data-depth="front"] {
  opacity: var(--edge-opacity, 0.90);
  stroke-width: var(--edge-width, 1.9px);
}

.nyx-graph[data-layout="space"] .nyx-edge[data-depth="middle"] {
  opacity: var(--edge-opacity, 0.68);
  stroke-width: var(--edge-width, 1.68px);
}

.nyx-graph[data-layout="planes"] .nyx-edge[data-depth="middle"] {
  opacity: var(--edge-opacity, 0.66);
  stroke-width: var(--edge-width, 1.62px);
}

.nyx-graph[data-layout="space"] .nyx-edge[data-depth="back"] {
  opacity: var(--edge-opacity, 0.46);
  stroke-width: var(--edge-width, 1.42px);
}

.nyx-graph[data-layout="planes"] .nyx-edge[data-depth="back"] {
  opacity: var(--edge-opacity, 0.42);
  stroke-width: var(--edge-width, 1.36px);
}

.nyx-graph[data-layout="planes"] .nyx-edge[data-route-mode="system-plane"] {
  opacity: calc(var(--edge-opacity, 0.70) * 0.88);
  filter: drop-shadow(0 0 2px rgba(95, 220, 255, 0.10));
}

.nyx-graph[data-layout="planes"] .nyx-edge[data-active="true"] {
  opacity: 1;
}

.nyx-edge[data-kind="hops_in"],
.nyx-edge[data-kind="hops_out"],
.nyx-edge[data-kind="upstream"],
.nyx-edge[data-kind="downstream"] {
  stroke-dasharray: 5 5;
}

.nyx-edge-arrow {
  fill: rgba(145, 150, 230, 0.72);
}

.nyx-node {
  position: absolute;
  pointer-events: auto;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--nyx-node-border);
  border-radius: 14px;
  padding: 8px 13px;
  overflow: hidden;
  color: var(--nyx-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 45%),
    var(--nyx-node-bg);
  box-shadow:
    inset 0 1px 0 rgba(220, 225, 255, 0.08),
    inset 0 -1px 0 rgba(120, 100, 255, 0.10),
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(90, 75, 255, 0.08);
  cursor: pointer;
  text-align: left;
  transform: translateZ(0);
  user-select: none;
  -webkit-user-drag: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    filter 160ms ease,
    background 160ms ease;
}

.nyx-node::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(160, 150, 255, 0.08), transparent);
  translate: -100% 0;
  opacity: 0;
}

.nyx-node:hover::before {
  animation: nyx-node-scan 900ms ease-out;
}

@keyframes nyx-node-scan {
  from { translate: -100% 0; opacity: 0; }
  20% { opacity: 1; }
  to { translate: 100% 0; opacity: 0; }
}

.nyx-node:hover {
  border-color: rgba(185, 170, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(230, 235, 255, 0.20),
    0 0 28px rgba(140, 115, 255, 0.30),
    0 14px 32px rgba(0, 0, 0, 0.34);
}

.nyx-node__label {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 13px/1.15 var(--nyx-font);
  letter-spacing: 0.015em;
}

.nyx-node__meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 5px;
  min-width: 0;
  color: var(--nyx-muted);
  font: 500 10px/1 var(--nyx-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nyx-node__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nyx-node__glyphs {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  pointer-events: none;
}

.nyx-node__glyph {
  height: 15px;
  min-width: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(130, 145, 255, 0.18);
  border-radius: 999px;
  padding: 0 4px;
  background: rgba(4, 7, 15, 0.62);
  color: rgba(210, 226, 255, 0.82);
  font: 800 9px/1 var(--nyx-mono);
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(220, 235, 255, 0.08);
}

.nyx-node__glyph b {
  color: rgba(226, 235, 255, 0.88);
  font: inherit;
}

.nyx-node__glyph[data-glyph-id="flow.in"],
.nyx-node__glyph[data-glyph-id="flow.out"] {
  border-color: rgba(95, 220, 255, 0.24);
  color: rgba(155, 232, 255, 0.86);
}

.nyx-node__glyph[data-glyph-id="bridge.cross_organ"] {
  border-color: rgba(255, 190, 100, 0.34);
  color: rgba(255, 214, 145, 0.88);
}

.nyx-node__glyph[data-glyph-id="health.loose"] {
  border-color: rgba(255, 210, 110, 0.36);
  color: rgba(255, 225, 150, 0.90);
}

.nyx-node__glyph[data-glyph-id="health.unplugged"],
.nyx-node__glyph[data-glyph-id="health.orphan"] {
  border-color: rgba(255, 100, 145, 0.42);
  color: rgba(255, 150, 180, 0.92);
}

.nyx-node__fold {
  position: absolute;
  right: 7px;
  top: 6px;
  z-index: 2;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.72);
  border: 1px solid rgba(170, 155, 255, 0.25);
  color: rgba(226, 230, 255, 0.82);
  font: 700 11px/1 var(--nyx-mono);
}

.nyx-node[data-kind="root"] {
  --nyx-node-border: rgba(220, 210, 255, 0.70);
  --nyx-node-bg: rgba(34, 29, 57, 0.96);
}

.nyx-node[data-kind="organ"] {
  --nyx-node-border: rgba(95, 220, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(220, 245, 255, 0.08), 0 0 20px rgba(60, 180, 255, 0.13), 0 10px 26px rgba(0,0,0,0.28);
}

.nyx-node[data-kind="route"] {
  --nyx-node-border: rgba(130, 255, 210, 0.36);
}

.nyx-graph[data-layout="field"] .nyx-node[data-field-anchor="true"] {
  --nyx-node-border: rgba(130, 255, 225, 0.62);
  --nyx-node-bg: rgba(9, 35, 36, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(220, 255, 245, 0.14),
    inset 0 -1px 0 rgba(120, 255, 225, 0.12),
    0 0 28px rgba(55, 220, 205, 0.24),
    0 14px 34px rgba(0, 0, 0, 0.34);
}

.nyx-graph[data-layout="planes"] .nyx-node {
  border-radius: 8px;
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="model"] {
  --nyx-node-border: rgba(238, 238, 238, 0.70);
  --nyx-node-bg: rgba(28, 28, 34, 0.88);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="state"] {
  --nyx-node-border: rgba(255, 174, 40, 0.62);
  --nyx-node-bg: rgba(48, 31, 8, 0.76);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="platform"] {
  --nyx-node-border: rgba(42, 180, 255, 0.62);
  --nyx-node-bg: rgba(8, 32, 52, 0.78);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="capital"] {
  --nyx-node-border: rgba(20, 240, 142, 0.62);
  --nyx-node-bg: rgba(7, 43, 27, 0.78);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="bio"] {
  --nyx-node-border: rgba(18, 224, 202, 0.62);
  --nyx-node-bg: rgba(5, 42, 40, 0.78);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="narrative"] {
  --nyx-node-border: rgba(230, 90, 220, 0.58);
  --nyx-node-bg: rgba(48, 14, 46, 0.76);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-system-plane="people"] {
  --nyx-node-border: rgba(255, 150, 88, 0.58);
  --nyx-node-bg: rgba(48, 26, 16, 0.74);
}

.nyx-graph[data-layout="space"] .nyx-node {
  border-radius: 12px;
}

.nyx-graph[data-layout="space"] .nyx-node[data-depth="front"] {
  opacity: 0.98;
  box-shadow:
    inset 0 1px 0 rgba(230, 245, 255, 0.14),
    0 0 26px rgba(95, 220, 255, 0.18),
    0 18px 36px rgba(0, 0, 0, 0.40);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-depth="front"] {
  opacity: 0.98;
  box-shadow:
    inset 0 1px 0 rgba(230, 245, 255, 0.14),
    0 0 24px rgba(95, 220, 255, 0.16),
    0 18px 36px rgba(0, 0, 0, 0.38);
}

.nyx-graph[data-layout="space"] .nyx-node[data-depth="middle"] {
  opacity: 0.82;
}

.nyx-graph[data-layout="planes"] .nyx-node[data-depth="middle"] {
  opacity: 0.84;
}

.nyx-graph[data-layout="space"] .nyx-node[data-depth="back"] {
  opacity: 0.56;
  filter: saturate(0.78) blur(0.15px);
}

.nyx-graph[data-layout="planes"] .nyx-node[data-depth="back"] {
  opacity: 0.62;
  filter: saturate(0.82) blur(0.12px);
}

.nyx-graph[data-layout="space"] .nyx-node[data-field-anchor="true"] {
  --nyx-node-border: rgba(120, 255, 224, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(230, 255, 248, 0.18),
    0 0 0 1px rgba(120, 255, 224, 0.16),
    0 0 34px rgba(80, 245, 220, 0.26),
    0 20px 42px rgba(0, 0, 0, 0.42);
}

.nyx-node[data-plane="interface"] {
  --nyx-node-border: rgba(95, 220, 255, 0.44);
}

.nyx-node[data-plane="implementation"] {
  --nyx-node-border: rgba(170, 155, 255, 0.46);
}

.nyx-node[data-plane="state"] {
  --nyx-node-border: rgba(110, 255, 210, 0.46);
  --nyx-node-bg: rgba(9, 31, 30, 0.88);
}

.nyx-node[data-plane="knowledge"] {
  --nyx-node-border: rgba(220, 150, 255, 0.52);
  --nyx-node-bg: rgba(29, 18, 43, 0.88);
}

.nyx-node[data-plane="external"] {
  --nyx-node-border: rgba(160, 165, 190, 0.22);
}

.nyx-node[data-kind="receipt"] {
  --nyx-node-border: rgba(130, 255, 210, 0.52);
  --nyx-node-bg: rgba(10, 31, 31, 0.90);
}

.nyx-node[data-kind="identity"] {
  --nyx-node-border: rgba(220, 150, 255, 0.58);
  --nyx-node-bg: rgba(35, 18, 48, 0.94);
}

.nyx-node[data-kind="external"] {
  --nyx-node-border: rgba(160, 165, 190, 0.18);
  opacity: 0.78;
}

.nyx-node[data-kind="atlas"],
.nyx-node[data-kind="layer"] {
  --nyx-node-border: rgba(110, 255, 210, 0.56);
  --nyx-node-bg: rgba(10, 25, 35, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(210, 255, 245, 0.12),
    inset 0 -1px 0 rgba(80, 220, 190, 0.14),
    0 10px 28px rgba(0, 0, 0, 0.30),
    0 0 22px rgba(20, 184, 166, 0.16);
}

.nyx-node[data-kind="cluster"] {
  --nyx-node-border: rgba(96, 210, 255, 0.58);
  --nyx-node-bg: rgba(9, 25, 39, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(210, 240, 255, 0.13),
    inset 0 -1px 0 rgba(80, 160, 255, 0.16),
    0 10px 28px rgba(0, 0, 0, 0.30),
    0 0 22px rgba(70, 170, 255, 0.14);
}

.nyx-node[data-kind="raw"] {
  --nyx-node-border: rgba(255, 196, 100, 0.58);
  --nyx-node-bg: rgba(38, 26, 9, 0.92);
}

.nyx-node[data-kind="atlas"] .nyx-node__label,
.nyx-node[data-kind="layer"] .nyx-node__label,
.nyx-node[data-kind="cluster"] .nyx-node__label {
  color: rgba(200, 255, 244, 0.98);
}

.nyx-node[data-relation="focus"] {
  border-color: var(--nyx-node-border-hot);
  background: var(--nyx-node-bg-hot);
  box-shadow:
    inset 0 1px 0 rgba(230, 235, 255, 0.22),
    inset 0 -1px 0 rgba(150, 130, 255, 0.22),
    0 0 0 1px rgba(170, 155, 255, 0.18),
    0 0 34px rgba(150, 130, 255, 0.55),
    0 14px 36px rgba(0, 0, 0, 0.42);
}

.nyx-node[data-relation="upstream"] {
  border-color: rgba(95, 220, 255, 0.64);
}

.nyx-node[data-relation="downstream"] {
  border-color: rgba(190, 130, 255, 0.64);
}

.nyx-node[data-relation="ancestor"],
.nyx-node[data-relation="descendant"] {
  border-style: dashed;
}

.nyx-node[data-relation="unrelated"] {
  opacity: 0.24;
  filter: saturate(0.55);
}

/* Depth-by-distance opacity ramp — only active under blast lens.
   Focus is full; each hop further dims; far/unrelated is heavily dimmed. */
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="0"] { opacity: 1; }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="1"] { opacity: 0.86; }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="2"] { opacity: 0.7; }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="3"] { opacity: 0.54; filter: saturate(0.85); }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="4"] { opacity: 0.42; filter: saturate(0.75); }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="5"] { opacity: 0.32; filter: saturate(0.65); }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="6"],
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="7"],
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="8"] { opacity: 0.24; filter: saturate(0.55); }
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="far"],
.nyx-graph[data-lens="blast"] .nyx-node[data-distance="none"] { opacity: 0.16; filter: saturate(0.4); }

.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="0"] { opacity: 1; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="1"] { opacity: 0.84; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="2"] { opacity: 0.66; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="3"] { opacity: 0.5; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="4"] { opacity: 0.38; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="5"] { opacity: 0.28; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="6"],
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="7"],
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="8"] { opacity: 0.2; }
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="far"],
.nyx-graph[data-lens="blast"] .nyx-edge[data-distance="none"] { opacity: 0.14; }

.nyx-node[data-dimmed-by-filter="true"] {
  opacity: 0.16;
  filter: grayscale(0.8);
}

.nyx-graph[data-lens="lineage"] .nyx-edge[data-kind="upstream"],
.nyx-graph[data-lens="lineage"] .nyx-edge[data-kind="downstream"],
.nyx-graph[data-lens="lineage"] .nyx-edge[data-kind="hops_in"],
.nyx-graph[data-lens="lineage"] .nyx-edge[data-kind="hops_out"] {
  stroke: rgba(190, 150, 255, 0.78);
  opacity: 0.95;
}

.nyx-graph[data-lens="receipts"] .nyx-node[data-kind="receipt"],
.nyx-graph[data-lens="identity"] .nyx-node[data-kind="identity"] {
  opacity: 1;
  filter: none;
}

.nyx-graph[data-zoom-band="far"] .nyx-node__meta,
.nyx-graph[data-zoom-band="mid"] .nyx-node__meta {
  display: none;
}

.nyx-graph[data-zoom-band="far"] .nyx-node__glyphs {
  display: none;
}

.nyx-graph[data-zoom-band="far"] .nyx-node {
  border-radius: 999px;
}

.nyx-graph__side {
  z-index: 2;
  min-height: 0;
  background: linear-gradient(180deg, rgba(12, 15, 27, 0.88), rgba(5, 7, 14, 0.92));
  display: grid;
  grid-template-rows: auto minmax(150px, 0.45fr) minmax(0, 0.75fr) 160px;
}

.nyx-graph__stats {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(130, 145, 255, 0.14);
  color: var(--nyx-muted);
  font: 600 11px/1.4 var(--nyx-mono);
}

.nyx-graph__tree {
  min-height: 0;
  border-bottom: 1px solid rgba(130, 145, 255, 0.14);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.nyx-graph__tree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
  color: rgba(181, 191, 232, 0.72);
  font: 700 10px/1 var(--nyx-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nyx-graph__tree-head b {
  color: rgba(125, 240, 255, 0.86);
  font-weight: 800;
}

.nyx-graph__tree-list {
  min-height: 0;
  overflow: auto;
  padding: 0 8px 10px;
  display: grid;
  align-content: start;
  gap: 4px;
  scrollbar-width: thin;
}

.nyx-tree-row {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 7px 6px calc(8px + var(--tree-depth, 0) * 10px);
  border: 1px solid rgba(130, 145, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 8, 16, 0.48);
  color: rgba(223, 228, 255, 0.72);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.nyx-tree-row:hover {
  border-color: rgba(125, 240, 255, 0.34);
  background: rgba(16, 29, 45, 0.62);
}

.nyx-tree-row:focus-visible {
  outline: 1px solid rgba(93, 220, 255, 0.78);
  outline-offset: 1px;
}

.nyx-tree-row[data-selected="true"] {
  border-color: rgba(100, 245, 220, 0.62);
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.20), rgba(62, 58, 160, 0.12));
  color: rgba(232, 255, 250, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(210, 255, 245, 0.10),
    0 0 16px rgba(20, 184, 166, 0.12);
}

.nyx-tree-row[data-plane="knowledge"] {
  border-color: rgba(188, 120, 255, 0.22);
}

.nyx-tree-row[data-plane="state"] {
  border-color: rgba(255, 188, 76, 0.20);
}

.nyx-tree-row[data-status="orphan"],
.nyx-tree-row[data-status="loose"],
.nyx-tree-row[data-status="stranded"] {
  border-color: rgba(255, 91, 127, 0.34);
}

.nyx-tree-row__main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.nyx-tree-row__label,
.nyx-tree-row__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nyx-tree-row__label {
  color: inherit;
  font: 760 11px/1.1 var(--nyx-mono);
}

.nyx-tree-row__meta {
  color: rgba(165, 178, 220, 0.56);
  font: 650 9px/1 var(--nyx-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nyx-tree-row__chips {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
}

.nyx-tree-row__chips span {
  min-width: 19px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(95, 220, 255, 0.24);
  border-radius: 999px;
  background: rgba(2, 7, 15, 0.72);
  color: rgba(138, 230, 255, 0.82);
  font: 800 9px/1 var(--nyx-mono);
}

.nyx-graph__inspector {
  overflow: auto;
  padding: 16px;
}

.nyx-inspector__empty {
  color: var(--nyx-muted);
  font-size: 13px;
  line-height: 1.5;
}

.nyx-inspector__eyebrow {
  color: var(--nyx-faint);
  font: 700 10px/1 var(--nyx-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.nyx-inspector__title {
  color: var(--nyx-text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.2;
  margin-bottom: 11px;
  word-break: break-word;
}

.nyx-inspector__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.nyx-inspector__chips span {
  border: 1px solid rgba(130, 145, 255, 0.20);
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(220, 225, 255, 0.76);
  background: rgba(8, 11, 21, 0.64);
  font: 600 10px/1 var(--nyx-mono);
}

.nyx-inspector__open {
  width: 100%;
  height: 32px;
  margin: 8px 0 10px;
  border: 1px solid rgba(110, 255, 210, 0.42);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.13);
  color: rgba(180, 255, 238, 0.92);
  font: 700 11px/1 var(--nyx-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(210, 255, 245, 0.10), 0 0 18px rgba(20, 184, 166, 0.08);
}

.nyx-inspector__open:hover {
  border-color: rgba(110, 255, 210, 0.72);
  box-shadow: inset 0 1px 0 rgba(210, 255, 245, 0.14), 0 0 22px rgba(20, 184, 166, 0.18);
}

.nyx-inspector__kv {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0 0 14px;
  font: 12px/1.35 var(--nyx-mono);
}

.nyx-inspector__kv dt { color: var(--nyx-faint); }
.nyx-inspector__kv dd { margin: 0; color: rgba(229, 232, 255, 0.82); word-break: break-word; }

.nyx-inspector__details summary {
  cursor: pointer;
  color: var(--nyx-muted);
  font: 700 11px/1 var(--nyx-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nyx-inspector__edges {
  margin: 10px 0;
}

.nyx-inspector__edges summary {
  cursor: pointer;
  color: rgba(180, 210, 255, 0.72);
  font: 700 11px/1 var(--nyx-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nyx-inspector__edges ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.nyx-inspector__edges li {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(130, 145, 255, 0.13);
  border-radius: 9px;
  padding: 7px 8px;
  background: rgba(5, 8, 16, 0.46);
  font-family: var(--nyx-mono);
}

.nyx-inspector__edges span,
.nyx-inspector__edges small,
.nyx-inspector__edges em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nyx-inspector__edges span {
  color: rgba(226, 231, 255, 0.84);
  font-size: 11px;
}

.nyx-inspector__edges small {
  color: rgba(120, 230, 255, 0.70);
  font-size: 10px;
}

.nyx-inspector__edges em {
  color: rgba(169, 178, 220, 0.55);
  font-size: 10px;
  font-style: normal;
}

.nyx-inspector__details pre,
.nyx-graph__export-text {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(130, 145, 255, 0.16);
  border-radius: 12px;
  background: rgba(4, 6, 12, 0.72);
  color: rgba(220, 226, 255, 0.76);
  font: 11px/1.45 var(--nyx-mono);
}

.nyx-inspector__details pre {
  max-height: 260px;
  overflow: auto;
  padding: 10px;
}

.nyx-graph__export-text {
  resize: none;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 12px;
  outline: none;
}

@media (max-width: 980px) {
  .nyx-graph__body {
    grid-template-columns: 1fr;
  }
  .nyx-graph__side-resize {
    display: none;
  }
  .nyx-graph__side {
    border-left: 0;
    border-top: 1px solid rgba(130, 145, 255, 0.18);
    min-height: 280px;
  }
  .nyx-graph__viewport {
    min-height: 560px;
  }
}

/* Standalone atlas mode: the graph is the window, controls live in the left rail. */
.nyx-graph {
  --nyx-control-rail-width: 118px;
  grid-template-columns: var(--nyx-control-rail-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  border-radius: 0;
}

.nyx-graph__chrome {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: stretch;
  align-content: stretch;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 10px 7px;
  border-right: 1px solid rgba(130, 145, 255, 0.18);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(24, 27, 47, 0.94), rgba(8, 11, 20, 0.92)),
    radial-gradient(circle at 50% 0%, rgba(95, 220, 255, 0.10), transparent 40%);
}

.nyx-graph__brand {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  white-space: normal;
  text-align: center;
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: 0.14em;
}

.nyx-graph__sigil {
  min-width: 58px;
  height: 26px;
  padding: 0 7px;
  font-size: 11px;
}

.nyx-graph__toolbar {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  align-items: stretch;
  justify-content: stretch;
  gap: 9px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 1px;
  scrollbar-width: thin;
}

.nyx-graph__search {
  display: none;
}

.nyx-graph__toolbar button,
.nyx-graph__search {
  width: 100%;
  min-width: 0;
  height: 32px;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.nyx-graph__toolbar button {
  grid-template-columns: 25px minmax(0, 1fr);
  justify-content: stretch;
  gap: 7px;
  padding: 0 8px;
  text-align: left;
}

.nyx-control-glyph {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 12px;
}

.nyx-control-label {
  justify-self: start;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.nyx-graph__search {
  padding: 0 8px;
}

.nyx-graph__tool-group {
  display: grid;
  grid-template-columns: 1fr;
  height: auto;
  min-width: 0;
  gap: 5px;
  padding: 8px 6px 7px;
  border-radius: 12px;
}

.nyx-graph__tool-group::before {
  margin: 0 0 1px;
  text-align: center;
  font-size: 8px;
}

.nyx-graph__tool-group[data-group="view"],
.nyx-graph__tool-group[data-group="camera"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nyx-graph__tool-group[data-group="view"]::before,
.nyx-graph__tool-group[data-group="camera"]::before {
  grid-column: 1 / -1;
}

.nyx-graph__tool-group[data-group="view"] button,
.nyx-graph__tool-group[data-group="camera"] button {
  min-width: 0;
  padding: 0;
}

.nyx-graph__tool-group[data-group="view"] button[data-nyx-action="zoom-out"],
.nyx-graph__tool-group[data-group="view"] button[data-nyx-action="zoom-in"] {
  grid-template-columns: 1fr;
}

.nyx-graph__tool-group[data-group="view"] button[data-nyx-action="zoom-out"] .nyx-control-label,
.nyx-graph__tool-group[data-group="view"] button[data-nyx-action="zoom-in"] .nyx-control-label {
  display: none;
}

.nyx-graph__tool-group[data-group="view"] button[data-nyx-action="fit"] {
  grid-column: 1 / -1;
}

.nyx-graph__tool-group[data-group="edges"] {
  border-color: rgba(255, 190, 100, 0.16);
}

.nyx-graph__tool-group[data-group="lens"] {
  overflow: visible;
}

.nyx-graph__planes {
  grid-column: auto;
  display: grid;
  grid-auto-rows: minmax(23px, auto);
  align-content: end;
  align-items: stretch;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nyx-graph__planes button {
  width: 100%;
  height: 23px;
  justify-content: space-between;
  gap: 4px;
  padding: 0 6px;
  font-size: 8px;
}

.nyx-graph__body {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
}

.nyx-graph__height-resize {
  display: none;
}

.nyx-graph__viewport[data-panning="rotating"] {
  cursor: move;
}

@media (max-width: 980px) {
  .nyx-graph {
    --nyx-control-rail-width: 92px;
  }

  .nyx-graph__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .nyx-graph__side {
    display: none;
  }

  .nyx-graph__viewport {
    min-height: 0;
  }
}
