.text_with_bordered_items {
    --twbi-title-fz: clamp(17px, 28 * (100vw / 1920), 28px);
    --twbi-title-lh: clamp(19px, 32 * (100vw / 1920), 32px);
    --twbi-text-fz: clamp(15px, 19 * (100vw / 1920), 19px);
    --twbi-text-lh: clamp(16px, 24 * (100vw / 1920), 24px);
    --twbi-large-fz: clamp(15px, 28 * (100vw / 1920), 28px);
    --twbi-large-lh: clamp(16px, 32 * (100vw / 1920), 32px);
    --twbi-section-gap: clamp(28px, 84 * (100vw / 1920), 84px);
    --twbi-gap: clamp(16px, 28 * (100vw / 1920), 28px);
}

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

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

.text_with_bordered_items .text_with_bordered_items__title {
    margin: 0 0 12px;
    color: #000;
}

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

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

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

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

.text_with_bordered_items__title + .text_with_bordered_items__items,
.text_with_bordered_items__description + .text_with_bordered_items__items {
    margin-top: var(--twbi-section-gap);
}

/* ===== Items ===== */

/* Each item spans two rows of the parent grid (title + text) via subgrid,
   so texts line up across a row even when a title wraps */
.text_with_bordered_items__items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--twbi-gap);
}

.text_with_bordered_items__item {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: clamp(8px, 12 * (100vw / 1920), 12px);
    align-content: start;
    padding-top: clamp(16px, 24 * (100vw / 1920), 24px);
    border-top: 2px solid #000;
}

.text_with_bordered_items .text_with_bordered_items__item_title {
    margin: 0;
    font-size: var(--twbi-title-fz);
    line-height: var(--twbi-title-lh);
    font-weight: 500;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #000;
}

.text_with_bordered_items__item_text {
    margin: 0;
    font-size: var(--twbi-text-fz);
    line-height: var(--twbi-text-lh);
    letter-spacing: -0.01em;
    color: #000;
}

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

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