@font-face
{
    font-family: "Pixel UI";
    src: local("Courier New");
    font-display: swap;
}

:root
{
    color-scheme: dark;
    --void: #08070a;
    --ink: #ded9e6;
    --muted: #716b7a;
    --purple: #9b6dff;
    --purple-hot: #c4a8ff;
    --purple-dim: #2b2039;
    --line: #2a2530;
    --pixel: 3px;
}

*
{
    box-sizing: border-box;
}

html,
body
{
    margin: 0;
    min-height: 100%;
    background: var(--void);
}

body
{
    color: var(--ink);
    font-family: "Pixel UI", "IBM Plex Mono", "Courier New", monospace;
    overflow-x: hidden;
}

button,
a
{
    color: inherit;
    font: inherit;
}

button:focus-visible,
a:focus-visible
{
    outline: 2px solid var(--purple-hot);
    outline-offset: 4px;
}

.meta-separator
{
    margin: 0 7px;
    color: var(--purple);
    opacity: 0.75;
    text-shadow: 0 0 5px rgba(155, 109, 255, 0.55);
}

.meta-separator--small
{
    margin: 0 5px;
}

.meta-cursor
{
    display: inline-block;
    width: 8px;
    height: 0.9em;
    margin-right: 9px;
    background: var(--purple);
    box-shadow: 0 0 7px rgba(155, 109, 255, 0.75);
    vertical-align: -0.08em;
    animation: cursor-blink 1.05s steps(1) infinite;
}

.archive
{
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    padding: clamp(16px, 2.2vw, 32px) clamp(16px, 2.4vw, 42px) 18px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background:
    repeating-linear-gradient(45deg, rgba(155, 109, 255, 0.022) 0 1px, transparent 1px 16px),
    radial-gradient(circle at 50% 46%, #15101e 0, #0a080d 48%, var(--void) 78%);
    background-size: auto, auto;
}

.archive::before
{
    content: "";
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.2) 3px,
    rgba(0, 0, 0, 0.2) 4px
    );
    mix-blend-mode: multiply;
}

