/* Fix box model width weirdness */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
    font-size: 12pt;
    font-family: 'Roboto', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

div.titlebar, div.content, div.footer {
    max-width: 55rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
}

div.content {
    margin-bottom: 2rem;
}

div.footer {
    text-align: right;
    margin-bottom: 2rem;
}

h1, h2, h3, h4, p, ul, table {
    margin-top: 0;
    margin-bottom: 1em;
}

h1, h2, h3, h4 {
    font-family: 'Raleway', sans-serif;
}

h1:not(:first-child), h2:not(:first-child), h3:not(:first-child), h4:not(:first-child) {
    margin-top: 1.2rem;
}

h1 {
    font-size: 1.5rem;
}
h2 {
    font-size: 1.2rem;
}
h3 {
    font-size: 1.1rem;
}
h4 {
    font-size: 1rem;
}

a {
    color: #552200;
    text-decoration: underline;
}
a:hover {
    color: #a08040;
    text-decoration: underline;
}

header {
    border-left: 0.2em solid #552200;
    padding-left: 0.5em;
    background-color: rgba(85, 34, 0, 0.05);
}

hr {
    margin-top: 0.9rem;
    margin-bottom: 0.9rem;
    box-sizing: content-box;
    border: 0;
    border-top: 1px solid #ccc;
    height: 0;
    overflow: visible;
}

div.content hr {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

div.content table {
    border-collapse: collapse;
}

div.content table thead th {
    border-bottom: 0.5pt solid black;
    padding-right: 0.5em;
}

div.content table tbody td {
    padding-right: 0.5em;
}

div.content table tbody tr:nth-child(even) {
    background-color: #eee;
}

blockquote {
    border-left: 2pt solid #3976c0;
    background-color: #eaedf1;
    margin: 1em 1em 1em 0.8em;
    padding: 0.2em 0.6em 0.2em 0.6em;
}

pre {
    border-left: 2pt solid #c0c0c0;
    background-color: #efefef;
    margin: 1em 1em 1em 0.8em;
    padding: 0.2em 0.6em 0.2em 0.6em;
    overflow-x: auto;
}

code {
    background-color: #efefef;
}

div.note {
    border-left: 2pt solid #3995c0;
    background-color: #e9f8ff;
    margin: 1em 1em 1em 0.8em;
    padding: 0.2em 0.6em 0.2em 0.6em;
}
div.note p:last-child {
    margin-bottom: 0;
}

div.warning {
    border-left: 2pt solid #c03939;
    background-color: #ffe9e9;
    margin: 1em 1em 1em 0.8em;
    padding: 0.2em 0.6em 0.2em 0.6em;
}
div.warning p:last-child {
    margin-bottom: 0;
}

/* Title styling */
.titlebar {
    display: flex;
    flex-direction: column;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.titlebar a.title {
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    color: black;
    margin-right: auto;
}
.titlebar a.title:hover {
    color: darkgrey;
}
.titlebar .nav a {
    text-decoration: none;
    font-weight: bold;
}
.titlebar .nav span {
    margin-left: 1em;
    margin-right: 1em;
}

@media (min-width: 900px) {
    .titlebar {
        flex-direction: row;
        align-items: center;
    }
}

h1.article_title {
    margin-bottom: 0.05em;
}

div.article_meta {
    font-size: 80%;
    margin-bottom: 1rem;
}