/* =========================================================================
   auth-visual.css — the animated brand panels on login.php and register.php.

   Scale: .av is a size container and the stage sets its font-size from it,
   so every length below is in em on a 40em x 30em stage and the whole
   composition scales to the panel without overflowing in either direction.

   Motion: one 12 s loop per page, CSS keyframes only, transform and opacity
   (plus stroke-dashoffset on a few short SVG paths). The default styles are
   the finished state, which is what reduced-motion users see; the loop is
   added only under prefers-reduced-motion: no-preference.
   assets/js/auth-visual.js adds pointer depth (--px, --py) and the
   .av--paused class while the tab is hidden.

   Colour: indigo for the product and processing, green only for success.
   ========================================================================= */

.av {
    --av-indigo: #818cf8;
    --av-indigo-deep: #6366f1;
    --av-violet: #a78bfa;
    --av-green: #22c55e;
    --av-green-deep: #16a34a;
    --av-surface: rgba(20, 20, 26, 0.86);
    --av-surface-2: rgba(28, 28, 36, 0.92);
    --av-line: rgba(255, 255, 255, 0.07);
    --av-line-strong: rgba(255, 255, 255, 0.11);
    --av-text: #ededf0;
    --av-text-2: #a1a1aa;
    --av-text-3: #71717a;
    --av-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --av-ease-io: cubic-bezier(0.65, 0, 0.35, 1);
    --px: 0;
    --py: 0;

    position: relative;
    width: 100%;
    height: 100%;
    container-type: size;
    pointer-events: none;
    user-select: none;
}

.av__stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40em;
    height: 30em;
    /* Slightly wider than the box: the outer 1em of the stage is only
       ambient light, which the visual padding absorbs. */
    font-size: min(2.65cqi, 3.333cqb);
    transform: translate(-50%, -50%);
    perspective: 90em;
    font-family: var(--font-body);
    color: var(--av-text);
}

.av-mono {
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
}

/* ---- Ambient: two slow light sources, a fading grid, a faint network ---- */
.av__ambient {
    position: absolute;
    inset: -20%;
}

.av__ambient span {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.av__ambient span:first-child {
    width: 60%;
    height: 60%;
    left: 38%;
    top: 4%;
    background: radial-gradient(closest-side, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0) 70%);
}

.av__ambient span:last-child {
    width: 50%;
    height: 50%;
    left: 6%;
    top: 46%;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0) 70%);
}

.av__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 2.5em 2.5em;
    background-position: center;
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 55% 48%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 55% at 55% 48%, #000 30%, transparent 75%);
}

.av__net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.av-net__lines path,
.av-net__links path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 0.6;
    vector-effect: non-scaling-stroke;
}

.av-net__links path {
    stroke: rgba(129, 140, 248, 0.22);
    stroke-dasharray: 2 3;
}

.av-net__nodes circle {
    fill: rgba(129, 140, 248, 0.5);
}

.av-pulse,
.av-link {
    fill: none;
    stroke: var(--av-indigo);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 0.14 1.2;
    stroke-dashoffset: 0.14;
    opacity: 0;
    vector-effect: non-scaling-stroke;
}

.av-link {
    stroke-width: 1.8;
    stroke-dasharray: 0.22 1.2;
    stroke-dashoffset: 0.22;
}

/* ---- Depth wrappers: pointer parallax only, never keyframed ---- */
.av-depth {
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.9s var(--av-ease);
}

/* ---- Shared surfaces ---- */
.av-win,
.av-search,
.av-chip,
.av-url,
.av-node__core {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 40%),
        var(--av-surface);
    border: 1px solid var(--av-line-strong);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0.1em 0.3em rgba(0, 0, 0, 0.3),
        0 1.6em 3.2em -1em rgba(0, 0, 0, 0.65);
}

/* =========================================================================
   LOGIN: the submission engine
   ========================================================================= */

