:root {
  color-scheme: dark;
  --bg: #07080c;
  --panel: rgba(15, 17, 24, 0.8);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --muted: #929aad;
  --dim: #626a7d;
  --accent: #6ee7b7;
  --accent-2: #7aa2ff;
  --danger: #fb7185;
  --amber: #fbbf24;
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(1100px 760px at 18% 0%, #131b2c 0%, transparent 62%),
    radial-gradient(900px 700px at 88% 108%, #0f1d19 0%, transparent 58%),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.app {
  position: relative;
  height: 100%;
  isolation: isolate;
}

/* ------------------------------- background ------------------------------- */

.grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.09) 1px, transparent 1.2px);
  background-size: calc(28px * var(--gk, 1)) calc(28px * var(--gk, 1));
  background-position: var(--gx, 0px) var(--gy, 0px);
  -webkit-mask-image: radial-gradient(125% 105% at 50% 42%, #000 42%, transparent 100%);
  mask-image: radial-gradient(125% 105% at 50% 42%, #000 42%, transparent 100%);
  opacity: 0.75;
}

.graph {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.graph:active {
  cursor: grabbing;
}

/* -------------------------------- topbar ---------------------------------- */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: linear-gradient(to bottom, rgba(7, 8, 12, 0.94), rgba(7, 8, 12, 0.6) 68%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex: none;
  filter: drop-shadow(0 0 12px rgba(110, 231, 183, 0.35));
}

.brand__text {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__sub {
  margin: 1px 0 0;
  font: 500 11px/1.3 var(--mono);
  color: var(--dim);
  white-space: nowrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 340px;
  margin: 0 auto;
  padding: 0 12px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(16, 18, 26, 0.72);
  backdrop-filter: blur(12px);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.search:focus-within {
  border-color: rgba(110, 231, 183, 0.42);
  background: rgba(18, 21, 30, 0.92);
}

.search svg {
  width: 15px;
  height: 15px;
  color: var(--dim);
  flex: none;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search input::placeholder {
  color: var(--dim);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 18, 26, 0.7);
  color: var(--muted);
  font: 500 11.5px/1 var(--mono);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.status-pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.status-pill[data-health="good"] .status-pill__dot {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.7);
}

.status-pill[data-health="warn"] .status-pill__dot {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.status-pill[data-health="bad"] .status-pill__dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.65);
}

.status-pill.is-checking .status-pill__dot {
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
    transform: scale(0.75);
  }
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(16, 18, 26, 0.72);
}

.segmented__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.segmented__btn:hover {
  color: var(--text);
}

.segmented__btn.is-active {
  background: rgba(110, 231, 183, 0.14);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.24);
}

.account {
  position: relative;
}

.account summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(16, 18, 26, 0.72);
}

.account summary::-webkit-details-marker {
  display: none;
}

.account__avatar {
  font: 600 11px/1 var(--mono);
  color: var(--accent);
  text-transform: uppercase;
}

.account__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 210px;
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 17, 24, 0.97);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.9);
}

