* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

html {
    width: 100%;
    height: 100%;
}

body {
    width: 100%;
    height: 100%;
}

#page-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    flex-flow: column nowrap;
    align-items: stretch;
    overflow: hidden;
}

#background-image {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-image: url("./media/background.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: -1;
}

header {
    flex: 0 0 auto;
    height: 48px;
    z-index: 10;
}

#menu-bar {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    flex-flow: row nowrap;
    justify-content: space-between;
    background-color: #402f26;
    box-shadow: 0 0 15px 2px #000000;
    z-index: 11;
}

#menu-heading {
    flex: 0 0 auto;
    height: 48px;
    line-height: 48px;
    padding-left: 10px;
    color: #dadada;
    font-size: 30px;
}

#menu-heading a {
    color: inherit;
    text-decoration: none;
}

#menu-button {
    flex: 0 0 auto;
    height: 48px;
    width: 48px;
    display: block;
    background-color: transparent;
    border: none;
}

.menu-icon-bar {
    width: 36px;
    height: 5px;
    margin: 6px auto;
    background-color: #dadada;
    border-radius: 2px;
}

#navigation {
    height: 100%;
    max-width: 100%;
    padding-top: 48px;
    position: absolute;
    top: 0;
    right: calc(-100% + -15px);
    display: flex;
    flex-flow: column nowrap;
    background-color: #1f1b18;
    box-shadow: 0 0 15px 2px #000000;
    overflow: hidden;
    z-index: 1;
    transition: right 400ms ease;
}

#nav-main-list-wrapper {
    flex: 1 1 auto;
    height: 0;
    position: relative;
    overflow: auto;
}

#navigation.menu-show {
    right: 0;
}

#nav-main-list {
    min-width: 100%;
    display: inline-block;
    list-style-type: none;
    counter-reset: nav-main-counter;
}

#nav-main-list > li {
    counter-increment: nav-main-counter;
    position: relative;
}

#nav-main-list > li > a::before {
    content: counter(nav-main-counter) ". ";
    color: inherit;
    font-size: 1.3rem;
    font-weight: bold;
    position: absolute;
    top: 15px;
    left: 20px;
}

#nav-main-list > li > a {
    width: 100%;
    padding: 15px 15px 15px calc(1.8rem + 20px);
    display: inline-block;
    color: #dadada;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    transition: color 200ms ease, background-color 200ms ease;
}

#nav-main-list > li > a:hover,
#nav-main-list > li > a:focus {
    color: #1f1b18;
    background-color: #dadada;
}

.nav-sub-list {
    list-style-type: none;
    counter-reset: nav-sublist-counter;
}

.nav-sub-list > li {
    counter-increment: nav-sublist-counter;
    position: relative;
}

.nav-sub-list > li > a::before {
    content: counter(nav-main-counter) "." counter(nav-sublist-counter);
    color: inherit;
    font-size: 1.3rem;
    font-weight: bold;
    position: absolute;
    top: 5px;
    left: 2.2rem;
}

.nav-sub-list > li > a {
    width: 100%;
    padding: 5px 15px 5px calc(2.6rem + 2.2rem);
    display: inline-block;
    color: #dadada;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    transition: color 200ms ease, background-color 200ms ease;
}

.nav-sub-list > li > a:hover,
.nav-sub-list > li > a:focus {
    color: #1f1b18;
    background-color: #dadada;
}

#nav-external-links {
    flex: 0 0 auto;
    padding: 10px;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    box-shadow: 0 0 15px 2px #000000;
}

#nav-external-links a {
    margin: 5px 5px;
    padding: 5px 10px;
    display: block;
    color: #dadada;
    font-size: 1.3rem;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 7px;
    transition: color 200ms ease, background-color 200ms ease;
}

#nav-external-links a:hover,
#nav-external-links a:focus {
    color: #1f1b18;
    background-color: #dadada;
}

#download-source-button {
    background-color: #41920a;
}

#download-app-button {
    background-color: #172ca0;
}

#manual-link {
    background-color: #6b461b;
}

#page-content-wrapper {
    flex: 1 0 auto;
    height: 0;
    overflow: auto;
    scroll-behavior: smooth;
    position: relative;
}

#splash {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#splash h1 {
    color: #dadada;
    font-size: 6rem;
}

#splash p {
    color: #ffae34;
    font-size: 1.5rem;
}

main {
    padding-bottom: 10px;
    counter-reset: section-counter;
}

.content {
    padding: 10px 10px 35px 10px;
    counter-increment: section-counter;
}

.content h2 {
    padding: 5px 0 5px 10px;
    color: #dadada;
    font-size: 2rem;
    background-color: #402f26;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.content h2::before {
    content: counter(section-counter) ". ";
}

