/* Shared responsive tables for rich content. Keep every rule inside this namespace. */
.content-prose__table-shell {
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 18px 0 22px;
}

.content-prose__table-shell > .content-prose__table-wrap {
    margin: 0;
}

.content-prose__table-guide {
    display: none;
}

.content-prose__matrix-mobile {
    display: none;
}

.content-prose__table-toggle {
    display: none;
}

@media (max-width: 767px) {
    .content-prose__table-shell {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 17px 0 22px;
        clear: both;
        box-sizing: border-box;
    }

    .content-prose__table-shell--mobile-full-width {
        width: var(--content-table-mobile-width) !important;
        max-width: var(--content-table-mobile-width) !important;
        margin-left: var(--content-table-mobile-offset) !important;
        margin-right: 0 !important;
        float: none !important;
    }

    .content-prose__table-shell > .content-prose__table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .content-prose__table-shell--cards > .content-prose__table-wrap {
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .content-prose__table-shell--cards table[data-prose-table-ready] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent;
        table-layout: auto !important;
    }

    .content-prose__table-shell--cards table colgroup {
        display: none !important;
    }

    .content-prose__table-shell--cards table > thead,
    .content-prose__table-shell--cards .content-prose__table-header-row {
        display: none !important;
    }

    .content-prose__table-shell--cards table > tbody {
        display: grid !important;
        gap: 13px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .content-prose__table-shell--cards table > tbody > tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden;
        border: 1px solid #d5e4ef;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(19, 53, 82, .07);
    }

    .content-prose__table-shell--cards table > tbody > tr > td,
    .content-prose__table-shell--cards table > tbody > tr > th {
        display: grid !important;
        grid-template-columns: minmax(100px, 38%) minmax(0, 1fr);
        gap: 11px;
        align-items: start;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 11px 13px;
        border: 0 !important;
        border-bottom: 1px solid #e2ecf3 !important;
        background: #fff !important;
        color: #29465f;
        box-sizing: border-box;
        line-height: 1.55;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .content-prose__table-shell--cards table > tbody > tr > :last-child {
        border-bottom: 0 !important;
    }

    /* Layout authority over legacy desktop rules that also use !important. */
    .content-prose__table-shell--cards > .content-prose__table-wrap > table[data-prose-table-ready] > tbody {
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .content-prose__table-shell--cards > .content-prose__table-wrap > table[data-prose-table-ready] > tbody > tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .content-prose__table-shell--cards > .content-prose__table-wrap > table[data-prose-table-ready] > tbody > tr > td,
    .content-prose__table-shell--cards > .content-prose__table-wrap > table[data-prose-table-ready] > tbody > tr > th {
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .content-prose__table-shell--cards table > tbody > tr > [data-label]::before {
        content: attr(data-label);
        color: #1d638f;
        font-size: 12px;
        line-height: 1.45;
        font-weight: 800;
    }

    .content-prose__table-shell--cards table > tbody > tr > .content-prose__table-primary {
        display: block !important;
        padding: 12px 14px;
        border-bottom: 1px solid #d7e6f1 !important;
        background: linear-gradient(135deg, #edf7fc 0%, #f8fcff 100%) !important;
        color: #153d5c;
        font-family: var(--site-font-serif, Georgia, serif);
        font-size: 16px;
        font-weight: 800;
        line-height: 1.4;
    }

    .content-prose__table-shell--cards table > tbody > tr > .content-prose__table-primary::before {
        content: none !important;
    }

    .content-prose__table-shell--cards table > tbody > tr > .content-prose__table-index {
        display: none !important;
    }

    .content-prose__table-shell--cards table > tbody > tr > .content-prose__table-primary[data-row-index]::before {
        content: attr(data-row-index) !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        height: 26px;
        margin: 0 8px 0 0;
        padding: 0 6px;
        border-radius: 999px;
        background: #1e719f;
        color: #fff;
        font-family: var(--site-font-sans, Arial, sans-serif);
        font-size: 12px;
        line-height: 26px;
        font-weight: 850;
        vertical-align: 2px;
    }

    .content-prose__table-shell--mode-price-list table > tbody > tr > :last-child {
        display: block !important;
        color: #087e62;
        font-size: 17px;
        font-weight: 850;
        text-align: left !important;
    }

    .content-prose__table-shell--mode-price-list table > tbody > tr > :last-child::before {
        display: none;
    }

    .content-prose__table-shell--mode-price-list table del,
    .content-prose__table-shell--mode-price-list table s {
        margin-left: 7px;
        color: #7b8d9e;
        font-size: 13px;
        font-weight: 650;
    }

    .content-prose__table-cell-content {
        min-width: 0;
    }

    .content-prose__table-cell--long .content-prose__table-cell-content {
        position: relative;
        max-height: 7.2em;
        overflow: hidden;
    }

    .content-prose__table-cell--long .content-prose__table-cell-content::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 2.5em;
        background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%);
        pointer-events: none;
    }

    .content-prose__table-cell--long.is-expanded .content-prose__table-cell-content {
        max-height: none;
    }

    .content-prose__table-cell--long.is-expanded .content-prose__table-cell-content::after {
        display: none;
    }

    .content-prose__table-detail-toggle {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 7px;
        padding: 7px 11px;
        border: 1px solid #bdd7e8;
        border-radius: 999px;
        background: #f4faff;
        color: #175d89;
        font-size: 12px;
        line-height: 1.3;
        font-weight: 800;
        cursor: pointer;
    }

    .content-prose__table-detail-toggle:focus-visible,
    .content-prose__table-toggle:focus-visible,
    .content-prose__matrix-select:focus-visible {
        outline: 3px solid rgba(32, 126, 178, .24);
        outline-offset: 2px;
    }

    .content-prose__table-shell--scroll,
    .content-prose__table-shell--matrix.is-showing-full-table {
        padding-top: 0;
    }

    .content-prose__table-shell--scroll > .content-prose__table-wrap,
    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-wrap {
        border: 1px solid #cbdde9;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(19, 53, 82, .07);
        overflow-x: auto !important;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scrollbar-color: #6e9fbd #e8f1f7;
        -webkit-overflow-scrolling: touch;
    }

    .content-prose__table-shell--scroll > .content-prose__table-wrap::-webkit-scrollbar,
    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-wrap::-webkit-scrollbar {
        height: 8px;
    }

    .content-prose__table-shell--scroll > .content-prose__table-wrap::-webkit-scrollbar-thumb,
    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-wrap::-webkit-scrollbar-thumb {
        border: 2px solid #e8f1f7;
        border-radius: 999px;
        background: #6e9fbd;
    }

    .content-prose__table-shell--scroll table[data-prose-table-ready],
    .content-prose__table-shell--matrix.is-showing-full-table table[data-prose-table-ready] {
        display: table !important;
        width: max-content !important;
        min-width: max(720px, 100%) !important;
        table-layout: auto !important;
    }

    .content-prose__table-shell--scroll table > thead,
    .content-prose__table-shell--matrix.is-showing-full-table table > thead {
        display: table-header-group !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        clip: auto !important;
        overflow: visible !important;
        white-space: normal !important;
    }

    .content-prose__table-shell--scroll table > tbody,
    .content-prose__table-shell--matrix.is-showing-full-table table > tbody {
        display: table-row-group !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .content-prose__table-shell--scroll table tr,
    .content-prose__table-shell--matrix.is-showing-full-table table tr {
        display: table-row !important;
        width: auto !important;
    }

    .content-prose__table-shell--scroll table th,
    .content-prose__table-shell--scroll table td,
    .content-prose__table-shell--matrix.is-showing-full-table table th,
    .content-prose__table-shell--matrix.is-showing-full-table table td {
        display: table-cell !important;
        min-width: 130px !important;
        width: auto !important;
    }

    .content-prose__table-shell--scroll table th:first-child,
    .content-prose__table-shell--scroll table td:first-child,
    .content-prose__table-shell--matrix.is-showing-full-table table th:first-child,
    .content-prose__table-shell--matrix.is-showing-full-table table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        box-shadow: 5px 0 10px rgba(18, 55, 82, .08);
    }

    .content-prose__table-shell--scroll > .content-prose__table-guide,
    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-guide {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: fit-content;
        max-width: 100%;
        margin: 0 0 9px;
        padding: 7px 11px;
        border: 1px solid #c8deec;
        border-radius: 999px;
        background: #eef8fd;
        color: #185d88;
        font-size: 12px;
        line-height: 1.35;
        font-weight: 800;
    }

    .content-prose__table-guide-icon {
        display: inline-block;
        font-size: 16px;
        letter-spacing: 2px;
    }

    .content-prose__table-guide.is-animated .content-prose__table-guide-icon {
        animation: content-table-swipe-hint 1.25s ease-in-out 2;
    }

    .content-prose__table-guide.is-used {
        opacity: .72;
    }

    .content-prose__table-shell--scroll:not(.is-at-end)::after,
    .content-prose__table-shell--matrix.is-showing-full-table:not(.is-at-end)::after {
        content: "";
        position: absolute;
        z-index: 4;
        top: 40px;
        right: 0;
        bottom: 8px;
        width: 30px;
        border-radius: 0 14px 14px 0;
        background: linear-gradient(90deg, rgba(255,255,255,0), rgba(24, 86, 124, .16));
        pointer-events: none;
    }

    .content-prose__matrix-mobile {
        display: block;
        padding: 14px;
        border: 1px solid #d3e3ee;
        border-radius: 15px;
        background: linear-gradient(145deg, #f5fbff, #fff);
        box-shadow: 0 8px 22px rgba(19, 53, 82, .06);
    }

    .content-prose__matrix-label {
        display: block;
        margin: 0 0 7px;
        color: #173f5d;
        font-size: 13px;
        font-weight: 850;
    }

    .content-prose__matrix-select {
        display: block;
        width: 100%;
        min-height: 46px;
        margin: 0 0 13px;
        padding: 9px 38px 9px 12px;
        border: 1px solid #bfd7e7;
        border-radius: 11px;
        background: #fff;
        color: #173d5a;
        font-size: 14px;
        font-weight: 750;
    }

    .content-prose__matrix-results {
        display: grid;
        gap: 9px;
    }

    .content-prose__matrix-result {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        padding: 10px 11px;
        border: 1px solid #dfebf3;
        border-radius: 11px;
        background: #fff;
    }

    .content-prose__matrix-result-label {
        min-width: 0;
        color: #35546d;
        font-size: 12.5px;
        line-height: 1.45;
        font-weight: 700;
    }

    .content-prose__matrix-result-value {
        color: #087e62;
        font-size: 14px;
        line-height: 1.35;
        font-weight: 850;
        text-align: right;
    }

    .content-prose__table-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 100%;
        min-height: 42px;
        margin-top: 11px;
        padding: 9px 13px;
        border: 1px solid #bdd6e7;
        border-radius: 999px;
        background: #fff;
        color: #175d88;
        font-size: 13px;
        font-weight: 850;
        cursor: pointer;
    }

    .content-prose__table-shell--matrix > .content-prose__table-wrap,
    .content-prose__table-shell--matrix > .content-prose__table-guide {
        display: none;
    }

    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__matrix-mobile {
        display: none;
    }

    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-wrap,
    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-guide {
        display: flex;
    }

    .content-prose__table-shell--matrix.is-showing-full-table > .content-prose__table-wrap {
        display: block;
    }

    @keyframes content-table-swipe-hint {
        0%, 100% { transform: translateX(0); }
        35% { transform: translateX(5px); }
        70% { transform: translateX(-5px); }
    }
}

@media (max-width: 390px) {
    .content-prose__table-shell--cards table > tbody > tr > td,
    .content-prose__table-shell--cards table > tbody > tr > th {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .content-prose__matrix-result {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .content-prose__matrix-result-value {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .content-prose__table-guide.is-animated .content-prose__table-guide-icon {
        animation: none;
    }
}
