.cx-surface {
  --cx-accent: #7653d8;
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
  outline: 0;
  user-select: none;
  color: #202133;
  background-color: #fafafd;
  background-image: radial-gradient(circle, #d8d9e4 1px, transparent 1.1px);
  background-size: var(--cx-grid, 19px) var(--cx-grid, 19px);
  background-position: var(--cx-grid-x, 0px) var(--cx-grid-y, 0px);
}
.cx-plane { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; width: 1px; height: 1px; }
.cx-lines { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.cx-line { fill: none; stroke: #9294a8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cx-edge-hit { stroke: transparent; stroke-width: 14; fill: none; pointer-events: stroke; cursor: pointer; }
.cx-edge-label { cursor: pointer; pointer-events: all; }
.cx-edge-label text { font: 600 11px system-ui,sans-serif; dominant-baseline: central; text-anchor: middle; }
.cx-edge.is-selected .cx-line { stroke: var(--cx-accent); stroke-width: 2.5; }
.cx-draft { fill: none; stroke: var(--cx-accent); stroke-width: 2; stroke-dasharray: 6 5; pointer-events: none; }
.cx-node {
  position: absolute;
  left: 0; top: 0;
  display: flex; align-items: center; gap: 10px;
  width: 196px; height: 78px; box-sizing: border-box;
  padding: 10px 13px;
  border: 1.5px solid var(--cx-border);
  border-radius: 11px;
  background: linear-gradient(112deg,color-mix(in srgb,var(--cx-tint) 44%,white),color-mix(in srgb,var(--cx-tint) 14%,white));
  box-shadow: 0 2px 5px rgba(30,28,55,.055), 0 1px 1px rgba(30,28,55,.035);
  cursor: grab;
  outline: none;
}
.cx-node:hover { box-shadow: 0 3px 10px rgba(30,28,55,.09); }
.cx-node.is-selected, .cx-node:focus-visible { outline: 2px solid var(--cx-accent); outline-offset: 3px; z-index: 2; }
.cx-node.is-connecting { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
.cx-node.is-target { outline: 2px dashed var(--cx-accent); outline-offset: 3px; }
.cx-glyph {
  display: grid; place-items: center; flex: 0 0 34px; height: 34px; box-sizing: border-box;
  border-radius: 9px; background: var(--cx-tint); color: var(--cx-tone);
  border: 1px solid color-mix(in srgb,var(--cx-tone) 12%,transparent);
}
.cx-glyph svg { width: 19px; height: 19px; stroke-width: 1.8px; }
.cx-copy { flex: 1; min-width: 0; display: grid; align-content: center; gap: 4px; }
.cx-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 720; line-height: 1.15; letter-spacing: .055em; text-transform: uppercase; color: var(--cx-tone); }
.cx-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 14.75px; line-height: 1.19; font-weight: 660; letter-spacing: -.025em; color: #282739; }
.cx-open { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 21px; height: 21px; padding: 0; background: transparent; color: var(--cx-tone); border: 0; border-radius: 5px; cursor: pointer; opacity: .76; }
.cx-open:hover, .cx-open:focus-visible { background: var(--cx-tint); opacity: 1; }
.cx-open svg { width: 13px; height: 13px; }
.cx-port {
  position: absolute; width: 16px; height: 16px; padding: 0; margin: 0;
  border: 0; background: transparent; border-radius: 50%; cursor: crosshair;
  display: grid; place-items: center; opacity: 0;
}
.cx-port::after { content: ''; width: 5px; height: 5px; box-sizing: border-box; border-radius: 50%; background: white; border: 1.35px solid var(--cx-tone); }
.cx-port[data-port='left'] { left: -9px; top: calc(50% - 8px); }
.cx-port[data-port='right'] { right: -9px; top: calc(50% - 8px); }
.cx-port[data-port='top'] { top: -9px; left: calc(50% - 8px); }
.cx-port[data-port='bottom'] { bottom: -9px; left: calc(50% - 8px); }
.cx-node:hover .cx-port, .cx-node.is-selected .cx-port, .cx-surface[data-mode='connect'] .cx-port, .cx-node:focus-within .cx-port { opacity: .88; }
.cx-node:hover .cx-port:hover, .cx-port:focus-visible { opacity: 1; }
.cx-port:hover::after, .cx-port:focus-visible::after { width: 8px; height: 8px; background: var(--cx-tone); box-shadow: 0 0 0 3px var(--cx-tint); }
.cx-node.is-moving, .cx-surface.is-panning, .cx-surface.is-panning .cx-node { cursor: grabbing; }
.cx-surface[data-mode='pan'], .cx-surface[data-mode='pan'] .cx-node, .cx-surface.is-space, .cx-surface.is-space .cx-node { cursor: grab; }
.cx-surface[data-mode='connect'], .cx-surface[data-mode='connect'] .cx-node { cursor: crosshair; }
.cx-drop-preview { position: absolute; top: 0; left: 0; pointer-events: none; box-sizing: border-box; width: 196px; height: 78px; border: 2px dashed var(--cx-accent); background: #8055d914; border-radius: 11px; }
.cx-empty { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%); width: min(80%,320px); display: grid; justify-items: center; gap: 9px; text-align: center; pointer-events: none; }
.cx-empty[hidden] { display: none; }
.cx-empty-mark { color: #7855cf; background: #eee9fc; display: grid; place-items: center; border-radius: 12px; width: 47px; height: 47px; }
.cx-empty strong { color: #373446; font-size: 16px; }
.cx-empty span:last-child { color: #676779; font-size: 14px; line-height: 1.45; }
.cx-mini { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.cx-mini .cx-viewrect { fill: #855bd70a; stroke: #9a85d2; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
