/* CSS reset */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Now apply relevant style */

body {
    font-size: 1rem;
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.4;
    color: #222
}

.content-wrapper {
    margin: 20px auto;
    max-width: 800px;
}

@media (max-width: 1000px) {
    .content-wrapper {
        max-width: 600px;
    }
}

ol, ul {
    margin-top: 15px;
    margin-bottom: 15px;
    margin-left: 45px;
    margin-right: 20px;
}

p {
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 1em;
}

a {
    color: #2674d3;
}

h1, h2, h3, h4 {
    color: #111;
    margin-left: 20px;
    margin-right: 20px;
}

h1 {
    font-size: 3rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
    padding-top: 32px;
    padding-bottom: 24px;
}

h3 {
    color: #333;
    font-size: 1.6rem;
    padding-top: 18px;
    padding-bottom: 16px;
}

h4 {
    color: #888;
    font-size: 1rem;
    padding-top: 8px;
    padding-bottom: 10px;
}

@media (max-width: 700px) {
    h1 {
        font-size: 2.5rem;
        padding-top: 2.5rem;
        padding-bottom: 1.5rem;
    }
    h2 {
        font-size: 1.8rem;
        padding-top: 28px;
        padding-bottom: 20px;
    }
    h3 {
        font-size: 1.5rem;
        padding-top: 16px;
        padding-bottom: 14px;
    }
}

@media (max-width: 500px) {
    h1 {
        font-size: 2rem;
        padding-top: 2rem;
        padding-bottom: 1rem;
    }
    h2 {
        font-size: 1.6rem;
        padding-top: 24px;
        padding-bottom: 18px;
    }
    h3 {
        font-size: 1.4rem;
        padding-top: 14px;
        padding-bottom: 12px;
    }
}

hr {
    height: 2px;
    background: linear-gradient(to left, #09a5b8, #076591);
    border: none;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Tables */

table.mdz-table {
    width: calc(100% - 40px);
    margin: 25px 20px;
}

table.mdz-table tr {
    border-top: 1px solid #cccccc;
    background-color: white;
}

table.mdz-table tr th {
    font-weight: bold;
    border: 1px solid #cccccc;
    text-align: left;
    margin: 0;
    padding: 8px 15px;
}

table.mdz-table tr td {
    border: 1px solid #cccccc;
    text-align: left;
    margin: 0;
    padding: 8px 15px;
}

table.mdz-table tr th :first-child, table.mdz-table tr td :first-child {
    margin-top: 0;
}

table.mdz-table tr th :last-child, table tr td :last-child {
    margin-bottom: 0;
}

/* Small devices */
@media (max-width: 600px) {
    table tr td {
        padding: 8px 8px;
    }
}

/* Code */

code, pre {
    font-family: monospace;
    white-space: pre-wrap;
}

.mendoza-codeblock {
    margin: 20px;
    line-height: 1.2;
    border-radius: 5px;
    padding: 10px;
    background: #f8f8f8;
    color: #111;
}

/* Docstrings */

.binding-wrap {
    padding: 15px 20px;
}

.binding-realval {
    font-family: monospace;
    background: #eee;
    padding: 4px;
}

.binding-type {
    float: right;
}

.binding {
    font-size: 1.4em;
    color: steelblue;
}

.source-map {
    color: steelblue;
    font-size: 0.8em;
}

.docstring {
    border-bottom: solid 2px steelblue;
}

/* Tables */

.mendoza-table {
    width: calc(100% - 40px);
    margin: 25px 20px;
}

.mendoza-table tr {
    border-top: 1px solid #cccccc;
    background-color: white;
}

.mendoza-table tr th {
    font-weight: bold;
    border: 1px solid #cccccc;
    text-align: left;
    margin: 0;
    padding: 8px 15px;
}

.mendoza-table tr td {
    border: 1px solid #cccccc;
    text-align: left;
    margin: 0;
    padding: 8px 15px;
}

.mendoza-table tr th :first-child, table tr td :first-child {
    margin-top: 0;
}

.mendoza-table tr th :last-child, table tr td :last-child {
    margin-bottom: 0;
}

/* Embedded content */

.mendoza-video {
    padding: 20px;
}

.gist {
    padding: 20px;
}

.asciinema-wrap {
    padding: 20px;
}

/* Footer */

footer {
    color: #888;
    padding: 40px;
    text-align: center;
}

/* Syntax */

/* Monokai colors */
.mdzsyn-comment {color: #888888;}
.mdzsyn-operator {color: #9e71df;}
.mdzsyn-number {color: #9e81ef;}
.mdzsyn-keyword {color: #e92662;}
.mdzsyn-string {color: #26bb00;}
.mdzsyn-identifier {color: #a6e22e;}
.mdzsyn-symbol {color: #568aca;}
.mdzsyn-coresym {color: #ed871f;}

.mdzsyn-constant { color: #eb8756; }
.mdzsyn-character { color: red; }
.mdzsyn-type { color: green; }
.mdzsyn-line { color: darkgray; }

/* Table of contents and sidebar */

.subtitle {
    text-align: center;
}

.twocol {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
}

@media (min-width: 1400px) {
    .twocol {
        display: block;
    }
    .toc {
        position: absolute;
    }
}

@media (max-width: 800px) {
    .main-content {
        margin-top: 35px;
    }
    .twocol {
        flex-direction: column;
    }
    .toc {
        background: #f2f2f2;
        width: calc(100% - 60px);
    }
    .prevnext-text a {
        padding: 5px;
        background: gray;
    }

}

/*
 * Table of Contents
 */

.toc-hidden {
    display: none;
}

.toc {
    padding-left: 30px;
    padding-right: 30px;
    padding-top: 72px;
    padding-bottom: 45px;
}

.toc a {
    text-decoration: none;
}

.toc span {
    padding: 2px;
}

.toc span.selected {
    background: #0765911a;
}

.toc span:hover {
    background: #0765911a;
}

.toc ul {
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 12px;
    margin-right: 0px;
}

.toc ul li {
    text-decoration: none;
    color: #076591;
    font-size: 1rem;
}

/* Toc Toggle */

#toc-toggle {
    text-align: center;
    padding: 6px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

#toc-toggle .bar {
    margin: 7px;
    height: 4px;
    width: 28px;
    border-radius: 2px;
    background: #CCC;
}

#toc-toggle.open .topbar {
    transform: rotate(-45deg) translate(-5px, -2px);
}

#toc-toggle.open .botbar {
    transform: rotate(45deg) translate(-5px, 2px);
}

/* Prev Next bar */

.prevnext-bar {
    padding: 40px 15px;
    margin: 10px 0;
}

.prev, .next {
    color: #076591;
}

.prev {
    float: left;
}

.prev .prevnext-text::before {
    content: "< ";
}

.next {
    float: right;
    margin-left: 30px;
}

.next .prevnext-text::after {
    content: " >";
}
