.cdf-home-library {
    box-sizing: border-box;
    background: #f5f7fa;
    border: 1px solid #dce4ed;
    border-radius: 8px;
    padding: 26px 32px;
    margin: 28px 0;
    color: #10294a;
}

.cdf-home-library-kicker {
    color: #a47b29;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 10px;
}

.cdf-home-library-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cdf-home-library-heading h2 {
    font-size: clamp(24px,3vw,32px);
    line-height: 1.25;
    margin: 0;
}

.cdf-home-library-heading a {
    color: #10294a;
    text-decoration: none;
}

.cdf-home-library-heading svg {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    color: #a47b29;
}

.cdf-home-library p {
    font-size: 17px;
    line-height: 1.6;
    margin: 10px 0 20px;
}

.cdf-home-library-categories {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    border-top: 1px solid #dce4ed;
    padding-top: 20px;
    gap: 16px;
}

.cdf-home-library-categories a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    color: #10294a;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.cdf-home-library-categories svg {
    width: 30px;
    height: 30px;
    color: #a47b29;
}

.cdf-home-library a:hover {
    color: #a47b29;
}

@media(max-width: 650px) {
    .cdf-home-library {
        padding: 20px 16px;
    }

    .cdf-home-library p {
        font-size: 15px;
    }

    .cdf-home-library-categories {
        gap: 10px;
    }

    .cdf-home-library-categories a {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .cdf-home-library-categories svg {
        width: 26px;
        height: 26px;
    }
}


/* CDF home library all link */
.cdf-home-library-heading .cdf-home-library-all {
    font-size: 14px;
    font-weight: 600;
    color: #10294a;
    white-space: nowrap;
    text-decoration: none;
}

.cdf-home-library-heading .cdf-home-library-all:hover {
    color: #a47b29;
}

@media(max-width: 650px) {
    .cdf-home-library-heading {
        flex-wrap: wrap;
        gap: 8px;
    }

    .cdf-home-library-heading .cdf-home-library-all {
        font-size: 13px;
    }
}


/* CDF homepage uniform spacing */
body.home #cdf3-main {
    --cdf-section-gap: 22px;
}

body.home #cdf3-main .c3-content {
    row-gap: var(--cdf-section-gap) !important;
    padding-top: var(--cdf-section-gap) !important;
    padding-bottom: var(--cdf-section-gap) !important;
}

body.home #cdf3-main .c3-content > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body.home #cdf3-main .c3-project:last-child {
    margin-bottom: 0 !important;
}

body.home #cdf3-main .c3-section > .c3-card:last-child {
    margin-bottom: 0 !important;
}

body.home #cdf3-main .cdf-v2-institution > .cdf-v2-directions {
    margin-bottom: 0 !important;
}

body.home #cdf3-main .cdf-v2-institution > .cdf-v2-people {
    margin-top: var(--cdf-section-gap) !important;
    margin-bottom: 0 !important;
}


/* CDF mobile compact refinement */
@media (max-width: 650px) {
    body.home #cdf3-main .c3-hero .c3-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    body.home #cdf3-main .c3-hero .c3-actions > a {
        width: 260px !important;
        max-width: 100% !important;
        min-height: 48px !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        box-sizing: border-box;
    }
}
