*,
*::after,
*::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    font-size: 12px;
    --color-text: #1a1a1a;
    --gray: #313131;
    --color-bg: #fff;
    --color-link: #1a1a1a;
    --color-link-hover: #1a1a1a;
    --page-padding: 1.5rem;
}

body {
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-family: ui-monospace, monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    margin: 0;
}
.details::-webkit-scrollbar {
    width: 6px;
}
.details::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px var(--color-bg);
    box-shadow: inset 0 0 6px var(--color-bg);
}
.details::-webkit-scrollbar-thumb {
    background-color: var(--gray);
    outline: 1px solid var(--gray);
    border-radius: 10px;
}
@media (scripting: enabled) {
    .loading {
        &::before,
        &::after {
            content: '';
            position: fixed;
            z-index: 10000;
        }

        &::before {
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--color-bg);
        }

        &::after {
            top: 50%;
            left: 50%;
            width: 100px;
            height: 1px;
            margin: 0 0 0 -50px;
            background: var(--color-link);
            animation: loaderAnim 1.5s ease-in-out infinite alternate forwards;
        }
    }
}

@keyframes loaderAnim {
    0% {
        transform: scaleX(0);
        transform-origin: 0% 50%;
    }

    50% {
        transform: scaleX(1);
        transform-origin: 0% 50%;
    }

    50.1% {
        transform: scaleX(1);
        transform-origin: 100% 50%;
    }

    100% {
        transform: scaleX(0);
        transform-origin: 100% 50%;
    }
}

a {
    text-decoration: none;
    color: var(--color-link);
    outline: none;
    cursor: pointer;

    &:hover {
        text-decoration: underline;
        color: var(--color-link-hover);
    }

    &:focus {
        outline: none;
        background: lightgrey;

        &:not(:focus-visible) {
            background: transparent;
        }

        &:focus-visible {
            outline: 2px solid red;
            background: transparent;
        }
    }
}

.frame {
    display: grid;
    z-index: 1000;
    grid-row-gap: 1rem;
    grid-column-gap: 2rem;
    pointer-events: none;
    justify-items: start;
    align-content: start;
    padding: var(--page-padding);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    grid-template-columns: auto auto auto 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
    'title title title title'
    'back github archive ...'
    'sponsor sponsor sponsor sponsor';

    #cdawrap {
        max-width: 260px;
        align-self: end;
    }

    a,
    button {
        pointer-events: auto;
    }

    .frame__title {
        grid-area: title;
        font-size: inherit;
        margin: 0;
    }

    .frame__back {
        grid-area: back;
        justify-self: start;
    }

    .frame__archive {
        grid-area: archive;
        justify-self: start;
    }

    .frame__github {
        grid-area: github;
    }

    .frame__tags {
        grid-area: tags;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .frame__demos {
        grid-area: demos;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

.content {
    padding: var(--page-padding);
    display: flex;
    flex-direction: column;
    width: 100vw;
    position: relative;

    @media screen and (min-width: 53em) {
        min-height: 100vh;
        justify-content: center;
        align-items: center;
    }
}
