/* ================================================
   Subject hub, browse and search results (/resources/browse/)
   Panel 316 + gap 32 + results in a 1360 container (1920 frames).
   ================================================ */

.sr-hub {
    background: #fff;
}

.sr-hub .sr-container {
    padding-left: clamp(16px, 3vw, 40px);
    padding-right: clamp(16px, 3vw, 40px);
    max-width: calc(1360px + 2 * clamp(16px, 3vw, 40px));
}

.sr-hub__body {
    padding-top: 80px;
    padding-bottom: 120px;
}

.sr-hub__bar {
    display: none;
}

/* Filters open a sheet only below 1024 (see there). */
.sr-hub__filters-btn:not(#sr-x) {
    display: none;
}

.sr-hub .sr-hub__share.sr-pbtn:not(#sr-x) {
    display: none;
}

.sr-hub__layout {
    display: grid;
    grid-template-columns: 316px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.sr-hub__more {
    display: flex;
    flex-direction: column;
    gap: 120px;
    margin-top: 120px;
}

/* ------------------------------------------------
   Filter panel
   ------------------------------------------------ */
.sr-panel {
    font-family: var(--sr-font-body);
}

.sr-panel__sheet-head,
.sr-panel__sheet-foot {
    display: none;
}

.sr-panel__top {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--sr-line);
}

.sr-panel__title {
    font-family: var(--sr-font-body);
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    color: var(--sr-neutral-heading);
    letter-spacing: 0;
    text-transform: none;
}

.sr-panel__search {
    margin: 0;
}

.sr-panel__count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 21px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sr-neutral-light-text);
}

/* One group: Subject, Islamic Studies Syllabus, Collection, Type, Age */
.sr-filter {
    padding: 24px 0;
    border-bottom: 1px solid var(--sr-line);
}

.sr-filter__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -6px -8px;
    padding: 6px 8px;
    border-radius: 6px;
    list-style: none;
    cursor: pointer;
    color: var(--sr-neutral-heading);
}

.sr-filter__head::-webkit-details-marker,
.sr-filter__head::marker {
    display: none;
    content: "";
}

.sr-filter__head:hover {
    background: #F5F9FC;
}

.sr-filter__head:focus {
    outline: none;
}

.sr-filter__head:focus-visible {
    box-shadow: var(--sr-focus-ring);
}

.sr-filter__title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.sr-filter__chevron {
    flex-shrink: 0;
    width: 12px;
    height: 7px;
    transform: rotate(180deg);
    transition: transform var(--sr-transition-fast);
}

.sr-filter[open] .sr-filter__chevron {
    transform: none;
}

.sr-filter__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

/* Parts under a book, lessons under a part: 28px in, 20px apart like the
   rest, so each keeps a 40px tap area of its own. */
.sr-filter__list--nested {
    gap: 20px;
    margin: 20px 0 0;
    padding-left: 28px;
}

.sr-filter__item {
    margin: 0;
    padding: 0;
}

.sr-filter__caption {
    margin-bottom: -2px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--sr-neutral-light-text);
}

.sr-filter__list > .sr-filter__caption:first-child {
    margin-top: -4px;
}

.sr-filter__item + .sr-filter__caption {
    margin-top: 4px;
}

.sr-filter__option,
.sr-filter__option:visited {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: -3px -6px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sr-neutral-body);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sr-filter__option .sr-check {
    margin-top: 2.5px;
}

/* Drawn options sit 14px apart, so the shared tap layer (see
   components.css) grows by exactly that much and neighbours never overlap. */
.sr-filter__option::before {
    height: calc(100% + 14px);
}

.sr-filter__label {
    flex: 1;
    min-width: 0;
}

.sr-filter__count {
    flex-shrink: 0;
    line-height: 21px;
    color: var(--sr-neutral-light-text);
    font-variant-numeric: tabular-nums;
}

a.sr-filter__option:hover {
    color: var(--sr-neutral-heading);
    text-decoration: none;
}

a.sr-filter__option:hover .sr-check {
    border-color: var(--sr-green-1);
}

.sr-filter__option:focus {
    outline: none;
}

.sr-filter__option:focus-visible {
    box-shadow: var(--sr-focus-ring);
}

