:root {
    --sunlight: #F7FFF5;
    --black: #222222;
    --fern: #85AF69;
    --faded: #5F7D4B;
}

body {
    height: 100vh;
    margin: 0;
    background-color: var(--sunlight);
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

canvas {
    padding: inherit;
    max-width: 100%;
}

legend,
label, 
small {
    font-family: "Farro", sans-serif;
    font-weight: 300;
    font-size: small;
    color: var(--black);
}

h1 {
    font-family: "Farro", sans-serif;
    font-weight: 400;
    color: var(--black);
}

nav {
    display: grid;
    width: 100%;
    grid-template-columns: 0.5fr 2fr 0.5fr;
    justify-items: center;
    align-items: baseline;
}

a {
    text-decoration: none;
    color: var(--faded);
}

a:hover {
    color: var(--fern);
    text-decoration: underline 2px var(--fern);
}

header.asleep {
    animation: sleep 10s ease-in-out forwards;
}

header:not(.asleep) {
    animation: wake 0.2s ease-in-out forwards;
}

body.asleep * {
    cursor: none;
}

@keyframes sleep {
    from {
        opacity: 1;
        display: auto;
    }

    to {
        opacity: 0;
        display: none;
    }
}

@keyframes wake {
    from {
        opacity: 0;
        display: none;
    }

    to {
        opacity: 1;
        display: auto;
    }
}

fieldset {
    border-radius: 5px;
    border-color: #85AF69;
}

#rightward {
    float: right;
}

/* Avoid linebreaks between input and label */
span {
    display: inline-block;
}