/* General Styles */
body {
    font-family: Helvetica, Arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}
h2 {
    border-bottom-width: .04em;
    border-bottom-style: solid;
}
/* option to pad heading from top of page when jumping */
/* h2::before, h3::before, h4::before, h5::before, h6::before {
    display: block;
    content: " ";
    margin-top: -2.3em;
    height: 2.3em;
    visibility: hidden;
    pointer-events: none;
} */
/* smoother display */
blockquote, pre, .notices, ol, ul {
    display: flow-root;
}
/* blockquotes and notices */
blockquote h2, .notices h2 {
    border: none;
}
/* copy to clipboard buttons */
.copy-to-clipboard:hover, .copy-to-clipboard:focus,
/* adding "pre" to overwrite other learn2 stylesheet */
pre .copy-to-clipboard:hover, pre .copy-to-clipboard:focus {
    border-width: 2px;
    border-style: solid;
    outline-width: 1px;
    outline-style: solid;
}

/* Header */

header {
    display: flex;
    flex-wrap: wrap;
    padding: .3em .5em;

    font-size: 2.3em;
    line-height: 2.1;
}
header a {
    text-decoration: none;
}
header a:hover, header a:focus {
    outline-width: 2px;
    outline-style: solid;
}
.header-logo {
    max-width: 35%;
    min-width: 10em;
}
.header-logo img {
    margin: 0;
}
.header-text {
    margin: auto;
}
.header-logo, .header-text {
    padding: .3em .5em;
}

/* Page Navigation */

.page-nav {
    display: flex;
    flex-wrap: wrap;
    width: initial;
    margin: 0;
    padding: 0;

    list-style: none;
    justify-content: space-between;

    font-size: 1em;
    white-space: normal;
    text-align: center;

    background-color: transparent;
}
.page-nav li {
    margin: initial;
}
.page-nav.first {
    justify-content: flex-end;
}

/* Primary Navigation */

/* menu toggle */
.show-menu-wrapper {
    display: none;
    width: 19em;
    padding: .5em;
}
#hide-menu {
    display: none;
    margin-bottom: .5em;
}
#hide-menu, #show-menu {
    font-size: .9em;
}
/* sidebar */
.sidebar-wrapper {
    float: left;
    padding-right: 3em;
    padding-bottom: 2em;
}
#sidenav {
    width: 19em;
    padding: .5em;
    letter-spacing: .02em;
}
#sidenav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
#sidenav ul ul {
    display: none;
    padding: 0 0 0 1em;
}
#sidenav .nav-item {
    display: block;
    width: 100%;
    padding: .5em 1em;

    border: none;
    border-bottom-width: 1px;
    border-bottom-style: solid;

    cursor: pointer;

    font-size: 1.2em;
    text-align: left;
    line-height: 2em;
    text-decoration: none;

    color: inherit;
    background-color: transparent;
}
#sidenav ul ul .nav-item {
    font-size: 1.1em;
}
#sidenav nav>ul>:last-child>.nav-item {
    border: none;
}
#sidenav nav>ul>:last-child>.nav-item.toggle-btn {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}
#sidenav .nav-item:hover, #sidenav .nav-item:focus {
    outline: none;
}
#sidenav a.nav-item {
    text-decoration: none;
}
#sidenav a.nav-item:hover, #sidenav a.nav-item:focus {
    text-decoration: underline;
}
#sidenav .show>ul {
    display: block;
}
.toggle-btn {
    position: relative;
}
/* triangle toggle symbols */
.toggle-btn::after {
    position: absolute;
    top: 50%;
    right: 1.2em;
    transform: translateY(-50%);
    display: block;
    width: 0;
    height: 0;
    margin-left: .255em;

    content: "";
    border-top: .5em solid;
    border-right: .4em solid transparent;
    border-bottom: 0;
    border-left: .4em solid transparent;
}
.show>.toggle-btn::after {
    border-top: 0;
    border-bottom: .5em solid;
}
/* indicate disabled nav buttons */
#sidenav button[disabled="true"].toggle-btn:hover, #sidenav button[disabled="true"].toggle-btn:focus {
    cursor: default;
    color: inherit;
    background-color: inherit;
}