.sr-filter__list--nested > .sr-filter__item > .sr-filter__option.is-checked {
    font-weight: 600;
    color: var(--sr-neutral-heading);
}

.sr-filter__option.is-disabled {
    cursor: default;
    opacity: 0.45;
}

.sr-filter__option.is-pending .sr-check {
    border-color: var(--sr-green-1);
    background: var(--sr-green-1);
}

/* ------------------------------------------------
   Results column
   ------------------------------------------------ */
.sr-hub__results {
    min-width: 0;
    container-type: inline-size;
    transition: opacity var(--sr-transition-base);
}

.sr-hub__results[aria-busy="true"] {
    opacity: 0.55;
}

.sr-hub__results[aria-busy="true"] .sr-grid {
    pointer-events: none;
}

.sr-results__head {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sr-results__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 10px;
}

.sr-results__title {
    flex: 1 1 280px;
    min-width: 0;
    font-family: var(--sr-font-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: var(--sr-neutral-heading);
}

.sr-results__title:focus {
    outline: none;
}

.sr-results__title:focus-visible {
    outline: 2px solid var(--sr-focus);
    outline-offset: 4px;
    border-radius: 4px;
}

.sr-results__share.sr-pbtn {
    white-space: nowrap;
}

.sr-results__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Sort menu */
.sr-sort {
    position: relative;
}

.sr-sort__menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    left: 0;
    width: 200px;
    padding: 16px;
}

.sr-sort__heading {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--sr-neutral-light-text);
}

.sr-sort__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sr-sort__option,
.sr-sort__option:visited {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -8px;
    padding: 10px 8px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--sr-neutral-body);
    text-decoration: none;
}

.sr-sort__option:hover,
.sr-sort__option:focus-visible {
    background: var(--sr-bg-skyblue);
    color: var(--sr-blue-1);
    outline: none;
    text-decoration: none;
}

.sr-sort__option[aria-current="true"] {
    font-weight: 600;
    color: var(--sr-blue-1);
}

.sr-sort__option[aria-current="true"]::after {
    content: "";
    width: 12px;
    height: 9px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5L4.5 8L11 1' fill='none' stroke='%230168A5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sr-results__badge {
    display: inline-block;
    position: relative;
    top: -4px;
    margin-right: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--sr-safar-blue);
    font-family: var(--sr-font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.2px;
    vertical-align: middle;
    color: #fff;
}

/* ------------------------------------------------
   A search, a filter or a lesson chosen (is-focused): a breadcrumb row
   above the results. With the sr_hub_hero_on_filtered switch off
   (is-white), the page is also white like the shop's product pages: the
   hero goes, its heading staying for screen readers.
   ------------------------------------------------ */
body.sr-hub-focused #brx-header {
    background: transparent;
}

.sr-hub.is-white .sr-hero {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.sr-hub.is-white .sr-hero :is(.sr-hero__search, .sr-hero__popular, .sr-hero__decor) {
    display: none;
}

/* My resources shows once: in the breadcrumb row. */
.sr-hub.is-focused .sr-hero .sr-hero__account {
    display: none;
}

/* Under the hero, the breadcrumb row sits closer to the wave. */
.sr-hub.is-focused .sr-hub__body {
    padding-top: 40px;
}

.sr-hub.is-white .sr-hub__body {
    padding-top: 32px;
}

.sr-hub:not(.is-focused) :is(.sr-hub__crumbs, .sr-hub__my):not(#sr-x) {
    display: none;
}

.sr-hub.is-focused .sr-hub__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 0 0 28px;
}

.sr-hub__crumbs {
    position: relative;
    min-width: 0;
}

.sr-hub__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sr-hub.is-focused .sr-hub__share.sr-pbtn:not(#sr-x) {
    display: inline-flex;
    gap: 8px;
    min-height: 40px;
    height: 40px;
    padding: 0 18px;
    border: 1.5px solid var(--sr-blue-1);
    background: #fff;
    font-size: 14px;
    color: var(--sr-blue-1);
}

.sr-hub.is-focused .sr-hub__share.sr-pbtn:not(#sr-x):hover {
    background: var(--sr-bg-skyblue);
    color: var(--sr-safar-blue);
}

