.acfrt-wrap,
.acfrt-wrap * {
    box-sizing: border-box;
}

.acfrt-wrap {
    width: 100%;
    color: #173260;
}

.acfrt-head {
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: 28px;
}

.acfrt-eyebrow {
    margin-bottom: 8px;
    color: #1769e8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.acfrt-heading {
    margin: 0;
    color: #173260;
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.35;
}

.acfrt-description {
    margin-top: 10px;
    color: #6a7a91;
    font-size: 15px;
    line-height: 1.9;
}

.acfrt-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.acfrt-card {
    min-width: 0;
    min-height: 220px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid #e3ebf5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(26, 70, 126, .06);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.acfrt-card:hover,
.acfrt-card:focus-within {
    border-color: #afcdf5;
    box-shadow: 0 15px 36px rgba(26, 70, 126, .10);
    transform: translateY(-2px);
}

.acfrt-card-link {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    color: inherit;
    text-decoration: none;
}

.acfrt-card-link:focus-visible {
    outline: 3px solid rgba(23, 105, 232, .22);
    outline-offset: -3px;
}

.acfrt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    background: #eef5ff;
    color: #1769e8;
}

.acfrt-icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

.acfrt-card-content {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.acfrt-card-title {
    display: block;
    color: #18365f;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
}

.acfrt-card-description {
    display: block;
    margin-top: 8px;
    color: #697a90;
    font-size: 13px;
    line-height: 1.85;
}

.acfrt-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
    color: #1769e8;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.acfrt-cta-arrow {
    display: inline-block;
    font-size: 17px;
    line-height: 1;
    transition: transform .18s ease;
}

.acfrt-card:hover .acfrt-cta-arrow,
.acfrt-card:focus-within .acfrt-cta-arrow {
    transform: translateX(-3px);
}

[dir="ltr"] .acfrt-card:hover .acfrt-cta-arrow,
[dir="ltr"] .acfrt-card:focus-within .acfrt-cta-arrow {
    transform: translateX(3px);
}

.acfrt-editor-empty {
    padding: 22px 24px;
    border: 1px dashed #b9cce3;
    border-radius: 14px;
    background: #f8fbff;
    color: #5f728d;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

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

    .acfrt-card {
        min-height: 200px;
    }
}

@media (max-width: 767px) {
    .acfrt-head {
        margin-bottom: 22px;
    }

    .acfrt-heading {
        font-size: clamp(25px, 8vw, 32px);
    }

    .acfrt-description {
        font-size: 14px;
    }

    .acfrt-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .acfrt-card {
        min-height: 0;
    }

    .acfrt-card-link {
        gap: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acfrt-card,
    .acfrt-cta-arrow {
        transition: none;
    }
}

/* Phase 8 — responsive QA and compact-screen hardening */
.acfrt-wrap,
.acfrt-head,
.acfrt-grid,
.acfrt-card,
.acfrt-card-link,
.acfrt-card-content {
    min-width: 0;
    max-width: 100%;
}

.acfrt-card-title,
.acfrt-card-description,
.acfrt-cta {
    overflow-wrap: anywhere;
    word-break: normal;
}

.acfrt-card-link {
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 767px) {
    .acfrt-wrap {
        width: 100%;
        overflow: visible;
    }

    .acfrt-head {
        width: 100%;
        max-width: 100%;
    }

    .acfrt-card {
        width: 100%;
        padding: 20px;
    }

    .acfrt-card-link {
        gap: 14px;
    }

    .acfrt-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .acfrt-cta {
        min-height: 44px;
        padding-top: 14px;
    }
}

@media (max-width: 430px) {
    .acfrt-heading {
        font-size: clamp(24px, 7.2vw, 30px);
    }

    .acfrt-card {
        padding: 18px;
        border-radius: 16px;
    }
}

@media (max-width: 360px) {
    .acfrt-head {
        margin-bottom: 18px;
    }

    .acfrt-card {
        padding: 16px;
    }

    .acfrt-card-title {
        font-size: 17px;
    }

    .acfrt-card-description {
        line-height: 1.75;
    }
}

@media (max-width: 320px) {
    .acfrt-grid {
        gap: 12px;
    }

    .acfrt-card {
        padding: 15px;
    }
}
