.text_with_stat_cards {
    --twsc-value-fz: clamp(32px, 56 * (100vw / 1920), 56px);
    --twsc-value-lh: clamp(36px, 65 * (100vw / 1920), 65px);
    --twsc-title-fz: clamp(13px, 19 * (100vw / 1920), 19px);
    --twsc-title-lh: clamp(16px, 24 * (100vw / 1920), 24px);
    --twsc-text-fz: clamp(15px, 19 * (100vw / 1920), 19px);
    --twsc-text-lh: clamp(16px, 24 * (100vw / 1920), 24px);
    --twsc-large-fz: clamp(15px, 28 * (100vw / 1920), 28px);
    --twsc-large-lh: clamp(16px, 32 * (100vw / 1920), 32px);
    --twsc-section-gap: clamp(28px, 84 * (100vw / 1920), 84px);
    --twsc-gap: clamp(16px, 28 * (100vw / 1920), 28px);
}

.text_with_stat_cards.grey {
    background-color: #EDEDED;
}
.text_with_stat_cards.white_bg {
    background-color: #fff;
}

/* ===== Heading ===== */

.text_with_stat_cards .text_with_stat_cards__title {
    margin: 0 0 12px;
    color: #000;
}

.text_with_stat_cards__description {
    font-size: var(--twsc-large-fz);
    line-height: var(--twsc-large-lh);
    letter-spacing: -0.01em;
    color: #000;
}

.text_with_stat_cards__description * {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
}

.text_with_stat_cards__description > *:not(:last-child) {
    margin-bottom: 12px;
}

.text_with_stat_cards__description a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.text_with_stat_cards__title + .text_with_stat_cards__cards,
.text_with_stat_cards__description + .text_with_stat_cards__cards {
    margin-top: var(--twsc-section-gap);
}

/* ===== Cards ===== */

/* Each card spans three rows of the parent grid (value + title + text) via subgrid,
   so titles and texts line up across a row even when a title wraps */
.text_with_stat_cards__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 28 * (100vw / 1920), 28px);
}

.text_with_stat_cards__card {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
    padding: var(--twsc-gap) var(--twsc-gap) clamp(28px, 56 * (100vw / 1920), 56px);
    border: 2px solid #D1D1D1;
}

.text_with_stat_cards .text_with_stat_cards__card_value {
    margin: 0 0 clamp(8px, 16 * (100vw / 1920), 16px);
    font-size: var(--twsc-value-fz);
    line-height: var(--twsc-value-lh);
    font-weight: 500;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #000;
}

.text_with_stat_cards .text_with_stat_cards__card_title {
    margin: 0 0 clamp(8px, 16 * (100vw / 1920), 16px);
    font-size: var(--twsc-title-fz);
    line-height: var(--twsc-title-lh);
    font-weight: 500;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #000;
}

.text_with_stat_cards__card_text {
    font-size: var(--twsc-text-fz);
    line-height: var(--twsc-text-lh);
    letter-spacing: -0.01em;
    color: #818181;
}

.text_with_stat_cards__card_text * {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
}

.text_with_stat_cards__card_text > *:not(:last-child) {
    margin-bottom: 12px;
}

.text_with_stat_cards__card_text a {
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

@media (max-width: 1024px) {
    .text_with_stat_cards__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .text_with_stat_cards__cards {
        grid-template-columns: 1fr;
    }

    .text_with_stat_cards__card {
        padding-bottom: var(--twsc-gap);
    }
}