.av--login .av-depth--win {
    left: 6.8em;
    top: 4.2em;
    width: 28em;
    transform: rotateX(calc(7deg - var(--py) * 2.5deg)) rotateY(calc(-11deg + var(--px) * 3deg));
}

.av--login .av-depth--a {
    left: 1em;
    top: 1.4em;
    transform: translate3d(calc(var(--px) * 0.7em), calc(var(--py) * 0.5em), 0);
}

.av--login .av-depth--b {
    left: 27.2em;
    top: 22.6em;
    transform: translate3d(calc(var(--px) * 0.9em), calc(var(--py) * 0.7em), 0);
}

.av-win {
    position: relative;
    border-radius: 1.1em;
    overflow: hidden;
}

/* A soft reflection along the top edge of the glass. */
.av-win::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.av-win__head {
    display: flex;
    align-items: center;
    gap: 0.7em;
    padding: 0.95em 1.1em 0.85em;
}

.av-win__mark {
    display: grid;
    place-items: center;
    width: 1.7em;
    height: 1.7em;
    border-radius: 0.5em;
    background: linear-gradient(145deg, var(--av-indigo-deep), #4338ca);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.av-win__mark .material-symbols-rounded {
    font-size: 1.1em;
    color: #fff;
    font-variation-settings: 'FILL' 1;
}

.av-win__title {
    font-size: 0.82em;
    font-weight: 600;
    color: var(--av-text);
}

.av-win__title .av-mono {
    font-weight: 500;
    color: var(--av-text-2);
}

.av-pill {
    position: relative;
    display: grid;
    align-items: center;
    margin-left: auto;
    height: 1.8em;
    min-width: 9.6em;
    padding: 0 0.8em 0 1.75em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--av-line);
    font-size: 0.72em;
    font-weight: 600;
    color: var(--av-text-2);
}

.av-pill__text {
    grid-area: 1 / 1;
    white-space: nowrap;
}

.av-pill__dot {
    position: absolute;
    left: 0.8em;
    top: 50%;
    width: 0.5em;
    height: 0.5em;
    margin-top: -0.25em;
    border-radius: 50%;
}

.av-pill__dot--live { background: var(--av-indigo); box-shadow: 0 0 0 0.25em rgba(129, 140, 248, 0.15); }
.av-pill__dot--done { background: var(--av-green); box-shadow: 0 0 0 0.25em rgba(34, 197, 94, 0.15); }

.av-win__progress {
    position: relative;
    height: 2px;
    margin: 0 1.1em;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.av-win__progress-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--av-indigo-deep), var(--av-violet) 55%, var(--av-green));
    transform-origin: left center;
}

.av-rows {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 1em 1.1em;
    overflow: hidden;
}

.av-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75em;
    height: 3.1em;
    padding: 0 0.8em 0 0.9em;
    border-radius: 0.7em;
    background: var(--av-surface-2);
    border: 1px solid var(--av-line);
}

.av-row:nth-child(2) { --i: 0; }
.av-row:nth-child(3) { --i: 1; }
.av-row:nth-child(4) { --i: 2; }
.av-row:nth-child(5) { --i: 3; }

.av-row__flash {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid rgba(34, 197, 94, 0.45);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0) 60%);
    opacity: 0.4;
}

.av-row__fav {
    position: relative;
    flex: none;
    width: 1.1em;
    height: 1.1em;
    border-radius: 0.3em;
    background: linear-gradient(145deg, #3f3f46, #27272a);
}

.av-row__url {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--font-mono);
    font-size: 0.74em;
    color: var(--av-text);
}

.av-row__state {
    position: relative;
    display: grid;
    justify-items: end;
    font-size: 0.7em;
    font-weight: 500;
    color: var(--av-text-2);
}