.account__who {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.account__link {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.account__link:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* --------------------------------- panels --------------------------------- */

.panel {
  position: absolute;
  top: 76px;
  bottom: 22px;
  z-index: 3;
  width: 282px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.panel::-webkit-scrollbar {
  width: 7px;
}

.panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.panel--left {
  left: 18px;
}

.panel--right {
  right: 18px;
  width: 340px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.kicker {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.panel__count {
  font: 500 11px/1 var(--mono);
  color: var(--dim);
}

.panel__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}

.title-input {
  width: 100%;
  margin: 0 0 12px;
  padding: 2px 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.title-input:hover {
  border-color: var(--line);
}

.title-input:focus {
  outline: 0;
  border-color: rgba(110, 231, 183, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 12px;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* status block */

.status-block {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.status-block__dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}

.status-block__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.status-block__text strong {
  font: 500 12.5px/1.4 var(--mono);
  color: var(--text);
  font-weight: 500;
}

.status-block__flag {
  font-size: 11.5px;
  color: var(--danger);
}

.status-block[data-state="up"] .status-block__dot {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.75);
}

.status-block[data-state="auth"] .status-block__dot {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.status-block[data-state="down"] .status-block__dot,
.status-block[data-state="error"] .status-block__dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.65);
}

/* fields */

.field {
  display: block;
  margin-bottom: 14px;
}

.field__label {
  display: block;
  margin-bottom: 5px;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.field input[type="text"],
.field input:not([type]),
.field textarea,
.field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(9, 10, 15, 0.65);
  font-size: 13px;
  outline: 0;
  transition: border-color 0.16s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(110, 231, 183, 0.45);
}

.field textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.link {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 13px;
  word-break: break-all;
}

.link:hover {
  text-decoration: underline;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.chip--quiet {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--dim));
}

/* relations */

.relations {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.relations li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rel-go {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.rel-go:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.rel-go__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rel-go__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--dim));
  flex: none;
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.btn--primary {
  border-color: rgba(110, 231, 183, 0.4);
  background: rgba(110, 231, 183, 0.14);
  color: var(--accent);
}

.btn--primary:hover {
  background: rgba(110, 231, 183, 0.22);
  border-color: rgba(110, 231, 183, 0.6);
}

.btn--ghost {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn--danger-ghost {
  border-color: rgba(251, 113, 133, 0.3);
  background: transparent;
  color: var(--danger);
}

.btn--danger-ghost:hover {
  background: rgba(251, 113, 133, 0.12);
  border-color: var(--danger);
}

.btn--full {
  width: 100%;
  margin-top: 8px;
}

.stack {
  display: block;
}

.panel__divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

/* segmented option groups in the inspector */

.seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(9, 10, 15, 0.6);
}

.seg__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  padding: 7px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg__btn em {
  font: 400 9.5px/1 var(--mono);
  font-style: normal;
  color: var(--dim);
}

.seg__btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.seg__btn.is-active {
  background: rgba(110, 231, 183, 0.14);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.22);
}

.seg__btn.is-active em {
  color: rgba(110, 231, 183, 0.6);
}

.seg__btn:disabled {
  cursor: default;
}

.seg--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.seg--grid .seg__btn {
  align-items: flex-start;
  text-align: left;
  padding: 8px 9px;
  line-height: 1.35;
}

/* endpoint pair */

.endpoints {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.endpoint {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
}

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

.endpoint:hover {
  border-color: var(--line-strong);
}

.endpoints__arrow {
  color: var(--dim);
  font-family: var(--mono);
  flex: none;
}

/* groups panel */

.grow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 9px;
  transition: background 0.14s ease, opacity 0.14s ease;
}

.grow:hover {
  background: rgba(255, 255, 255, 0.045);
}

.grow.is-hidden {
  opacity: 0.42;
}

.eye {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  flex: none;
}

.eye:hover {
  color: var(--text);
}

.eye svg {
  width: 14px;
  height: 14px;
}

.gdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, var(--dim));
  box-shadow: 0 0 9px color-mix(in srgb, var(--c, var(--dim)) 60%, transparent);
  flex: none;
}

.gcolor {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  flex: none;
}

.gcolor::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.gcolor::-webkit-color-swatch {
  border: 0;
  border-radius: 3px;
}

.gname {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  padding: 2px 3px;
  border-radius: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input.gname:hover {
  background: rgba(255, 255, 255, 0.05);
}

input.gname:focus {
  outline: 0;
  background: rgba(255, 255, 255, 0.07);
}

.gname--static {
  color: var(--muted);
}

.gcount {
  font: 500 10.5px/1 var(--mono);
  color: var(--dim);
  flex: none;
}

.mini {
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 5px;
  cursor: pointer;
  flex: none;
}

.mini:hover {
  color: var(--danger);
  background: rgba(251, 113, 133, 0.12);
}

/* legend */

.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.legend__row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}

.legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--dim);
}

.legend__dot[data-state="up"] {
  background: #4ade80;
}

.legend__dot[data-state="auth"] {
  background: var(--amber);
}

.legend__dot[data-state="down"] {
  background: var(--danger);
}

.legend__line {
  width: 22px;
  height: 1.5px;
  flex: none;
  background: rgba(150, 165, 195, 0.55);
}

.legend__line--dashed {
  background: none;
  border-top: 1.5px dashed rgba(251, 191, 36, 0.75);
}

.legend__line--arrow {
  background: linear-gradient(to right, rgba(150, 165, 195, 0.4), rgba(150, 165, 195, 0.9));
}

/* hud + toast */

.hud {
  position: absolute;
  left: 18px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud__btn {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(14, 16, 22, 0.8);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.hud__btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.hud__hint {
  font: 500 11px/1.3 var(--mono);
  color: var(--dim);
  max-width: 330px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 9;
  max-width: min(460px, calc(100vw - 40px));
  padding: 10px 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 20, 28, 0.97);
  color: var(--text);
  font-size: 12.5px;
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.9);
}

.toast[data-kind="error"] {
  border-color: rgba(251, 113, 133, 0.5);
  color: #ffd6dd;
}

/* ---------------------------------- gate ---------------------------------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(23, 38, 60, 0.92), transparent 60%),
    rgba(6, 7, 11, 0.95);
  backdrop-filter: blur(6px);
}

.gate__card {
  width: min(420px, 100%);
  padding: 30px 26px 26px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(16, 18, 26, 0.94);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.9);
}

.gate__card h2 {
  margin: 8px 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.gate__card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.gate__input {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 16, 0.85);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.gate__input:focus {
  outline: none;
  border-color: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.14);
}

.gate__error {
  min-height: 17px;
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 12.5px;
}

/* ------------------------------ graph marks ------------------------------- */

