/* ============================================================================
   Course catalogue — /course/, /courses/<term>/, /topic/<tag>/
   (wave joris-feedback: V1 A, V2 A, V3 A, C2 A)

   Markup: parts/browse-content.php + template-parts/browse/*.
   The course card itself (C3 A) is styled globally in shell.css, because it
   is used site-wide.

     1. Navy showcase + Top picks (/course/, visitors)
     2. Page frame, light header, "Picked for you"
     3. Library layout + sidebar navigation + plans card
     4. Filter bar: dropdowns, options, chips, sort
     5. Mobile sheets (Categories / Filters)
     6. Results, grid, empty states, pagination
     7. Curated path (category editorial module)
     8. SEO text + FAQ
   All colour, radius and shadow values are tokens (tokens.css).
   ========================================================================= */

/* ── 1. Navy showcase ───────────────────────────────────────────────────── */

.sf-cat-hero {
    background: var(--player-dark);
    color: var(--on-navy);
    overflow-x: clip;
}

.sf-cat-hero__inner {
    max-width: var(--container-browse);
    margin: 0 auto;
    padding: 28px 24px 44px;
}

.sf-cat-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sf-cat-crumbs a {
    color: var(--deep-blue);
    text-decoration: none;
}

.sf-cat-crumbs a:hover {
    text-decoration: underline;
}

.sf-cat-crumbs .sf-icon {
    width: 14px;
    height: 14px;
    color: var(--muted-2);
}

.sf-cat-crumbs--on-navy,
.sf-cat-crumbs--on-navy a {
    color: var(--on-navy-strong);
}

.sf-cat-crumbs--on-navy .sf-icon {
    color: var(--on-navy-faint);
}

.sf-cat-hero__kicker {
    margin: 0;
    color: var(--on-navy-faint);
    font-size: 13px;
    font-weight: 900;
}

.sf-cat-hero__title {
    margin: 6px 0 8px;
    color: var(--on-navy);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.02em;
}

.sf-cat-hero__lead {
    max-width: 640px;
    margin: 0;
    color: var(--on-navy-strong);
    font-size: 16px;
    line-height: 1.55;
}

.sf-cat-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: var(--on-navy-strong);
    font-size: 14px;
    font-weight: 700;
}

.sf-cat-hero__stats b {
    color: var(--on-navy);
    font-weight: 900;
}

.sf-picks {
    margin-top: 30px;
}

.sf-picks__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.sf-picks__title {
    margin: 0;
    color: var(--on-navy);
    font-size: 20px;
    font-weight: 900;
}

.sf-picks__switch {
    display: inline-flex;
    gap: 2px;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--on-navy-line);
    border-radius: var(--r-btn);
    background: var(--on-navy-fill);
}