.av-st { grid-area: 1 / 1; white-space: nowrap; }
.av-st.av-p { color: #c7d2fe; }
.av-st.av-s { color: #86efac; }

.av-row__ind {
    position: relative;
    flex: none;
    width: 1.55em;
    height: 1.55em;
    color: #52525b;
    overflow: visible;
}

.av-spin,
.av-ind-done {
    transform-box: fill-box;
    transform-origin: center;
}

.av-tick {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.av-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: -2em;
    height: 3em;
    background: linear-gradient(180deg, rgba(129, 140, 248, 0), rgba(129, 140, 248, 0.09) 70%, rgba(165, 180, 252, 0.5) 97%, rgba(129, 140, 248, 0));
    opacity: 0;
    z-index: 1;
}

.av-win__foot {
    display: flex;
    align-items: center;
    gap: 0.7em;
    padding: 0.75em 1.1em 0.9em;
    border-top: 1px solid var(--av-line);
    font-size: 0.66em;
    color: var(--av-text-3);
}

.av-win__sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.av-win__foot-end {
    margin-left: auto;
}

.av-chip {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.55em 0.8em;
    border-radius: 0.8em;
    font-size: 0.72em;
    white-space: nowrap;
}

.av-chip--api {
    color: var(--av-text-2);
    opacity: 0.55;
}

.av-chip__method {
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--av-indigo);
}

.av-chip__code {
    padding: 0.15em 0.5em;
    border-radius: 0.45em;
    background: rgba(129, 140, 248, 0.14);
    color: #c7d2fe;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.av-chip--done {
    gap: 0.75em;
    padding: 0.7em 1.1em 0.7em 0.75em;
    border-radius: 1em;
}

.av-chip__ring {
    width: 2.6em;
    height: 2.6em;
    transform: rotate(-90deg);
}

.av-chip__ring-fill {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.av-chip__body {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
}

.av-chip__value {
    font-size: 1.35em;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--av-text);
}

.av-chip__label {
    color: var(--av-text-2);
}

/* Finished state (reduced motion and the base for the loop). */
.av-q, .av-p, .av-h-recv, .av-h-proc, .av-pill__dot--live { opacity: 0; }
.av-s, .av-h-done, .av-pill__dot--done { opacity: 1; }

/* =========================================================================
   REGISTER: from URL to discovery
   ========================================================================= */

.av--register .av-depth--a {
    left: 1.4em;
    top: 3.1em;
    width: 15.8em;
    transform: translate3d(calc(var(--px) * 0.9em), calc(var(--py) * 0.6em), 0);
}

.av--register .av-depth--node {
    left: 22.6em;
    top: 3.2em;
    transform: translate3d(calc(var(--px) * 0.5em), calc(var(--py) * 0.4em), 0);
}

.av--register .av-depth--win {
    left: 8.4em;
    top: 11.6em;
    width: 29.2em;
    transform: rotateX(calc(7deg - var(--py) * 2.5deg)) rotateY(calc(-9deg + var(--px) * 3deg));
}

.av-url {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    padding: 0.85em;
    border-radius: 1em;
}

.av-url__label {
    font-size: 0.62em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--av-text-3);
}

.av-url__field {
    display: flex;
    align-items: center;
    gap: 0.45em;
    height: 2.3em;
    padding: 0 0.7em;
    border-radius: 0.6em;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--av-line);
}

.av-url__field .material-symbols-rounded {
    font-size: 1em;
    color: var(--av-indigo);
}

.av-url__text {
    font-size: 0.7em;
    color: var(--av-text);
    white-space: nowrap;
}

