/* Continue the centered landing-page logo into the editor header. */
#heusEditorEntry,
#heusEditorExit {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}
#heusEditorEntry::before,
#heusEditorExit::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 1;
    background:
        radial-gradient(ellipse at 48% 105%, rgba(59, 0, 78, .54), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 25%, rgba(60, 0, 75, .22)),
        linear-gradient(105deg, #3f56ad 0%, #6f50b8 32%, #9828aa 58%, #ee078b 100%);
    transition: opacity 560ms cubic-bezier(.22, 1, .36, 1);
}
.heus-editor-entering #heusEditorEntry { display: flex; }
.heus-editor-entering #heusHomeLink img { opacity: 0; }
#heusEditorEntry img {
    display: block;
    position: fixed;
    left: var(--heus-entry-x, calc(50vw - 75px));
    top: var(--heus-entry-y, calc(50vh - 75px));
    width: var(--heus-entry-width, 150px);
    height: var(--heus-entry-height, 150px);
    object-fit: cover;
    transform-origin: center;
    animation: heusLogoGlow .95s cubic-bezier(.45,0,.2,1) infinite;
    animation-delay: var(--heus-glow-delay, 0ms);
    will-change: transform;
    user-select: none;
}
@keyframes heusLogoGlow {
    0%, 100% { opacity: .64; filter: url(#heusLogoKnockout) drop-shadow(0 0 0 rgba(255,255,255,0)); }
    48% { opacity: 1; filter: url(#heusLogoKnockout) drop-shadow(0 0 14px rgba(255,255,255,.48)); }
    72% { opacity: .82; filter: url(#heusLogoKnockout) drop-shadow(0 0 7px rgba(255,255,255,.26)); }
}
#heusEditorEntry.heus-entry-traveling img {
    animation: none;
    opacity: 1;
    filter: url(#heusLogoKnockout);
}
#heusEditorEntry.heus-entry-revealing::before { opacity: 0; }
#heusHomeLink {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #334155;
    border-radius: 12px;
    background: #1e293b;
}
#heusHomeLink:hover { filter: brightness(1.2); }
#heusHomeLink:focus-visible { outline: 2px solid rgb(var(--acc-400)); outline-offset: 3px; }
#heusHomeLink img { display: block; width: 28px; height: 28px; object-fit: cover; filter: url(#heusLogoKnockout); }
.heus-editor-brand {
    flex: 0 0 auto;
    white-space: nowrap;
    font-family: 'Sora', 'Onest', 'Inter', sans-serif;
    font-size: clamp(13px, 1.2vw, 18px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.1;
    color: inherit;
}
@media (prefers-reduced-motion: reduce) {
    #heusEditorEntry::before { transition-duration: 80ms; }
    #heusEditorEntry img { animation: none; opacity: 1; filter: url(#heusLogoKnockout); }
}

/* Same logo flight and backdrop as the forward transition. */
#heusEditorExit { display: block; }
#heusEditorExit::before { animation: heusExitBackdrop 360ms ease both; }
@keyframes heusExitBackdrop { from { opacity: 0; } to { opacity: 1; } }
#heusEditorExit img {
    position: fixed;
    left: 0;
    top: 0;
    display: block;
    object-fit: cover;
    transform-origin: top left;
    animation: heusLogoGlow .95s cubic-bezier(.45,0,.2,1) infinite;
    will-change: transform, width, height;
}
.heus-editor-leaving #appBody > :not(#heusEditorExit) {
    opacity: 0 !important;
    transition: opacity 360ms ease !important;
    pointer-events: none !important;
}
