/* Keep the numeric measure intact; explanatory text belongs below it. */
.hero-random-3dfb .stat-box {
    box-sizing: border-box;
    min-width: min(12rem, 100%);
    max-width: 100%;
}

.hero-random-3dfb .stat-number,
.pdf-stats-bar .pdf-stat-number {
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.hero-random-3dfb .stat-number {
    display: flex;
    align-items: baseline;
    gap: 0.35em;
}

.hero-random-3dfb .stat-number > i {
    flex: 0 0 auto;
    margin-right: 0 !important;
}

.hero-random-3dfb .ibc-stat-value,
.pdf-stats-bar .ibc-stat-value {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.hero-random-3dfb .stat-description,
.pdf-stats-bar .pdf-stat-description {
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.pdf-stats-bar {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1rem;
}

.pdf-stats-bar .pdf-stat-item {
    box-sizing: border-box;
    min-width: 0;
    flex: 0 1 12.5rem;
}

/* Variable-length explanations cannot overlap when cards join normal flow. */
@media (max-width: 768px) {
    .hero-random-3dfb {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 0.75rem;
        padding: 0;
    }

    .hero-random-3dfb .hero-random-3dfb-image {
        grid-column: 1 / -1;
        justify-self: center;
        width: 70%;
        max-width: 100%;
    }

    .hero-random-3dfb .stat-box,
    .hero-random-3dfb .stat-box:nth-of-type(2),
    .hero-random-3dfb .stat-box:nth-of-type(3) {
        position: static;
        inset: auto;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: 0.875rem;
    }

    .hero-random-3dfb .stat-number {
        font-size: clamp(1.125rem, 4.5vw, 1.5rem);
    }

    .hero-random-3dfb .stat-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .hero-random-3dfb {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-random-3dfb .hero-random-3dfb-image {
        width: 100%;
        max-width: 22rem;
    }

    .pdf-stats-bar .pdf-stat-item {
        flex-basis: 100%;
        width: 100%;
    }
}
