body,
html {
    font-size: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
    font-size: 1.25em;
    padding: 0 26px;
    line-height: 1.6;
    word-wrap: break-word;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--bg-color);
    color: var(--fg-color);
}

@media only screen and (max-width: 800px) {
    body {
        font-size: 1em;
    }
}

body .code-line {
    position: relative;
}

body .code-line:hover:before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: -12px;
    height: 100%;
}

body li.code-line:hover:before {
    left: -30px;
}

img {
    max-width: 100%;
    max-height: 100%;
}

a {
    color: var(--ln-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 1px solid -webkit-focus-ring-color;
    outline-offset: -1px;
}

hr {
    border: 0;
    height: 2px;
    border-bottom: 2px solid;
}

h1 {
    padding-bottom: 0.3em;
    line-height: 1.2;
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

h1,
h2,
h3 {
    font-weight: normal;
}

h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code {
    font-size: inherit;
    line-height: auto;
}

table {
    border-collapse: collapse;
}

table>thead>tr>th {
    text-align: left;
    border-bottom: 1px solid;
}

table>thead>tr>th,
table>thead>tr>td,
table>tbody>tr>th,
table>tbody>tr>td {
    padding: 5px 10px;
}

table>tbody>tr+tr>td {
    border-top: 1px solid;
}

blockquote {
    margin: 0 7px 0 5px;
    padding: 0 16px 0 10px;
    border-left-width: 5px;
    border-left-style: solid;
}

input[type=text],
pre {
    background-color: var(--bg-code-color);
}

input[type=text] {
    color: var(--fg-color);
    height: 2em;
    border: none;
}

input[type=text]:focus {
    outline-color: var(--in-border-color);
}

input,
button {
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.75em;
    padding: 0.25em 0.75em;
}

button,
input[type="submit"] {
    color: #fff;
    background-color: var(--bt-color);
    border-radius: 0px;
    border: none;
    user-select: none;
}

button:hover,
input[type="submit"]:hover {
    background-color: var(--bt-color-hover);
}

code {
    font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
    font-size: 14px;
    line-height: 19px;
}

body.wordWrap pre {
    white-space: pre-wrap;
}

.mac code {
    font-size: 12px;
    line-height: 18px;
}

pre:not(.hljs),
pre.hljs code>div {
    padding: 16px;
    border-radius: 3px;
    overflow: auto;
}

table>thead>tr>th {
    border-color: rgba(255, 255, 255, 0.69);
}

h1,
hr,
footer,
table>tbody>tr+tr>td {
    border-color: rgba(255, 255, 255, 0.18);
}

.code-line:hover:before {
    border-left: 3px solid var(--cl-color);
}

.code-line .code-line:hover:before {
    border-left: none;
}

footer {
    margin-top: 3em;
    border-top-width: 2px;
    border-top-style: solid;
    text-align: center;
}


/* Theming
   ----------------------------- */

/* Dark */

:root {
    --bg-color: #1e1e1e;
    --fg-color: #d4d4d4;
    --ln-color: #3794ff;
    --bt-color: #0e639c;
    --bt-color-hover: #1177bb;
    --cl-color: rgba(255, 255, 255, 0.60);
    --in-border-color: #007fd4;
    --bg-code-color: rgba(10, 10, 10, 0.4);
}


/* Light */

@media (prefers-color-scheme:light) {
    :root {
        --bg-color: #fff;
        --fg-color: #000;
        --ln-color: #006ab1;
        --bt-color: #007acc;
        --bt-color-hover: #0062a3;
        --cl-color: rgba(0, 0, 0, 0.40);
        --in-border-color: #0090f1;
        --bg-code-color: rgba(220, 220, 220, 0.4);
    }
}


/* High Contrast */

@media (prefers-contrast:more) {
    :root {
        --bg-color: #000;
        --fg-color: #fff;
        --ln-color: #006ab1;
        --bt-color: #007acc;
        --ln-color: #3794ff;
        --bt-color: #000;
        --bt-color-hover: #000;
        --cl-color: rgba(255, 160, 0, 1);
        --in-border-color: #f38518;
        --bg-code-color: rgb(0, 0, 0);
    }

    h1 {
        border-color: rgb(0, 0, 0);
    }

    button,
    input[type="submit"] {
        border: 1px solid #6fc3df;
    }
}


/* Monokai
   ----------------------------- */

@media (prefers-color-scheme:dark),
(prefers-contrast:more) {
    .hljs {
        background: #272822;
        color: #ddd;
    }

    .hljs-tag,
    .hljs-keyword,
    .hljs-selector-tag,
    .hljs-literal,
    .hljs-strong,
    .hljs-name {
        color: #f92672;
    }

    .hljs-code {
        color: #66d9ef;
    }

    .hljs-attribute,
    .hljs-symbol,
    .hljs-regexp,
    .hljs-link {
        color: #bf79db;
    }

    .hljs-string,
    .hljs-bullet,
    .hljs-subst,
    .hljs-title,
    .hljs-section,
    .hljs-emphasis,
    .hljs-type,
    .hljs-built_in,
    .hljs-selector-attr,
    .hljs-selector-pseudo,
    .hljs-addition,
    .hljs-variable,
    .hljs-template-tag,
    .hljs-template-variable {
        color: #a6e22e;
    }

    .hljs-title.class_,
    .hljs-class .hljs-title {
        color: white;
    }

    .hljs-comment,
    .hljs-quote,
    .hljs-deletion,
    .hljs-meta {
        color: #75715e;
    }

    .hljs-keyword,
    .hljs-selector-tag,
    .hljs-literal,
    .hljs-doctag,
    .hljs-title,
    .hljs-section,
    .hljs-type,
    .hljs-selector-id {
        font-weight: bold;
    }
}