:root {
    --red: #c5004a;
    --green: #bbffdc;
    --blue: #0086b3;
    --darkgreen: #042200;
    --lightyellow: #ffffcc;

    --gray: #c0c0c0;
    --lightgray: #e0e0e0;
    --lightergray: #999999;
    --darkgray: #333333;
    --text: hsl(0, 0%, 10%);
    --black: #000000;

    --white: #ffffff;
    --almost-white: #f2f2f2;
    --kinda-almost-white: #e6e6e6;

    /* These are needed when we are overlaying things on top of the code */
    /* snippets. They always have the same shade irrespective or dark or */
    /* light colorschemes. */
    --always-white: #ffffff;
    --always-black: #000000;

    --main-font: "Crimson Pro", serif;
    --code-font: "DM Mono", "Inconsolata", Consolas, Menlo, Monaco,
        "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
        "Liberation Mono", "Nimbus Mono L", monospace;
    --font-weight: 300;
}
@media (prefers-color-scheme: dark) {
    :root {
        --red: #c5004a;
        --green: #bbffdc;
        --blue: #26c8ff;
        --darkgreen: #042200;
        --lightyellow: #ffffcc;

        --gray: #c0c0c0;
        --lightgray: hsl(0, 0%, 38%);
        --lightergray: hsl(0, 0%, 60%);
        --darkgray: hsl(0, 0%, 90%);
        --text: hsl(0, 0%, 95%);
        --black: #ffffff;

        --white: #000000;
        --almost-white: hsl(0, 0%, 18.8%);
        --kinda-almost-white: hsl(0, 0%, 40%);
    }
}
* {
    box-sizing: border-box;
    font-variant-ligatures: no-common-ligatures;
}
html,
body {
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--main-font);
    color: var(--text);
    background-color: var(--white);
    line-height: 1.7rem;
    font-weight: var(--font-weight);
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    color: var(--black);
    margin-bottom: 5px;
    line-height: 1;
}
h1 {
    margin-top: 50px;
    margin-bottom: 25px;
}
h2 {
    margin-top: 40px;
    margin-bottom: 15px;
}
h1 + h2 {
    margin-top: 10px;
}
h3 {
    margin-top: 20px;
}
h2 + h3 {
    margin-top: 5px;
}
h4 {
    margin-top: 10px;
}
h1 + p {
    margin-top: 5px;
}
p {
    margin: 0;
}
p + p {
    margin: 13px 0;
}
p:last-child {
    margin-bottom: 0;
}
video,
img {
    margin: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: min(90%, 37.5em);
    border-radius: 5px;
}
@media only screen and (max-width: 600px) {
    video,
    img {
        max-width: 100%;
    }
}
.tmpl-post li {
    line-height: 1.45;
}
p.lead {
    font-size: 1.375rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1.3;
}
main {
    padding: 1rem;
    max-width: 800px;
    margin: 20px auto;
}
header {
    border-bottom: 1px dashed var(--lightgray);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
}
@media only screen and (max-width: 600px) {
    header {
        padding: 20px;
        justify-content: center;
    }
}
table {
    border: 1px solid var(--gray);
    border-radius: 3px;
    overflow: auto;
    max-width: 100%;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}
table thead {
    background: var(--darkgray);
    color: var(--white);
}
table td,
table th {
    padding: 5px 10px;
    min-width: 300px;
}
@media only screen and (max-width: 600px) {
    table td,
    table th {
        min-width: 100px;
    }
}
tr:nth-child(even) {
    background-color: var(--almost-white);
}

blockquote {
    margin: 1.5em 0;
    color: var(--darkgray);
    border-left: 0.75em solid var(--darkgray);
    background-color: var(--lightgray);
    border-radius: 3px;
    line-height: 1.5;
    padding: 10px 10px 10px 23px;
}

pre,
code {
    font-family: var(--code-font);
    line-height: 1.5;
    background-color: var(--kinda-almost-white);
    padding: 2px 5px;
    margin: 0 !important;
}
h1>code{
  font-size: 1.5rem !important;
}
h2>code {
    font-size: 1.3rem !important;
}
h3>code {
    font-size: 1.1rem !important;
}
h4>code {
    font-size: 1rem !important;
}
h5>code {
    font-size: 0.9rem !important;
}
h6>code {
    font-size: 0.8rem !important;
}

b>code,
strong>code,
em>code,
i>code,
u>code,
s>code,
li>code,
a>code,
p>code{
  font-size: 0.9rem !important;
}
pre > code {
    padding: 0;
    background-color: unset;
    font-size: 0.8rem !important;
}
code {
    border-radius: 5px;
    margin-left: 5px;
    margin-right: 5px;
}
pre {
    line-height: 1.375;
    tab-size: 2;
    hyphens: none;
    padding: 0.8em !important;
    background-color: var(--almost-white);
    max-height: 400px;
    overflow: auto;
}

.faded {
    font-size: 0.8125em; /* 13px /16 */
    color: var(--gray);
}

.highlight-line {
    display: block;
    text-decoration: none; /* override del, ins, mark defaults */
    color: inherit; /* override del, ins, mark defaults */
}
/* allow highlighting empty lines */
.highlight-line:empty:before {
    content: " ";
}
/* avoid double line breaks when using display: block; */
.highlight-line + br {
    display: none;
}
.highlight-line-isdir {
    color: #b0b0b0;
    background-color: #222;
}
.highlight-line-active {
    background-color: hsl(0, 0%, 40%);
}
.highlight-line-add {
    background-color: #45844b;
}
.highlight-line-remove {
    background-color: #902f2f;
}

