/* Cert-compression cursor: a Certificate message going through the compressor.
 *
 * The head is the compressor. Behind it the message trails away, and it does on
 * screen exactly what the page spends 3,435 bytes arguing it does: the
 * structural material — names, OIDs, ASN.1 framing — shrinks as it falls back,
 * while the signature and public-key blocks stay exactly the size they started.
 *
 * Four entropy blocks in twelve segments is 33%, against the 35.2% measured on
 * this server's chain, and they sit every third segment so the tail reads as
 * four certificates each ending in a signature it cannot shorten.
 *
 * Colours are the page's own split palette, so the pointer and the 35.2/64.8
 * bar in "The ceiling" are saying the same thing in the same two colours.
 */

/* Nothing here applies until the script sets .cc-cursor-on. If it fails to
 * load, the native pointer is untouched rather than hidden with no replacement. */
.cc-cursor-on,
.cc-cursor-on a,
.cc-cursor-on button,
.cc-cursor-on summary,
.cc-cursor-on code {
    cursor: none;
}

.cc-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 1.5px solid var(--cc-primary, #67e8f9);
    border-radius: 3px;
    background: rgba(7, 10, 15, 0.55);
    /* The ambient background is a grid of small cyan cells, so an unlit cyan
     * square is camouflage. The glow is what separates the pointer from it. */
    box-shadow:
        0 0 7px rgba(103, 232, 249, 0.4),
        0 0 14px rgba(103, 232, 249, 0.16),
        inset 0 0 5px rgba(103, 232, 249, 0.16);
    transition:
        transform 0.12s ease-out,
        background-color 0.12s ease-out,
        box-shadow 0.12s ease-out;
    will-change: transform;
}

/* The compressor's jaws: two marks closing on the stream. */
.cc-cursor::before,
.cc-cursor::after {
    content: '';
    position: absolute;
    left: 3.5px;
    right: 3.5px;
    height: 2px;
    background: var(--cc-primary, #67e8f9);
    opacity: 0.75;
    transition:
        top 0.12s ease-out,
        bottom 0.12s ease-out;
}

.cc-cursor::before {
    top: 4px;
}
.cc-cursor::after {
    bottom: 4px;
}

/* Over something actionable the jaws close — 1.446:1, the whole-message ratio. */
.cc-cursor-active {
    transform: scale(1.15);
    background-color: rgba(103, 232, 249, 0.18);
    box-shadow:
        0 0 14px rgba(103, 232, 249, 0.75),
        0 0 30px rgba(103, 232, 249, 0.35),
        inset 0 0 8px rgba(103, 232, 249, 0.3);
}

.cc-cursor-active::before {
    top: 7px;
}
.cc-cursor-active::after {
    bottom: 7px;
}

.cc-cursor-seg {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9998;
    pointer-events: none;
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
    border-radius: 2px;
    will-change: transform, opacity;
}

/* Structure: names, OIDs, extension headers, ASN.1 framing. Compresses 1.968:1,
 * and the JS scales these down as they trail. */
.cc-cursor-structure {
    background: rgba(103, 232, 249, 0.7);
    border: 1px solid rgba(103, 232, 249, 0.95);
    box-shadow: 0 0 6px rgba(103, 232, 249, 0.42);
}

/* Signature and public-key bytes. Cryptographically random by design, so they
 * are drawn hollow and the JS never scales them: fed to zlib alone this material
 * grows, 1,209 B to 1,220. */
.cc-cursor-entropy {
    background: rgba(252, 165, 165, 0.16);
    border: 1.5px solid var(--cc-accent, #fca5a5);
    box-shadow: 0 0 7px rgba(252, 165, 165, 0.45);
}

/* prefers-reduced-motion is not acted on here — see the note in the script.
 * Suppressing the trail left this page the only one of six themed cursors
 * without one, which presented as a broken cursor rather than as a choice.
 * Honouring it belongs in a site-wide decision covering all six, not here.
 */