.av-url__btn {
    position: relative;
    display: grid;
    place-items: center;
    height: 2.1em;
    border-radius: 0.6em;
    background: linear-gradient(180deg, #6d70f3, var(--av-indigo-deep));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0.4em 1em -0.4em rgba(99, 102, 241, 0.6);
    font-size: 0.72em;
    font-weight: 600;
    color: #fff;
}

.av-url__btn-a,
.av-url__btn-b {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.av-url__btn-b .material-symbols-rounded {
    font-size: 1.15em;
}

.av-node {
    position: relative;
    width: 5.2em;
    height: 5.2em;
}

.av-node__glow {
    position: absolute;
    inset: -1.6em;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(99, 102, 241, 0.42), rgba(99, 102, 241, 0) 72%);
    opacity: 0.25;
}

.av-node__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.av-node__core {
    position: absolute;
    inset: 0.9em;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border-color: rgba(129, 140, 248, 0.35);
}

.av-node__core .material-symbols-rounded {
    font-size: 1.5em;
    color: #c7d2fe;
    font-variation-settings: 'FILL' 1;
}

.av-node__label {
    position: absolute;
    left: 6em;
    top: 50%;
    display: grid;
    transform: translateY(-50%);
    font-size: 0.66em;
    white-space: nowrap;
}

.av-node__label > span { grid-area: 1 / 1; }
.av-n-ready { color: var(--av-text-3); }
.av-n-proc { color: #c7d2fe; }
.av-n-done { color: #86efac; }

.av-search {
    position: relative;
    border-radius: 1.1em;
    overflow: hidden;
}

.av-search::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.av-search__bar {
    display: flex;
    align-items: center;
    gap: 0.6em;
    height: 2.6em;
    margin: 0.9em 0.9em 0;
    padding: 0 1em;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--av-line);
}

.av-search__bar .material-symbols-rounded {
    font-size: 1.1em;
    color: var(--av-text-3);
}

.av-search__q {
    font-size: 0.78em;
    color: var(--av-text);
}

.av-search__loading {
    display: block;
    height: 2px;
    margin: 0.8em 0.9em 0;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(129, 140, 248, 0), var(--av-indigo), rgba(129, 140, 248, 0));
    transform-origin: left center;
    opacity: 0;
}

.av-results {
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    height: 12.6em;
    padding: 0.5em 0.9em 0.9em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
    mask-image: linear-gradient(180deg, #000 78%, transparent);
}

.av-res {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    flex: none;
    height: 3.75em;
    padding: 0.65em 0.85em;
    border-radius: 0.7em;
    background: var(--av-surface-2);
    border: 1px solid var(--av-line);
}

.av-res__site {
    display: flex;
    align-items: center;
    gap: 0.45em;
    font-size: 0.62em;
    color: var(--av-text-3);
}

.av-res__fav {
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    background: #3f3f46;
}

.av-res__fav--me {
    background: linear-gradient(145deg, var(--av-green), var(--av-green-deep));
}

.av-res__tag {
    margin-left: 0.3em;
    padding: 0.1em 0.5em;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    font-family: var(--font-body);
    font-weight: 600;
}

.av-res__title {
    display: block;
    height: 0.55em;
    border-radius: 0.3em;
    background: #3f3f46;
}

.av-res__title--me {
    height: auto;
    background: none;
    font-size: 0.74em;
    font-weight: 600;
    color: #c7d2fe;
    white-space: nowrap;
}

.av-res__desc {
    display: block;
    height: 0.4em;
    border-radius: 0.2em;
    background: #2e2e33;
}

.av-res--new {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.07), rgba(34, 197, 94, 0) 55%), var(--av-surface-2);
}

.av-res__glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    box-shadow: 0 0 0 0.25em rgba(34, 197, 94, 0.12);
    opacity: 0;
}

.av__caption {
    position: absolute;
    left: 2.5em;
    top: 2.4em;
    margin: 0;
    font-size: 0.58em;
    color: var(--av-text-3);
}

/* Finished state. */
.av-url__btn-a, .av-n-ready, .av-n-proc { opacity: 0; }
.av-url__btn-b, .av-n-done { opacity: 1; }

/* =========================================================================
   The loop
   ========================================================================= */

