:where(body) .railcars-table-wrap {
    width: min(calc(100vw - 2rem), 1180px);
    margin: 1.75rem auto 2.75rem;
    overflow-x: auto;
    border: 1px solid var(--color-gray-light, #e8e8e8);
    border-top: 4px solid var(--color-red, #e10707);
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 51, 102, 0.08);
}

:where(.entry-content, .prose, article) > :where(h1, h2):has(+ .railcars-table-wrap) {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    color: var(--color-gray-darker, #1a1a1a);
    font-family: var(--font-display, "Playfair Display", serif);
    font-size: var(--type-section, clamp(1.9rem, 3.2vw, 3rem));
    font-weight: 700;
    line-height: 1.08;
}

:where(.entry-content, .prose, article) > :where(h1, h2):has(+ .railcars-table-wrap)::before {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--color-red, #e10707);
    font-family: var(--font-body, "Instrument Sans", system-ui, sans-serif);
    font-size: var(--type-eyebrow, 0.75rem);
    font-weight: 700;
    letter-spacing: var(--tracking-wide, 0.2em);
    line-height: 1.2;
    text-transform: uppercase;
    content: "Railcar inventory";
}

:where(body) .railcars-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
    background: #ffffff;
    color: var(--color-gray-dark, #333333);
    font-family: var(--font-body, "Instrument Sans", system-ui, sans-serif);
    font-size: var(--type-small, 0.94rem);
    line-height: 1.55;
}

:where(body) .railcars-table thead {
    background: var(--color-navy, #003366);
    color: #ffffff;
}

:where(body) .railcars-table th {
    padding: 1.05rem 1rem;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: 3px solid var(--color-red, #e10707);
    color: #ffffff;
    font-size: var(--type-eyebrow, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

:where(body) .railcars-table th:last-child {
    border-right: 0;
}

:where(body) .railcars-table td {
    padding: 1rem;
    border: 0;
    border-right: 1px solid var(--color-gray-light, #e8e8e8);
    border-bottom: 1px solid var(--color-gray-light, #e8e8e8);
    text-align: left;
    vertical-align: top;
}

:where(body) .railcars-table td:last-child {
    border-right: 0;
}

:where(body) .railcars-table tbody tr:nth-child(even) {
    background: var(--color-surface-base, #f6f8fb);
}

:where(body) .railcars-table tbody tr:hover {
    background: var(--color-surface-soft, #eef3f8);
}

:where(body) .railcars-table tbody tr:last-child td {
    border-bottom: 0;
}

:where(body) .railcars-table td:nth-child(1),
:where(body) .railcars-table td:nth-child(3),
:where(body) .railcars-table td:nth-child(5),
:where(body) .railcars-table td:nth-child(6),
:where(body) .railcars-table td:nth-child(7) {
    font-weight: 650;
    color: var(--color-gray-darker, #1a1a1a);
}

:where(body) .railcars-table td:nth-child(2) {
    color: var(--color-navy, #003366);
    font-weight: 700;
}

:where(body) .railcars-table td:nth-child(4),
:where(body) .railcars-table td:nth-child(7) {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 48rem) {
    :where(body) .railcars-table-wrap {
        width: calc(100vw - 2rem) !important;
        max-width: 30rem !important;
        margin-top: 1.25rem;
        margin-right: 0;
        margin-bottom: 2.25rem;
        margin-left: 0 !important;
        overflow-x: visible;
        border: 0;
        border-top: 4px solid var(--color-red, #e10707);
        background: transparent;
        box-shadow: none;
    }

    :where(body) .railcars-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 0.9rem;
        background: transparent;
    }

    :where(body) .railcars-table thead {
        display: none;
    }

    :where(body) .railcars-table tbody,
    :where(body) .railcars-table tr,
    :where(body) .railcars-table td {
        display: block;
        width: 100%;
    }

    :where(body) .railcars-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--color-gray-light, #e8e8e8);
        border-top: 6px solid var(--color-navy, #003366);
        border-left: 4px solid var(--color-navy, #003366);
        background: #ffffff;
        box-shadow: 0 18px 40px rgba(0, 51, 102, 0.07);
    }

    :where(body) .railcars-table tbody tr:nth-child(even),
    :where(body) .railcars-table tbody tr:hover {
        background: #ffffff;
    }

    :where(body) .railcars-table td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 38%) 1fr;
        gap: 1rem;
        padding: 0.82rem 1rem;
        border-right: 0;
        border-bottom: 1px solid var(--color-gray-light, #e8e8e8);
    }

    :where(body) .railcars-table td::before {
        color: var(--color-navy, #003366);
        font-size: var(--type-eyebrow, 0.75rem);
        font-weight: 700;
        letter-spacing: 0.08em;
        line-height: 1.35;
        text-transform: uppercase;
        content: attr(data-label);
    }
}