/* main/content */
.wrapper {
    margin-top: 3em;
    margin-bottom: 5em;
    margin-right: 2em;
    margin-left: 2em;
}
.contents {
    margin-left: 20em;
    margin-right: 3em;

    font-size: 1.1em;
}
.contents, .sidebar-wrapper {
    transition: transform .7s ease;
}
/* remove extra margin when sidebar is out of sight */
.full .contents {
    transform: translateX(-8.5em);
}
/* and slide sidebar out of sight to avoid complications */
.full .sidebar-wrapper {
    transform: translateX(-22em);
}
/* prevent weird behavior when initially loading the page */
.start .transition {
    transition: none;
}

/* chapter page */
.chapter {
    padding-bottom: 1.5em;
}
.chapter h1 {
    margin: auto;
    padding: 0 1em;

    border-bottom-width: .05em;
    border-bottom-style: solid;
}
#subtitle {
    margin-top: .5em;
    text-align: center;
    font-size: 1.8em;
}
.chapter-data {
    margin: .5em 0;
    text-align: center;
    font-size: 1.1em;
}

/* responsive */
@media (max-width: 1175px) {
    .wrapper {
        margin-right: 1em;
        margin-left: 1em;
    }
    header {
        font-size: 2.15em;
    }
}
@media (max-width: 1050px) {
    .contents {
        margin-right: 2em;
    }
    .full .contents {
        translate: transformX(-9em);
    }
}
@media (max-width: 975px) {
    #sidenav, .show-menu-wrapper {
        width: 17em;
    }
    .contents {
        margin-left: 17em;
        margin-right: 1em;
    }
    .sidebar-wrapper {
        padding-right: 2em;
    }
    header {
        font-size: 2em;
    }
    #hide-menu {
        display: block;
    }
    /* sidebar hidden */
    .sidebar-hidden .show-menu-wrapper {
        display: block;
    }
    .sidebar-hidden .sidebar-wrapper {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    .sidebar-hidden #sidenav {
        display: none;
    }
    .sidebar-hidden {
        overflow-y: scroll;
    }
    .full .contents {
        transform: translateX(-9em);
    }
    .full .sidebar-wrapper {
        transform: translateX(-20em);
    }
    .sidebar-hidden .contents {
        margin-left: 2em;
    }
    .sidebar-hidden.full .contents, .sidebar-hidden.full .sidebar-wrapper {
        transform: none;
    }
}
@media (max-width: 875px) {
    #sidenav, .show-menu-wrapper {
        width: 16em;
    }
    #sidenav ul .nav-item {
        font-size: 1.1em;
    }
    #sidenav ul ul .nav-item {
        font-size: 1em;
    }
    .contents {
        margin-left: 16em;
        margin-right: 0;
    }
    .sidebar-hidden .contents {
        margin-left: 2em;
        margin-right: 2em;
    }
    .full .contents {
        transform: translateX(-8em);
    }
}
@media (max-width: 830px) {
    .wrapper {
        margin-top: 2.5em;
    }
    #sidenav, .show-menu-wrapper {
        width: 15em;
    }
    #sidenav ul .nav-item {
        font-size: 1em;
    }
    #sidenav ul ul .nav-item {
        font-size: .9em;
    }
    .sidebar-wrapper {
        padding-right: 1em;
    }
    .contents {
        margin-left: 14em;
    }
    .full .sidebar-wrapper {
        transform: translateX(-17em);
    }
    .full .contents {
        transform: translateX(-6.5em);
    }
    header {
        font-size: 1.8em;
    }
}
@media (max-width: 700px) {
    .wrapper {
        margin-top: 0;
        margin-right: 0;
        margin-left: 0;
    }
    .contents {
        margin-left: 2em;
        margin-right: 2em;
    }
    #sidenav {
        width: 100%;
    }
    .sidebar-wrapper {
        float: none;
        width: 100%;

        margin-bottom: 1em;
        
        padding-top: 1em;
        padding-right: 0;
        padding-bottom: 0;
    }
    .sidebar-hidden .sidebar-wrapper {
        margin-bottom: 2em;
    }
    .sidebar-hidden .show-menu-wrapper {
        width: 100%;
    }
    .full .contents, .full .sidebar-wrapper {
        transform: none;
    }
}
@media (max-width: 430px) {
    .contents, .full .contents, .sidebar-hidden .contents {
        margin-left: .5em;
        margin-right: .5em;
    }
    h1 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        font-size: 2.8em;
    }
    body {
        word-wrap: break-word;
    }
}