/* Vellionix · agent swarm engine (see swarm.js). Everything here lives in the overlay, except .sw-x, which the engine
   puts on a site's own [data-sw] elements while they are being built (hidden, typed or wiped in), then removes. */
@property --sw-o { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --sw-c { syntax: '*'; inherits: false; }
.sw-x { opacity: var(--sw-o, 1) !important; clip-path: var(--sw-c, none) !important; transition: none !important; }

.sw-overlay { pointer-events: none; }
.sw-root { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.sw-root * { box-sizing: border-box; }
.sw-l { position: absolute; left: 0; top: 0; width: 0; height: 0; }

/* Artboard layer: paper sheet, colour flood, guides, grey skeletons (clipped to the artboard) */
.sw-art { position: absolute; overflow: hidden; isolation: isolate; }
.sw-paper {
  position: absolute; inset: 0; background-color: #fff;
  background-image: linear-gradient(rgba(24, 24, 27, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 24, 27, 0.055) 1px, transparent 1px);
  background-size: 16px 16px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), transparent var(--fr, -2px), #000 calc(var(--fr, -2px) + 1.5px));
  mask-image: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), transparent var(--fr, -2px), #000 calc(var(--fr, -2px) + 1.5px));
}
.sw-tint { position: absolute; border-radius: 50%; opacity: 0; transform: scale(0.001); will-change: transform, opacity; }
.sw-guide { position: absolute; overflow: hidden; opacity: 0; }
.sw-guide.is-v { width: 1px; }
.sw-guide.is-h { height: 1px; }
.sw-gi { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, currentColor 0 5px, transparent 5px 9px); will-change: transform; }
.sw-guide.is-h .sw-gi { background: repeating-linear-gradient(to right, currentColor 0 5px, transparent 5px 9px); }
.sw-skel { position: absolute; left: 0; top: 0; opacity: 0; transform-origin: 0 0; }
/* the planner's wireframe: mid grey so it reads on the white paper and on light or dark brand colours */
.sw-wire { position: absolute; opacity: 0; background: rgba(128, 128, 140, 0.1); box-shadow: inset 0 0 0 1px rgba(128, 128, 140, 0.4); will-change: transform, opacity; }
.sw-wire.is-text { background: none; box-shadow: none; }
.sw-wire.is-text i { position: absolute; background: rgba(128, 128, 140, 0.32); }
.sw-wire.is-img {
  background-color: rgba(128, 128, 140, 0.16);
  background-image: linear-gradient(to top right, transparent calc(50% - 0.6px), rgba(128, 128, 140, 0.42) 50%, transparent calc(50% + 0.6px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.6px), rgba(128, 128, 140, 0.42) 50%, transparent calc(50% + 0.6px));
}

