/* ==========================================================================
   Learner home (Views/Learner/_CourseItems.cshtml + _CourseItemsPartial.cshtml)

   A catalogue page: a dark band (greeting, search, popular subjects, "pick up where you left
   off"), a bar that stays in view (category chips, format, filters), and the courses as cards
   or rows. Same palette and type as the course page and My learning: violet #6d4aff, ink
   #14121f, the band's deep indigo, Sora for headings, Inter for the rest.
   ========================================================================== */

.lh {
    --lh-v: #6d4aff;
    --lh-v-ink: #4f30e0;
    --lh-v-soft: #f1edff;
    --lh-ink: #14121f;
    --lh-ink-2: #3d3a4d;
    --lh-muted: #6c6980;
    --lh-line: #e8e6f0;
    --lh-wash: #f6f5fb;
    --lh-green: #12a66a;
    --lh-red: #ff3d5a;
    --lh-max: 1280px;
    --lh-top: 0px;
    min-height: 100vh;
    padding-bottom: 72px;
    background: var(--lh-wash);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--lh-ink-2);
}

    .lh *, .lh *::before, .lh *::after { box-sizing: border-box; }
    .lh p, .lh h1, .lh h2, .lh h3, .lh ul, .lh fieldset { margin: 0; }
    .lh ul { padding: 0; list-style: none; }
    .lh a { text-decoration: none; }
    .lh button { font-family: inherit; }

html.lh-lock, html.lh-lock body { overflow: hidden; }

/* ---------------- the band ---------------- */
.lh-band {
    position: relative;
    z-index: 1;
    background:
        radial-gradient(900px 360px at 88% -20%, rgba(109, 74, 255, .5), transparent 60%),
        radial-gradient(700px 300px at -10% 130%, rgba(56, 189, 248, .16), transparent 60%),
        linear-gradient(110deg, #120e2b, #241a63);
    color: #fff;
}

    .lh-band::after {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
        background-size: 18px 18px;
        pointer-events: none;
    }

.lh-band-in {
    position: relative;
    z-index: 3;
    max-width: var(--lh-max);
    margin: 0 auto;
    padding: 48px 24px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: center;
}

.lh-hero { min-width: 0; }

.lh-hello {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: rgba(255, 255, 255, .78);
}

    .lh-hello b { color: #fff; font-weight: 700; }

.lh-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}

.lh-spark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .12);
    color: #ffd166;
}

.lh-title {
    margin-top: 14px !important;
    max-width: 680px;
    font-family: "Sora", "Inter", sans-serif;
    font-size: clamp(30px, 4.2vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.025em;
    color: #fff;
}

    .lh-title em {
        font-style: normal;
        background: linear-gradient(90deg, #b9a6ff, #7dd3fc);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

/* the search box (ids from co-learner.js: co-course-search-m2 / -input-m2 / -results-m2) */
.lh #co-course-search-m2.lh-search {
    position: relative !important;
    display: flex !important;
    align-items: center;
    width: 100%;
    max-width: 640px;
    height: 60px;
    margin: 26px 0 0 !important;
    left: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 48px -24px rgba(5, 2, 30, .8), 0 0 0 4px rgba(255, 255, 255, .08);
}

    .lh-search > .bi-search { position: absolute; left: 20px; font-size: 18px; color: var(--lh-v); pointer-events: none; }

.lh #co-course-search-input-m2 {
    width: 100%;
    height: 100%;
    padding: 0 52px 0 54px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    font-family: inherit;
    font-size: 16px !important;
    color: var(--lh-ink);
    outline: none;
}

    .lh #co-course-search-input-m2::placeholder { color: #8f8ba3; }
    .lh #co-course-search-m2:focus-within { box-shadow: 0 24px 48px -24px rgba(5, 2, 30, .8), 0 0 0 4px rgba(185, 166, 255, .55); }

.lh-search-clear {
    position: absolute;
    right: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--lh-wash);
    color: var(--lh-muted);
    cursor: pointer;
}

