@import url(fonts.css);

:root {
    --vh: 1vh;
}

html {
    background-color: var(--c-bg);
    scrollbar-color: var(--c-border) transparent;
    scrollbar-width: thin;
}

/* text, links and lists :3 */

t, strong {
    font-family: "mono";
    font-weight: bold;
    color: var(--c-title)
}

em {
    font-style: italic;
    color: var(--c-title)
}

p, d {
    font-family: "mono";
    color: var(--c-fg);
    margin-top: 0;
    margin-bottom: 0
}

d:not(d:only-child):hover {
    color: var(--c-bg); background-color: var(--c-fg)
}

a {
    font-family: "mono";
    color: var(--c-highlight);
    text-decoration: none;
}

a:focus {
    color: var(--c-bg);
    background-color: var(--c-highlight);
}

a:hover {
    cursor: pointer
}

:is(a, d) + p {
    display: none
}

ul {
    margin: 0 0 0 -16px;
}

li {
    list-style: none;
}

/* lil text on the borders :3 */

.title, .title2, .credit, .skip-notice {
    height: 24px;
    background-color: var(--c-bg);
    color: var(--c-title);
    position: fixed;
    padding: 0 4px;
    font-family: "mono";
    font-weight: bold;
}

.title {
    top: 0;
    left: 32px;
}

.credit {
    top: calc(var(--vh) * 100 - 1.5em);
    right: 64px;
    color: var(--c-fg)
}

.skip-notice {
    bottom: 0;
    right: 8px;
    color: var(--c-fg);
    background-color: transparent;
    font-weight: normal;
    opacity: 0
}

.hyper {
    color: var(--c-highlight);
    right: 64px;
    left: auto !important;
    text-decoration: underline;
}

.hyper:hover {
    color: var(--c-bg);
    background-color: var(--c-highlight);
    cursor: pointer
}

/* here are some @media rules to choose when to display ascii art */

.ascii > div, .splash {
    font-family: "mono";
    color: var(--c-fg);
    white-space: pre;
    display: none
}

@media screen and (min-width: 420px) {
    .splash-1 {
        display: block;
        visibility: visible
    }
}

/* styling for the basic border when no js */

body > .nojs {
    border: 2px solid var(--c-border);
    box-sizing: border-box;
    position: fixed;
    width: calc(100vw - 16px);
    height: calc(var(--vh) * 100 - 16px);
    top: 8px;
    left: 8px
}

main, .js > div > div {
    overflow: hidden auto;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
}

main {
    overflow-y: auto !important
}

.nojs li > :is(a, d):hover + p {
    visibility: visible;
    display: block;
    position: fixed;
    box-sizing: border-box;
    padding: 16px;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden
}

/* styling for the js mode! */
.js {
    visibility: hidden;
    border: 2px solid var(--c-border);
    box-sizing: border-box;
    position: fixed;
    width: calc(100vw - 16px);
    height: calc(var(--vh) * 100 - 16px);
    top: 8px;
    left: 8px
}

.js > div, .nojs > :is(div, main) {
    box-sizing: border-box;
    border: 2px solid var(--c-border);
    overflow: hidden;
    position: fixed;
}

/* stuff for shaping squares */

@media screen and (min-aspect-ratio: 1/1) {
    :is(.js, .nojs) > :is(div:first-child, main) {
        width: calc(50vw - 4px - 11px);
        height: calc(var(--vh) * 100 - 16px - 10px);
        top: 13px;
        left: 13px
    }
    :is(.js, .nojs) > div:last-child, .nojs li > :is(a, d):hover + p {
        width: calc(50vw - 4px - 11px);
        height: calc(var(--vh) * 100 - 16px - 10px);
        top: 13px;
        right: 13px
    }
    .title2 {
        top: 0;
        left: calc(50vw + 24px);
    }
    @media (600px < width < 632px) {
        .hyper {
            right: 32px !important
        }
    }
    @media (max-width: 600px) {
        .title2:not(:last-child) {
            display: none
        }
        .hyper {
            left: calc(50vw + 24px) !important;
            right: auto !important;
        }
    }
}

@media screen and (max-aspect-ratio: 1000/1001) {
    :is(.js, .nojs) > :is(div:first-child, main) {
        width: calc(100vw - 16px - 10px);
        height: calc(var(--vh) * 50 - 4px - 11px);
        top: 13px;
        left: 13px
    }
    :is(.js, .nojs) > div:last-child, .nojs li > :is(a, d):hover + p {
        width: calc(100vw - 16px - 10px);
        height: calc(var(--vh) * 50 - 4px - 11px);
        bottom: 13px;
        left: 13px
    }
    .title2 {
        top: calc(var(--vh) * 50 - 12px);
        left: 32px;
    }
    @media (300px < width < 332px) {
        .hyper {
            right: 32px !important
        }
    }
    @media (max-width: 300px) {
        .title2:not(:last-child) {
            display: none
        }
        .hyper {
            left: 32px !important;
            right: auto !important;
        }
    }
}

@media (max-width: 430px) and (max-height: 430px), (any-hover: none) {
    .nojs > div:last-child, .nojs li > :is(a, d):hover + p {
        display: none !important
    }
    .nojs > main {
        width: calc(100vw - 16px - 10px) !important;
        height: calc(var(--vh) * 100 - 16px - 10px) !important;
    }
}

.js > div:only-child {
    width: calc(100vw - 16px - 10px);
    height: calc(var(--vh) * 100 - 16px - 10px);
    top: 13px;
    left: 13px
}

/* buttons and focus */

.buttons {
    white-space: pre;
    margin-left: 24px
}

.back {
    margin-bottom: 8px;
    display: inline-block
}

:focus {
    outline: none
}

.f {
    color: var(--c-bg);
    background-color: var(--c-focus-secondary)
}