.sr-hub.is-focused .sr-results__share.sr-pbtn:not(#sr-x) {
    display: none;
}

/* The lesson's crumb: a button that opens the part's lessons. */
.sr-lmenu {
    position: relative;
}

.sr-lmenu__btn:not(#sr-x) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 0;
    margin: -2px 0;
    padding: 2px 10px;
    border: 1.5px solid var(--sr-neutral-border);
    border-radius: 100px;
    background: #fff;
    box-shadow: none;
    font-family: var(--sr-font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
    color: var(--sr-safar-blue);
    cursor: pointer;
}

.sr-lmenu__btn:not(#sr-x):hover {
    border-color: var(--sr-blue-2);
    background: #fff;
    color: var(--sr-safar-blue);
}

.sr-lmenu__btn:not(#sr-x):focus {
    outline: none;
}

.sr-lmenu__btn:not(#sr-x):focus-visible,
.sr-lmenu__btn:not(#sr-x)[aria-expanded="true"] {
    border-color: var(--sr-blue-1);
    box-shadow: var(--sr-focus-ring);
}

.sr-lmenu__btn svg {
    flex: none;
    transition: transform 0.15s ease;
}

.sr-lmenu__btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.sr-lmenu__pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 40;
    width: 380px;
    padding: 8px;
    border: 1px solid rgba(217, 219, 220, 0.75);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 73, 116, 0.14);
}

.sr-lmenu__pop[hidden] {
    display: none;
}

.sr-lmenu__head {
    margin: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--sr-neutral-light-text);
}

.sr-hub .sr-crumbs .sr-lmenu__list {
    display: block;
    max-height: 372px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

.sr-hub .sr-crumbs .sr-lmenu__list li {
    display: block;
}

.sr-hub .sr-crumbs .sr-lmenu__list li::before {
    content: none;
}

.sr-hub .sr-crumbs a.sr-lmenu__item:not(#sr-x) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--sr-safar-blue);
    text-decoration: none;
}

.sr-hub .sr-crumbs a.sr-lmenu__item:not(#sr-x):hover {
    background: #F7FBFE;
    text-decoration: none;
}

.sr-hub .sr-crumbs a.sr-lmenu__item:not(#sr-x):focus {
    outline: none;
}

.sr-hub .sr-crumbs a.sr-lmenu__item:not(#sr-x):focus-visible {
    box-shadow: inset 0 0 0 2px var(--sr-focus);
}

.sr-hub .sr-crumbs a.sr-lmenu__item.is-empty:not(#sr-x) {
    color: var(--sr-neutral-body);
}

.sr-hub .sr-crumbs a.sr-lmenu__item.is-current:not(#sr-x) {
    background: var(--sr-bg-skyblue);
    font-weight: 600;
    color: var(--sr-safar-blue);
}

.sr-lmenu__name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sr-lmenu__note {
    flex: none;
    font-size: 13px;
    font-weight: 400;
    color: var(--sr-neutral-light-text);
}

.is-current .sr-lmenu__note {
    color: var(--sr-blue-1);
}

.sr-lmenu__more {
    padding: 8px;
    font-size: 13px;
    text-align: center;
    color: var(--sr-neutral-light-text);
}

/* A lesson's heading: its badge, then the lessons either side. */
.sr-lpager {
    display: flex;
    gap: 12px;
}

.sr-lpager__link:not(#sr-x) {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 16px;
    border: 1.5px solid var(--sr-neutral-border);
    border-radius: 14px;
    background: #fff;
    color: var(--sr-blue-1);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sr-lpager__link--next:not(#sr-x) {
    justify-content: flex-end;
    text-align: right;
}

.sr-lpager__link:not(#sr-x):hover {
    border-color: var(--sr-blue-2);
    box-shadow: 0 4px 12px rgba(0, 73, 116, 0.1);
}

.sr-lpager__link:not(#sr-x):focus {
    outline: none;
}

.sr-lpager__link:not(#sr-x):focus-visible {
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sr-blue-2);
}

.sr-lpager__link svg {
    flex: none;
}

.sr-lpager__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sr-lpager__text small {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--sr-neutral-light-text);
}

.sr-lpager__text b {
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--sr-blue-1);
}

.sr-lpager__short {
    display: none;
}