.lh #co-course-search-results-m2 {
    top: calc(100% + 8px) !important;
    max-height: 360px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--lh-line);
    border-radius: 14px;
    box-shadow: 0 24px 48px -20px rgba(20, 10, 70, .45);
}

    .lh #co-course-search-results-m2 > li { border-radius: 10px; padding: 9px 10px; font-size: 13.5px !important; min-height: 0; }
    .lh #co-course-search-results-m2 > li:hover { background: var(--lh-wash); }

.lh-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .62);
}

.lh-pop {
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

    .lh-pop:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); }

/* ---- the side: resume card + numbers ---- */
.lh-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.lh-resume {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    color: var(--lh-ink-2) !important;
    box-shadow: 0 28px 56px -28px rgba(5, 2, 30, .85);
    transition: transform .18s ease;
}

    .lh-resume:hover { transform: translateY(-2px); }

.lh-resume-media {
    position: relative;
    flex: none;
    width: 112px;
    aspect-ratio: 16 / 10;
    border-radius: 11px;
    overflow: hidden;
    background: var(--lh-v-soft);
}

    .lh-resume-media[hidden] { display: none; }
    .lh-resume-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lh-resume-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 8, 30, .25); }

    .lh-resume-play .bi {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: #fff;
        color: var(--lh-v);
        font-size: 18px;
        padding-left: 2px;
    }

.lh-resume-icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--lh-v-soft);
    color: var(--lh-v);
    font-size: 22px;
}

.lh-resume-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

    .lh-resume-main small { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--lh-v); }

    .lh-resume-main b {
        font-family: "Sora", "Inter", sans-serif;
        font-size: 14.5px;
        font-weight: 700;
        line-height: 1.3;
        color: var(--lh-ink);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .lh-resume-main > span { font-size: 12.5px; color: var(--lh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lh-resume-go {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--lh-v);
    color: #fff;
    font-size: 15px;
}

.lh-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: 16px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    overflow: hidden;
}

    .lh-stats li { padding: 12px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
    .lh-stats li + li { border-left: 1px solid rgba(255, 255, 255, .1); }
    .lh-stats b { font-family: "Sora", "Inter", sans-serif; font-size: 20px; font-weight: 800; color: #fff; line-height: 1.1; }
    .lh-stats span { font-size: 11.5px; color: rgba(255, 255, 255, .62); }

/* ---------------- the bar ---------------- */
.lh-bar {
    position: sticky;
    top: var(--lh-top);
    z-index: 40;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--lh-line);
    transition: box-shadow .2s ease;
}

    .lh-bar.is-stuck { box-shadow: 0 10px 24px -18px rgba(30, 20, 90, .45); }

.lh-bar-in {
    max-width: var(--lh-max);
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* every option is a hidden radio and the label after it */
.lh-r { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.lh-cats {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    padding-right: 40px;
}

    .lh-cats::-webkit-scrollbar { display: none; }

.lh .lh-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    margin: 0;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--lh-line);
    background: #fff;
    font-size: 13.5px !important;
    font-weight: 600;
    color: var(--lh-ink-2) !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

    .lh .lh-chip span { font-size: 11.5px; font-weight: 700; color: var(--lh-muted); }
    .lh .lh-chip:hover { border-color: #cfc6f5; background: var(--lh-v-soft); }
.lh .lh-r:checked + .lh-chip { background: var(--lh-ink); border-color: var(--lh-ink); color: #fff !important; }
    .lh .lh-r:checked + .lh-chip span { color: rgba(255, 255, 255, .65); }
.lh .lh-r:focus-visible + label { outline: 3px solid rgba(109, 74, 255, .4); outline-offset: 2px; }

.lh-controls { flex: none; display: flex; align-items: center; gap: 10px; }

.lh-seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 12px;
    background: #efedf6;
}

    .lh .lh-seg label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 32px;
        margin: 0;
        padding: 0 12px;
        border-radius: 9px;
        font-size: 13px !important;
        font-weight: 600;
        color: var(--lh-muted) !important;
        white-space: nowrap;
        cursor: pointer;
        transition: background-color .15s ease, color .15s ease;
    }

    .lh .lh-seg .lh-r:checked + label { background: #fff; color: var(--lh-ink) !important; box-shadow: 0 2px 6px -2px rgba(30, 20, 90, .3); }

.lh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lh-red); box-shadow: 0 0 0 3px rgba(255, 61, 90, .18); }

.lh-more {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--lh-line);
    border-radius: 12px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--lh-ink);
    cursor: pointer;
}

    .lh-more:hover { border-color: #cfc6f5; background: var(--lh-v-soft); }

.lh-more-n {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: var(--lh-v);
    color: #fff;
    font-size: 11.5px;
}

    .lh-more-n[hidden] { display: none; }

/* ---------------- results ---------------- */
.lh-main { max-width: var(--lh-max); margin: 0 auto; padding: 28px 24px 0; }

.lh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lh-head-l { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }

.lh-h2 {
    font-family: "Sora", "Inter", sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--lh-ink);
}

