.article-page {
    /* max-width: 900px; */
    width: min(100%, 1200px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.article {
    color: #1f2937;
    line-height: 1.7;
    overflow-wrap: break-word;

    h1 {
        margin: 0 0 1.5rem;
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.15;
        color: #111827;
    }

    h2 {
        margin: 3rem 0 1rem;
        font-size: 1.75rem;
        line-height: 1.3;
        color: #111827;
    }

    h3 {
        margin: 1.75rem 0 0.625rem;
        font-size: 1.25rem;
        color: #111827;
    }

    p {
        margin-top: 0.7rem;
    }

    ul,
    ol {
        margin: 1rem 0 1.5rem;
        padding-left: 1.5rem;
    }

    li {
        margin-bottom: 0.75rem;
    }

    hr {
        margin: 3rem 0;
        border: 0;
        border-top: 1px solid #e5e7eb;
    }

    .article--highlight {
        margin-top: 1rem;
        padding: 2rem 3rem;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.03);

        h2 {
            margin-top: 0;
        }
    }

    .article__img {
        margin-top: 1rem;
        border: 1px solid var(--color-gray-70);
    }

    pre {
        overflow-x: auto;
        margin: 1.5rem 0;
        padding: 1rem;
        border-radius: 8px;
        background: #0f172a;
    }

    code {
        font-family: monospace;
        font-size: 0.95rem;
    }

    pre code {
        color: #e5e7eb;
        white-space: pre;
    }

    table {
        width: 100%;
        min-width: 760px;
        border-collapse: collapse;
        font-size: 0.95rem;
    }

    th,
    td {
        padding: 0.875rem 1rem;
        border: 1px solid #e5e7eb;
        text-align: left;
        vertical-align: top;
    }

    th {
        background: #f3f4f6;
        color: #111827;
        font-weight: 700;
    }

    tr:nth-child(even) td {
        background: #f9fafb;
    }
}

.article__eyebrow {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-brand);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0 2.25rem;
}

.bread-crumbs {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: #6b7280;

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

        &:hover {
            text-decoration: underline;
        }
    }
}

@media (max-width: 768px) {
    .article-page {
        padding: 2rem 1rem;
    }

    .article {
        h1 {
            font-size: 2rem;
        }

        h2 {
            font-size: 1.5rem;
        }

        h3 {
            font-size: 1.125rem;
        }

        .article--highlight {
            padding: 1.125rem;
        }
    }


}


/* Additional styles used by the benchmark article HTML. */
.article {
    /* Keep long IDs and file paths from expanding the article on mobile. */
    a {
        color: var(--color-brand);
        text-underline-offset: 0.15em;
        overflow-wrap: anywhere;

        &:hover {
            color: var(--color-brand-dark);
        }
    }

    h2,
    h3,
    h4 {
        scroll-margin-top: 100px;
    }

    h4 {
        margin: 1.5rem 0 0.625rem;
        font-size: 1.1rem;
        line-height: 1.4;
        color: var(--color-gray-blue);
        font-weight: 600;
    }

    strong {
        font-weight: 600;
    }

    /* Inline code should remain distinct from dark code blocks. */
    :not(pre) > code {
        padding: 0.1em 0.3em;
        border-radius: var(--radius-xs);
        background: var(--color-gray-97);
        overflow-wrap: anywhere;
    }

    pre {
        max-width: 100%;
        line-height: 1.6;
        -webkit-overflow-scrolling: touch;
    }

    pre code {
        font-family: var(--ff-mono);
        font-size: 0.875rem;
    }

    /* Paragraphs can appear inside table cells in the exported document. */
    td p,
    th p {
        margin: 0 0 0.4rem;
        font-size: inherit;
    }

    td p:last-child,
    th p:last-child {
        margin-bottom: 0;
    }

    figure {
        margin: 1.5rem 0 2rem;
    }

    figcaption {
        margin-top: 0.5rem;
        font-size: var(--fs-small);
        color: var(--color-gray-50);
    }

    .article__img {
        display: block;
        max-width: 100%;
        height: auto;
        border-radius: var(--radius-md);
    }

    .article__inline-image {
        display: inline-block;
        width: 53px;
        height: 18px;
        vertical-align: middle;
    }
}

.article__metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0 0 2rem;
    color: var(--color-gray-50);
    font-size: var(--fs-small);
}

.article__toc {
    margin: 1.5rem 0 2.5rem;
    padding: 1.5rem;
    border: 1px solid var(--color-gray-92);
    border-radius: var(--radius-lg);
    background: var(--color-brand-98);

    h2 {
        margin: 0 0 1rem;
        font-size: 1.25rem;
    }

    ol {
        columns: 2;
        column-gap: 2rem;
        margin: 0;
        padding-left: 1.5rem;
    }

    li {
        break-inside: avoid;
        margin-bottom: 0.5rem;
    }

    a {
        font-size: 0.95rem;
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }
}

.table-wrapper {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;

    &:focus-visible {
        outline: 2px solid var(--color-brand);
        outline-offset: 2px;
    }
}

@media (max-width: 768px) {
    .article-page {
        padding: 2rem 1rem;
    }

    .article {
        h1 {
            font-size: 2rem;
        }

        h2 {
            font-size: 1.5rem;
        }

        h3 {
            font-size: 1.125rem;
        }

        .article--highlight {
            padding: 1.125rem;
        }
    }

    .article__toc {
        padding: 1.125rem;

        ol {
            columns: 1;
        }
    }
}
