/* Sandbox Africa V8 PUB7 — public typography correction
 * Keeps the established visual system while restoring hierarchy and readable line lengths.
 */

.sandbox-v8-public .hero-copy > h1,
.sandbox-v8-public .subhero-grid > div:first-child > h1,
.sandbox-v8-public .pub1-hero-copy > h1,
.sandbox-v8-public .pub5-hero-copy > h1,
.sandbox-v8-public .institutional-hero-copy > h1 {
    font-size: clamp(2.7rem, 4.6vw, 4.8rem) !important;
    line-height: 0.99 !important;
    letter-spacing: -0.045em;
    max-width: 18ch;
    text-wrap: balance;
}

.sandbox-v8-public .pub1-hero-copy > h1,
.sandbox-v8-public .pub5-hero-copy > h1,
.sandbox-v8-public .institutional-hero-copy > h1 {
    max-width: 16ch;
}

.sandbox-v8-public .hero-copy > .lede,
.sandbox-v8-public .hero-copy > p,
.sandbox-v8-public .subhero-grid > div:first-child > p,
.sandbox-v8-public .pub1-hero-copy > p,
.sandbox-v8-public .pub5-hero-copy > .lede,
.sandbox-v8-public .institutional-hero-copy > p {
    font-size: clamp(1rem, 1.35vw, 1.22rem) !important;
    line-height: 1.62 !important;
    max-width: 66ch;
}

.sandbox-v8-public .section-head h2,
.sandbox-v8-public .section-heading h2,
.sandbox-v8-public .pub1-section-head h2,
.sandbox-v8-public .pub1-split-head h2,
.sandbox-v8-public .pub2-section-heading h2,
.sandbox-v8-public .pub2-directory-heading h2,
.sandbox-v8-public .pub3-section-heading h2,
.sandbox-v8-public .v8-readiness-heading h2,
.sandbox-v8-public .cta-panel h2,
.sandbox-v8-public .pub1-final-grid h2,
.sandbox-v8-public .pub3-directory-toolbar h2 {
    font-size: clamp(1.8rem, 2.75vw, 3rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.sandbox-v8-public .card h3,
.sandbox-v8-public .pub1-engine-card h3,
.sandbox-v8-public .pub1-feature-panel h2,
.sandbox-v8-public .pub3-pathway-card h3 {
    text-wrap: balance;
}

.sandbox-v8-public .pub1-feature-panel h2 {
    font-size: clamp(1.65rem, 2.25vw, 2.45rem) !important;
    line-height: 1.12 !important;
}

/* Long data-driven names should wrap cleanly without inheriting marketing-display scale. */
.sandbox-v8-public.sandbox-v8-detail-page .subhero h1,
.sandbox-v8-public.sandbox-v8-detail-page .hero h1,
.sandbox-v8-public .institutional-hero h1 {
    overflow-wrap: break-word;
}

@media (max-width: 760px) {
    .sandbox-v8-public .hero-copy > h1,
    .sandbox-v8-public .subhero-grid > div:first-child > h1,
    .sandbox-v8-public .pub1-hero-copy > h1,
    .sandbox-v8-public .pub5-hero-copy > h1,
    .sandbox-v8-public .institutional-hero-copy > h1 {
        font-size: clamp(2.25rem, 10vw, 3.35rem) !important;
        line-height: 1.01 !important;
        max-width: 100%;
    }

    .sandbox-v8-public .section-head h2,
    .sandbox-v8-public .section-heading h2,
    .sandbox-v8-public .pub1-section-head h2,
    .sandbox-v8-public .pub1-split-head h2,
    .sandbox-v8-public .pub2-section-heading h2,
    .sandbox-v8-public .pub2-directory-heading h2,
    .sandbox-v8-public .pub3-section-heading h2,
    .sandbox-v8-public .v8-readiness-heading h2,
    .sandbox-v8-public .cta-panel h2,
    .sandbox-v8-public .pub1-final-grid h2,
    .sandbox-v8-public .pub3-directory-toolbar h2 {
        font-size: clamp(1.65rem, 7.2vw, 2.35rem) !important;
    }
}