.lh-count { font-size: 14px; color: var(--lh-muted); }
.lh-head-r { display: flex; align-items: center; gap: 8px; }

.lh-sort { position: relative; display: flex; align-items: center; margin: 0; }

    .lh-sort select {
        height: 38px;
        padding: 0 34px 0 12px;
        border: 1px solid var(--lh-line);
        border-radius: 11px;
        background: #fff;
        background-image: none !important;
        font-family: inherit;
        font-size: 13.5px;
        font-weight: 600;
        color: var(--lh-ink);
        -webkit-appearance: none !important;
        appearance: none !important;
        cursor: pointer;
    }

    .lh-sort .bi { position: absolute; right: 12px; font-size: 11px; color: var(--lh-muted); pointer-events: none; }

.lh-view { display: inline-flex; padding: 3px; border-radius: 11px; background: #efedf6; }

    .lh-view button {
        width: 34px;
        height: 32px;
        border: 0;
        border-radius: 8px;
        background: none;
        color: var(--lh-muted);
        font-size: 15px;
        cursor: pointer;
    }

        .lh-view button.is-on { background: #fff; color: var(--lh-ink); box-shadow: 0 2px 6px -2px rgba(30, 20, 90, .3); }

.lh-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
    .lh-active[hidden] { display: none; }

.lh-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 8px 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--lh-v-soft);
    color: var(--lh-v-ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .lh-pill:hover { background: #e4dcff; }

.lh-link { border: 0; background: none; padding: 0 4px; font-size: 13.5px; font-weight: 700; color: var(--lh-v); cursor: pointer; }
    .lh-link:hover { text-decoration: underline; }

.lh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--lh-v);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 22px -14px rgba(109, 74, 255, .9);
}

    .lh-btn:hover { background: var(--lh-v-ink); }

.lh-results { margin-top: 20px; }

/* the skeleton grid (co-skeleton.css) keeps its own columns */
.lh-results .cosk { margin: 0 -10px; }

.lh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

/* ---- a course ---- */
.lh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--lh-line);
    overflow: hidden;
    color: var(--lh-ink-2) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .lh-card:hover { transform: translateY(-3px); border-color: #dcd5fb; box-shadow: 0 24px 44px -26px rgba(40, 20, 120, .5); }
    .lh-card:focus-visible { outline: 3px solid rgba(109, 74, 255, .45); outline-offset: 2px; }

.lh-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--lh-v-soft); overflow: hidden; }
    .lh-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.lh-card:hover .lh-media img { transform: scale(1.04); }

.lh-tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

.lh-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--lh-ink);
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .3);
}

    .lh-tag.is-live { background: var(--lh-red); color: #fff; }
        .lh-tag.is-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: lh-pulse 1.6s ease-in-out infinite; }
    .lh-tag.is-program { background: var(--lh-ink); color: #fff; }

@keyframes lh-pulse { 50% { opacity: .35; } }

.lh-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 15px 17px 16px; min-width: 0; }

.lh-cat { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--lh-v); }

