#main-grid > main {
    grid-area: content;
    color: #222;
}

#main-grid > header {
    grid-area: header;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 1em;
    border-bottom: 1px solid #ddd;
}

#main-grid > footer {
    grid-area: footer;
    color: #eee;
    font-size: small;
    text-align: right;
}

#top-title {
    font-size: 1.4em;
}

#top-nav {
    line-height: 2.5;
    user-select: none;
}

#toc {
    grid-area: toc;
    border-bottom: 2px dashed #ccc;
    margin-bottom: 1.5em;
    padding-bottom: 1.8em;
}

#toc ul {
    margin: 0 0 0 1.2em;
    padding: 0.1em;
}

#main-grid {
    display: grid;
    grid-row-gap: 10px;
    grid-template-areas:
        "header"
        "toc"
        "content"
        "footer";
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

@media only screen and (min-width: 1000px) and (min-device-width: 700px) {
    #main-grid {
        grid-template-areas:
            "header  header"
            "toc     content"
            "footer  footer";
        grid-column-gap: 2.5em;
        grid-row-gap: 20px;
        grid-row-gap: 1em;
        grid-template-columns: 1fr 4fr;
    }

    #toc {
        border-bottom: none;
        font-size: 0.9em;
    }

    #main-grid > main > h1:first-child {
        margin-top: 0;
    }
}

@media only print {
    #main-grid > header, #main-grid > footer, #toc {
        display: none;
    }
}
html, body {
    font: 16px/1.6 Helvetica, arial, sans-serif;
}

body {
    margin: 1em;
}

#top-nav a {
    margin-left: 0.5em;
    padding: 5px 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: linear-gradient(0, #eaeaea, #fff);
    box-shadow: 0 0 1px 1px rgba(255,255,255,0.8) inset, 0 1px 0 #ccc;
    text-shadow: 0 1px 0 rgba(255,255,255,.8);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    background-clip: padding-box;
}

#top-nav a:hover, #top-nav a:focus {
    outline: 0;
}

#top-nav a:active {
    position: relative;
    top: 1px;
}

#toc a em {
    font-size: 0.95em;
}

a {
    color: #0E68C1;
    text-decoration: none;
    transition: color 250ms ease-out;
}

a:hover {
    color: darkblue;
}

h1, h2, h3, h4, h5, h6 {
    margin: 1.1em 0 0.7em;
    padding: 0;
    font-weight: bold;
}

h1 {font-size: 2.25em;}
h2 {font-size: 1.75em; border-bottom: 1px solid #eee;}
h3 {font-size: 1.5em; font-weight: normal;}
h4 {font-size: 1.25em;}
h5 {font-size: 1em;}
h6 {font-size: 1em;}

p, blockquote, ul, ol, dl, table, pre {
    margin: 1em 0;
}

dl {
    padding: 0;
}

dl dt {
    font-weight: bold;
    padding: 0;
    margin: 1em 0 0.35em;
}

dd {
    margin: 1em 0 1em 1.8em;
}

li {
    margin: 0.15em 0;
}

hr {
    margin: 1.75em 0 0.8em 0;
    border: none;
    border-bottom: 1px solid #ccc;
}

h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
    margin-top: 0;
}

li p.first {
    display: inline-block;
}

ul, ol {
    padding-left: 1.5em;
}

blockquote {
    border-left: 4px solid #dddddd;
    padding: 0 15px;
    color: #777777;
}

table {
    border-collapse: collapse;
    margin: 1em 0;
    padding: 0;
}

table tr {
    border-top: 1px solid #cccccc;
    background-color: white;
    margin: 0;
    padding: 0;
}

table tr:nth-child(2n) {
    background-color: #f8f8f8;
}

table tr th, table tr td {
    border: 1px solid #ccc;
    text-align: left;
    margin: 0;
    padding: 6px 13px !important;
}

table thead th {
    text-align: center;
}

img {
    max-width: 100%;
}

main code {
    margin: 0 2px;
    padding: 0 5px;
    border: 1px solid #eaeaea;
    background-color: #f8f8f8;
    border-radius: 3px;
    font-size: 0.95em;
}

pre code {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-all;
    background: transparent;
}

pre {
    background-color: #f8f8f8;
    border: 1px solid #cccccc;
    padding: 6px 10px;
    border-radius: 3px;
}

pre code {
    background-color: transparent;
    border: none;
}

/* Make word-break more aggressive if page is narrow, to avoid scrolling: */
p > a {word-break: break-all}
@media (min-width: 400px) {
    p > a {word-break: normal}
    p code {white-space: nowrap}
}

kbd {
    display: inline-block;
    border-radius: 3px;
    padding: 1px 6px;
    margin: 0 2px;
    font-size: small;
    background-color: #fafbfc;
    color: #444d56;
    border: solid 1px #c6cbd1;
    border-bottom-color: #959da5;
    box-shadow: inset 0 -1px 0 #959da5;
    vertical-align: middle;
}

.sourceLine {color: black}
.sourceCode span.kw {font-weight: bold}
.sourceCode span.st {color: goldenrod}
.sourceCode span.co {color: gray}
.sourceCode span.do {color: gray}
.sourceCode span.dv {color: blue}
.sourceCode span.bn {color: blue}
.sourceCode span.fl {color: purple}
.sourceCode span.dt {color: purple}
.sourceCode span.al {color: green; font-weight: bold}
.sourceCode span.er {color: red; font-weight: bold}