.sr-lpager__gap {
    flex: 1 1 0;
}

/* One row above the cards: how many, the types and the sort. */
.sr-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--sr-line);
}

.sr-tools__count {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--sr-safar-blue);
}

.sr-tools__label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: var(--sr-neutral-light-text);
}

.sr-tools__types {
    display: flex;
    flex: 0 1 auto;
    overflow: hidden;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-left: 8px;
}

.sr-tools .sr-catrow {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.sr-tools .sr-catrow__list {
    gap: 8px;
}

.sr-tools .sr-cat-chip:not(#sr-x) {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
}

.sr-tools__sort {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.sr-tools + .sr-grid {
    margin-top: 20px;
}

/* An empty lesson: an invitation to share it first. */
.sr-invite {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin: 24px 0 8px;
    padding: 22px 24px;
    border: 1.5px dashed var(--sr-neutral-border);
    border-radius: 14px;
}

.sr-invite__text {
    flex: 1 1 300px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--sr-neutral-body);
}

.sr-invite__heading {
    display: block;
    margin-bottom: 2px;
    font-family: var(--sr-font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--sr-safar-blue);
}

.sr-invite .sr-invite__btn.sr-pbtn:not(#sr-x) {
    flex: none;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
}

/* Lesson strip (Concept D) */
.sr-strip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sr-strip__list {
    flex: 1 1 auto;
    min-width: 0;
}

.sr-strip__label {
    flex-shrink: 0;
    padding-top: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--sr-neutral-heading);
}

.sr-strip__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Category chip row with its scroll arrow */
.sr-catrow {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.sr-catrow__list {
    display: flex;
    flex: 1;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 2px;
    list-style: none;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.sr-catrow__list::-webkit-scrollbar {
    display: none;
}

.sr-catrow.has-more .sr-catrow__list {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}

.sr-catrow__next:not(#sr-x) {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 41px;
    height: 41px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sr-neutral-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--sr-neutral-body);
    cursor: pointer;
}

.sr-catrow__next:not(#sr-x)[hidden] {
    display: none;
}

.sr-catrow__next:not(#sr-x):hover {
    border-color: var(--sr-blue-2);
    background: #fff;
    color: var(--sr-blue-1);
}

.sr-catrow__next:not(#sr-x):focus {
    outline: none;
}

.sr-catrow__next:not(#sr-x):focus-visible {
    box-shadow: var(--sr-focus-ring);
}

.sr-catrow__next:not(#sr-x):active {
    background: var(--sr-bg-skyblue);
}

.sr-catrow.at-end .sr-catrow__next svg {
    transform: rotate(180deg);
}

/* Seasonal banner */
.sr-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    margin-top: 32px;
    padding: 24px 200px;
    border-radius: 16px;
    background: var(--sr-purple-banner);
    overflow: hidden;
    text-align: center;
    color: #fff;
}

.sr-banner__art {
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;
    max-width: none;
}

.sr-banner__art--left { left: 0; }
.sr-banner__art--right { right: 0; }

.sr-banner__text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sr-banner__heading {
    font-family: var(--sr-font-heading);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.sr-banner__body {
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
}

/* Grid: 3 columns, 24 apart, rows 32 apart */
.sr-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 24px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.sr-grid__item {
    display: flex;
    min-width: 0;
    margin: 0;
}

.sr-grid__item > .sr-resource-card {
    flex: 1;
}

.sr-hub .sr-pagination {
    margin-top: 40px;
}

/* Empty state */
.sr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 60px 24px;
    border: 1px solid var(--sr-neutral-border);
    border-radius: 16px;
    text-align: center;
}

.sr-empty__icon {
    color: var(--sr-blue-1);
    margin-bottom: 8px;
}

.sr-empty__heading {
    font-family: var(--sr-font-heading);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--sr-neutral-heading);
}

.sr-empty__body {
    max-width: 560px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--sr-neutral-body);
}

.sr-empty__dym {
    font-size: 18px;
    line-height: 1.5;
    color: var(--sr-neutral-body);
}

.sr-results__dym {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--sr-neutral-body);
}