/* Radios stay focusable for keyboard use; the labels are the visible buttons. */
.sf-picks__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.sf-picks__opt {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: calc(var(--r-btn) - 2px);
    color: var(--on-navy-strong);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.sf-picks__opt:hover {
    color: var(--on-navy);
}

.sf-picks__radio:checked + .sf-picks__opt {
    background: var(--white);
    color: var(--ink);
}

.sf-picks__radio:focus-visible + .sf-picks__opt {
    outline: 3px solid var(--blue-on-navy);
    outline-offset: 2px;
}

.sf-picks__sub {
    margin: 6px 0 14px;
    color: var(--on-navy-faint);
    font-size: 14px;
    font-weight: 700;
}

/* One panel per mode; the checked radio picks the visible one. A single
   mode renders without a switch and simply shows. */
.sf-picks__panel {
    display: none;
}

.sf-picks:not(:has(.sf-picks__switch)) .sf-picks__panel,
.sf-picks:has(#sf-picks-popular:checked) .sf-picks__panel[data-picks="popular"],
.sf-picks:has(#sf-picks-rated:checked) .sf-picks__panel[data-picks="rated"],
.sf-picks:has(#sf-picks-new:checked) .sf-picks__panel[data-picks="new"] {
    display: block;
}

@supports not selector(:has(*)) {
    .sf-picks__panel:not([data-picks-alt]) {
        display: block;
    }
    .sf-picks__switch {
        display: none;
    }
}

.sf-picks__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.sf-picks__grid .course-card {
    border-color: transparent;
}

/* ── 2. Page frame, light header, "Picked for you" ──────────────────────── */

.sf-cat {
    max-width: var(--container-browse);
    margin: 0 auto;
    padding: 0 24px 56px;
}

/* Inside the side panel the shell's content column supplies the gutters. */
.sf-cat--in-panel {
    max-width: none;
    padding: 0;
}

.sf-cat-head {
    padding: 28px 0 8px;
}

.sf-cat--in-panel .sf-cat-head {
    padding-top: 0;
}

.sf-cat-head__title {
    margin: 0;
    color: var(--ink);
    /* soofos.nl scale: a calm 32px bold heading, normal case. */
    font-size: clamp(26px, 3vw, 32px);
    line-height: 1.2;
    font-weight: 800;
}

.sf-cat-head__intro {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.sf-cat-head__proof {
    margin: 10px 0 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.sf-cat-head__note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sf-cat-head__note a {
    color: var(--deep-blue);
    font-weight: 900;
}

.sf-picked {
    margin: 22px 0 8px;
    padding: 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
}

.sf-picked__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.sf-picked__title {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.sf-picked__sub {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sf-picked__sophie {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--blue-border);
    border-radius: var(--r-btn);
    background: var(--blue-tint);
    color: var(--deep-blue);
    font: 800 14px/1.2 var(--font);
    cursor: pointer;
}

.sf-picked__sophie:hover {
    background: var(--blue-fill);
}

.sf-picked__sophie:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.sf-picked__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* ── 3. Library layout + sidebar ────────────────────────────────────────── */

.sf-cat-lib {
    display: block;
    padding-top: 24px;
    scroll-margin-top: calc(var(--sf-nav-h, 75px) + 8px);
}

.sf-cat-lib--sidebar {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.sf-cat-main {
    min-width: 0;
}

.sf-cat-side {
    display: grid;
    gap: 20px;
}

.sf-cat-nav__group + .sf-cat-nav__group {
    margin-top: 20px;
}

.sf-cat-nav__heading {
    margin: 0 0 6px;
    padding: 0 10px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
}

.sf-cat-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-cat-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: var(--r-btn);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.sf-cat-nav__icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--muted);
}

.sf-cat-nav__icon .sf-icon {
    width: 19px;
    height: 19px;
}

.sf-cat-nav__label {
    flex: 1 1 auto;
    min-width: 0;
}

.sf-cat-nav__link:hover .sf-cat-nav__icon,
.sf-cat-nav__link.is-current .sf-cat-nav__icon {
    color: var(--deep-blue);
}

.sf-cat-nav__sub {
    margin: 2px 0 6px;
    padding: 0 0 0 29px;
    list-style: none;
}

.sf-cat-nav__link--sub {
    min-height: 36px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.sf-cat-nav__link:hover {
    background: var(--blue-tint);
    color: var(--deep-blue);
}

.sf-cat-nav__link.is-current {
    background: var(--blue-fill);
    color: var(--deep-blue);
    font-weight: 800;
}

.sf-cat-nav__link:focus-visible,
.sf-cat-nav__more:focus-visible,
.sf-cat-opt:focus-visible,
.sf-cat-chip:focus-visible,
.sf-cat-chips__clear:focus-visible,
.sf-cat-plus:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 1px;
}

.sf-cat-nav__count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.sf-cat-nav__more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 36px;
    margin-top: 4px;
    padding: 0 10px;
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.sf-cat-plans {
    padding: 16px;
    border: 1px solid var(--blue-border);
    border-radius: var(--r-card-sm);
    background: var(--blue-tint);
}

.sf-cat-plans__title {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
}

.sf-cat-plans__copy {
    margin: 4px 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.sf-cat-plans__btn {
    min-height: 40px;
}

/* ── 4. Filter bar ──────────────────────────────────────────────────────── */

/* Sticky under the site header / panel top bar (browse.js sets the exact
   offset in --sf-cat-sticky-top and .is-stuck for the hairline). */
.sf-cat-toolbar {
    position: sticky;
    top: var(--sf-cat-sticky-top, var(--sf-nav-h, 75px));
    z-index: 40;
    margin: 0 0 14px;
    padding: 8px 0;
    background: var(--page);
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}

.sf-cat-toolbar.is-stuck {
    border-bottom-color: var(--card-border);
}

@media (prefers-reduced-motion: reduce) {
    .sf-cat-toolbar {
        transition: none;
    }
}

@media (max-width: 760px) {
    /* One compact row on phones: the chips scroll sideways, never stack. */
    .sf-cat-chips,
    .sf-cat-chips__list {
        flex-wrap: nowrap;
    }

    .sf-cat-chips {
        overflow-x: auto;
        margin-top: 8px;
        scrollbar-width: none;
    }

    .sf-cat-chips::-webkit-scrollbar {
        display: none;
    }

    .sf-cat-chips li,
    .sf-cat-chips__clear {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

.sf-cat-toolbar__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.sf-cat-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sf-cat-dd {
    position: relative;
}

.sf-cat-dd__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-btn);
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.sf-cat-dd__btn::-webkit-details-marker {
    display: none;
}

.sf-cat-dd__btn:hover {
    border-color: var(--blue);
}

.sf-cat-dd__btn:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.sf-cat-dd__btn.is-active {
    border-color: var(--blue);
    background: var(--blue-fill);
    color: var(--deep-blue);
}

.sf-cat-dd__btn .sf-icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: transform .15s ease;
}

.sf-cat-dd[open] > .sf-cat-dd__btn {
    border-color: var(--blue);
}

.sf-cat-dd:not(.sf-cat-sheet)[open] > .sf-cat-dd__btn .sf-icon {
    transform: rotate(180deg);
}

.sf-cat-dd__count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: var(--r-pill);
    background: var(--deep-blue);
    color: var(--on-navy);
    font-size: 12px;
    font-weight: 900;
}

.sf-cat-dd__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card-sm);
    background: var(--white);
    box-shadow: var(--shadow-pop);
}

.sf-cat-dd__panel--end {
    left: auto;
    right: 0;
}

.sf-cat-dd__panel--wide {
    width: min(520px, 80vw);
    max-height: min(70vh, 560px);
    overflow: auto;
    padding: 14px;
}

.sf-cat-opts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-cat-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: var(--r-btn);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.sf-cat-opt:hover {
    background: var(--blue-tint);
    color: var(--deep-blue);
}

.sf-cat-opt.is-current {
    color: var(--deep-blue);
    font-weight: 900;
}

.sf-cat-opt__tick {
    display: inline-flex;
    width: 18px;
    flex: none;
    color: var(--deep-blue);
}

.sf-cat-plus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 6px;
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.sf-cat-plus:hover {
    text-decoration: underline;
}

.sf-cat-dd--sort {
    flex: none;
}

.sf-cat-dd__btn--sort {
    border-color: transparent;
    background: transparent;
}

.sf-cat-sort__short {
    display: none;
}

/* Phones: "Sort" alone keeps Categories + Filters + Sort on one row; the
   full label stays for screen readers and the menu ticks the current one. */
@media (max-width: 600px) {
    .sf-cat-sort__full {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .sf-cat-sort__short {
        display: inline;
    }
    .sf-cat-dd__btn--sort {
        border-color: var(--card-border);
        background: var(--white);
    }
}

.sf-cat-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 12px;
}

.sf-cat-chips__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 8px 0 12px;
    border: 1px solid var(--blue-border);
    border-radius: var(--r-pill);
    background: var(--blue-fill);
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.sf-cat-chip .sf-icon {
    width: 14px;
    height: 14px;
}

.sf-cat-chip:hover {
    border-color: var(--blue);
}

.sf-cat-chips__clear {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 900;
}

/* ── 5. Mobile sheets ───────────────────────────────────────────────────── */

.sf-cat-mobile {
    display: none;
}

@media (max-width: 899px) {
    .sf-cat-lib--sidebar {
        display: block;
    }

    .sf-cat-side,
    .sf-cat-desktop {
        display: none;
    }

    .sf-cat-mobile {
        display: block;
    }

    .sf-cat-sheet[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 990;
        background: var(--overlay);
    }

    .sf-cat-sheet__panel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 995;
        display: flex;
        flex-direction: column;
        max-height: 85vh;
        border-radius: var(--r-card) var(--r-card) 0 0;
        background: var(--white);
        box-shadow: var(--shadow-pop);
    }

    .sf-cat-sheet__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px 10px;
        border-bottom: 1px solid var(--card-border);
    }

    .sf-cat-sheet__title {
        margin: 0;
        color: var(--ink);
        font-size: 17px;
        font-weight: 900;
    }

    .sf-cat-sheet__close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 50%;
        background: var(--blue-tint);
        color: var(--ink);
        cursor: pointer;
    }

    .sf-cat-sheet__close[hidden] {
        display: none;
    }

    .sf-cat-sheet__close:focus-visible {
        outline: 3px solid var(--blue);
        outline-offset: 2px;
    }

    .sf-cat-sheet__body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 14px 16px;
        overscroll-behavior: contain;
    }

    .sf-cat-sheet__group + .sf-cat-sheet__group {
        margin-top: 16px;
    }

    /* Facet options as wrapping chips inside the Filters sheet. */
    .sf-cat-sheet__group .sf-cat-opts {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sf-cat-sheet__group .sf-cat-opt {
        min-height: 44px;
        padding: 0 14px;
        border: 1px solid var(--card-border);
        border-radius: var(--r-pill);
    }

    .sf-cat-sheet__group .sf-cat-opt.is-current {
        border-color: var(--blue);
        background: var(--blue-fill);
    }

    .sf-cat-sheet__group .sf-cat-opt__tick {
        display: none;
    }

    .sf-cat-sheet__body .sf-cat-nav__link {
        min-height: 44px;
    }

    .sf-cat-sheet__foot {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--card-border);
    }

    .sf-cat-sheet__foot .btn {
        min-height: 44px;
    }

    html.sf-cat-sheet-open {
        overflow: hidden;
    }

    .sf-cat-lib {
        padding-top: 16px;
    }

    .sf-cat-toolbar__filters {
        flex-wrap: nowrap;
    }

    .sf-cat-toolbar__filters > * {
        flex: none;
    }
}