.node {
  cursor: pointer;
}

.node__halo {
  fill: var(--group, var(--dim));
  opacity: 0.1;
  transition: opacity 0.2s ease;
}

.node__ring {
  fill: none;
  stroke: var(--group, var(--dim));
  stroke-width: 1;
  stroke-opacity: 0.35;
  transition: stroke-opacity 0.2s ease;
}

.node__body {
  fill: #0c0e15;
  stroke: var(--group, var(--dim));
  stroke-width: 1.6;
  transition: filter 0.2s ease;
}

.node__initials {
  fill: #f1f5fd;
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.03em;
  pointer-events: none;
}

.node__label {
  fill: #9ca6ba;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  paint-order: stroke;
  stroke: #07080c;
  stroke-width: 3.5px;
  stroke-linejoin: round;
}

.node__dot-shell {
  fill: #0a0c11;
}

.node__dot {
  fill: var(--state, var(--dim));
  transition: fill 0.2s ease;
}

.node[data-state="up"] {
  --state: #4ade80;
}

.node[data-state="auth"] {
  --state: var(--amber);
}

.node[data-state="down"],
.node[data-state="error"] {
  --state: var(--danger);
}

.node[data-state="up"] .node__dot {
  filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.9));
}

.node[data-state="down"] .node__dot,
.node[data-state="error"] .node__dot {
  filter: drop-shadow(0 0 5px rgba(251, 113, 133, 0.9));
}

.node[data-blocked="true"] .node__body {
  stroke: var(--danger);
  stroke-dasharray: 5 4;
}

.node[data-blocked="true"] .node__ring {
  stroke: var(--danger);
  stroke-opacity: 0.5;
  stroke-dasharray: 2 6;
}

.node:hover .node__halo {
  opacity: 0.2;
}

.node.is-selected .node__halo {
  opacity: 0.24;
}

.node.is-selected .node__body {
  stroke-width: 2.4;
}

.node.is-selected .node__ring {
  stroke-opacity: 0.95;
  stroke-dasharray: 3 4;
}

.node.is-connect-source .node__ring {
  stroke-opacity: 1;
  stroke-width: 2;
  animation: spin 5s linear infinite;
  transform-origin: center;
}

.node.is-connect-source .node__halo {
  opacity: 0.3;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.node.is-dragging .node__body {
  stroke-width: 2.4;
}

.node.is-dim {
  opacity: 0.16;
}

.node.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.node,
.edge {
  transition: opacity 0.2s ease;
}

.edge__line {
  fill: none;
  stroke: rgba(150, 165, 195, 0.34);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.edge__hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  cursor: pointer;
  pointer-events: stroke;
}

.edge[data-reliance="source"] .edge__line,
.edge[data-reliance="target"] .edge__line,
.edge[data-reliance="both"] .edge__line {
  stroke: rgba(251, 191, 36, 0.42);
  stroke-dasharray: 5 4;
}

.edge.is-hover .edge__line {
  stroke: rgba(110, 231, 183, 0.75);
  stroke-width: 1.8;
}

.edge.is-selected .edge__line {
  stroke: var(--accent);
  stroke-width: 2.2;
}

.edge__label {
  fill: #b9c3d6;
  font: 500 10px/1 var(--mono);
  opacity: 0;
  pointer-events: none;
  paint-order: stroke;
  stroke: #07080c;
  stroke-width: 3px;
  stroke-linejoin: round;
  transition: opacity 0.15s ease;
}

.edge.is-selected .edge__label,
.edge.is-hover .edge__label {
  opacity: 1;
}

.edge.is-dim {
  opacity: 0.1;
}

.edge.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------- responsive ------------------------------- */

@media (max-width: 1180px) {
  .search {
    flex-basis: 240px;
  }

  .panel--left {
    width: 246px;
  }

  .panel--right {
    width: 310px;
  }
}

@media (max-width: 940px) {
  body {
    font-size: 13.5px;
  }

  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .search {
    order: 3;
    flex: 1 0 100%;
    margin: 0;
  }

  .status-pill span:last-child {
    display: none;
  }

  .panel {
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 46vh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
  }

  .panel--left {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    display: none;
  }

  .panel--right {
    right: 0;
    left: 0;
    width: 100%;
  }

  .panel--right:empty {
    display: none;
  }

  .hud {
    bottom: calc(46vh + 16px);
    left: 14px;
  }

  .hud__hint {
    display: none;
  }
}
