.authors {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1.25rem;
    border-top: 0.063rem solid var(--rsm-light-grey);
    border-bottom: 0.063rem solid var(--rsm-light-grey);
}

.authors .author {
    width: 100%;
    padding: 0 1.25rem;
}

.authors .profile {
    padding-top: 1.875rem;
}

.authors.single-author .profile {
    padding-top: 1.25rem;
}

.authors .author:last-child .profile {
    padding-bottom: 1.875rem;
}

.authors .profile-top {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 0.625rem;
}

.authors .profile-image {
    height: auto;
    position: relative;
}

.authors .profile-image img {
    object-fit: cover;
    position: relative;
    bottom: 0;
}

.authors .profile-content {
    text-align: left;
    padding-left: 1.875rem;
    align-items: flex-start;
    width: 100%;
    align-self: flex-start;
}

.authors .profile-name {
    margin: 0 0 0.25rem;
    font-size: var(--heading-font-size-l);
    line-height: 1.35;
    font-weight: normal;
}

.authors .profile-role {
    margin: 0;
    font-size: var(--body-font-size-s);
    line-height: 1.5;
}

.authors .profile-view a {
    font-weight: 600;
}

.authors .button {
    width: 100%;
}

.authors .profile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 0.625rem;
}

.authors .profile-actions .button {
    width: 100%;
    display: inline-flex;
    justify-content: flex-start;
}

.authors .button:not(:last-child) {
    margin-block-end: 0.125rem;
}

/* Single author specific styles (mobile) */
.single-author.authors .author {
    width: 100%;
}

@media (min-width:900px) {
    .authors .author {
        width: 33.3333%;
    }

    .authors .profile {
        padding-bottom: 1.875rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 100%;
    }

    .authors.single-author .profile {
        padding-top: 2.375rem;
        padding-left: 168px;
    }

    .authors .profile-top {
        display: flex;
        width: 100%;
        margin-bottom: 1.375rem;
    }

    .authors .button {
        width: auto;
    }

    /* Reset styles for multiple authors on desktop */
    .authors:not(.single-author) .profile-top {
        flex-wrap: wrap;
        justify-content: center;
    }

    .authors:not(.single-author) .profile-content {
        text-align: center;
        padding-left: 0;
        min-height: 105px;
        display: flex;
        flex-direction: column;
        position: relative;
        align-items: center;
        margin-top: 1rem;
    }

    .authors:not(.single-author) .profile-view {
        position: absolute;
        bottom: 0;
    }

    .authors:not(.single-author) .profile-actions {
        justify-content: center;
    }

    /* Single author specific desktop styles */
    .single-author.authors .profile {
        display: flex;
        flex-flow: row wrap;
        align-content: flex-end;
        position: relative;
        padding-left: 198px;
        min-height: 168px;
    }

    .single-author.authors .profile-image {
        max-width: 168px;
        height: 168px;
        position: absolute;
        left: 0;
        bottom: 1.75rem;
    }

    .single-author.authors .profile-content {
        padding-left: 0;
    }

    .single-author.authors .profile-actions .button {
        width: auto;
    }

    .authors .profile-name {
        line-height: 1.2083;
    }

    .single-author.authors .button:not(:last-child) {
        margin-right: 0.625rem;
        margin-bottom: 0;
    }

    .single-author.authors .profile-actions {
        width: 100%;
    }
}
