/* Course details only: avoid nested gutters on smaller screens. */
.course-nav-page #course {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .course-nav-page #course .course-section {
        box-sizing: border-box;
        min-width: 0;
        padding: 20px 16px 36px;
    }
    .course-nav-page #course .course-detail-content {
        gap: 24px;
        padding: 20px 0;
    }
    .course-nav-page #course .course-detail-text,
    .course-nav-page #course .course-detail-image {
        min-width: 0;
    }
    .course-nav-page #course .course-detail-text {
        text-align: left;
        overflow-wrap: anywhere;
    }
    .course-nav-page #course .course-detail-text h3 {
        padding-left: 20px;
    }
    .course-nav-page #course .course-detail-text p {
        padding: 0 0 0 20px;
        font-size: 1rem;
        line-height: 1.9;
    }
    .course-nav-page #course .course-detail-image img {
        display: block;
        width: 100%;
        height: auto;
    }
    .course-nav-page #course .course-detail-tags {
        padding-inline: 0;
    }
    .course-nav-page #course .course-section > h2 {
        width: 100%;
        margin: 16px 0 0 !important;
    }
    /* Override the legacy flex lists and forced single-line subjects. */
    .course-nav-page #course .course-section > ul {
        display: block;
        box-sizing: border-box;
        width: 100%;
        margin: 0 0 24px !important;
        padding: 16px !important;
        column-count: 2 !important;
        column-gap: 28px !important;
        font-size: 1rem !important;
    }
    .course-nav-page #course .course-section > ul > li {
        width: auto;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
        font-size: 1rem !important;
        line-height: 1.75 !important;
        padding: 4px 0 !important;
    }
}
@media (max-width: 768px) {
    .course-nav-page #course .course-section {
        padding: 20px 0 32px;
    }
    .course-nav-page #course .course-detail-content {
        flex-direction: column;
        gap: 20px;
    }
    .course-nav-page #course .course-detail-header {
        padding: 16px;
    }
    .course-nav-page #course .course-detail-header h3 {
        font-size: 1.125rem;
        overflow-wrap: anywhere;
    }
    .course-nav-page #course .course-detail-text,
    .course-nav-page #course .course-detail-image {
        width: 100%;
    }
}
@media (max-width: 600px) {
    .course-nav-page #course .course-section > ul {
        column-count: 1 !important;
    }
}
@media (max-width: 768px) {
    .course-nav-page #pb .course-detail-header,
    .course-nav-page #th .course-detail-header {
        padding-inline: 10px;
    }
}
@media (max-width: 1024px) {
    .course-nav-page.course-headings-ready #course h3 {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        white-space: nowrap;
    }
    .course-nav-page.course-headings-ready #course h3 br {
        display: none;
    }
    .course-nav-page #course h3.course-heading-fitted {
        font-size: var(--course-heading-size) !important;
    }
}