.content .text-wrapper {
    padding: 10px;
    font-size: 1.2rem;
    background-color: #dadada;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
}

.content-with-subsections {
    counter-reset: subsection-counter;
}

.content-subsection {
    counter-increment: subsection-counter;
}

.content-subsection:not(:last-child) {
    margin-bottom: 5px;
}

.content .text-wrapper h3 {
    padding-top: 5px;
    margin-bottom: 10px;
    color: #402f26;
    font-size: 1.5rem;
}

.content-subsection h3::before {
    content: counter(section-counter) "." counter(subsection-counter) " ";
}

.content .text-wrapper p {
    text-indent: 2em;
    text-align: justify;
    margin-bottom: 10px;
}

.content .text-wrapper p:not(:last-child) {
    margin-bottom: 15px;
}

.content .text-wrapper p a {
    color: #712700;
}

.content .text-wrapper figure {
    padding-top: 5px;
    margin-bottom: 10px;
    text-align: center;
    font-style: italic;
}

.content .text-wrapper figure div {
    max-width: 100%;
    overflow-x: auto;
}

.content .text-wrapper figure:not(:last-child) {
    margin-bottom: 15px;
}

.content .text-wrapper figure img {
    max-width: 200%;
}

#fig-2 img {
    max-width: 100%;
}

.content .text-wrapper figure span {
    font-weight: bold;
    font-style: normal;
}

.content-emphasize {
    font-style: italic;
}

.plan-wrapper {
    padding-left: 11px;
}

.plan-milestone {
    padding: 10px 0 10px 19px;
    border-left: 4px solid #402f26;
}

.plan-milestone p {
    text-indent: 0 !important;
}

.plan-milestone .milestone-time {
    position: relative;
    color: #402f26;
    font-size: 1.6rem;
    font-weight: bold;
}

.plan-milestone .milestone-time::before {
    content: '';
    width: 26px;
    height: 26px;
    position: absolute;
    top: 0;
    left: -34px;
    background-color: #402f26;
    border-radius: 50%;
}

.plan-milestone .milestone-time::after {
    content: '';
    width: 18px;
    height: 18px;
    position: absolute;
    top: 4px;
    left: -30px;
    background-color: #dadada;
    border-radius: 50%;
}

.plan-milestone h3 {
    padding-top: 0 !important;
    font-size: 1.4rem !important;
    color: #000000 !important;
}

footer {
    padding: 10px 7px;
    color: #dadada;
    font-size: 1.3rem;
    text-align: center;
    background-color: #150e0b;
}

footer #image-credit {
    margin-top: 7px;
    font-size: 1rem;
}

footer #image-credit a {
    color: #da9d57;
}

@media only screen and (min-width: 560px) {
    .content .text-wrapper figure img {
        max-width: 150%;
    }

    #fig-2 img {
        max-width: 80%;
    }
}

@media only screen and (min-width: 800px) {
    html {
        font-size: 0.85em;
    }

    #page-wrapper {
        flex-direction: row;
    }

    header {
        width: 30%;
        height: auto;
        display: flex;
        flex-flow: column nowrap;
        align-items: stretch;
        overflow: hidden;
        box-shadow: 0 0 15px 2px #000000;
    }
    
    #menu-bar {
        flex: 0 0 auto;
        width: auto;
        height: 48px;
    }

    #menu-button {
        display: none;
    }
    
    #navigation {
        transition: none;
        flex: 1 0 auto;
        width: auto;
        height: auto;
        padding-top: 0;
        position: relative;
        right: 0;
        box-shadow: none;
    }
    
    #nav-main-list > li > a {
        margin: 10px 0;
        padding: 5px 20px 5px calc(1.8rem + 15px);
    }

    #page-content-wrapper {
        flex: 0 0 auto;
        width: 70%;
        height: auto;
    }

    #splash h1 {
        font-size: 6.5rem;
    }
    
    #splash p {
        font-size: 1.75rem;
    }

    .content {
        padding: 10px 10px 35px 10px;
    }

    .content .text-wrapper figure img {
        max-width: 100%;
    }
}

@media only screen and (min-width: 1100px) {
    header {
        width: 25%;
    }

    #page-content-wrapper {
        width: 75%;
    }

    .content .text-wrapper figure img {
        max-width: 80%;
    }
}

@media only screen and (min-width: 1300px) {
    header {
        width: 20%;
    }

    #page-content-wrapper {
        width: 80%;
    }

    .content .text-wrapper figure img {
        max-width: 65%;
    }
}

@media only screen and (min-width: 1800px) {
    .content .text-wrapper figure img {
        max-width: 50%;
    }
}