.sr-empty__dym a,
.sr-empty__dym a:visited,
.sr-results__dym a,
.sr-results__dym a:visited {
    font-weight: 600;
    color: var(--sr-blue-1);
    text-decoration: underline;
    text-underline-offset: 3px;
    border-radius: 2px;
}

.sr-empty__dym a:hover,
.sr-results__dym a:hover {
    color: var(--sr-heading-hover);
}

.sr-empty__dym a:focus-visible,
.sr-results__dym a:focus-visible {
    outline: 2px solid var(--sr-focus);
    outline-offset: 2px;
}

.sr-empty__popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
}

.sr-empty__popular-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-neutral-body);
}

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

.sr-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.sr-close {
    margin-top: 48px;
}

.sr-close__title {
    font-family: var(--sr-font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--sr-neutral-heading);
}

.sr-close .sr-grid {
    margin-top: 24px;
}

/* ------------------------------------------------
   Narrower screens
   ------------------------------------------------ */
@container (max-width: 900px) {
    .sr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sr-banner { padding: 24px 140px; }
    .sr-banner__heading { font-size: 22px; }
}

@container (max-width: 560px) {
    .sr-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .sr-banner { padding: 24px 20px; }
    .sr-banner__art { opacity: 0.35; }
}

@media (max-width: 1279px) {
    .sr-hub__layout { grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
    .sr-hub__more { gap: 96px; margin-top: 96px; }
}

/* Below 1024 the panel becomes a full-height sheet behind a Filters button
   (only once browse.js has started; without it the panel stacks on top). */
@media (max-width: 1023px) {
    .sr-hub__body { padding-top: 40px; padding-bottom: 80px; }
    .sr-hub__layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .sr-hub__more { gap: 72px; margin-top: 72px; }

    .sr-hub.is-enhanced .sr-hub__bar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 30;
        margin: 0 calc(-1 * clamp(16px, 3vw, 40px)) 16px;
        padding: 10px clamp(16px, 3vw, 40px);
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid transparent;
    }

    .sr-hub.is-stuck .sr-hub__bar {
        border-bottom-color: var(--sr-line);
    }

    /* With a breadcrumb the bar stays where it is, above the results. */
    .sr-hub.is-focused.is-enhanced .sr-hub__bar {
        position: static;
        margin: 0 0 24px;
        padding: 0;
        background: none;
        border: 0;
    }

    .sr-hub__filters-btn:not(#sr-x) {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 44px;
        margin: 0;
        padding: 0 18px;
        border: 1px solid var(--sr-neutral-border);
        border-radius: 100px;
        background: #fff;
        box-shadow: none;
        font-family: var(--sr-font-body);
        font-size: 15px;
        font-weight: 600;
        line-height: 1;
        color: var(--sr-neutral-heading);
        text-transform: none;
        letter-spacing: normal;
        cursor: pointer;
    }

    .sr-hub__filters-btn:not(#sr-x):hover {
        border-color: var(--sr-blue-2);
        background: #fff;
        color: var(--sr-blue-1);
    }

    .sr-hub__filters-btn:not(#sr-x):focus {
        outline: none;
    }

    .sr-hub__filters-btn:not(#sr-x):focus-visible {
        box-shadow: var(--sr-focus-ring);
    }

    .sr-hub__filters-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 11px;
        background: var(--sr-green-1);
        font-size: 12px;
        color: #fff;
    }

    .sr-hub__filters-count[hidden] {
        display: none;
    }

    .sr-hub.is-enhanced .sr-hub__panel {
        position: fixed;
        z-index: 1001;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(420px, 100%);
        background: #fff;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform var(--sr-transition-base), visibility 0s linear 250ms;
    }

    .sr-hub.is-enhanced.is-sheet-open .sr-hub__panel {
        transform: none;
        visibility: visible;
        transition: transform var(--sr-transition-base), visibility 0s;
    }

    .sr-hub.is-enhanced .sr-panel {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .sr-hub.is-enhanced .sr-panel__sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        padding-top: max(16px, env(safe-area-inset-top));
        border-bottom: 1px solid var(--sr-line);
    }

    .sr-panel__sheet-title {
        font-family: var(--sr-font-heading);
        font-size: 22px;
        font-weight: 700;
        line-height: 1.2;
        color: var(--sr-neutral-heading);
    }

    .sr-panel__close:not(#sr-x) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin: 0 -8px 0 0;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        box-shadow: none;
        color: var(--sr-neutral-body);
        cursor: pointer;
    }

    .sr-panel__close:not(#sr-x):hover,
    .sr-panel__close:not(#sr-x):focus-visible {
        background: #F5F6F7;
        color: var(--sr-neutral-heading);
        outline: none;
    }

    .sr-panel__close:not(#sr-x):focus-visible {
        box-shadow: var(--sr-focus-ring);
    }

    .sr-hub.is-enhanced .sr-panel__scroll {
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 20px 20px 8px;
    }

    .sr-hub.is-enhanced .sr-panel__title {
        display: none;
    }

    .sr-hub.is-enhanced .sr-panel__sheet-foot {
        display: block;
        padding: 12px 20px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--sr-line);
        background: #fff;
    }

    .sr-panel__show.sr-pbtn {
        width: 100%;
    }

    .sr-hub__scrim {
        position: fixed;
        z-index: 1000;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
    }

    .sr-hub__scrim[hidden] {
        display: none;
    }
}

