:root {
    --grey: rgba(0, 0, 0, 0.5);
}

html {
    line-height: 1.25;
    letter-spacing: 0;
    color: rgba(0, 0, 0, 0.85);
    font-size: 0.95rem;
    font-weight: 420;
    font-style: normal;
    font-family: "Font 1", sans-serif;
    font-variation-settings:
        "slnt" 0,
        "MONO" 0.25;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-y: scroll;
    paint-order: stroke fill markers;
}

svg {
    align-content: normal;
    display: inline-block;
    vertical-align: middle;
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

figure {
    margin: 0;
    break-inside: avoid;
    padding: 0 0.75rem 0;
    pointer-events: none;
}

a:has(figure) {
    &:hover {
        text-decoration: none;
    }
}

.gallery {
    position: relative;
    width: 100%;

    & img {
        display: none;
        max-width: 100%;
        max-height: 100%;
    }

    & div.arrow-left-container,
    & div.arrow-right-container {
        width: 20%;
        height: 100%;
        position: absolute;

        &:hover {
            cursor: pointer;
        }
    }

    & div.arrow-left-container {
        left: 0;
    }

    & div.arrow-right-container {
        right: 0;
    }

    & img.arrow-left,
    & img.arrow-right {
        display: none;
        position: absolute;
        top: 47%;
        opacity: 0.9;
        z-index: 2;
        width: 25%;
        user-select: none;
        -moz-user-select: none;
        -webkit-user-drag: none;
        -webkit-user-select: none;
        -ms-user-select: none;
    }

    &#gallery-new-balance img:not(.static) {
        object-fit: cover;
        height: 100%;
    }
}

@media screen and (min-width: 701px) {
    .gallery:hover .arrow-left,
    .gallery:hover .arrow-right {
        display: block;
    }
}

.gallery .arrow-left {
    left: 0;
    transform: rotate(-90deg);
}

.gallery .arrow-right {
    right: 0;
    transform: rotate(90deg);
}

hr {
    margin: 0 0.75rem 0;
}

figcaption {
    font-size: 0.85rem;
    color: var(--grey);
    text-decoration-color: var(--grey);
    margin: 0.25rem 0 0.25rem;
    visibility: hidden;

    &::before {
        content: "△ ";
    }
}

section {
    z-index: 4;
    position: relative;
}

a {
    -webkit-text-stroke: 0.2rem #fff;
    paint-order: stroke fill markers;
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
    background-color: transparent;
    text-decoration-line: none;
    text-decoration-color: black;
    color: inherit;

    &:hover {
        text-decoration-line: underline;
        text-decoration-style: solid;
        text-underline-offset: 0.1rem;
    }
}

#screen {
    box-sizing: border-box;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

#offscreen {
    box-sizing: border-box;
    padding: 0 0 0;
    width: 100%;
}

#footer {
    padding: 1.25rem 0 0;
}

#footer #rail {
    padding: 0.5rem 0 0.5rem;
}

#mailto-footer,
#instagram-footer,
#trademark-footer {
    box-sizing: border-box;
    font-size: 0.85rem;

    & a {
        font-size: 0.85rem;
    }
}

footer #trademark-footer {
    color: var(--grey);
    padding: 0 0.75rem 0;
    text-align: end;
}

main {
    display: block;
}

.fill {
    height: 100%;
}

p {
    margin-top: 1rem;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

img {
    border-style: none;
    overflow-clip-margin: border-box;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;

    &.pixel,
    &.pixel-modal {
        image-rendering: pixelated;
    }
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

.hidden,
[hidden] {
    display: none !important;
}

.highlight .dropdown-content {
    display: block;
}

.title {
    position: fixed;
}

.header {
    flex-grow: 1;
}

@media screen and (max-width: 700px) {
    figcaption {
        overflow-wrap: break-word;
    }

    #offscreen {
        max-width: 900px;
    }

    #pointer {
        z-index: 999;
    }
}