.topbar,
.controls
{
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar
{
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.wordmark
{
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #f3eff7;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.34em;
    text-decoration: none;
}

.wordmark__sigil
{
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    overflow: visible;
    fill: none;
    stroke: var(--purple);
    stroke-linecap: square;
    stroke-linejoin: miter;
    filter: drop-shadow(0 0 5px rgba(155, 109, 255, 0.62));
}

.wordmark__sigil-frame
{
    stroke-width: 1;
    opacity: 0.52;
}

.wordmark__sigil-orbit
{
    stroke: var(--purple-hot);
    stroke-width: 1.2;
}

.wordmark__sigil-core
{
    fill: rgba(155, 109, 255, 0.2);
    stroke-width: 1.3;
}

.wordmark__sigil-scan
{
    stroke-width: 1;
    opacity: 0.8;
}

.wordmark__sigil-pixel
{
    fill: var(--purple-hot);
    stroke: none;
}

.system-status
{
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: clamp(10px, 0.75vw, 12px);
    letter-spacing: 0.16em;
}

.status-light
{
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
    transform: translateY(-2px);
    background: var(--purple);
    box-shadow: 0 0 9px var(--purple);
    animation: blink 2.4s steps(1) infinite;
}

.status-divider
{
    color: #38313e;
}

.viewer
{
    position: relative;
    z-index: 2;
    min-height: 0;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 50px;
    gap: clamp(10px, 1.4vw, 22px);
    align-items: center;
    padding: clamp(12px, 1.8vh, 24px) 0 clamp(10px, 1.4vh, 18px);
}

.side-nav
{
    align-self: center;
    justify-self: center;
    display: grid;
    width: 70px;
    height: 150px;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    color: #8e8497;
    cursor: pointer;
    transition: color 140ms, transform 140ms, filter 140ms;
}

.side-nav:hover
{
    color: var(--purple-hot);
    filter: drop-shadow(0 0 7px rgba(155, 109, 255, 0.5));
}

.side-nav--previous
{
    transform: translateX(0);
}

.side-nav--previous:hover
{
    transform: translateX(-4px);
}

.side-nav--next
{
    color: #8e8497;
    transform: translateX(0);
}

.side-nav--next:hover
{
    transform: translateX(4px);
}

.side-nav__icon
{
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transition: transform 140ms;
}

.side-nav:hover .side-nav__icon
{
    filter: drop-shadow(0 0 5px rgba(155, 109, 255, 0.65));
}

.side-nav--previous:hover .side-nav__icon
{
    transform: translateX(-3px);
}

.side-nav--next:hover .side-nav__icon
{
    transform: translateX(3px);
}

.artifact
{
    width: min(100%, 1535px);
    margin: 0 auto;
}

.mobile-swipe-hint
{
    display: none;
}

.mobile-title
{
    display: none;
}

.artifact__frame
{
    position: relative;
    height: clamp(460px, 82vh, 940px);
    overflow: hidden;
    background: #050507;
    border-radius: 10px / 7px;
    border: 1px solid #3a3243;
    box-shadow:
    0 0 0 5px #0d0b10,
    0 0 0 6px #211b28,
    inset 0 0 24px rgba(0, 0, 0, 0.9),
    0 34px 90px rgba(0, 0, 0, 0.62),
    0 0 80px rgba(111, 67, 168, 0.08);
}

.artifact__frame::after
{
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
    radial-gradient(ellipse at center, transparent 46%, rgba(2, 1, 4, 0.42) 100%),
    linear-gradient(115deg, rgba(224, 211, 255, 0.1), transparent 25%);
    box-shadow: inset 0 0 34px 8px rgba(0, 0, 0, 0.42);
}

.artifact__frame > #artifact-image
{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter:
    saturate(0.84)
    contrast(1.12)
    brightness(1.03)
    sepia(0.07)
    drop-shadow(1px 0 rgba(255, 45, 110, 0.2))
    drop-shadow(-1px 0 rgba(67, 169, 255, 0.2));
    image-rendering: auto;
    transform: scale(1.012);
    transition: opacity 180ms steps(3), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: crt-flicker 6s steps(1) infinite;
}

.artifact__frame:hover > #artifact-image
{
    transform: scale(1.026);
}

.artifact__frame > #artifact-image.is-switching
{
    opacity: 0;
    transform: scale(1.025);
}

.artifact__crt
{
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    background:
    repeating-linear-gradient(
    to bottom,
    rgba(8, 5, 12, 0.08) 0,
    rgba(8, 5, 12, 0.08) 1px,
    rgba(0, 0, 0, 0.24) 2px,
    rgba(0, 0, 0, 0.24) 3px,
    transparent 4px
    ),
    repeating-linear-gradient(
    to right,
    rgba(255, 50, 90, 0.035) 0,
    rgba(255, 50, 90, 0.035) 1px,
    rgba(80, 255, 170, 0.02) 1px,
    rgba(80, 255, 170, 0.02) 2px,
    rgba(90, 130, 255, 0.035) 2px,
    rgba(90, 130, 255, 0.035) 3px
    );
    background-size: 100% 5px, 6px 100%;
    mix-blend-mode: normal;
    opacity: 0.46;
}

.artifact__crt::before
{
    content: "";
    position: absolute;
    top: -22%;
    right: 0;
    left: 0;
    height: 16%;
    background: linear-gradient(
    to bottom,
    transparent,
    rgba(190, 154, 255, 0.018) 25%,
    rgba(232, 220, 255, 0.09) 52%,
    rgba(155, 109, 255, 0.025) 72%,
    transparent
    );
    filter: blur(4px);
    animation: crt-roll 8s linear infinite;
}

.artifact__crt::after
{
    content: "";
    position: absolute;
    inset: 0;
    background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.065), transparent 18%, transparent 76%, rgba(173, 134, 255, 0.035)),
    radial-gradient(ellipse at 50% 50%, transparent 63%, rgba(0, 0, 0, 0.35) 100%);
    mix-blend-mode: screen;
}

.corner
{
    position: absolute;
    z-index: 7;
    width: 20px;
    height: 20px;
    border-color: var(--purple-hot);
    opacity: 0.7;
}

