.container {
    max-width: 1125px;
    margin: 0 auto;
}


/* Article body readability & code styling */

#article-body {
    font-size: 0.98rem;
}

@media (min-width: 640px) {
    #article-body {
        font-size: 1.015rem;
    }
}

@media (min-width: 2500px) {
    .container {
        max-width: 1950px;
    }
    #article-body {
        font-size: 1.15rem;
    }
    #article-body p {
        max-width: 76ch;
    }
    #article-body pre {
        font-size: .92rem;
    }
}

@media (min-width: 3000px) {
    .container {
        max-width: 2100px;
    }
    #article-body {
        font-size: 1.18rem;
    }
    #article-body p {
        max-width: 77ch;
    }
    #article-body pre {
        font-size: .95rem;
    }
}

@media (min-width: 1024px) {
    #article-body {
        font-size: 1.05rem;
    }
}


/* Headings scale */

#article-body h1 {
    font-size: clamp(1.95rem, 1.4rem + 1.6vw, 2.75rem);
    line-height: 1.15;
    font-weight: 800;
}

#article-body h2 {
    font-size: clamp(1.55rem, 1.25rem + 0.9vw, 1.5rem);
    line-height: 1.22;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

#article-body h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.35rem);
    line-height: 1.3;
    font-weight: 600;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
}

#article-body h4 {
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.15rem);
    line-height: 1.35;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
}

#article-body h2+h3,
#article-body h3+h4 {
    margin-top: 1.25rem;
}


/* Paragraph */

#article-body p {
    margin-top: 1.15em;
    margin-bottom: 1.15em;
}

#article-body>p:first-of-type {
    font-size: 1.05em;
    line-height: 1.55;
}

#article-body strong {
    color: #0f172a;
}

#article-body a {
    text-decoration: none;
    position: relative;
    font-weight: 500;
}

#article-body a:not(.no-underline):after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s;
    opacity: .55;
}

#article-body a:hover:after {
    transform: scaleX(1);
}


/* Lists */

#article-body ul,
#article-body ol {
    padding-left: 1.35rem;
    margin-top: 1.15em;
    margin-bottom: 1.15em;
}

#article-body li {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

#article-body ul li {
    list-style: disc;
}

#article-body ul ul li {
    list-style: circle;
}

#article-body ol {
    counter-reset: ordered;
}

#article-body ol>li {
    list-style: decimal;
}


/* Blockquotes */

#article-body blockquote {
    border-left: 4px solid #6366f1;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 0 .5rem .5rem 0;
    font-style: italic;
    color: #334155;
    margin: 2rem 0;
}


/* Inline code */

#article-body :not(pre)>code {
    background: #f1f5f9;
    color: #dc2626;
    padding: 0.2em 0.45em;
    border-radius: .4rem;
    font-size: .85em;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}


/* Code blocks */

#article-body pre {
    position: relative;
    background: #0f172a;
    color: #f1f5f9;
    padding: 1.15rem 1.2rem;
    border-radius: .75rem;
    overflow: auto;
    line-height: 1.55;
    font-size: .82rem;
    box-shadow: 0 2px 4px -2px rgba(15, 23, 42, .4), 0 4px 12px -2px rgba(15, 23, 42, .35);
    margin: 2rem 0;
}

#article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

#article-body pre::-webkit-scrollbar {
    height: 10px;
}

#article-body pre::-webkit-scrollbar-track {
    background: #1e293b;
}

#article-body pre::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 999px;
}


/* Code block header label */

#article-body pre[data-lang]::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    right: 0;
    font-size: .65rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: #334155;
    color: #e2e8f0;
    padding: .35rem .6rem;
    border-bottom-left-radius: .5rem;
    border-top-right-radius: .7rem;
}


/* Copy button */

#article-body .code-copy-btn {
    position: absolute;
    top: .55rem;
    right: .55rem;
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, .15);
    padding: .35rem .55rem;
    font-size: .65rem;
    line-height: 1;
    border-radius: .45rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: background .25s, color .25s;
}

#article-body .code-copy-btn:hover {
    background: rgba(255, 255, 255, .18);
}

#article-body .code-copy-btn.copied {
    background: #10b981;
    color: #fff;
    border-color: #059669;
}


/* Tables */

#article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    margin: 2.25rem 0;
    overflow: hidden;
    border-radius: .75rem;
}

#article-body table thead {
    background: #f1f5f9;
}

#article-body th,
#article-body td {
    padding: .75rem .9rem;
    border: 1px solid #e2e8f0;
}

#article-body tbody tr:nth-child(odd) {
    background: #f8fafc;
}


/* Images */

#article-body figure img,
#article-body>img {
    border-radius: .75rem;
    box-shadow: 0 4px 14px -4px rgba(15, 23, 42, .25);
}

#article-body figure {
    margin: 2rem 0;
}


/* Horizontal rule */

#article-body hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e1, #e2e8f0);
    margin: 3rem 0;
}


/* Small screens fine-tuning */

@media (max-width: 480px) {
    #article-body h1 {
        font-size: 1.9rem;
    }
    #article-body pre {
        font-size: .78rem;
    }
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

code {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (min-width: 1600px) {
    #article-body {
        font-size: 1.075rem;
    }
    #article-body p {
        max-width: 72ch;
    }
    #blog-index .grid {
        column-gap: 3.5rem;
    }
    .container {
        max-width: 1350px;
    }
}

@media (min-width: 1800px) {
    .container {
        max-width: 1500px;
    }
    #article-body {
        font-size: 1.09rem;
    }
    #article-body h1 {
        font-size: clamp(2.4rem, 1.6rem + 1.9vw, 3.25rem);
    }
    #article-body h2 {
        font-size: clamp(1.75rem, 1.3rem + 1.1vw, 2.1rem);
    }
    #article-body h3 {
        font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.55rem);
    }
    #blog-index .lg\:col-span-4 {
        flex: 0 0 auto;
    }
}

@media (min-width: 2200px) {
    .container {
        max-width: 1680px;
    }
    #article-body {
        font-size: 1.1rem;
    }
    #article-body p {
        max-width: 74ch;
    }
    #article-body pre {
        font-size: .86rem;
    }
}

@media (min-width: 2600px) {
    .container {
        max-width: 1820px;
    }
    #article-body {
        font-size: 1.12rem;
    }
    #article-body p {
        max-width: 75ch;
    }
    #article-body pre {
        font-size: .9rem;
    }
}