.lh-name {
    font-family: "Sora", "Inter", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--lh-ink);
    min-height: calc(1.35em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lh-card:hover .lh-name { color: var(--lh-v-ink); }

.lh-facts { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12.5px; color: var(--lh-muted); }
    .lh-facts > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
    .lh-facts .bi { color: #a39fb5; }
.lh-langs { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block !important; }

/* level as three rising bars */
.lh-level { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
    .lh-level i { width: 3px; border-radius: 2px; background: #d9d4ea; }
        .lh-level i:nth-child(1) { height: 5px; }
        .lh-level i:nth-child(2) { height: 8px; }
        .lh-level i:nth-child(3) { height: 12px; }
    .lh-level[data-level="1"] i:nth-child(1),
    .lh-level[data-level="2"] i:nth-child(-n+2),
    .lh-level[data-level="3"] i { background: var(--lh-v); }

.lh-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--lh-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lh-price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
    .lh-price b { font-family: "Sora", "Inter", sans-serif; font-size: 18px; font-weight: 800; color: var(--lh-ink); }
    .lh-price b.is-free { color: var(--lh-green); }
    .lh-price s { font-size: 13px; color: #9a96ab; }
    .lh-price em { font-style: normal; padding: 2px 7px; border-radius: 6px; background: #e7f8f0; color: #0b7a4c; font-size: 11.5px; font-weight: 700; }

.lh-cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lh-v);
    white-space: nowrap;
}

    .lh-cta .bi { transition: transform .18s ease; }
.lh-card:hover .lh-cta .bi { transform: translateX(3px); }

/* ---- rows (the "rows" layout) ---- */
.lh-results.is-list .lh-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lh-results.is-list .lh-card { flex-direction: row; }
.lh-results.is-list .lh-media { flex: none; width: 300px; aspect-ratio: 16 / 9; }
.lh-results.is-list .lh-body { padding: 18px 22px; gap: 9px; }
.lh-results.is-list .lh-name { font-size: 18px; min-height: 0; }
.lh-results.is-list .lh-foot { border-top: 0; padding-top: 4px; }
.lh-results.is-list .lh-cta {
    height: 40px;
    padding: 0 16px;
    border-radius: 11px;
    background: var(--lh-v);
    color: #fff;
}

/* ---- nothing found ---- */
.lh-empty {
    max-width: 520px;
    margin: 40px auto 0;
    padding: 40px 28px 34px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--lh-line);
    text-align: center;
}

.lh-empty-art { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center; background: var(--lh-v-soft); color: var(--lh-v); font-size: 30px; }
.lh-empty h3 { font-family: "Sora", "Inter", sans-serif; font-size: 20px; font-weight: 800; color: var(--lh-ink); }
.lh-empty p { margin: 8px 0 20px !important; font-size: 14.5px; line-height: 1.55; color: var(--lh-muted); }

/* ---------------- the filters drawer ---------------- */
.lh-scrim {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(12, 9, 34, .45);
    opacity: 0;
    transition: opacity .22s ease;
}

    .lh-scrim.is-open { opacity: 1; }
    .lh-scrim[hidden], .lh-drawer[hidden] { display: none; }

.lh-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2101;
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -24px 0 60px -30px rgba(12, 9, 34, .6);
    transform: translateX(100%);
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}

    .lh-drawer.is-open { transform: none; }

.lh-drawer-head {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--lh-line);
}

    .lh-drawer-head h3 { display: flex; align-items: center; gap: 9px; font-family: "Sora", "Inter", sans-serif; font-size: 18px; font-weight: 800; color: var(--lh-ink); }
    .lh-drawer-head h3 .bi { color: var(--lh-v); }

.lh-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--lh-wash); color: var(--lh-ink); cursor: pointer; }
    .lh-x:hover { background: #eae7f5; }

.lh-drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; overscroll-behavior: contain; }

.lh-group { padding: 18px 0 14px; }
    .lh-group + .lh-group { border-top: 1px solid #f0eef6; }

    .lh-group .lh-legend {
        margin: 0 0 12px !important;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--lh-muted);
    }

