/* ==============================
   Body and General Typography
   ============================== */

body {
    background-color: #fff;
    font-family: "Lato", sans-serif;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 75%;
    margin: auto;
}

h1 {
    display: block;
    font-size: 180%;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    font-weight: 700;
}

h2 {
    display: block;
    font-size: 130%;
    color: #000;
    padding-top: 20px;
    font-weight: 700;
    margin: 1em 0 .4em;
}

h3 {
    display: block;
    font-size: 110%;
    margin: 0;
    font-style: italic;
}

p, li {
    text-align: left;
}

p.caption {
    text-align: center;
    display: block;
    font-size: 85%;
}

p.media {
    text-align: center;
    display: block;
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -.25em;
}

sup {
    top: -.5em;
}

hr {
    border: 0;
    width: 80%;
    color: #818181;
    background-color: #818181;
    height: 1px;
}


/* ==============================
   Images
   ============================== */

img {
    display: block;
    margin-left: 0;
    margin-right: auto;
    border: 1px solid #ddd;
    padding: 5px;
    max-width: 90%;
}


/* ==============================
   Links
   ============================== */

a {
    color: #005EA2;
    text-decoration: none;
}

.abstractexception {
    color: black;
}


/* ==============================
   Article Sections and Formatting
   ============================== */

.abstract {
    background-color: #f2f2f2;
    border-left: 5px solid #818181;
    padding: 5px 20px;
}

.hangingindent {
    padding-left: 22px;
    text-indent: -22px;
}

.center,
.footnote {
    scroll-margin-top: 1px;
}


/* ==============================
   Tables
   ============================== */

table {
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid black;
}

th, td {
    padding: 1px;
}

.no-border,
.no-border th,
.no-border td {
    border: none;
}


/* ==============================
   Boxes
   ============================== */

.box {
    border: 1px solid black;
    padding: 10px;
}

.box p {
    margin: 0;
}


/* ==============================
   Reading Progress Bar
   ============================== */

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(to right, #2563eb, #8b5cf6);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.35);
    z-index: 9999;
}


/* ==============================
   Sidebar
   ============================== */

.sidenav {
    width: 200px;
    height: 100%;
    position: fixed;
    z-index: 1;
    overflow: visible;
    background-color: #fff;
    padding-top: 0;
    border-right: 1px solid #818181;
    transition: width 0.3s ease;
}

.sidenav a {
    padding: 6px 8px 6px 16px;
    text-decoration: none;
    font-size: 120%;
    color: #818181;
    display: block;
}

.sidenav a:hover {
    color: #f1f1f1;
}

.sidenav a.active {
    font-weight: bold;
    border-left: 3px solid black;
    padding-left: 10px;
}

/* Collapse Sidebar */

.sidenav.hidden {
    width: 0;
    border-right: none;
}

/* Hide Links When Collapsed */

.sidenav.hidden a {
    display: none;
}


/* ==============================
   Sidebar Toggle Button
   ============================== */

.sidenav-toggle {
    position: absolute;
    top: -4px;
	right: 20px;
    left: calc(100% - 30px);
    width: 40px;
    padding: 6px 8px;
    background: none;
    border: none;
    text-align: center;
    font-size: 20px;
    color: #818181;
    cursor: pointer;
    z-index: 100;
    transition: left 0.3s ease;
}

.sidenav-toggle:hover {
    color: black;
}

/* Move Button to Left Edge When Collapsed */

.sidenav.hidden .sidenav-toggle {
    left: -20px;
}


/* ==============================
   Main Article Content
   ============================== */

.main {
    margin-left: 200px;
    padding: 0 10px;
    height: 100%;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    transition: margin-left 0.3s ease;
}

/* Expand Article Into Freed Space */

.main.expanded {
    margin-left: 0;
    max-width: none;
    width: auto;
    box-sizing: border-box;
}

/* ==============================
   Citation Hover
   ============================== */

a.citation {
    color: inherit;
    text-decoration: none;
}

a.citation:hover {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

/* ==============================
   Responsive Layout: Screens 700px and Below
   ============================== */

@media screen and (max-width: 700px) {
    .sidenav {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
    }

    .sidenav a {
        float: left;
        text-align: center;
        border-right: none;
    }

    .main {
        margin-left: 0;
    }
}


/* ==============================
   Responsive Layout: Screens 400px and Below
   ============================== */

@media screen and (max-width: 400px) {
    .sidenav a {
        text-align: center;
        float: none;
        border-right: none;
    }
}
