/* Monstertov - https://tov.monster/ */
html.blog-document {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html.blog-document {
        scroll-behavior: auto;
    }
}

.content .homepage-links {
    margin-top: 1rem;
    width: min(100% - 2rem, 860px);
}

html:not(.boot-done) .homepage-blog {
    display: none;
}

.homepage-blog,
.blog-page {
    width: min(100% - 2.5rem, 860px);
    margin: 4rem auto;
    color: #d2d8df;
    font-family: Iosevka, monospace;
    font-size: 1.0625rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.homepage-blog h2 {
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
}

.blog-card {
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border: 1px solid #23313f;
    border-top: 2px solid #0071bc;
    background: #080c10;
}

.blog-card + .blog-card {
    margin-top: 1.5rem;
}

.blog-card h3 {
    margin: .75rem 0 1rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.3;
}

.homepage-blog a,
.blog-page a,
.homepage-blog a:visited,
.blog-page a:visited {
    color: #65b9f0;
    text-decoration: underline !important;
    text-underline-offset: .2em;
}

.blog-card h3 a,
.blog-card h3 a:visited {
    color: #65b9f0;
    text-decoration: none !important;
}

.homepage-blog a:hover,
.blog-page a:hover {
    color: #fff;
}

.homepage-blog a:focus-visible,
.blog-page a:focus-visible,
.blog-page [tabindex]:focus-visible {
    outline: 2px solid #65b9f0;
    outline-offset: 5px;
}

.blog-meta {
    color: #9aaaba;
    font-size: .9rem;
}

.blog-page nav {
    margin-bottom: 3rem;
}

.blog-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem .75rem;
}

.blog-page .blog-nav {
    margin-bottom: 1.5rem;
}

.blog-page .blog-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 0;
    font-size: .875rem;
    line-height: 1.4;
    text-decoration: none !important;
}

.blog-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(112px, 12vw, 144px);
    aspect-ratio: 7 / 6;
    flex-shrink: 0;
}

.blog-page .blog-logo pre {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
}

.blog-language {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
}

.flag-nl {
    display: inline-block;
    width: 30px;
    height: 20px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #ae1c28 0 33.333%, #fff 33.333% 66.667%, #21468b 66.667% 100%);
    outline: 1px solid #9aaaba;
}

.blog-page header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #23313f;
}

.blog-video {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 1.5rem;
    border: 1px solid #23313f;
}

.blog-page h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.blog-page h2,
.blog-page h3 {
    color: #fff;
    line-height: 1.35;
    margin: 2.5rem 0 1rem;
}

.blog-page h2 {
    font-size: 1.65rem;
}

.blog-page h3 {
    font-size: 1.3rem;
}

.blog-page .blog-toc {
    margin: 0 0 2rem;
    padding: .75rem 1rem;
    border: 1px solid #23313f;
    background: #080c10;
    font-size: .9rem;
    line-height: 1.6;
}

.blog-toc summary {
    color: #fff;
    cursor: pointer;
}

.blog-toc summary:focus-visible {
    outline: 2px solid #65b9f0;
    outline-offset: 5px;
}

.blog-toc ol {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.blog-toc a {
    display: block;
    padding: .3rem 0;
}

.blog-toc-subsection {
    padding-left: 1rem;
}

/* desktop: contents as a sticky sidebar on the left, article body on the right. the grid is set up by blog.js,
   which also opens the panel on wide screens; below the breakpoint it stays a single column and the panel collapses. */
@media (min-width: 60rem) {
    .blog-page {
        width: min(100% - 2.5rem, 1140px);
    }

    .blog-layout {
        display: grid;
        grid-template-columns: 15rem minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
    }

    .blog-content {
        min-width: 0;
    }

    .blog-page .blog-toc {
        position: sticky;
        top: 2rem;
        margin: 0;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    .blog-toc summary {
        pointer-events: none;
    }

    .blog-toc summary::-webkit-details-marker {
        display: none;
    }

    .blog-toc summary::marker {
        content: "";
    }

    .blog-toc ol {
        margin-top: .75rem;
    }
}

.blog-page h2,
.blog-page h3 {
    scroll-margin-top: 1rem;
}

.blog-page p {
    margin-bottom: 1.4rem;
}

.blog-page pre,
.blog-table {
    margin: 1.5rem 0;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid #23313f;
    background: #080c10;
}

.blog-page pre {
    color: #b4dafa;
    font-size: .9rem;
    line-height: 1.6;
}

.blog-page table {
    width: 100%;
    min-width: 520px;
    font-size: .9rem;
}

.blog-page th,
.blog-page td {
    padding: .75rem;
    vertical-align: top;
    border-bottom: 1px solid #23313f;
}

.blog-page th {
    color: #fff;
}

.blog-page footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #23313f;
}

.blog-page .blog-links {
    width: 100%;
    margin: 0 0 1.5rem;
    gap: 1.5rem;
}

.blog-page .blog-links a {
    text-decoration: none !important;
}