.lh-opts { display: flex; flex-wrap: wrap; gap: 8px; }

    .lh .lh-opts label {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 38px;
        margin: 0;
        padding: 6px 14px;
        border-radius: 11px;
        border: 1.5px solid var(--lh-line);
        background: #fff;
        font-size: 13.5px !important;
        font-weight: 600;
        color: var(--lh-ink-2) !important;
        cursor: pointer;
        transition: border-color .15s ease, background-color .15s ease;
    }

        .lh .lh-opts label span:not(.lh-level) { font-size: 11.5px; color: var(--lh-muted); }
        .lh .lh-opts label:hover { border-color: #cfc6f5; }
    .lh .lh-opts .lh-r:checked + label { border-color: var(--lh-v); background: var(--lh-v-soft); color: var(--lh-v-ink) !important; }

.lh-drawer-foot {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--lh-line);
}

    .lh-drawer-foot .lh-btn { flex: 1; max-width: 240px; }

/* ---------------- smaller screens ---------------- */
@media (max-width: 1099.98px) {
    .lh-band-in { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
}

@media (max-width: 991.98px) {
    .lh-band-in { grid-template-columns: minmax(0, 1fr); padding: 36px 20px 40px; gap: 28px; }
    .lh-bar-in, .lh-main { padding-left: 20px; padding-right: 20px; }
    .lh-results.is-list .lh-media { width: 240px; }
}

@media (max-width: 767.98px) {
    .lh-band-in { padding: 26px 16px 30px; gap: 22px; }
    .lh-title { margin-top: 10px !important; }
    .lh #co-course-search-m2.lh-search { height: 52px; margin-top: 18px !important; border-radius: 14px; }
    .lh #co-course-search-input-m2 { font-size: 15px !important; padding-left: 48px; }
    .lh-search > .bi-search { left: 17px; }
    .lh-popular { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
        .lh-popular::-webkit-scrollbar { display: none; }
        .lh-popular > * { flex: none; }
    .lh-stats b { font-size: 17px; }

    /* the bar: chips on one line, format + filters on the next */
    .lh-bar-in { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 16px; }
    .lh-controls { justify-content: space-between; }
    .lh-seg { flex: 1; }
        .lh .lh-seg label { flex: 1; justify-content: center; padding: 0 8px; }
    .lh-main { padding: 20px 16px 0; }
    .lh-h2 { font-size: 20px; }
    .lh-view { display: none; }

    /* courses as compact rows on a phone, whichever layout was picked */
    .lh-grid, .lh-results.is-list .lh-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .lh-card, .lh-results.is-list .lh-card { flex-direction: row; border-radius: 16px; }
    .lh-media, .lh-results.is-list .lh-media { flex: none; width: 118px; aspect-ratio: auto; min-height: 100%; }
    .lh-tags { left: 7px; top: 7px; }
        .lh-tag.is-program { display: none; }
        .lh-tag { padding: 3px 7px; font-size: 10.5px; }
    .lh-body, .lh-results.is-list .lh-body { padding: 12px 13px; gap: 5px; }
    .lh-name, .lh-results.is-list .lh-name { font-size: 14.5px; min-height: 0; }
    .lh-facts > span:not(:first-child) { display: none; }
    .lh-foot { padding-top: 8px; }
    .lh-price b { font-size: 16px; }
    .lh-cta, .lh-results.is-list .lh-cta { display: none; }

    /* the drawer comes up from below */
    .lh-drawer { top: auto; width: 100%; max-height: 86vh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
    .lh * { transition: none !important; animation: none !important; }
}

/* ---------------- fixes ---------------- */
/* this page has its own search in the band, so the header's is not shown here (this stylesheet
   is only loaded by the learner home) */
#co-course-search { display: none !important; }

/* while the search is in use its results drop over the sticky bar below, not under it */
.lh-band:focus-within,
.lh-band:has(#co-course-search-results-m2.show) { z-index: 45; }

/* co-bootstrap.css pulls #co-course-list-main up 25px on small screens, for the old page -
   here that slid the first course under the results heading */
.lh #co-course-list-main { margin-top: 0 !important; }