@media (prefers-reduced-motion: no-preference) {
    .av__ambient span:first-child { animation: av-drift-a 22s var(--av-ease-io) infinite alternate; }
    .av__ambient span:last-child { animation: av-drift-b 28s var(--av-ease-io) infinite alternate; }

    .av-pulse { animation: av-pulse 7s var(--av-ease-io) infinite; }
    .av-pulse--b { animation-duration: 9s; animation-delay: -3s; }
    .av-pulse--c { animation-duration: 8s; animation-delay: -5.5s; }
    .av-pulse--d { animation-duration: 10.5s; animation-delay: -2s; }

    .av-spin { animation: av-spin 1s linear infinite; }

    /* -- login -- */
    .av--login .av-row,
    .av--login .av-row .av-q,
    .av--login .av-row .av-p,
    .av--login .av-row .av-s,
    .av--login .av-tick,
    .av--login .av-ind-done,
    .av--login .av-row__flash {
        animation-duration: 12s;
        animation-iteration-count: infinite;
        animation-timing-function: var(--av-ease);
        animation-fill-mode: both;
        animation-delay: calc(var(--i, 0) * 0.4s);
    }

    .av--login .av-row { animation-name: av-row; }
    .av--login .av-row .av-q { animation-name: av-q; }
    .av--login .av-row .av-p { animation-name: av-p; }
    .av--login .av-row .av-s { animation-name: av-s; }
    .av--login .av-tick { animation-name: av-tick; }
    .av--login .av-ind-done { animation-name: av-pop; }
    .av--login .av-row__flash { animation-name: av-flash; }
    /* the spinner keeps its own rotation */
    .av--login .av-spin { animation: av-spin 1s linear infinite; }

    .av-h-recv { animation: av-h-recv 12s linear infinite; }
    .av-h-proc { animation: av-h-proc 12s linear infinite; }
    .av-h-done, .av-pill__dot--done { animation: av-h-done 12s linear infinite; }
    .av-pill__dot--live { animation: av-h-live 12s linear infinite; }
    .av-win__progress-fill { animation: av-progress 12s var(--av-ease-io) infinite; }
    .av-scan { animation: av-scan 12s var(--av-ease-io) infinite; }
    .av-chip--api { animation: av-api 12s var(--av-ease) infinite; }
    .av-chip--done { animation: av-done 12s var(--av-ease) infinite; }
    .av-chip__ring-fill { animation: av-ring 12s var(--av-ease) infinite; }

    /* -- register -- */
    .av-url__text { animation: av-type 12s linear infinite; }
    .av-url__btn { animation: av-press 12s var(--av-ease) infinite; }
    .av-url__btn-a { animation: av-btn-a 12s linear infinite; }
    .av-url__btn-b { animation: av-btn-b 12s linear infinite; }
    .av--register .av-depth--a > .av-url { animation: av-url-dim 12s var(--av-ease) infinite; }
    .av-link--1 { animation: av-link-1 12s var(--av-ease-io) infinite; }
    .av-link--2 { animation: av-link-2 12s var(--av-ease-io) infinite; }
    .av-node__glow { animation: av-node-glow 12s var(--av-ease) infinite; }
    .av-node__ring { animation: av-spin 16s linear infinite; }
    .av-n-ready { animation: av-n-ready 12s linear infinite; }
    .av-n-proc { animation: av-n-proc 12s linear infinite; }
    .av-n-done { animation: av-n-done 12s linear infinite; }
    .av-search__loading { animation: av-loading 12s var(--av-ease-io) infinite; }
    .av-res--new { animation: av-res-new 12s var(--av-ease) infinite; }
    .av-res__glow { animation: av-res-glow 12s var(--av-ease) infinite; }
    .av-res--shift { animation: av-res-shift 12s var(--av-ease-io) infinite; }

    .av--paused *,
    .av--paused *::before,
    .av--paused *::after {
        animation-play-state: paused !important;
    }
}

@keyframes av-drift-a {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-12%, 9%, 0); }
}

@keyframes av-drift-b {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(14%, -8%, 0); }
}

@keyframes av-spin {
    to { transform: rotate(360deg); }
}

@keyframes av-pulse {
    0%   { stroke-dashoffset: 0.14; opacity: 0; }
    8%   { opacity: 0.9; }
    55%  { opacity: 0.9; }
    62%, 100% { stroke-dashoffset: -1.1; opacity: 0; }
}

