:root {
    --bg-color: rgb(255, 255, 255);
    --link-color: rgb(55, 93, 197);
    --text-color: rgb(23, 43, 49);
    --hr-color: rgb(200, 200, 200);
    --logo-color: var(--text-color);
    --header-color: var(--logo-color);
    --table-head-color: rgb(232, 232, 232);
    --table-stripe-color: rgb(235, 245, 255);
    --section-border-color: rgb(223, 223, 223);
}

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-size: 17px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-wrap: break-word;
}

.main {
    padding: 0em 3em;
    max-width: 54em;
    margin: 1.5em auto 7em auto;
}

.content {
    align-content: center;
}

.content p, .content li {
    line-height: 1.8;
}

.header {
    text-align: center;
    margin: 2em 0 1em 0;
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--hr-color);
    display: flex;
    align-items: baseline;
}

.header a:link, .header a:visited, .header a:active {
    text-decoration: none;
}

nav {
    margin-top: 0.8em;
    margin-left: auto;
}

nav ul {
    display: flex;
    column-gap: 2em;
    row-gap: 0.5em;
    padding: 0;
    margin: 0;

}

nav li {
    display: inline-block;

}

a:link, a:visited, a:active {
    color: var(--link-color);
}

.header a:hover {
    text-decoration: underline;
}

.logo {
    font-family: var(--font-logo);
    font-weight: bold;
    font-size: 1.2em;
}

.logo, .logo a:link, .logo a:visited, .logo a:active {
    color: var(--logo-color);
    text-decoration: none;
}

h1, h2, h3, h4 {
    color: var(--header-color);
}

h1 {
    line-height: 1.2;
    font-size: 1.6em;
}

h2 {
    line-height: 1.3;
    font-size: 1.3em;
}

h3 {
    line-height: 1.3;
    font-size: 1.15em;
}

h4 {
    font-size: 1em;
    line-height: 1.3;
}

h1, h2, h3, h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 + h1, h1 + h2, h1+ h3, h1 + h4,
h2 + h1, h2 + h2, h2 + h3, h2 + h4,
h3 + h1, h3 + h2, h3 + h3, h3 + h4,
h4 + h1, h4 + h2, h4 + h3, h4 + h4 {
    margin-top: 0;
}

sup {
    font-size: 0.7em;
}

sup a:link, sup a:active, sup a:visited {
    text-decoration: none;
}

mark {
    padding: 0.1em 0.3em;
    background-color: rgb(209 255 185);
}

pre, code {
    background-color: rgb(245, 245, 245);
    font-size: 0.9em;
}

p code {
    padding: 0.2em 0.4em;
}

pre {
    display: block;
    width: 100%;
    overflow-x: auto;
    padding: 0.5em 1em;
}

.content table {
    border: 1px solid var(--section-border-color);
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.9em
}

.content thead {
    background-color: var(--table-head-color);
}

.content td, .content th {
    padding: 0.4em 2.5em 0.4em 1em;
}

.content tr:nth-child(even) {
  background-color: var(--table-stripe-color);
}

.content li {
    line-height: 1.6;
    margin-bottom: 0.3em;
}


img {
    max-width: 100%;
}

.top-note {
    font-size: 0.9em;
    font-style: italic;
    text-align: right;
}

p.top-note + h1 {
    margin-top: 1.4em;
}

.footnotes-sep {
    margin-top: 4em;
    border: none;
    height: 1px;
    color: var(--hr-color);
    background-color: var(--hr-color);
}

.footnotes {
    font-size: 0.9em;
}

.post-list-date {
    font-size: 0.8em;
    font-style: italic;
}

.post-date {
    font-size: 0.8em;
    font-style: italic;
}

.error-title {
    font-size: 4em;
    font-weight: bold;
    margin: 0.2em auto 0 auto;
    text-align: center;
    text-shadow: 4px 4px rgba(255, 100, 200, 1), -4px -4px rgba(100, 255, 200, 1);
    transition: all 0.5s;
}

.error-title:hover {
    text-shadow: 8px 8px rgba(255, 100, 200, 1), -8px -8px rgba(100, 255, 200, 1);
}

.error-subtitle {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
}

/*
 * Narrow screens
 */

 @media (max-width: 46em) {
    .main {
        max-width: inherit;
        padding: 0 0.5em;
        margin: 1.5em 0.5em 7em 0.5em;
    }

    .header {
        display: block;
    }
     
     nav, nav ul, nav li {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 20em) {
    nav, nav ul, nav li {
        flex-flow: column;
    }
}
