/* Swarm build-in effect. Nothing here affects page layout. */

/* Hides the page until the swarm is armed, so nothing flashes before it builds. */
.sw-pending body {
  opacity: 0;
}

.sw-hidden {
  clip-path: inset(0 100% 0 0);
  transition: none !important;
}

[style*="clip-path"] {
  transition: none !important;
}

/* Typed text: characters are wrapped while a block is typing, then restored. */
.sw-c {
  visibility: hidden;
}

.sw-c.on {
  visibility: visible;
}

.sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.sw-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 22px;
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.sw-box {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid var(--c);
  background: color-mix(in srgb, var(--c) 8%, transparent);
  opacity: 0;
  will-change: transform, width, height;
}

.sw-box.on {
  opacity: 1;
}

.sw-box i {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1px solid var(--c);
}

.sw-box i:nth-child(1) { left: -4px; top: -4px; }
.sw-box i:nth-child(2) { right: -4px; top: -4px; }
.sw-box i:nth-child(3) { left: -4px; bottom: -4px; }
.sw-box i:nth-child(4) { right: -4px; bottom: -4px; }

.sw-badge {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--c);
  color: #0a0e14;
  font: 500 10px/1.5 "JetBrains Mono", ui-monospace, monospace;
  white-space: nowrap;
}

@media print {
  .sw-hidden {
    clip-path: none !important;
  }
  .sw-c {
    visibility: visible !important;
  }
  .sw-overlay {
    display: none;
  }
}
