:root {
    --main-width: 60em;
    --side-width: 15em;
    --column-gap: 1.5em;
    --padding: 30px;
}

body {
    display: grid;
    grid-template-areas: "hmenu header padding"
                             "menu content padding";
    grid-template-columns: var(--side-width)
                              var(--main-width)
                              var(--side-width);
    grid-template-rows: 65px auto;
    column-gap: var(--column-gap);
    justify-content: center;
    margin: 0;
    padding: var(--padding);
    background-color: #dadada;
    min-height: calc(100vh - var(--padding)*2);

    font-size: 13pt;
    font-family: sans-serif;
    position: relative;
    z-index: -2
}

img {
    max-width: 100%;
}

.recaman {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

menuheader {
    grid-area: hmenu;
    display: flex;
    align-items: end;

    background-color: rgba(240,240,240, 0.6);
    border-bottom: 2pt solid black;
    padding-bottom: 2pt;
    padding-left: 15pt;
    font-size: 160%;
}

menu {
    grid-area: menu;
    align-self: stretch;
    display: flex;
    flex-direction: column;

    background-color: #fff;
    padding: var(--padding) calc(var(--padding)/2);
    margin: 0;
}

#menubutton, #checked, #unchecked {
    display: none;
}

#current {
    font-weight: bold;
    text-decoration: none;
    color: black;
}

#current:hover {
    cursor: default;
}

header {
    grid-area: header;
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: right;

    font-size: 250%;
    background-color: rgba(255,255,255, 0.8);
    border-bottom: 2px solid black;
    padding-right: var(--padding);
    margin: 0;
}

content {
    grid-area: content;

    background-color: #fff;
    padding: 0 var(--padding) var(--padding);
    margin-top: 0;
}

.meta {
    display: flex;
    flex-direction: row;
    align-items: bottom;
    justify-content: space-between;
}

#timestamp {
    display: flex;
    flex-direction: column;
    justify-content: center;

    font-size: 90%;
    color: #777;
    text-align: right;
}

.hidden {
    display: none;
}

em {
    color: #555;
}

@media screen and (max-width: 1675px) {
    body {
        grid-template-areas: "hmenu header"
                                 "menu content";
        grid-template-columns: var(--side-width)
                                  var(--main-width);
        justify-content: left;
    }
}
@media screen and (max-width: 1392px) {
    :root {
        --main-width: auto;
    }
    body {
        justify-content: stretch;
    }
}
@media screen and (max-width: 1128px) {
    :root {
        --main-width: 3fr;
        --side-width: 1fr;
    }
}
@media screen and (max-width: 766px) {
    :root {
        --padding: 15px;
    }
    body {
        grid-template-areas: "header"
                                 "content";
        grid-template-columns: var(--main-width);
        font-size: 10pt;
    }
    menuheader {
        display: none;
    }
    menu {
        grid-area: content;
        padding: var(--padding);
        background-color: #f5f5f5;

        transition: width 0.3s, visibility 0.3s;
        visibility: hidden;
        width: 0;
    }
    label {
        grid-area: header;
        justify-self: left;
        align-self: end;
        margin-left: 8pt;
        display: flex;
        height: 63px;
        width: 63px;
    }
    #unchecked {
        background-image: url('/static/menu.svg');
        background-size: contain;
        height: 63px;
        width: 63px;
        display: initial;
    }
    #checked {
        background-image: url('/static/backmenu.svg');
        background-size: contain;
        height: 63px;
        width: 63px;
        display: initial;
        visibility: hidden;
    }
    #menubutton:checked ~ menu {
        visibility: initial;
        width: calc(100vw - var(--padding)*4);
    }
    #menubutton:checked ~ #checked {
        visibility: initial;
    }
    #menubutton:checked ~ #unchecked {
        visibility: hidden;
    }
}