/* Login rows (row 1 timings; rows 2-4 run 0.4 s apart via --i).
   0.4-1.0 s arrive from the left, 3.0 s processing, 5.4 s completed,
   10.2-10.8 s leave upwards. The jump back happens while invisible. */
@keyframes av-row {
    0%, 3.3%  { opacity: 0; transform: translate3d(-1.8em, 0, 0); }
    9%        { opacity: 1; transform: translate3d(0, 0, 0); }
    85%       { opacity: 1; transform: translate3d(0, 0, 0); }
    90%, 100% { opacity: 0; transform: translate3d(0, -0.7em, 0); }
}

@keyframes av-q {
    0%, 24%     { opacity: 1; }
    26.5%, 100% { opacity: 0; }
}

@keyframes av-p {
    0%, 24%     { opacity: 0; }
    26.5%, 44%  { opacity: 1; }
    46.5%, 100% { opacity: 0; }
}

@keyframes av-s {
    0%, 44%     { opacity: 0; }
    46.5%, 100% { opacity: 1; }
}

@keyframes av-tick {
    0%, 45.5% { stroke-dashoffset: 1; }
    50%, 100% { stroke-dashoffset: 0; }
}

@keyframes av-pop {
    0%, 44%   { transform: scale(0.6); }
    48%       { transform: scale(1.06); }
    51%, 100% { transform: scale(1); }
}

@keyframes av-flash {
    0%, 45%   { opacity: 0; }
    48%       { opacity: 1; }
    62%, 85%  { opacity: 0.4; }
    90%, 100% { opacity: 0; }
}

@keyframes av-h-recv {
    0%, 23%   { opacity: 1; }
    25.5%     { opacity: 0; }
    92%       { opacity: 0; }
    95%, 100% { opacity: 1; }
}

@keyframes av-h-proc {
    0%, 23%     { opacity: 0; }
    25.5%, 54%  { opacity: 1; }
    56.5%, 100% { opacity: 0; }
}

@keyframes av-h-done {
    0%, 54%     { opacity: 0; }
    56.5%, 88%  { opacity: 1; }
    91%, 100%   { opacity: 0; }
}

@keyframes av-h-live {
    0%, 54%   { opacity: 1; }
    56.5%     { opacity: 0; }
    89%       { opacity: 0; }
    92%, 100% { opacity: 1; }
}

@keyframes av-progress {
    0%, 25%   { transform: scaleX(0); opacity: 1; }
    55%       { transform: scaleX(1); opacity: 1; }
    86%       { transform: scaleX(1); opacity: 1; }
    92%       { transform: scaleX(1); opacity: 0; }
    95%       { transform: scaleX(0); opacity: 0; }
    100%      { transform: scaleX(0); opacity: 1; }
}

/* One sweep through the rows while they process (3.2-6.4 s). */
@keyframes av-scan {
    0%, 26%   { opacity: 0; transform: translate3d(0, 0, 0); }
    29%       { opacity: 1; }
    50%       { opacity: 1; }
    54%, 100% { opacity: 0; transform: translate3d(0, 16em, 0); }
}

@keyframes av-api {
    0%        { opacity: 0.55; transform: translate3d(0, 0, 0); }
    3%        { opacity: 1; transform: translate3d(0.3em, 0, 0); }
    7%        { opacity: 1; transform: translate3d(0, 0, 0); }
    24%       { opacity: 1; }
    32%, 100% { opacity: 0.55; transform: translate3d(0, 0, 0); }
}

@keyframes av-done {
    0%, 55%   { opacity: 0; transform: translate3d(0, 0.8em, 0); }
    60%       { opacity: 1; transform: translate3d(0, 0, 0); }
    86%       { opacity: 1; transform: translate3d(0, 0, 0); }
    91%, 100% { opacity: 0; transform: translate3d(0, 0.4em, 0); }
}

@keyframes av-ring {
    0%, 56%   { stroke-dashoffset: 1; }
    66%, 100% { stroke-dashoffset: 0; }
}

