:root {
    --white: #fff;
    --black: #000;
    --red: #ff3333;
    --rose: #ffcccc;
    --violet: #663399;
    --navy: #000066;
    --margin: 50px;
    --window-width: 100vw;
    --window-height: 100vh;
    --infobox-width: 20vw;
    --full-width: calc(var(--window-width)+var(--infobox-width));
    --slider-height: 200px;
    --tall-size: 4em;
    --medium-size: 1.2em;
    --small-size: 0.8em;
    --iphone-se-w: 375px;
    --iphone-se-h: 667px;
    --iphone-xr-w: 414px;
    --iphone-xr-h: 896px;
    --iphone-12pro-w: 390px;
    --iphone-12pro-h: 844px;
}

body {
    font-family: "helvetia", Arial, sans-serif;
    color: var(--black);
    width: var(--window-width);
    overflow-y: hidden;
    scroll-behavior: smooth;
    font-size: 1em;
    margin: 0;
}

body,
#vis,
#vis #canvas {
    min-height: var(--window-height);
    height: var(--window-height);
    min-height: -webkit-fill-available;
}

.divider {
    border-bottom: 2px solid var(--black);
}

input[type="checkbox" i] {
    margin: 0.5em 0.5em 0 0;
    height: 1em;
    width: 1em;
    border-radius: 50%;
}

#title {
    position: fixed;
    left: var(--margin);
    top: var(--margin);
    font-size: var(--tall-size);
    font-weight: 900;
}

a,
a:visited {
    color: var(--black);
    text-decoration: none;
}

#info-link {
    font-size: var(--medium-size);
    line-height: var(--medium-size);
    font-weight: 500;
}

#about-link {
    display: none;
}

#index {
    position: absolute;
    right: var(--margin);
    top: var(--margin);
    font-size: var(--medium-size);
    line-height: var(--medium-size);
    text-align: right;
    font-weight: 500;
}

#index span {
    display: block;
}

.index-color::after {
    content: "";
    display: inline-block;
    margin-left: 0.5em;
    transform: translateY(0.1em);
    height: 1em;
    width: 1em;
    border-radius: 50%;
}

#index-1::after {
    background-color: var(--black);
}

#index-2::after {
    background-color: var(--rose);
}

#index-3::after {
    background-color: var(--red);
}

#index-4::after {
    background-color: var(--violet);
}

#index-5::after {
    background-color: var(--navy);
}

#info-text {
    width: var(--infobox-width);
    padding: var(--margin);
    position: absolute;
    left: var(--window-width);
    top: 0;
}

#info-text p {
    margin-top: 0;
    font-size: var(--medium-size);
    font-weight: 100;
    line-height: 1.2em;
}

h1 {
    margin-top: 0;
    font-size: var(--medium-size);
}

#credits {
    text-align: left;
    width: var(--infobox-width);
    padding: var(--margin);
    position: absolute;
    left: var(--window-width);
    bottom: 0;
}

#slider {
    position: absolute;
    bottom: 0;
}

.ticks {
    font-size: var(--small-size);
}

.track,
.track-inset,
.track-overlay {
    stroke-linecap: round;
}

.track {
    stroke-width: 2px;
}

.track-inset {
    stroke: var(--black);
    stroke-width: 2px;
}

.track-overlay {
    pointer-events: stroke;
    stroke-width: 100px;
    stroke: transparent;
    cursor: crosshair;
    background-color: var(--white);
    border-radius: 10px;
    padding: 10px;
}

.handle {
    fill: var(--black);
}

.popup {
    display: none;
    position: fixed;
    left: 0;
    top: 150px;
    width: 30vw;
    max-width: 500px;
    padding: 0 1em 1em var(--margin);
    font-size: var(--medium-size);
    background-color: var(--white);
    border-radius: 10px;
}

.popup h1 {
    font-family: Helvetica, sans-serif !important;
    font-size: var(--small-size);
    font-weight: 700;
}

.popup p {
    margin-block-end: 0.5em;
}

.kaching {
    position: fixed;
    left: 0;
    top: 0;
}

#real-check,
#switch {
    font-family: 'Caveat', cursive;
    font-size: var(--medium-size);
}

#instructions {
    font-size: var(--medium-size);
    font-family: 'Caveat', cursive;
    text-align: center;
    padding: var(--margin);
    position: fixed;
    left: 0;
    bottom: 120px;
    transform: rotate(-10deg);
}


/*         media fixes         */

@media (max-aspect-ratio: 10/9) {
    body {
        overflow-x: hidden;
        overflow-y: unset;
        height: unset;
        font-size: 1.4em;
    }
    #canvas {
        width: 100vw!important;
    }
    .kaching,
    #instructions {
        display: none!important;
    }
    #info-text {
        width: unset;
        padding: 0 var(--margin) 0 var(--margin);
        margin-bottom: var(--margin);
        position: relative;
        left: 0;
        top: unset;
    }
    #info-text .divider {
        margin: 2em 0 2em 0;
    }
    #credits {
        text-align: left;
        width: unset;
        padding: var(--margin);
        position: relative;
        left: unset;
        top: unset;
    }
    #about-link {
        display: block;
        font-size: var(--medium-size);
        line-height: var(--medium-size);
        font-weight: 500;
    }
    #info-link {
        display: none;
    }
}

@media only screen and (max-width: 600px) {
    .ticks {
        font-size: 0.5em;
    }
}

@media only screen and (max-device-width: 500px) and (max-aspect-ratio: 10/9) {
    body {
        font-size: 2em;
    }
    #real-check,
    #switch {
        font-size: 1.4em;
    }
}


/*         fuck you iOS         */


/*@media all and (device-width: var(--iphone-se-w)) and (device-height: var(--iphone-se-h)) {
    body {
        font-size: 2em;
    }
    body,
    #vis,
    #vis #canvas {
        width: var(--iphone-se-w);
        height: var(--iphone-se-h);
    }
    .kaching {
        display: none!important;
    }
}


@media all and (device-width: var(--iphone-xr-w)) and (device-height: var(--iphone-xr-h)) {
    body {
        font-size: 2em;
    }
    body,
    #vis,
    #vis #canvas {
        width: var(--iphone-xr-w);
        height: var(--iphone-xr-h);
    }
    .kaching {
        display: none!important;
    }
}

@media all and (device-width: var(--iphone-12pro-w)) and (device-height: var(--iphone-12pro-h)) {
    body {
        font-size: 2em;
    }
    body,
    #vis,
    #vis #canvas {
        width: var(--iphone-12pro-w);
        height: var(--iphone-12pro-h);
    }
    .kaching {
        display: none!important;
    }
}

@media all and (width: 828px) and (height: 1792px) {
    body {
        font-size: 24px;
    }
    body,
    #vis,
    #vis #canvas {
        width: 828px;
        height: 1792px;
    }
    .kaching {
        display: none!important;
    }
} */