.membership-comparison {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--portal-radius);
    overflow: hidden;
    table-layout: fixed;
}

.membership-comparison .show-for-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.membership-comparison th,
.membership-comparison td {
    padding: 1.25rem;
    border: solid #e0e0e0;
    border-width: 0 1px 1px 0;
    vertical-align: middle;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.membership-comparison tr {
    background: #fff;
}

.membership-comparison thead {
    background: #fff;
}

.membership-comparison .membership-introduction {
    width: 42%;
    border: 0;
    padding-left: 0;
}

.membership-comparison tr > :first-child,
.membership-comparison thead .membership-plan:first-of-type {
    border-left-width: 1px;
}

.membership-comparison thead .membership-plan {
    border-top-width: 1px;
}

.membership-comparison thead .membership-plan:first-of-type {
    border-top-left-radius: var(--portal-radius);
}

.membership-comparison thead .membership-plan:last-child {
    border-top-right-radius: var(--portal-radius);
}

.membership-comparison tbody > tr:first-child > th {
    border-top-width: 1px;
    border-top-left-radius: var(--portal-radius);
}

.membership-comparison tfoot tr:last-child > :first-child {
    border-bottom-left-radius: var(--portal-radius);
}

.membership-comparison tfoot tr:last-child > :last-child {
    border-bottom-right-radius: var(--portal-radius);
}

.membership-comparison tbody th {
    text-align: left;
}

/* Override the legacy bottom alignment so help icons sit level with the label text. */
.membership-comparison .fa-question-circle {
    vertical-align: middle;
}

.membership-comparison td,
.membership-comparison .membership-plan {
    text-align: center;
}

.membership-comparison .membership-introduction {
    text-align: left;
}

.membership-comparison .membership-plan {
    background: #fafafa;
}

.membership-comparison .membership-plan h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
}

.membership-comparison .membership-price {
    margin: 1rem 0;
    font-size: 3rem;
    line-height: 1.2;
}

.membership-price sup,
.membership-price span {
    font-size: 1rem;
}

.membership-comparison .button {
    margin: 0;
}

.membership-comparison .membership-section th {
    background: #ecf2f6;
    color: #316277;
    font-weight: bold;
}

.membership-plan-label {
    display: none;
}

/* Keep each feature with both plan values when the desktop columns no longer fit. */
@media only screen and (max-width: 64em) {
    .membership-comparison-section {
        padding: 2rem 1rem;
    }

    .membership-comparison,
    .membership-comparison thead,
    .membership-comparison tbody,
    .membership-comparison tfoot {
        display: block;
    }

    .membership-comparison tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .membership-comparison th,
    .membership-comparison td {
        display: block;
        min-width: 0;
        padding: 1rem 0.75rem;
    }

    .membership-comparison .membership-introduction {
        grid-column: 1 / -1;
        width: auto;
        padding: 0 0 1rem;
        border: 0;
    }

    .membership-comparison tbody th {
        grid-column: 1 / -1;
        padding: 0.75rem;
        background: #fafafa;
        font-weight: bold;
    }

    .membership-comparison tbody > tr:first-child > th {
        border-top-width: 0;
        border-top-left-radius: 0;
    }

    .membership-comparison tbody td:first-of-type,
    .membership-comparison tfoot td:nth-child(2) {
        border-left-width: 1px;
    }

    .membership-comparison tfoot td:nth-child(2) {
        border-bottom-left-radius: var(--portal-radius);
    }

    .membership-comparison .membership-plan h2 {
        font-size: 1.25rem;
    }

    .membership-comparison .membership-price {
        font-size: 2.5rem;
    }

    .membership-comparison .button {
        display: block;
        padding: 0.875rem 0.5rem;
        font-size: 0.875rem;
    }

    .membership-comparison .membership-footer-spacer {
        display: none;
    }

    .membership-plan-label {
        display: block;
        margin-bottom: 0.5rem;
        color: #316277;
        font-size: 0.875rem;
        font-weight: bold;
    }
}
