main .post-content h1 {
    margin-block: 1.5rem 1rem;
}

main .post-content h2 {
    margin-block: 1.25rem .75rem;
}

main .post-content h3 {
    margin-block: 1rem .5rem;
}

main .post-content p {
    margin-bottom: .75rem;
}

.post-content table {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    table-layout: fixed;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    border-spacing: 0;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.92rem;
}

.post-content table tr {
    border-bottom: 1px solid #e5e7eb;
}

.post-content table tbody tr:last-child {
    border-bottom: 0;
}

.post-content table th,
.post-content table td {
    padding: 0.8rem 0.9rem;
    border-right: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.post-content table th:last-child,
.post-content table td:last-child {
    border-right: 0;
}

.post-content table th {
    background: #f8fafc;
    color: #111827;
    font-weight: 700;
}

.post-content table td:first-child,
.post-content table th:first-child {
    color: #111827;
    font-weight: 600;
}

/*
 * Markdown tables in the blog have different column counts. Keep the
 * three-column comparison tables readable by default, then opt into the
 * layouts used by the wider data tables. The :has() checks use the header
 * row so a missing or extra cell cannot silently receive the wrong layout.
 */
.post-content table:has(> thead > tr > :nth-child(3):last-child) td:nth-child(1),
.post-content table:has(> thead > tr > :nth-child(3):last-child) th:nth-child(1) {
    width: 28%;
}

.post-content table:has(> thead > tr > :nth-child(3):last-child) td:nth-child(2),
.post-content table:has(> thead > tr > :nth-child(3):last-child) th:nth-child(2),
.post-content table:has(> thead > tr > :nth-child(3):last-child) td:nth-child(3),
.post-content table:has(> thead > tr > :nth-child(3):last-child) th:nth-child(3) {
    width: 36%;
}

.post-content table:has(> thead > tr > :nth-child(4):last-child) td:nth-child(1),
.post-content table:has(> thead > tr > :nth-child(4):last-child) th:nth-child(1) {
    width: 17%;
}

.post-content table:has(> thead > tr > :nth-child(4):last-child) td:nth-child(2),
.post-content table:has(> thead > tr > :nth-child(4):last-child) th:nth-child(2),
.post-content table:has(> thead > tr > :nth-child(4):last-child) td:nth-child(3),
.post-content table:has(> thead > tr > :nth-child(4):last-child) th:nth-child(3) {
    width: 28%;
}

.post-content table:has(> thead > tr > :nth-child(4):last-child) td:nth-child(4),
.post-content table:has(> thead > tr > :nth-child(4):last-child) th:nth-child(4) {
    width: 27%;
}

.post-content table:has(> thead > tr > :nth-child(5):last-child) td:nth-child(1),
.post-content table:has(> thead > tr > :nth-child(5):last-child) th:nth-child(1),
.post-content table:has(> thead > tr > :nth-child(5):last-child) td:nth-child(2),
.post-content table:has(> thead > tr > :nth-child(5):last-child) th:nth-child(2) {
    width: 16%;
}

.post-content table:has(> thead > tr > :nth-child(5):last-child) td:nth-child(3),
.post-content table:has(> thead > tr > :nth-child(5):last-child) th:nth-child(3) {
    width: 22%;
}

.post-content table:has(> thead > tr > :nth-child(5):last-child) td:nth-child(4),
.post-content table:has(> thead > tr > :nth-child(5):last-child) th:nth-child(4) {
    width: 30%;
}

.post-content table:has(> thead > tr > :nth-child(5):last-child) td:nth-child(5),
.post-content table:has(> thead > tr > :nth-child(5):last-child) th:nth-child(5) {
    width: 16%;
}

.post-content table:has(> thead > tr > :nth-child(6):last-child) td:nth-child(1),
.post-content table:has(> thead > tr > :nth-child(6):last-child) th:nth-child(1) {
    width: 22%;
}

.post-content table:has(> thead > tr > :nth-child(6):last-child) td:nth-child(2),
.post-content table:has(> thead > tr > :nth-child(6):last-child) th:nth-child(2) {
    width: 16%;
}

.post-content table:has(> thead > tr > :nth-child(6):last-child) td:nth-child(3),
.post-content table:has(> thead > tr > :nth-child(6):last-child) th:nth-child(3),
.post-content table:has(> thead > tr > :nth-child(6):last-child) td:nth-child(4),
.post-content table:has(> thead > tr > :nth-child(6):last-child) th:nth-child(4),
.post-content table:has(> thead > tr > :nth-child(6):last-child) td:nth-child(5),
.post-content table:has(> thead > tr > :nth-child(6):last-child) th:nth-child(5),
.post-content table:has(> thead > tr > :nth-child(6):last-child) td:nth-child(6),
.post-content table:has(> thead > tr > :nth-child(6):last-child) th:nth-child(6) {
    width: 15.5%;
}

@media (max-width: 640px) {
    .post-content table {
        font-size: 0.82rem;
    }

    .post-content table th,
    .post-content table td {
        padding: 0.55rem 0.45rem;
    }
}