/* ── 6. Results ─────────────────────────────────────────────────────────── */

.sf-bresults {
    scroll-margin-top: calc(var(--sf-nav-h, 75px) + 8px);
}

.sf-bresults__head {
    margin-bottom: 12px;
}

.sf-bresults__status {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sf-bresults__cross-search {
    color: var(--deep-blue);
    font-weight: 800;
}

.sf-bgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* In the panel there is no category sidebar, so the grid can use four. */
.sf-cat--in-panel .sf-bgrid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.sf-bresults__empty {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 56px 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
    text-align: center;
}

.sf-bresults__empty p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.sf-bresults__empty-action {
    min-height: 44px;
}

.sf-bsuggest {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.sf-bresults__empty .sf-bsuggest__label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.sf-bsuggest__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-bchip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.sf-bchip:hover {
    border-color: var(--blue);
    color: var(--deep-blue);
}

.sf-bchip__count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.sf-bpopular {
    width: 100%;
    max-width: 560px;
    text-align: left;
}

.sf-bpopular__title {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
    text-align: center;
}

.sf-bpopular__list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-bpopular__item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card-sm);
    background: var(--white);
    text-decoration: none;
}

.sf-bpopular__item:hover {
    border-color: var(--blue);
}

.sf-bpopular__thumb {
    display: block;
    width: 72px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--r-btn);
    background: var(--blue-fill);
}

