html {
    font-size: 16px;
}

body {
    font-family: sans-serif;
    margin: 0;
}

p:first-child {
    margin-top: 0;
}

main {
    padding: 0 0.5rem;
}

@media screen and (min-width: 800px) {
    main, header, footer {
        width: 800px;
        margin: 0 auto;
    }
}

#breadcrumbs {
    padding: 0.5rem;
    background: black;
    color: white;
}
#breadcrumbs a {
    color: white;
}

#breadcrumbs ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}
#breadcrumbs ul > li.spacer::before {
    content: '↓';
}
#breadcrumbs ul > li ~ li {
    margin: 0.5em 0 0 0;
}

@media screen and (min-width: 800px) {
    #breadcrumbs ul {
        flex-direction: row;
    }
    #breadcrumbs ul > li.spacer::before {
        content: '→';
    }
    #breadcrumbs ul > li ~ li {
        margin: 0 0 0 1em;
    }
}

#header {
    text-align: center;
}

body.index .table-of-contents {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.index .table-of-contents .part ~ .part {
    margin-top: 2em;
}

body.index .table-of-contents li {
    margin: 0.5em 0;
}

body.index #introduction {
    font-size: 1.1rem;
}

.table-of-contents ol {
    list-style: none;
}
.table-of-contents .parts {
    padding-left: 0;
}

main img {
    margin: 1em 0;
}

footer {
    background: #111;
    color: white;
    padding: 1rem;
    margin-top: 5rem;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: .25rem;
}

.tikzpicture{
    max-width: 100%;
    width: 100%;
}

.flushright{
    text-align: right;
}

.fbox{
    border: 1px solid;
    display: inline-block;
    padding: 3pt;
}

.minipage{
    display: inline-block;
}

pre, code {
    padding: 0.3em;
    color: #333;
    word-break: break-all;
    word-wrap: break-word;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}
code {
    display: inline-block;
}
pre {
    padding: 0.5em;
    display: block;
    margin: 1em 0;
    font-size: 1rem;
}

.centered{
    display:block;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

h4 {
    font-size: 1.3rem;
}
h5 {
    font-size: 1.15rem;
}

.hidden {
    display:none;
}

* ~ .section {
    margin-top: 5rem;
}

* ~ .subsection {
    margin-top: 3rem;
}

img {
    max-width: 100%;
    max-height: 60vh;
    border: 0;
    -ms-interpolation-mode: bicubic;
    vertical-align: middle;
}

tr, img {
    page-break-inside: avoid;
}

.figure {
    display: block;
    text-align: center;
    margin: 1em 0;
    width: 100%;
}

.figure img {
    border: none;
    margin: 0 auto;
}

.figure .caption::before {
    content: "Figure: ";
}

.vimeo-aspect-ratio iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0; top: 0;
}

.vimeo-aspect-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.recap-aspect-ratio iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0; top: 0;
}

.recap-aspect-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.youtube-aspect-ratio iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0; top: 0;
}

.youtube-aspect-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}


.numbas-aspect-ratio iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0; top: 0;
}

.numbas {
    width: 100%;
}

.oembed > iframe {
    margin: 0 auto;
    display: block;
    width: 100%;
}

.theme-switch {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    margin-top: 0.5rem;
}

.theme-switch .form-control {
    width: auto;
    font-size: 1em;
}

thead {
    border-bottom: solid #333 1px;
}

table {
    margin-bottom: 1em;
    line-height: 1rem;
}

table td {
    padding: 0.2rem 0.75rem;
}

table td p:last-child {
    margin-bottom: 0;
}

span.danger{
    color: #AA2222;
}


.exercise h3, .interlude h3 {
    margin-top: 1rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

.sourceCode pre {
    font-size: 1.1em;
}

.CodeMirror {
    min-height: 30px;
}

.CodeMirror-scroll {
    min-height: 30px;
}

figcaption {
    font-size: 0.7em;
}

pre.output {
    border: 1px solid #ccc;
    margin-top: -30px;
    border-top: 0;
    font-size: 1em;
    padding: 10px;
    background: #eee;
}


.thin-table {
    text-align: center;

}

.thin-table table {
    max-width: 250px;
    margin-left: 10px;
}

figure {
    text-align: center;
}

figcaption {
    font-size: 0.7em;
}

.reveal code {
    font-size: 87.5%;
    color: #e83e8c;
    word-break: break-word;
}

.ttfamily{
    font-family: "Courier New", Courier, monospace;
}

.itemize>li>p:first-of-type {
    display: inline;
}
