html {
    max-width: 100%;
    overflow-x: clip;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 100%;
    overflow-x: clip;
}

img,
svg,
video,
canvas {
    height: auto;
}

.shell,
.header-main,
.header-search-wrap,
.nav,
.navlinks,
.nav-item,
.course-shell,
.course-hero__inner,
.course-content,
.course-section,
.course-price-card-wrap,
.course-price-card,
.course-card-body,
.course-review-card,
.service-trust-card,
.service-feature-card {
    min-width: 0;
}

.course-hero__lead,
.course-section p,
.course-review-text,
.course-review-fact,
.service-feature-value,
.service-trust-card p,
.course-card-summary__item,
.course-price-note,
.course-installment__text {
    overflow-wrap: anywhere;
}

.course-section table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    -webkit-overflow-scrolling: touch;
}

.course-review-dialog__close {
    min-width: 44px !important;
    min-height: 44px !important;
}

@media (max-width: 1080px) {
    .course-price-card-wrap {
        width: 100% !important;
        max-width: 560px !important;
    }

    .service-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1180px) {
    .cr-catalog-head,
    .cr-catalog__sort {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .cr-catalog__sort {
        overflow: hidden !important;
    }

    .cr-sort-options {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-bottom: 6px !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .cr-sort-options::-webkit-scrollbar {
        display: none;
    }

    .cr-sort-option {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 720px) {
    .topbar {
        position: sticky;
        top: 0;
    }

    .shell {
        width: min(100% - 20px, 1300px) !important;
    }

    .utility-inner {
        gap: 6px !important;
        padding: 7px 0 !important;
    }

    .utility-note {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .utility-links,
    .top-auth {
        max-width: 100%;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .utility-links::-webkit-scrollbar,
    .top-auth::-webkit-scrollbar {
        display: none;
    }

    .utility-links a,
    .top-auth .button {
        min-height: 40px !important;
    }

    .header-main {
        gap: 8px !important;
        padding: 8px 0 !important;
    }

    .brand-logo {
        width: min(230px, 82vw) !important;
        max-height: 50px !important;
    }

    .header-search {
        min-height: 46px !important;
        grid-template-columns: minmax(0, 1fr) 50px !important;
        border-radius: 12px !important;
    }

    .header-search input {
        min-width: 0 !important;
        padding: 0 12px !important;
        font-size: 16px !important;
    }

    .nav {
        gap: 8px !important;
        padding-bottom: 10px !important;
    }

    .mobile-nav-toggle,
    .navlinks a,
    .navlinks button {
        min-height: 46px !important;
    }

    .nav.is-mobile-open .navlinks {
        display: grid !important;
        overflow: visible !important;
    }

    .navlinks {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }

    .navlinks a,
    .navlinks button {
        width: 100% !important;
        justify-content: flex-start !important;
        white-space: normal !important;
    }

    .course-shell {
        padding: 0 12px 40px !important;
    }

    .course-hero {
        margin-top: 8px !important;
    }

    .course-hero__inner {
        padding: 22px 12px 30px !important;
        gap: 24px !important;
    }

    .course-crumbs {
        gap: 8px !important;
        margin-bottom: 20px !important;
        font-size: 13px !important;
    }

    .course-hero__meta {
        gap: 8px !important;
        margin-bottom: 22px !important;
        font-size: 13px !important;
    }

    .course-school-chip,
    .course-meta-item,
    .course-updated,
    .course-free-pill {
        max-width: 100%;
        min-height: 38px !important;
    }

    .course-hero h1 {
        font-size: clamp(30px, 10vw, 38px) !important;
        line-height: 1.08 !important;
    }

    .course-hero__lead {
        margin-bottom: 24px !important;
        font-size: 17px !important;
        line-height: 1.58 !important;
    }

    .course-facts,
    .course-skills {
        gap: 8px !important;
    }

    .course-fact,
    .course-skill {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .course-hero-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) repeat(3, 54px) !important;
        align-items: stretch !important;
        margin-top: 22px !important;
    }

    .course-hero-button {
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 14px !important;
        text-align: center !important;
    }

    .course-current-price {
        font-size: 32px !important;
    }

    .course-card-body {
        padding: 20px 16px 22px !important;
    }

    .course-card-visual {
        min-height: 178px !important;
        padding: 18px !important;
    }

    .course-card-visual__title {
        max-width: 100% !important;
        font-size: 24px !important;
    }

    .course-card-actions {
        grid-template-columns: minmax(0, 1fr) repeat(3, 46px) !important;
        gap: 8px !important;
    }

    .course-go-button {
        min-height: 54px !important;
        padding: 0 12px !important;
        font-size: 15px !important;
        white-space: normal !important;
    }

    .course-square-button {
        width: 46px !important;
        height: 46px !important;
    }

    .course-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        padding: 12px !important;
        gap: 8px !important;
    }

    .course-tab {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: flex-start !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .course-tab span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .course-content {
        gap: 16px !important;
        margin-top: 18px !important;
        padding: 0 12px 44px !important;
    }

    .course-section {
        padding: 18px 16px !important;
    }

    .course-section h2 {
        font-size: 23px !important;
        line-height: 1.18 !important;
    }

    .service-feature-grid,
    .course-spec-grid,
    .course-reviews-grid,
    .course-teachers__grid,
    .course-similar-grid,
    .course-review-form__grid {
        grid-template-columns: 1fr !important;
    }

    .course-review-top {
        grid-template-columns: 44px minmax(0, 1fr) !important;
    }

    .course-review-rating {
        grid-column: 1 / -1 !important;
        justify-self: start !important;
    }

    .course-review-modal {
        align-items: flex-end !important;
        padding: 10px !important;
    }

    .course-review-dialog {
        max-height: calc(100dvh - 20px) !important;
        padding: 22px 16px !important;
    }

    .service-trust-check {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 5px !important;
    }
}

@media (max-width: 420px) {
    .shell {
        width: min(100% - 16px, 1300px) !important;
    }

    .course-card-actions {
        grid-template-columns: minmax(0, 1fr) repeat(3, 42px) !important;
    }

    .course-square-button {
        width: 42px !important;
        height: 42px !important;
    }

    .course-hero-actions {
        grid-template-columns: minmax(0, 1fr) repeat(3, 48px) !important;
    }

    .course-hero-square {
        width: 48px !important;
        height: 48px !important;
    }

    .course-tabs {
        grid-template-columns: 1fr !important;
    }
}