/* Header */
.home {
    color: var(--black);
    text-decoration: none;
    font-size: 2.5em;
    border-bottom: none;
    padding: 0 0;
    margin: 0;
}
.home a {
    color: var(--black);
}
.home a:hover {
    border-bottom: 2px solid rgba(0, 0, 0, 0);
}
.home :link:not(:hover) {
    text-decoration: none;
}

/* Nav */
.nav {
    list-style: none;
    margin: 0;
}
.nav-item {
    font-size: 1.3rem;
    padding: 5px;
    display: inline-block;
}
.nav-item-active {
    font-weight: 700;
}

/* Posts list */
.postlist {
    list-style: none;
    padding: 0;
}
.draft-tag {
    background: var(--black);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 50px;
    margin-right: 10px;
    font-size: 0.9rem;
}
.postlist-item {
    counter-increment: start-from -1;
    margin: 10px 25px;
    display: flex;
    justify-content: space-between;
    border-radius: 5px;
}
.postlist-date,
.postlist-item:before {
    font-size: 0.8125em; /* 13px /16 */
    color: var(--darkgray);
}
.postlist-date {
    word-spacing: -0.5px;
    color: var(--gray);
    text-transform: uppercase;
    /* font-weight: bold; */
}
.postlist-link {
    color: var(--darkgray);
    display: inline-block;
}
.postlist-item-active .postlist-link {
    font-weight: bold;
}
.tmpl-home .postlist-link {
    font-size: 1.1875em; /* 19px /16 */
    /* font-weight: 700; */
}

.post-read-time {
    display: none;
}
.postlist-item:hover .post-read-time {
    display: inline-block;
}

/* Tags */
.post-tag {
    display: inline-block;
    vertical-align: text-top;
    /* text-transform: uppercase; */
    font-size: 0.625em; /* 10px /16 */
    padding: 0px 10px;
    margin-left: 0.8em; /* 8px /10 */
    border: 1px solid var(--darkgrey);
    /* color: var(--darkgreen); */
    /* border-radius: 0.25em; /\* 3px /12 *\/ */
    /* border-radius: 50px; */
    text-decoration: none;
}

/* Warning */
.warning {
    background-color: var(--lightyellow);
    padding: 1em 0.625em; /* 16px 10px /16 */
}
.warning ol:only-child {
    margin: 0;
}

/* Direct Links / Markdown Headers */
.direct-link {
    text-decoration: none;
    font-style: normal;
    margin-left: 0.1em;
}
a[href].direct-link,
a[href].direct-link:visited {
    color: transparent;
}
a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
    color: var(--gray);
    border-bottom: 2px solid rgba(0, 0, 0, 0);
}

footer {
    padding: 25px 0;
    text-align: center;
    border-top: 0.2em dashed var(--kinda-almost-white);
}

a {
    text-decoration: none;
    color: var(--blue);
    border-bottom: 2px solid rgba(0, 0, 0, 0);
}

a:hover {
    border-bottom: 2px solid var(--blue);
    transition: border-bottom 0.1s ease-in-out;
}

@media only screen and (max-width: 600px) {
    .postlist-item {
        display: flex;
        border: 1px solid var(--kinda-almost-white);
        padding: 0 0.5em;
        background: var(--almost-white);
        flex-direction: column-reverse;
        margin: 5px;
        padding: 5px 10px;
        text-align: left;
    }

    .postlist-item:hover {
        border: 1px solid var(--blue);
        transition: border 0.1s ease-in-out;
    }

    a:hover {
        border-bottom: 2px solid rgba(0, 0, 0, 0);
        transition: border-bottom 0.1s ease-in-out;
    }
}
.category-title {
    color: var(--gray);
    margin-bottom: 20px;
}
.post-meta {
    color: var(--lightergrey);
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 1px;
    font-size: 1rem;
    margin-bottom: 1px;
}
.post-title {
    font-size: 2.5em;
    line-height: 1;
    margin-top: 5px;
    margin-bottom: 1.5em;
}

kbd {
    margin: 0px 0.1em;
    padding: 0.1em 0.6em;
    border-radius: 3px;
    border: 1px solid rgb(204, 204, 204);
    color: rgb(51, 51, 51);
    line-height: 1.4;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    display: inline-block;
    box-shadow:
        0px 1px 0px rgba(0, 0, 0, 0.2),
        inset 0px 0px 0px 2px #ffffff;
    background-color: rgb(247, 247, 247);
    text-shadow: 0 1px 0 #fff;
    cursor: pointer;
}
kbd * {
    cursor: pointer;
}
kbd:active {
    box-shadow: none;
}

.code-wrapper {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    margin: 0.5em 0;
}
.code-wrapper:focus > .copy-code-button,
.code-wrapper:active > .copy-code-button,
.code-wrapper:hover > .copy-code-button {
    display: block;
}
.code-wrapper > pre {
    /* colors from syntax highligter */
    background-color: #232822;
    color: #f8f8f2;
}
.copy-code-button {
    display: block;
    font-family: var(--main-font);
    padding: 3px 8px;
    cursor: pointer;
    border: none;
    outline: 0;

    background-color: var(--always-white);
    color: var(--always-black);
    border-top: none;
    border-right: none;
    border-radius: 0 3px 0 3px;
    overflow: hidden;

    position: absolute;
    right: 0;
    top: 0;

    display: none;
}

.copy-code-button:focus,
.copy-code-button:active,
.copy-code-button:hover {
    background-color: var(--always-white);
    color: var(--always-black);
}

img {
    box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.2);
}

.center {
    text-align: center;
}

.inline-favicon {
    width: 20px;
    display: inline-block;
    margin: 0 3px -3px 3px;
}

.pad4 {
    padding: 4px;
}

.pad2 {
    padding: 2px;
}
