:root { /* Flexoki theme https://github.com/kepano/flexoki */
    --color-tx: #100F0F;
    --color-tx-hover: #24837b;
    --color-tx-muted: #6F6E69;
    --color-tx-faint: #B7B5AC;
    --color-tx-sel: rgba(187, 220, 206, 0.3);
    --color-bg: #FFFCF0; /* Paper color */
    --color-code-keyword: #1F5EA5;
    --color-code-op: #BC5215;
    --color-bg-code: #f2f0e5;
    --color-ui: #E6E4D9;
    --font-smaller: 1.3rem;
    --font: -apple-system, BlinkMacSystemFont, 'Inter', 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", "IBM Plex Mono",
    "Roboto Mono", "DejaVu Sans Mono", "Liberation Mono", Menlo, Monaco,
    "Consolas", "Source Code Pro", monospace;

    --wrap-wide: 1000px;
    --wrap-normal: 38em;
    --line-height: 1.5;
}

html {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    font-size: 64%
}

body {
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-tx);
    font-size: 1.7rem;
    font-size: calc(1.5rem + 0.2vw);
    font-family: var(--font);
    text-rendering: optimizeLegibility;
}

@media (max-width: 1024px) {
    :root {
        .image {
            display: none;
        }

        #slider-container {
            padding-top: 10px;
            position: relative;
            flex-direction: column;
            align-items: center;
            padding-right: 0;
        }

        #slider-container-message {
            display: none;
        }

        #size-slider {
            display: none;
        }

        #slider-container-labels {
            position: relative;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            gap: 60px;
            padding-right: 16px;
        }

        #counter {
            opacity: 50%;
        }
    }
}


@media (max-width: 860px) {
    :root {
        --wrap-normal: 88vw;
        --wrap-wide: 100vw;

        footer {
            padding-top: 3rem;
        }
    }

    .image {
        display: none;
    }

    h2 a:hover::before {
        display: none;
    }
}

#slider-container {
    position: absolute;
    padding-right: 30px;
    right: 0;
    top: 10px;
    height: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-direction: column;
}

#slider-container-message {
    font-size: var(--font-smaller);
    color: var(--color-tx-faint);
    padding-right: 40px;
    position: absolute;
    margin-bottom: 180px;
    right: 0;
    display: flex;
    gap: 35px;
    text-align: center;
    cursor: pointer;
    z-index: 0;
}

#size-slider {
    width: 100px;
    cursor: pointer;
    z-index: 1;
    transform: rotate(90deg);
}

#slider-container-labels {
    color: var(--color-tx-muted);
    padding-right: 100px;
    position: absolute;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 60px;
    text-align: right;
    cursor: pointer;
    z-index: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#size-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: var(--color-bg-code);
    border-radius: 4px;
}

#size-slider {
    appearance: none;
}

#size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--color-tx-muted);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    top: -4px;
}

#size-slider::-webkit-slider-runnable-track {
}

#size-slider::-moz-range-track {
    background: var(--color-tx-faint);
    height: 8px;
    border-radius: 4px;
}

#size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
}

article {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--wrap-wide);
    width: var(--wrap-normal);
}

.two-cols {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

h1 {
    font-weight: 500;
    font-size: calc(1.35em + 0.50vw);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-top: 1.5em;
    margin-bottom: 0.25em
}

h2 {
    margin-top: 1.5em;
    font-weight: 500;
    font-size: calc(1em + 0.18vw);
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

p, li {
    line-height: var(--line-height);
}

a {
    color: var(--color-tx-muted);
    text-decoration: underline;
}

a:hover {
    color: var(--color-tx-hover);
    text-decoration: underline;
}

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

ul {
    padding-left: 30px;
}

ul > li {
    padding: 0.30rem 0
}

ul > li::marker {
    color: var(--color-tx-faint);
}

ul > li::marker {
    font-size: 85%
}

.faint {
    color: var(--color-tx-faint)
}

.muted {
    color: var(--color-tx-muted);
}

.normal {
    color: var(--color-tx);
}

::selection {
    background: var(--color-tx-sel);
}

::-moz-selection {
    background: var(--color-tx-sel);
}

img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

figure {
    padding: 0;
    margin: 0;
}

details {
    display: block;
    font-size: var(--font-faint);
    line-height: var(--line-height);
}

summary {
    color: var(--color-tx-muted)
}

pre {
    white-space: pre;
    overflow-x: auto;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 10px;
    border-radius: 10px;
}

.code-keyword {
    color: #1F5EA5;
}

.code-op {
    color: var(--color-code-op);
}

.code-comment {
    color: var(--color-tx-muted);
}

strong {
    font-weight: 500;
}

pre, code {
    font-family: var(--font-mono);
    color: var(--color-tx);
    background-color: var(--color-bg-code);
}

code {
    border-radius: 5px;
    padding: 3px;
}

pre code {
    font-size: 0.8em;
    line-height: 1.25rem;
    padding: 0;
}

code {
    font-size: calc(1.3rem + 0.2vw);
}

blockquote {
    padding-left: 1.5em;
    margin: 1.5em 0;
    border-left: 2px solid var(--color-tx);
}

summary {
    cursor: pointer;
    margin: 5px 0;
    font-weight: 500;
}

summary::marker {
    color: var(--color-tx-muted);
}

hr {
    width: 100%;
    border: 0;
    height: 1px;
    margin: 1.5em 0;
    background: var(--color-ui);
}

footer {
    padding-top: 6rem;
}

@keyframes highlight {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.highlight {
    color: var(--color-tx-faint);
    animation: highlight 1s infinite;
}

.fade-in-out {
    animation: fadeInOut 2s forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    10%, 80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

#comments {
    margin-top: 2em;
}

#comments strong, #comments strong a {
    color: var(--color-tx);
}

#comments summary {
    color: var(--color-tx-faint);
    text-align: center;
}

#stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

#likes-number {
    opacity: 50%;
}

#likes {
    display: flex;
    align-items: center;
    gap: 3px;
    text-align: right;
    opacity: 70%;
}

#likes:hover {
    cursor: pointer;
    font-weight: 500;
    opacity: 100%;
}


#likes svg {
    width: 20px;
    height: 20px;
}

#likes:hover svg {
    fill: var(--color-tx-hover);
}

#views {
    text-align: right;
    opacity: 30%;
    margin-right: 0;
}

h2 {
    position: relative;
}

h2 a:hover::before {
    content: "🔗";
    position: absolute;
    left: -24px;
    top: 0;
    cursor: pointer;
    opacity: 50%;
    font-size: 90%
}

.image {
    width: 300px;
    flex-shrink: 0;
    opacity: 80%;
}

.image img {
    border-radius: 7px;
}

#credits {
    text-align: center;
    font-size: var(--font-smaller);
    color: var(--color-tx-muted);
}

#credits a {
    color: var(--color-tx-muted);
}

#social {
    text-align: center;
    font-size: var(--font-smaller);
    margin-top: 2em;
    margin-bottom: 2em;
    padding: 12px 0
}

#social a:not(:last-of-type) {
    margin-inline-end: 12px
}

#social a svg {
    height: 22px;
    width: 22px
}

#footnote {
    margin-top: 2em;
}

.short-url {
    cursor: pointer;
    font-size: var(--font-smaller);
}

#toast {
    visibility: hidden;
    min-width: 100px;
    background-color: var(--color-bg-code);
    color: var(--color-tx);
    text-align: center;
    border-radius: 4px;
    padding: 8px 16px;
    position: fixed;
    z-index: 1;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
}