/* Selection (Figma blue), caret, image scan line, ghost thumbnail */
.sw-sel { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.sw-sel > * { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sw-sf { width: 1px; height: 1px; background: rgba(13, 153, 255, 0.14); }
.sw-se { width: 1px; height: 1.5px; background: #0d99ff; }
.sw-se:nth-child(4), .sw-se:nth-child(5) { width: 1.5px; height: 1px; }
.sw-se:nth-child(2), .sw-se:nth-child(3) { margin-top: -0.75px; }
.sw-se:nth-child(4), .sw-se:nth-child(5) { margin-left: -0.75px; }
.sw-sel b { width: 6px; height: 6px; background: #fff; border: 1px solid #0d99ff; border-radius: 1px; }
.sw-caret, .sw-scan { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; transform-origin: 0 0; will-change: transform, opacity; }
.sw-ghost {
  position: absolute; left: 0; top: 0; width: 64px; height: 48px; overflow: hidden; border-radius: 7px; opacity: 0;
  background: #e9e6e1; transform-origin: 0 0; will-change: transform, opacity;
  box-shadow: 0 0 0 2px #fff, 0 12px 24px -8px rgba(0, 0, 0, 0.45);
}
.sw-ghost img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-ghost.is-blank { background: linear-gradient(135deg, #ece9e4, #cfcac2); }
.sw-ghost.is-blank img { display: none; }

/* Cursors with name tags */
.sw-cur { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; transform-origin: 0 0; will-change: transform, opacity; }
.sw-s { position: absolute; display: none; overflow: visible; filter: drop-shadow(0 1px 1.3px rgba(0, 0, 0, 0.32)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12)); }
.sw-cur[data-s="arrow"] .sw-s-arrow, .sw-cur[data-s="dup"] .sw-s-dup, .sw-cur[data-s="cross"] .sw-s-cross,
.sw-cur[data-s="ibeam"] .sw-s-ibeam, .sw-cur[data-s="pen"] .sw-s-pen { display: block; }
.sw-s-arrow, .sw-s-dup { left: -3.4px; top: -2.6px; }
.sw-s-arrow path, .sw-s-dup > path:first-child { fill: var(--c); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.sw-s-dup .sw-k { fill: var(--c); stroke: #fff; stroke-width: 1.4; }
.sw-s-dup .sw-w { fill: none; stroke: var(--ct); stroke-width: 1.6; stroke-linecap: round; }
.sw-s-cross, .sw-s-ibeam { left: -12px; top: -12px; }
.sw-s .sw-o { fill: none; stroke: #fff; stroke-width: 4.2; stroke-linecap: round; }
.sw-s .sw-i { fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; }
.sw-s-pen { left: -2.6px; top: -21.4px; }
.sw-s-pen > path:first-child { fill: var(--c); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.sw-s-pen .sw-w { fill: none; stroke: #fff; stroke-width: 1.2; }
.sw-name {
  position: absolute; left: 13px; top: 18px; white-space: nowrap; padding: 1px 5px 1.5px; border-radius: 2px 6px 6px 6px;
  background: var(--c); color: var(--ct); font: 600 11px/1.4 "Instrument Sans", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.sw-cur[data-s="cross"] .sw-name, .sw-cur[data-s="ibeam"] .sw-name { left: 11px; top: 11px; }
.sw-cur[data-s="pen"] .sw-name { left: 12px; top: 4px; }
/* near the right edge (see rightEdge in swarm.js) the tag sits left of the cursor */
.sw-cur[data-f] .sw-name { left: auto; right: 2px; border-radius: 6px 2px 6px 6px; }
.sw-cur[data-f][data-s="cross"] .sw-name, .sw-cur[data-f][data-s="ibeam"] .sw-name { left: auto; right: 11px; }
.sw-cur[data-f][data-s="pen"] .sw-name { left: auto; right: 4px; }
.sw-cur[data-x] .sw-name { visibility: hidden; }

/* Plan tag, swatch popover, review outline + checklist + stamp, live chip */
.sw-ptag, .sw-pop, .sw-check, .sw-stamp, .sw-chip, .sw-qe { position: absolute; opacity: 0; transform-origin: 0 0; }
.sw-ptag { padding: 2px 7px 2.5px; border-radius: 5px; font: 600 10.5px/1.35 "Instrument Sans", "Helvetica Neue", Arial, sans-serif; white-space: nowrap; letter-spacing: 0.01em; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.4); }
.sw-pop { display: flex; gap: 6px; padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 14px 30px -10px rgba(0, 0, 0, 0.4); }
.sw-pop i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16); }
.sw-pop i.is-hit { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16), 0 0 0 2px #fff, 0 0 0 3.5px #0d99ff; }
.sw-qe.is-t, .sw-qe.is-b { height: 2px; }
.sw-qe.is-l, .sw-qe.is-r { width: 2px; }
.sw-qe.is-b { transform-origin: 100% 0; }
.sw-qe.is-l { transform-origin: 0 100%; }
.sw-check {
  width: 128px; padding: 8px 10px 7px; background: #fff; color: #18181b; border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 16px 32px -12px rgba(0, 0, 0, 0.45);
  font: 500 11px/1.25 "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
.sw-check b { display: block; margin-bottom: 4px; font-weight: 600; font-size: 10px; color: #8b8b90; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-check span { display: flex; align-items: center; gap: 6px; padding: 2.5px 0; opacity: 0.38; transition: opacity 0.14s; }
.sw-check span.on { opacity: 1; }
.sw-check i { flex: 0 0 auto; width: 13px; height: 13px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #d4d4d8; transition: background 0.14s, box-shadow 0.14s; }
.sw-check span.on i { background: var(--c); box-shadow: none; }
.sw-check svg { width: 11px; height: 11px; opacity: 0; }
.sw-check span.on svg { opacity: 1; }
.sw-check path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sw-stamp span {
  display: block; padding: 6px 13px 5px; border: 2.5px solid currentColor; border-radius: 9px; background: rgba(255, 255, 255, 0.92);
  font: 800 16px/1 "Archivo", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
}
.sw-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 999px; background: #111; color: #fff;
  font: 600 10.5px/1 "Instrument Sans", "Helvetica Neue", Arial, sans-serif; white-space: nowrap; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}
.sw-chip i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