.sf-bpopular__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-bpopular__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sf-bpopular__kicker {
    color: var(--deep-blue);
    font-size: 13px;
    font-weight: 900;
}

.sf-bpopular__name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sf-bpopular__meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.sf-bpopular__price {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.sf-bpagination {
    margin-top: 30px;
}

.sf-bpagination ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-bpagination .page-numbers {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-btn);
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.sf-bpagination a.page-numbers:hover {
    border-color: var(--blue);
    color: var(--deep-blue);
}

.sf-bpagination .page-numbers.current {
    border-color: var(--blue);
    background: var(--blue-fill);
    color: var(--deep-blue);
    font-weight: 900;
}

.sf-bpagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted-2);
}

/* ── 7. Curated path ────────────────────────────────────────────────────── */

.sf-bpath {
    display: grid;
    grid-template-columns: minmax(200px, .9fr) minmax(320px, 1.6fr);
    align-items: center;
    gap: 24px;
    margin: 0 0 20px;
    padding: 20px 22px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
}

.sf-bpath__label {
    margin: 0;
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 800;
}

.sf-bpath__heading {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 19px;
    line-height: 1.25;
    font-weight: 900;
}

.sf-bpath__copy {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.sf-bpath__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-bpath__step > a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    text-decoration: none;
}