/* Register: 0.2-1.4 s the URL is typed, 1.7 s Submit is pressed,
   2.0-3.2 s it travels to CrawlMe, 3.2-5.6 s processing, 5.6-6.7 s on to
   the search window, 7.0-7.7 s the result appears, held to 10.8 s, then
   everything eases back for the next pass. */
@keyframes av-type {
    0%        { clip-path: inset(0 100% 0 0); }
    1.6%      { clip-path: inset(0 100% 0 0); animation-timing-function: steps(30, end); }
    11.6%     { clip-path: inset(0 0 0 0); }
    90%       { clip-path: inset(0 0 0 0); animation-timing-function: var(--av-ease); }
    95%, 100% { clip-path: inset(0 100% 0 0); }
}

@keyframes av-press {
    0%, 13%   { transform: scale(1); }
    14.2%     { transform: scale(0.95); }
    16%, 100% { transform: scale(1); }
}

@keyframes av-btn-a {
    0%, 14.5%  { opacity: 1; }
    16%        { opacity: 0; }
    93%        { opacity: 0; }
    96%, 100%  { opacity: 1; }
}

@keyframes av-btn-b {
    0%, 14.5% { opacity: 0; }
    16%, 93%  { opacity: 1; }
    96%, 100% { opacity: 0; }
}

@keyframes av-url-dim {
    0%, 27%   { opacity: 1; }
    33%, 88%  { opacity: 0.6; }
    95%, 100% { opacity: 1; }
}

@keyframes av-link-1 {
    0%, 16.5% { stroke-dashoffset: 0.22; opacity: 0; }
    17.5%     { opacity: 1; }
    26%       { opacity: 1; }
    27%, 100% { stroke-dashoffset: -1.05; opacity: 0; }
}

@keyframes av-link-2 {
    0%, 46.5% { stroke-dashoffset: 0.22; opacity: 0; }
    47.5%     { opacity: 1; }
    55%       { opacity: 1; }
    56%, 100% { stroke-dashoffset: -1.05; opacity: 0; }
}

@keyframes av-node-glow {
    0%, 25%   { opacity: 0.25; transform: scale(0.9); }
    30%       { opacity: 1; transform: scale(1); }
    45%       { opacity: 1; transform: scale(1.04); }
    52%, 88%  { opacity: 0.35; transform: scale(0.95); }
    95%, 100% { opacity: 0.25; transform: scale(0.9); }
}

@keyframes av-n-ready {
    0%, 26%   { opacity: 1; }
    28%       { opacity: 0; }
    92%       { opacity: 0; }
    95%, 100% { opacity: 1; }
}

@keyframes av-n-proc {
    0%, 26%     { opacity: 0; }
    28%, 45%    { opacity: 1; }
    47%, 100%   { opacity: 0; }
}

@keyframes av-n-done {
    0%, 45%   { opacity: 0; }
    47%, 90%  { opacity: 1; }
    93%, 100% { opacity: 0; }
}

@keyframes av-loading {
    0%, 54%   { opacity: 0; transform: scaleX(0.1); }
    56%       { opacity: 1; }
    61%       { opacity: 1; transform: scaleX(1); }
    64%, 100% { opacity: 0; transform: scaleX(1); }
}

@keyframes av-res-new {
    0%, 58.5% { opacity: 0; transform: translate3d(0, -0.5em, 0) scale(0.985); }
    64%       { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    90%       { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    94%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.99); }
}

@keyframes av-res-glow {
    0%, 62%   { opacity: 0; }
    66%       { opacity: 1; }
    80%, 100% { opacity: 0; }
}

/* The results under the new one make room for it, then close up again. */
@keyframes av-res-shift {
    0%, 58%   { transform: translate3d(0, -4.2em, 0); }
    64%, 91%  { transform: translate3d(0, 0, 0); }
    97%, 100% { transform: translate3d(0, -4.2em, 0); }
}
