footer:has(> .problem-footer) {
    margin-bottom: 0;
}

.problem-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 3rem;
    width: 100%;
    min-height: 7.25rem;
    padding: 1.5rem clamp(1rem, 3vw, 3rem);
    background: #212121;
    text-align: start;
    font-weight: 400;
}

.problem-footer__link {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 2.5vw, 2.75rem);
    min-height: 2.75rem;
    color: #fff;
    text-decoration: none;
}

.problem-footer__link:hover,
.problem-footer__link:focus-visible {
    color: #fff;
}

.problem-footer__link:hover .problem-footer__title,
.problem-footer__link:focus-visible .problem-footer__title {
    text-decoration: underline;
}

.problem-footer__link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.problem-footer__link--prev {
    grid-column: 1;
    grid-row: 1;
}

.problem-footer__link--next {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    text-align: end;
}

.problem-footer__text {
    min-width: 0;
}

.problem-footer__label,
.problem-footer__title {
    display: block;
}

.problem-footer__label {
    color: #ccc;
    font-size: .9375rem;
    line-height: 1.35;
}

.problem-footer__title {
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.problem-footer__arrow {
    margin-block-start: 1rem;
    flex: none;
    font-size: 1.25rem;
}

.problem-footer__link--prev .problem-footer__arrow {
    margin-block-start: 1rem;
    order: -1;
}

@media (max-width: 42rem) {
    .problem-footer {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding-block: 1rem;
    }

    .problem-footer__link--next {
        grid-column: 1;
        grid-row: auto;
    }
}