.sf-bpath__thumb {
    display: block;
    flex: none;
    width: 54px;
    height: 42px;
    overflow: hidden;
    border-radius: var(--r-btn);
    background: var(--blue-fill);
}

.sf-bpath__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sf-bpath__step-body {
    display: block;
    min-width: 0;
}

.sf-bpath__number {
    display: block;
    color: var(--deep-blue);
    font-size: 13px;
    font-weight: 900;
}

.sf-bpath__step-title {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.25;
    font-weight: 800;
}

.sf-bpath__step > a:hover .sf-bpath__step-title {
    text-decoration: underline;
}

/* ── 8. SEO text + FAQ ──────────────────────────────────────────────────── */

.sf-bseo {
    margin-top: 44px;
    padding: 24px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
}

.sf-bseo__title {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.sf-bseo__subtitle {
    margin: 20px 0 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.sf-bseo__body p {
    max-width: 820px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.sf-bseo__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.sf-bseo__links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: var(--deep-blue);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.sf-bseo__links a:hover {
    text-decoration: underline;
}

.sf-bseo__qa {
    border-top: 1px solid var(--card-border);
}

.sf-bseo__qa:last-child {
    border-bottom: 1px solid var(--card-border);
}

.sf-bseo__qa summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.sf-bseo__qa summary::-webkit-details-marker {
    display: none;
}

.sf-bseo__qa summary:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.sf-bseo__qa summary .sf-icon {
    transition: transform .15s ease;
}

.sf-bseo__qa[open] summary .sf-icon {
    transform: rotate(180deg);
}

.sf-bseo__qa p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .sf-picks__grid,
    .sf-picked__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sf-bgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sf-bpath {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .sf-cat {
        padding: 0 16px 40px;
    }

    .sf-cat--in-panel {
        padding: 0;
    }

    .sf-cat-hero__inner {
        padding: 20px 16px 32px;
    }

    .sf-cat-hero__stats {
        font-size: 14px;
    }

    .sf-picks__switch {
        width: 100%;
    }

    .sf-picks__opt {
        flex: 1 1 0;
        justify-content: center;
        padding: 0 8px;
    }

    /* Rows of picks scroll sideways on a phone instead of stacking 4 tall. */
    .sf-picks__grid,
    .sf-picked__grid {
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        grid-template-columns: none;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        margin: 0 -16px;
        padding: 0 16px 6px;
        scroll-padding: 0 16px;
    }

    .sf-picks__grid > *,
    .sf-picked__grid > * {
        scroll-snap-align: start;
    }

    .sf-picked {
        padding: 16px;
    }

    .sf-bgrid,
    .sf-cat--in-panel .sf-bgrid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .sf-cat-dd__btn {
        padding: 0 12px;
    }

    .sf-bseo {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sf-cat-dd__btn .sf-icon,
    .sf-bseo__qa summary .sf-icon {
        transition: none;
    }
}

/* ── In-place loading (browse.js) ───────────────────────────────────────── */

/* A light "working" state: content stays put (no layout jump), it just dims. */
.sf-cat.is-loading .sf-cat-main,
.sf-cat.is-loading .sf-cat-head,
.sf-cat.is-loading .sf-bextras {
    opacity: .55;
    transition: opacity .15s ease .08s;
    pointer-events: none;
}

.sf-cat.is-loading {
    cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
    .sf-cat.is-loading .sf-cat-main,
    .sf-cat.is-loading .sf-cat-head,
    .sf-cat.is-loading .sf-bextras {
        transition: none;
    }
}

#sf-browse-results-heading:focus {
    outline: none;
}

/* ── Highlighted courses (category / topic) ─────────────────────────────── */

.sf-bhigh {
    margin: 0 0 24px;
}

.sf-bhigh__title,
.sf-bextras__title {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
}

.sf-bhigh__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-bhigh__card {
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
    color: inherit;
    text-decoration: none;
    transition: box-shadow .18s, border-color .18s;
}

.sf-bhigh__card:hover {
    border-color: var(--blue-border);
    box-shadow: var(--shadow-card);
}

.sf-bhigh__card:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.sf-bhigh__media {
    background: var(--strip);
}

.sf-bhigh__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-bhigh__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    min-width: 0;
}

.sf-bhigh__name {
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.sf-bhigh__proof {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sf-bhigh__excerpt {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sf-bhigh__foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.sf-bhigh__teacher {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

/* ── Programmes + instructors (category / topic) ────────────────────────── */

.sf-bextras {
    display: grid;
    gap: 32px;
    margin: 40px 0 0;
}

.sf-bextras__sub {
    margin: -6px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.sf-bprog,
.sf-bteach {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-bprog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sf-bteach {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sf-bprog__item,
.sf-bteach__item {
    display: flex;
    height: 100%;
    border: 1px solid var(--card-border);
    border-radius: var(--r-card);
    background: var(--white);
    color: inherit;
    text-decoration: none;
    transition: box-shadow .18s, border-color .18s;
}

.sf-bprog__item:hover,
.sf-bteach__item:hover {
    border-color: var(--blue-border);
    box-shadow: var(--shadow-card);
}

.sf-bprog__item:focus-visible,
.sf-bteach__item:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.sf-bprog__item {
    flex-direction: column;
    overflow: hidden;
}

.sf-bprog__media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: var(--blue-tint);
    color: var(--deep-blue);
}

.sf-bprog__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-bprog__icon .sf-icon {
    width: 32px;
    height: 32px;
}

.sf-bprog__body {
    display: grid;
    gap: 4px;
    padding: 12px 14px 14px;
}

.sf-bprog__name,
.sf-bteach__name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}

.sf-bprog__meta,
.sf-bteach__meta {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.sf-bteach__item {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    text-align: center;
}

.sf-bteach__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.sf-bteach__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-fill);
    color: var(--deep-blue);
    font-size: 20px;
    font-weight: 800;
}

@media (max-width: 1024px) {
    .sf-bteach {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .sf-bhigh__list,
    .sf-bprog {
        grid-template-columns: minmax(0, 1fr);
    }

    .sf-bhigh__card {
        grid-template-columns: 34% minmax(0, 1fr);
    }

    .sf-bteach {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
