.jsp-stats,
.jsp-stats * {
    box-sizing: border-box;
}

.jsp-stats {
    width: min(calc(100% - 32px), var(--jsp-max-width, 1320px));
    margin: var(--jsp-margin-top, 0) auto var(--jsp-margin-bottom, 28px);
    padding: var(--jsp-padding-y, 26px) var(--jsp-padding-x, 26px);
    background: var(--jsp-bg, #fff);
    border: var(--jsp-border-width, 1px) solid var(--jsp-border-color, #eef3ef);
    border-radius: var(--jsp-radius, 24px);
    box-shadow: var(--jsp-shadow, 0 20px 55px rgba(16,62,44,.12));
    font-family: var(--jsp-font-family, inherit);
    overflow: hidden;
    isolation: isolate;
}

.jsp-stats__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
}

.jsp-cols-d-1 .jsp-stats__inner { grid-template-columns: minmax(0, 1fr); }
.jsp-cols-d-2 .jsp-stats__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jsp-cols-d-3 .jsp-stats__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jsp-cols-d-4 .jsp-stats__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jsp-cols-d-5 .jsp-stats__inner { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jsp-cols-d-6 .jsp-stats__inner { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.jsp-stat {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: var(--jsp-icon-circle, 48px) max-content minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(10px, 1.2vw, 16px);
    row-gap: 3px;
    padding: 2px var(--jsp-gap, 24px);
    color: inherit;
    text-decoration: none;
    border-inline-end: var(--jsp-divider-width, 1px) solid var(--jsp-divider-color, #dfe8e2);
    transition: transform .25s ease, opacity .25s ease;
}

.jsp-stat:first-child { padding-inline-start: 0; }
.jsp-stat:last-child { padding-inline-end: 0; border-inline-end: 0; }

.jsp-cols-d-1 .jsp-stat:nth-child(1n),
.jsp-cols-d-2 .jsp-stat:nth-child(2n),
.jsp-cols-d-3 .jsp-stat:nth-child(3n),
.jsp-cols-d-4 .jsp-stat:nth-child(4n),
.jsp-cols-d-5 .jsp-stat:nth-child(5n),
.jsp-cols-d-6 .jsp-stat:nth-child(6n) {
    border-inline-end: 0;
}

.jsp-stat__icon {
    width: var(--jsp-icon-circle, 48px);
    height: var(--jsp-icon-circle, 48px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    color: var(--jsp-icon-color, #197344);
    background: var(--jsp-icon-bg, #f2f9f4);
    border: var(--jsp-icon-border-width, 1px) solid var(--jsp-icon-border, #cfe3d4);
}

.jsp-stat__icon svg,
.jsp-stat__icon img {
    display: block;
    width: var(--jsp-icon-size, 23px);
    height: var(--jsp-icon-size, 23px);
    object-fit: contain;
}

.jsp-stat__number-wrap {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    color: var(--jsp-number-color, #075b3e);
    font-size: var(--jsp-number-size, 27px);
    font-weight: var(--jsp-number-weight, 800);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.jsp-stat__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: var(--jsp-line-height, 1.45);
}

.jsp-stat__title,
.jsp-stat__subtitle {
    display: block;
    overflow-wrap: anywhere;
}

.jsp-stat__title {
    color: var(--jsp-title-color, #1e2f28);
    font-size: var(--jsp-title-size, 13px);
    font-weight: var(--jsp-title-weight, 700);
}

.jsp-stat__subtitle {
    margin-top: 2px;
    color: var(--jsp-subtitle-color, #6a766f);
    font-size: var(--jsp-subtitle-size, 10px);
    font-weight: var(--jsp-subtitle-weight, 400);
}

.jsp-stats[data-align="center"] .jsp-stat {
    justify-content: center;
}
.jsp-stats[data-align="center"] .jsp-stat__copy {
    text-align: center;
}
.jsp-stats[data-align="end"] .jsp-stat {
    justify-content: end;
}
.jsp-stats[data-align="end"] .jsp-stat__copy {
    text-align: end;
}

@media (hover:hover) and (pointer:fine) {
    .jsp-hover-enabled .jsp-stat:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 1024px) {
    .jsp-cols-t-1 .jsp-stats__inner { grid-template-columns: minmax(0, 1fr); }
    .jsp-cols-t-2 .jsp-stats__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jsp-cols-t-3 .jsp-stats__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .jsp-cols-t-4 .jsp-stats__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .jsp-stats .jsp-stat { border-inline-end: var(--jsp-divider-width, 1px) solid var(--jsp-divider-color, #dfe8e2); }
    .jsp-cols-t-1 .jsp-stat:nth-child(1n),
    .jsp-cols-t-2 .jsp-stat:nth-child(2n),
    .jsp-cols-t-3 .jsp-stat:nth-child(3n),
    .jsp-cols-t-4 .jsp-stat:nth-child(4n) { border-inline-end: 0; }

    .jsp-stat {
        padding-block: 16px;
    }
}

@media (max-width: 767px) {
    .jsp-stats {
        width: min(calc(100% - 20px), var(--jsp-max-width, 1320px));
        padding: max(14px, calc(var(--jsp-padding-y, 26px) * .72)) max(14px, calc(var(--jsp-padding-x, 26px) * .72));
        border-radius: min(var(--jsp-radius, 24px), 20px);
    }

    .jsp-cols-m-1 .jsp-stats__inner { grid-template-columns: minmax(0, 1fr); }
    .jsp-cols-m-2 .jsp-stats__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .jsp-stats .jsp-stat {
        min-height: 78px;
        padding: 15px 10px;
        grid-template-columns: var(--jsp-icon-circle, 48px) max-content minmax(0, 1fr);
        border-inline-end: var(--jsp-divider-width, 1px) solid var(--jsp-divider-color, #dfe8e2);
        border-bottom: var(--jsp-divider-width, 1px) solid var(--jsp-divider-color, #dfe8e2);
    }

    .jsp-cols-m-1 .jsp-stat:nth-child(1n),
    .jsp-cols-m-2 .jsp-stat:nth-child(2n) { border-inline-end: 0; }

    .jsp-cols-m-1 .jsp-stat:last-child,
    .jsp-cols-m-2 .jsp-stat:nth-last-child(-n+2) { border-bottom: 0; }

    .jsp-hide-mobile-divider .jsp-stat {
        border-inline-end: 0 !important;
        border-bottom: 0 !important;
    }

    .jsp-stat__number-wrap {
        font-size: clamp(20px, 6vw, var(--jsp-number-size, 27px));
    }

    .jsp-stat__title {
        font-size: max(11px, var(--jsp-title-size, 13px));
    }

    .jsp-stat__subtitle {
        font-size: max(9px, var(--jsp-subtitle-size, 10px));
    }
}

@media (max-width: 420px) {
    .jsp-cols-m-2 .jsp-stats__inner {
        grid-template-columns: minmax(0, 1fr);
    }
    .jsp-cols-m-2 .jsp-stat:nth-child(1n) {
        border-inline-end: 0;
    }
    .jsp-cols-m-2 .jsp-stat:not(:last-child) {
        border-bottom: var(--jsp-divider-width, 1px) solid var(--jsp-divider-color, #dfe8e2);
    }
    .jsp-hide-mobile-divider .jsp-stat {
        border-bottom: 0 !important;
    }

    .jsp-stat {
        grid-template-columns: var(--jsp-icon-circle, 48px) minmax(72px, max-content) minmax(0, 1fr);
        column-gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jsp-stat { transition: none; }
}

/* Keep counters readable inside both LTR and RTL language layouts. */
.jsp-stat__number-wrap {
    direction: ltr;
    unicode-bidi: isolate;
}

.jsp-stats[dir="rtl"] .jsp-stat__copy {
    text-align: right;
}

.jsp-stats[dir="ltr"] .jsp-stat__copy {
    text-align: left;
}

.jsp-stats[data-align="center"] .jsp-stat__copy {
    text-align: center;
}

.jsp-stats[data-align="end"] .jsp-stat__copy {
    text-align: end;
}
