:root {
    --primary-color: #e18510;
    --secondary-color: #9e3748;

    --text-color: #f2f2f2;
    --background-color: #222;
    --background-color-variant: #111;

    --font-family-sans-serif: -apple-system, 'Ubuntu', system-ui, sans-serif;
    --font-family-monospace: 'Ubuntu Mono', monospace;
}

body.light {
    --primary-color: #e18510;
    --secondary-color: #9e3748;

    --text-color: #222;
    --background-color: #f8f8f8;
    --background-color-variant: #d8d8d8;
}

::selection {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    font-size: 1em;
    line-height: 1.4;
}

@media (max-width: 400px) {
    html {
        font-size: 0.9em;
    }
}

body {
    font-family: var(--font-family-sans-serif);
    color: var(--text-color);
    background-color: var(--background-color);
}

code {
    padding: 0.15em 0.3em;
    background-color: var(--background-color-variant);
    font-family: var(--font-family-monospace);
}

pre code {
    padding: initial;
}

body :not(pre) > code[class*='language-'],
body pre[class*='language-'] {
    background-color: var(--background-color-variant);
}

body pre[class*='language-'] {
    border-radius: unset;
}

a {
    color: inherit;
}

a:hover,
button:hover,
:focus {
    outline: 0.2rem solid var(--primary-color);
    outline-offset: 0.1rem;
    cursor: pointer;
}

ul {
    list-style-type: '–\00a0\00a0';
}

li {
    margin-top: 1em;
    margin-bottom: 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1em;
    margin-bottom: 0.4em;
    font-weight: 900;
}

p,
pre {
    margin-top: 1em;
    margin-bottom: 1em;
}

p {
    line-height: 1.6;
}

h1 {
    font-size: 2.6em;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.5em;
}

h4 {
    font-size: 1.2em;
}

h5 {
    font-size: 1.1em;
}

h6 {
    font-size: 1em;
}

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

h1 + p,
h2 + p,
h3 + p,
h4 + p,
h5 + p ,
h6 + p,
h1 + ul > li,
h2 + ul > li,
h3 + ul > li,
h4 + ul > li,
h5 + ul > li,
h6 + ul > li,
h1 + ol > li,
h2 + ol > li,
h3 + ol > li,
h4 + ol > li,
h5 + ol > li,
h6 + ol > li {
    margin-top: 0;
}

/* Surcharge highlight.css */
body code[class*='language-'],
body pre[class*='language-'] {
    font-family: var(--font-family-monospace);
}

body pre[class*='language-'] {
    margin-top: 1em;
    margin-bottom: 1em;
}

.btn-go-to-content {
    position: absolute;
    left: -9999em;
    top: 1em;
}

.btn-go-to-content:focus {
    left: 1em;
}

.wrapper {
    max-width: 56em;
    margin: 0 auto;
    padding: 1.4em;
}

.site-title {
    font-size: 1.4em;
    font-weight: 900;
    font-family: var(--font-family-monospace);
    text-decoration: none;
    background-color: var(--text-color);
    color: var(--background-color);
    padding: 0.1em 0.4em;
}

.site-footer {
    text-align: center;
    font-size: 0.8em;
}

.article-header {
    padding: 0.5em 1em;
    background-color: var(--background-color-variant);
    font-size: 0.86em;
}

.article-header p {
    margin-top: 0;
    margin-bottom: 0;
}

.metadata-items {
    margin: 0;
    margin-bottom: 0;
    padding: 0;
    list-style-type: none;
}

.metadata-item {
    margin-right: 2em;
    display: inline-block;
}

.site-header {
    display: flex;
    justify-content: space-between;
}

.switch-theme {
    background-color: var(--background-color-variant);
    border: none;
    padding: 0.4em 0.7em;
}

.switch-theme::before {
    content: '☀️';
}

.light .switch-theme::before {
    content: '🌑';
}