@media (max-width: 767px) {
    .sr-hub.is-focused .sr-hub__crumbs {
        flex: 1 1 100%;
    }

    .sr-hub.is-focused .sr-hub__actions {
        width: 100%;
        justify-content: space-between;
    }

    .sr-hub.is-focused.is-enhanced .sr-hub__share.sr-pbtn:not(#sr-x) {
        display: none;
    }

    .sr-hub.is-focused .sr-hub__bar {
        margin-bottom: 24px;
    }

    /* The menu fits the screen: as wide as the breadcrumb. */
    .sr-lmenu {
        position: static;
    }

    .sr-lmenu__pop {
        left: 0;
        right: 0;
        width: auto;
    }

    .sr-lpager {
        gap: 8px;
    }

    .sr-lpager__link:not(#sr-x) {
        gap: 8px;
        padding: 10px 12px;
    }

    .sr-lpager__long {
        display: none;
    }

    .sr-lpager__short {
        display: inline;
    }

    .sr-tools {
        flex-wrap: wrap;
        gap: 12px 8px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .sr-tools__types {
        order: 5;
        flex: 1 1 100%;
        margin-left: 0;
        overflow: hidden;
    }

    .sr-tools__sort .sr-tools__label {
        display: none;
    }

    .sr-tools .sr-catrow__list {
        flex-wrap: nowrap;
        margin: 0 calc(-1 * clamp(16px, 3vw, 40px)) 0 0;
        padding: 2px clamp(16px, 3vw, 40px) 2px 2px;
    }

    .sr-invite {
        padding: 20px;
    }

    .sr-results__badge {
        display: table;
        top: 0;
        margin: 0 0 4px;
        font-size: 12px;
    }

    /* Share a resource moves up into the bar beside Filters, so nothing
       floats over the cards. */
    .sr-results__title-row { flex-wrap: nowrap; align-items: center; }
    .sr-results__title { flex: 1 1 auto; min-width: 0; font-size: 24px; text-wrap: balance; }
    .sr-sort__menu { right: 0; left: auto; min-width: 200px; }
    .sr-hub.is-enhanced .sr-results__share.sr-pbtn:not(#sr-x) { display: none; }
    .sr-hub.is-enhanced .sr-hub__bar { justify-content: space-between; gap: 12px; }
    .sr-hub.is-enhanced .sr-hub__share.sr-pbtn:not(#sr-x) {
        display: inline-flex;
        min-height: 44px;
        padding: 0 18px;
        gap: 8px;
    }
    /* Without browse.js there is no bar, so the results row keeps a round
       share button in its normal place. */
    .sr-results__share.sr-pbtn:not(#sr-x) {
        width: 48px;
        padding: 0;
        border-radius: 50%;
    }
    .sr-results__share-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    /* Chips, lesson pills and categories scroll sideways instead of wrapping */
    .sr-results__chips { max-width: calc(100% + 2 * clamp(16px, 3vw, 40px)); }
    .sr-results__chips,
    .sr-strip__list {
        flex-wrap: nowrap;
        margin: 0 calc(-1 * clamp(16px, 3vw, 40px));
        padding: 2px clamp(16px, 3vw, 40px);
        overflow-x: auto;
        scrollbar-width: none;
        /* Holds the pills' screen-reader text, which would otherwise widen the page. */
        position: relative;
    }
    .sr-results__chips::-webkit-scrollbar,
    .sr-strip__list::-webkit-scrollbar { display: none; }
    .sr-results__chips > li,
    .sr-strip__list > li { flex-shrink: 0; }
    .sr-strip { flex-direction: column; align-items: flex-start; }
    .sr-strip__list { width: calc(100% + 2 * clamp(16px, 3vw, 40px)); }
    .sr-catrow__next:not(#sr-x) { display: none; }
    .sr-catrow__list { margin: 0 calc(-1 * clamp(16px, 3vw, 40px)); padding: 2px clamp(16px, 3vw, 40px); }
    .sr-catrow.has-more .sr-catrow__list { -webkit-mask-image: none; mask-image: none; }
    .sr-empty { padding: 40px 20px; }
    .sr-empty__heading { font-size: 26px; }
    .sr-empty__body,
    .sr-empty__dym { font-size: 16px; }
    .sr-pagination { flex-direction: column; align-items: stretch; }
    .sr-pagination__pages { justify-content: center; }
}

/* In the shop the phone header is fixed over the page; with no hero, clear
   it with plain white space as the shop's own pages do. */
@media (max-width: 900px) {
    .brx-body .sr-content-wrapper.sr-hub.is-white {
        padding-top: 85px;
    }
}

/* ------------------------------------------------
   A collection's own page (/resources/collection/{slug}/): the hero keeps
   the shop page's look, heading and intro on the left and picture on the
   right, on Safar's blue with the hub's wave. Then More collections.
   ------------------------------------------------ */
.sr-hero.sr-chero {
    padding: 96px 0 120px;
    text-align: left;
}

.sr-chero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-chero--no-picture .sr-chero__inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 900px;
    text-align: center;
}

.sr-chero__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.sr-chero__title {
    font-size: 56px;
    line-height: 1.15;
}

.sr-chero__intro {
    max-width: 560px;
    margin: 0;
    font-family: var(--sr-font-body);
    font-size: 18px;
    line-height: 1.6;
    color: #fff;
}

.sr-chero--no-picture .sr-chero__intro {
    margin: 0 auto;
}

.sr-chero__intro--more {
    font-size: 16px;
}

.sr-chero__art {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.sr-chero__art img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
}

.sr-colls {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sr-colls__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sr-colls__card,
.sr-colls__card:visited {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #E7E9EE;
    border-radius: 24px;
    background: #fff;
    color: var(--sr-neutral-body);
    text-decoration: none;
    overflow: hidden;
    transition: border-color var(--sr-transition-fast), box-shadow var(--sr-transition-fast);
}

.sr-colls__art {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    padding: 16px;
    background: var(--sr-sky-blue-1);
}

.sr-colls__art img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sr-colls__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 56px 20px 24px;
}

.sr-colls__name {
    font-family: var(--sr-font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--sr-neutral-heading);
}

.sr-colls__count {
    font-size: 15px;
}

.sr-colls__arrow {
    position: absolute;
    right: 24px;
    bottom: 28px;
    color: var(--sr-sky-blue-1);
    transition: transform var(--sr-transition-fast);
}

.sr-colls__card:hover {
    border-color: var(--sr-sky-blue-1);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.sr-colls__card:hover .sr-colls__arrow {
    transform: translateX(3px);
}

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

.sr-colls__card:active {
    box-shadow: none;
}

.sr-colls__more {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin: 0;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .sr-hero.sr-chero { padding: 64px 0 104px; }
    .sr-chero__title { font-size: 44px; }
    .sr-colls__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .sr-hero.sr-chero { padding: 32px 0 64px; text-align: center; }
    .sr-chero__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .sr-chero__title { font-size: 34px; }
    .sr-chero__intro { margin: 0 auto; font-size: 16px; }
    .sr-chero__intro--more { font-size: 15px; }
    /* Small enough that the first cards show on a phone's first screen or two. */
    .sr-chero__art img { max-width: 240px; }
    .sr-colls__list { grid-template-columns: minmax(0, 1fr); }
}
