/* Swarm Rebuild overlay for mtdlabs.dev: colour-coded agent cursors tear the page down and rebuild it piece by piece. */
html.sw-boot body > *:not(#sw-layer):not(#sw-pill):not(#sw-glow):not(#sw-core) { visibility: hidden; }
html.sw-boot, html.sw-on { scroll-behavior: auto !important; }

/* a piece that hasn't been built yet */
.sw-h { opacity: 0 !important; transform: translateY(6px); }
.sw-in { transition: opacity .32s ease, transform .32s cubic-bezier(.2,.8,.2,1) !important; }
/* a container whose skin (background, border, shadow) hasn't been drawn yet */
.sw-shell { background: transparent !important; background-image: none !important; border-color: transparent !important;
  box-shadow: none !important; outline-color: transparent !important; }
.sw-skin { transition: background-color .45s ease, border-color .45s ease, box-shadow .45s ease !important; }
html.sw-boot .cine, html.sw-on .cine, html.sw-boot .skip, html.sw-on .skip { display: none !important; }

#sw-layer { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 2147483000; transition: opacity .8s ease; }
#sw-layer .cur { position: absolute; left: 0; top: 0; width: 22px; height: 22px; will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
#sw-layer .cur svg { display: block; }
#sw-layer .box { position: absolute; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 7%, transparent);
  border-radius: 3px; transition: opacity .35s ease; }
#sw-layer .box.shell { border-style: dashed; background: transparent; }
#sw-layer .box::before, #sw-layer .box::after { content: ''; position: absolute; width: 5px; height: 5px; background: #fff;
  border: 1.5px solid var(--c); border-radius: 1px; }
#sw-layer .box::before { left: -4px; top: -4px; }
#sw-layer .box::after { right: -4px; bottom: -4px; }
#sw-layer .badge { position: absolute; transform: translateY(-100%); margin-top: -4px; background: var(--c); color: #fff;
  font: 600 10px/1 'JetBrains Mono', ui-monospace, monospace; padding: 3px 5px; border-radius: 3px; white-space: nowrap;
  transition: opacity .3s ease; letter-spacing: .02em; }
#sw-layer .guide { position: absolute; border: 0 dashed var(--c); opacity: .85; transition: opacity .45s ease; }
#sw-layer .guide.h { left: 0; right: 0; height: 0; border-top-width: 1px; }
#sw-layer .guide.v { top: 0; width: 0; border-left-width: 1px; }

#sw-glow { position: fixed; top: 0; right: 0; bottom: 0; width: 46vw; pointer-events: none; z-index: 2147482999;
  background: radial-gradient(ellipse at 100% 50%, rgba(241,196,15,.30), rgba(255,122,69,.18) 38%, rgba(255,92,140,.08) 58%, transparent 72%);
  opacity: 0; transition: opacity 1.2s ease; }
#sw-glow.on { opacity: 1; }
#sw-core { position: fixed; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 6px;
  background: #2a2c30; border: 1px solid #3b3e44; z-index: 2147482998; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
#sw-core.on { opacity: 1; }

#sw-pill { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2147483001; display: flex;
  align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 999px; background: rgba(14,15,18,.92);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 34px rgba(0,0,0,.5); color: #e9e6dc;
  font: 500 12px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .02em; backdrop-filter: blur(8px); }
#sw-pill { transition: opacity .6s ease; }
#sw-pill.gone { opacity: 0; pointer-events: none; }
#sw-pill [hidden] { display: none; }
#sw-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #F1C40F; box-shadow: 0 0 10px #F1C40F; }
#sw-pill .sep { width: 1px; height: 14px; background: rgba(255,255,255,.14); }
#sw-pill b { color: #fff; font-weight: 600; }
#sw-pill .mute { color: #8d9199; }
#sw-pill button { all: unset; cursor: pointer; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.07); color: #fff; }
#sw-pill button.on { background: #F1C40F; color: #0A0A0B; }
#sw-pill .spd.flash { animation: swFlash .9s ease; }
@keyframes swFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px rgba(241,196,15,.45); } }
@media (max-width: 640px) { #sw-pill { gap: 8px; font-size: 10.5px; bottom: 14px; } #sw-pill .wide { display: none; } }