.corner--tl
{
    top: 9px;
    left: 9px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.corner--tr
{
    top: 9px;
    right: 9px;
    border-top: 1px solid;
    border-right: 1px solid;
}

.corner--bl
{
    bottom: 9px;
    left: 9px;
    border-bottom: 1px solid;
    border-left: 1px solid;
}

.corner--br
{
    right: 9px;
    bottom: 9px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

.eyebrow
{
    display: block;
    width: 100%;
    margin: 0 0 9px;
    color: var(--purple);
    font-size: clamp(9px, 0.8vw, 12px);
    letter-spacing: 0.2em;
    text-align: left;
}

.artifact__reveal
{
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    width: 100%;
    padding: clamp(24px, 5vw, 72px);
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: center;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.artifact__reveal::before
{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: clamp(96px, 18%, 156px);
    background:
    repeating-linear-gradient(
    45deg,
    rgba(155, 109, 255, 0.12) 0,
    rgba(155, 109, 255, 0.12) 1px,
    transparent 1px,
    transparent 10px
    ),
    linear-gradient(to bottom, rgba(5, 3, 8, 0.58), rgba(5, 3, 8, 0.26) 76%, transparent);
    opacity: 0;
    transition: opacity 180ms steps(4);
}

.artifact__reveal:hover::before,
.artifact__reveal:focus-visible::before
{
    opacity: 1;
}

.artifact__reveal-prompt
{
    position: absolute;
    top: clamp(22px, 4vh, 40px);
    left: 50%;
    padding: 12px 18px;
    border: 1px solid rgba(196, 168, 255, 0.48);
    background: rgba(16, 12, 21, 0.88);
    box-shadow: 6px 6px 0 rgba(43, 32, 57, 0.8), 0 0 28px rgba(155, 109, 255, 0.16);
    color: var(--purple-hot);
    font-size: 9px;
    letter-spacing: 0.22em;
    opacity: 0;
    transform: translate(-50%, -5px);
    transition: opacity 140ms steps(3), transform 140ms steps(3);
    white-space: nowrap;
}

.artifact__reveal:hover .artifact__reveal-prompt,
.artifact__reveal:focus-visible .artifact__reveal-prompt
{
    opacity: 1;
    transform: translate(-50%, 0);
}

.artifact__reveal-content
{
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: min(1040px, calc(100% - 50px));
    min-height: clamp(240px, 36%, 340px);
    padding: clamp(22px, 4vw, 42px);
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
    border-top: 2px solid rgba(196, 168, 255, 0.9);
    border-bottom: 2px solid rgba(196, 168, 255, 0.9);
    background:
    repeating-linear-gradient(45deg, rgba(155, 109, 255, 0.09) 0 1px, transparent 1px 9px),
    rgba(7, 5, 10, 0.88);
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.6),
        0 0 18px rgba(155, 109, 255, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -46%);
    transition: opacity 180ms steps(4), transform 180ms steps(4);
}

.artifact__reveal-content strong
{
    display: block;
    width: 100%;
    font-size: clamp(24px, 3.2vw, 48px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.075em;
    text-align: left;
    text-transform: uppercase;
}

.artifact__solution
{
    display: block;
    min-width: 0;
}

.artifact__source
{
    display: block;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(155, 109, 255, 0.35);
    background: #08070a;
    box-shadow:
    7px 7px 0 rgba(43, 32, 57, 0.58),
    0 0 22px rgba(155, 109, 255, 0.08);
}

.artifact__source[hidden]
{
    display: none;
}

.artifact__reveal-content.has-no-source
{
    width: min(760px, calc(100% - 50px));
    grid-template-columns: 1fr;
}

.artifact__source-label
{
    display: block;
    padding: 3px 3px 9px;
    color: var(--purple);
    font-size: 7px;
    letter-spacing: 0.16em;
    text-align: left;
}

.artifact__source img
{
    width: 100%;
    height: clamp(120px, 17vh, 190px);
    display: block;
    object-fit: contain;
    background:
    repeating-linear-gradient(45deg, rgba(155, 109, 255, 0.04) 0 1px, transparent 1px 8px),
    #030204;
    image-rendering: pixelated;
    filter: brightness(1.08) saturate(0.9);
}

.artifact__reveal.is-revealed::before
{
    opacity: 1;
    background:
    repeating-linear-gradient(45deg, rgba(155, 109, 255, 0.06) 0 1px, transparent 1px 12px),
    rgba(3, 2, 5, 0.18);
}

.artifact__reveal.is-revealed .artifact__reveal-prompt
{
    opacity: 0;
}

.artifact__reveal.is-revealed .artifact__reveal-content
{
    opacity: 1;
    transform: translate(-50%, -50%);
}

.artifact__note
{
    display: block;
    width: 100%;
    max-width: 430px;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--purple-dim);
    color: #756f7b;
    font-size: clamp(10px, 0.85vw, 13px);
    line-height: 1.8;
    letter-spacing: 0.06em;
    text-align: left;
}

.artifact__location
{
    color: var(--purple-hot);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.controls
{
    min-height: 58px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.controls__hint
{
    display: flex;
    align-items: center;
    gap: 8px;
}

.controls__hint
{
    color: #625c68;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.key
{
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid #37313c;
    background: #0d0b10;
    color: #8d8493;
}

.progress
{
    position: absolute;
    left: 50%;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
}

.progress button
{
    width: 16px;
    height: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.progress button::after
{
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: #3b3540;
    transition: background 120ms, box-shadow 120ms;
}

.progress button:hover::after,
.progress button.is-active::after
{
    background: var(--purple);
    box-shadow: 0 0 8px rgba(155, 109, 255, 0.7);
}

@keyframes blink
{
    0%, 83%
    {
        opacity: 1;
    }

    84%, 90%
    {
        opacity: 0.2;
    }

    91%, 100%
    {
        opacity: 1;
    }
}

@keyframes crt-roll
{
    from
    {
        transform: translateY(0);
    }

    to
    {
        transform: translateY(760%);
    }
}

@keyframes crt-flicker
{
    0%, 18%, 22%, 62%, 64%, 100%
    {
        opacity: 1;
    }

    19%
    {
        opacity: 0.96;
    }

    63%
    {
        opacity: 0.975;
    }
}

@keyframes cursor-blink
{
    0%, 48%
    {
        opacity: 1;
    }

    49%, 100%
    {
        opacity: 0;
    }
}

@media (max-width: 760px), (orientation: landscape) and (max-height: 720px) and (hover: none) and (pointer: coarse)
{
    .archive
    {
        padding: 18px 15px 14px;
        grid-template-rows: 1fr;
    }

    .topbar,
    .controls
    {
        display: none;
    }

    .viewer
    {
        grid-template-columns: 1fr;
        padding-top: 24px;
    }

    .side-nav
    {
        display: none;
    }

    .artifact__reveal
    {
        touch-action: pinch-zoom;
    }

    .artifact__reveal-prompt
    {
        display: none;
    }

    .mobile-swipe-hint
    {
        --swipe-progress: 0;
        display: grid;
        min-height: 48px;
        grid-template-columns: auto minmax(80px, 150px) 34px;
        gap: 10px;
        align-items: center;
        justify-content: center;
        padding: 12px 8px 0;
        color: #716b7a;
        font-size: 8px;
        letter-spacing: 0.13em;
        transition: opacity 140ms;
    }

    .mobile-swipe-hint.is-hidden
    {
        opacity: 0;
    }

    .mobile-swipe-hint__label
    {
        display: flex;
        align-items: center;
        gap: 7px;
        white-space: nowrap;
    }

    .mobile-swipe-hint__label svg
    {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: var(--purple);
        stroke-width: 1.5;
        transition: filter 120ms, transform 120ms;
    }

    .mobile-swipe-meter
    {
        position: relative;
        height: 4px;
        overflow: visible;
        background: #302936;
    }

    .mobile-swipe-meter__fill
    {
        position: absolute;
        inset: 0;
        background: var(--purple);
        box-shadow: 0 0 8px rgba(155, 109, 255, 0.62);
        transform: scaleX(var(--swipe-progress));
        transform-origin: left;
        transition: transform 50ms linear;
    }

    .mobile-swipe-meter__target
    {
        position: absolute;
        top: -4px;
        right: -1px;
        width: 2px;
        height: 12px;
        background: var(--purple-hot);
        box-shadow: 0 0 5px rgba(196, 168, 255, 0.65);
    }

    .mobile-swipe-hint__percent
    {
        color: var(--purple);
        text-align: right;
    }

    .mobile-swipe-hint.is-swiping
    {
        color: var(--purple-hot);
    }

    .mobile-swipe-hint.is-swiping .mobile-swipe-hint__label svg
    {
        filter: drop-shadow(0 0 5px rgba(155, 109, 255, 0.65));
        transform: translateY(-2px);
    }

    .mobile-title
    {
        display: block;
        margin: 0 0 6px;
        color: var(--ink);
        font-size: clamp(16px, 4.6vw, 24px);
        font-weight: 400;
        line-height: 1.35;
        letter-spacing: 0.12em;
        text-align: center;
        text-transform: uppercase;
        text-shadow: 0 0 18px rgba(155, 109, 255, 0.18);
    }

    .artifact__frame
    {
        height: min(70svh, 720px);
    }

    .artifact__reveal-content
    {
        min-height: 220px;
        gap: 24px;
    }

}

@media (orientation: landscape) and (max-height: 720px) and (hover: none) and (pointer: coarse)
{
    .archive
    {
        padding: 10px 15px;
    }

    .viewer
    {
        padding: 0;
    }

    .mobile-title
    {
        margin-bottom: 2px;
        font-size: clamp(13px, 3.5vh, 18px);
    }

    .artifact__frame
    {
        height: min(62svh, 520px);
    }

    .mobile-swipe-hint
    {
        min-height: 38px;
        padding-top: 7px;
    }
}

@media (max-width: 440px)
{
    .artifact__frame
    {
        height: 64svh;
    }

    .progress
    {
        gap: 2px;
    }

    .progress button
    {
        width: 9px;
    }

    .artifact__reveal-content
    {
        width: calc(100% - 34px);
        min-height: 390px;
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .artifact__source img
    {
        height: 120px;
    }
}

@media (prefers-reduced-motion: reduce)
{
    *, *::before, *::after
    {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}
