:root {
    --aquila-bg: #0a0d12;
    --aquila-fg: #e8ebf0;
    --aquila-pulse: #00d4ff;
    --aquila-pulse-glow: rgba(0, 212, 255, 0.55);
    --aquila-node-r: 7px;
    --aquila-edge-w: 2.6px;
    --aquila-tail-thin-w: 1.57762px;
    --aquila-duration-assembly: 2200;
    --aquila-duration-flip: 800;
    --aquila-pulse-period: 5000;
}

.aquila-wrapper {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.aquila-wrapper svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-origin: center center;
    will-change: transform;
}

.aquila-wrapper svg .node {
    transition: fill 200ms ease;
}

.aquila-wrapper svg .edge {
    transition: stroke 200ms ease;
    stroke-linecap: round;
}

.aquila-wrapper svg .edge.tail-thin {
    stroke-width: var(--aquila-tail-thin-w);
}

/* Lock-flash (end of intro): uniform glow — used only by phaseLock. */
.aquila-wrapper svg .edge.pulse {
    stroke: #ffffff;
    filter:
        drop-shadow(0 0 2px rgba(255, 255, 255, 1))
        drop-shadow(0 0 6px rgba(220, 245, 255, 0.85))
        drop-shadow(0 0 14px rgba(0, 212, 255, 0.5));
    animation: edge-bright 700ms ease-out forwards;
}

@keyframes edge-bright {
    0%   { stroke-width: 5px; }
    100% { stroke-width: var(--aquila-edge-w); }
}

/* Idle-pulse illumination: the wire itself flashes bright white with a
   heavy cyan bloom, then fades back to the base color. Applied by JS to
   each edge belonging to a firing ring. Rings fire every ~130ms while each
   flash lasts ~720ms, so multiple fade stages overlap into a visible wave
   of light traveling through the wireframe. */
.aquila-wrapper svg .edge.lit {
    animation: edge-lit-flash 720ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes edge-lit-flash {
    0% {
        stroke: #ffffff;
        stroke-width: 5.5px;
        filter:
            drop-shadow(0 0 2px  rgba(255, 255, 255, 1))
            drop-shadow(0 0 7px  rgba(255, 255, 255, 0.95))
            drop-shadow(0 0 16px rgba(200, 240, 255, 0.9))
            drop-shadow(0 0 30px rgba(0, 212, 255, 0.8))
            drop-shadow(0 0 55px rgba(0, 212, 255, 0.45))
            drop-shadow(0 0 90px rgba(0, 212, 255, 0.22));
    }
    35% {
        stroke: #f0fbff;
        stroke-width: 4px;
        filter:
            drop-shadow(0 0 2px  rgba(255, 255, 255, 0.75))
            drop-shadow(0 0 6px  rgba(255, 255, 255, 0.55))
            drop-shadow(0 0 12px rgba(200, 240, 255, 0.55))
            drop-shadow(0 0 22px rgba(0, 212, 255, 0.45))
            drop-shadow(0 0 40px rgba(0, 212, 255, 0.22))
            drop-shadow(0 0 70px rgba(0, 212, 255, 0.1));
    }
    100% {
        stroke: #e8ebf0;
        stroke-width: 2.2px;
        filter:
            drop-shadow(0 0 0 rgba(255, 255, 255, 0))
            drop-shadow(0 0 0 rgba(255, 255, 255, 0))
            drop-shadow(0 0 0 rgba(200, 240, 255, 0))
            drop-shadow(0 0 0 rgba(0, 212, 255, 0))
            drop-shadow(0 0 0 rgba(0, 212, 255, 0))
            drop-shadow(0 0 0 rgba(0, 212, 255, 0));
    }
}

.aquila-wrapper.compact {
    --aquila-node-r: 4px;
    --aquila-edge-w: 1.8px;
    --aquila-tail-thin-w: 1.1px;
}
