/**
 * Downloads section — desktop-first (1360 mockup).
 */

.downloads-page {
  background-color: var(--color-background-alt, #f6f6f6);
  background-image: url('../../img/downloads/pattern-dots-f6.png');
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
}

.downloads {
  padding: 40px 0 0;
}

.dl-home-band--bottom {
  background-color: var(--color-background-alt, #f6f6f6);
  background-image: url('../../img/backing.png');
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
  margin-top: 104px;
  padding-bottom: 64px;
}

.downloads .dl-home-band--bottom .container {
  display: flex;
  flex-direction: column;
  gap: 0;
  row-gap: 0;
  grid-template-columns: none;
  grid-template-areas: none;
}

.downloads-page--search,
.downloads-page--category {
  background-color: transparent;
  background-image: none;
}

.downloads-page--search .downloads,
.downloads-page--category .downloads {
  padding: 0;
}

/* Search / category: zoned full-bleed pattern bands */
.downloads-page--search .dl-search-band--top,
.downloads-page--category .dl-search-band--top {
  background-color: #fff;
  background-image: url('../../img/downloads/pattern-dots-white.png');
  background-repeat: repeat;
  background-position: top left;
  padding: 0;
  padding-bottom: 32px;
  box-sizing: border-box;
}

.downloads-page--category .dl-search-band--top {
  padding-top: 40px;
}

.downloads-page--search .dl-search-band--mid,
.downloads-page--category .dl-search-band--mid {
  background-color: #f6f6f6;
  background-image: url('../../img/downloads/pattern-dots-f6.png');
  background-repeat: repeat;
  background-position: top left;
  padding: 32px 0;
  box-sizing: border-box;
}

.downloads-page--search .dl-search-band--form,
.downloads-page--category .dl-search-band--form {
  background-color: #f6f6f6;
  background-image: url('../../img/downloads/pattern-form.png');
  background-repeat: repeat;
  background-position: top left;
  padding: 24px 0;
  box-sizing: border-box;
}

.downloads .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 28px;
  row-gap: 48px;
  align-items: start;
  grid-template-areas:
    "top top"
    "type type"
    "stage filters"
    "topic topic"
    "popular popular"
    "featured featured"
    "services services"
    "cats cats"
    "other other";
}

/* Search / category results: single-column page stack (home grid must not apply) */
.downloads-page--search .downloads .container,
.downloads-page--category .downloads .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
  grid-template-columns: none;
  grid-template-areas: none;
}

.dl-section-title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: 0;
  color: var(--color-text, #303030);
}

.dl-section-lead {
  margin: 8px 0 0;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 20px;
  color: var(--color-text-secondary, #4d4d4d);
}

/* Hero */
.downloads_background_block {
  display: grid;
  grid-template-columns: 180px 1fr 360px;
  align-items: center;
  gap: 64px;
  min-height: 280px;
  padding: 40px 64px;
  border-radius: 20px;
  background-color: #9ecde5;
  background-image: url('../../img/downloads/downloads_background_block.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  overflow: hidden;
}

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

.downloads_background_block__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-align: left;
}

.downloads_background_block__lead {
  margin: 48px 0 0;
  max-width: 520px;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.2;
  color: #fff;
  text-align: left;
}

.downloads_background_block__content {
  min-width: 0;
}

.downloads_background_block__media {
  display: none;
}

.downloads_background_block__media-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Hero + search */
.dl-top {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

/* Search — reuse search-block hero field/submit */
.dl-search.search-block__hero-search {
  width: 100%;
  max-width: none;
  column-gap: 12px;
}

.downloads-page--category .dl-search.search-block__hero-search {
  width: 100%;
  max-width: none;
  column-gap: 12px;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
}

/* Search page: 32px under stage nav + 24px padding on search shell */
.downloads-page--search .dl-stage-nav + .dl-search.search-block__hero-search {
  margin-top: -16px; /* container gap 48px → visual 32px */
  padding: 24px;
  box-sizing: border-box;
}

.downloads-page--search .dl-search.search-block__hero-search + .dl-search-layout {
  margin-top: -16px; /* container gap 48px → visual 32px */
}

.downloads-page--search .dl-search-band--mid .dl-more-tools + .dl-faq,
.downloads-page--category .dl-search-band--mid .dl-more-tools + .dl-faq {
  margin-top: -16px; /* container gap 48px → visual 32px */
}

.downloads-page .search-block__hero-search-lang.js-dl-lang {
  border-radius: 8px;
  cursor: pointer;
}

.dl-search .search-block__hero-search-input-icon,
.dl-search .search-block__hero-search-input-icon svg,
.dl-search .search-block__hero-search-submit svg {
  width: 24px;
  height: 24px;
}

.dl-search .search-block__hero-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 72px;
  height: 48px;
  padding: 0 16px;
  box-sizing: border-box;
}

.dl-search .search-block__hero-search-submit-label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Browse by type — full-width strip + half-peek carousel */
.dl-browse-type {
  width: 100%;
  min-width: 0;
}

.dl-browse-type__scroller {
  width: 100%;
  min-width: 0;
  margin-top: 20px;
  padding: 6px 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
}

.dl-browse-type__scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.dl-browse-type__scroller.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.dl-browse-type__scroller.is-dragging .dl-type-chip {
  pointer-events: none;
}

.dl-browse-type__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  /* Stretch across container + half of one chip past the edge */
  width: calc(100% + (100% - 72px) / 14);
  box-sizing: border-box;
}

.dl-type-chip {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #4d4d4d;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dl-type-chip.is-active {
  outline: 2px solid var(--color-primary);
}

.dl-type-chip__icon {
  flex: 0 0 auto;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.dl-type-chip__icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dl-type-chip__label {
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* Home layout — desktop: type full width, then stage | filters */
.dl-top {
  grid-area: top;
}

.dl-browse-type {
  grid-area: type;
}

.dl-home-layout__stage {
  grid-area: stage;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.dl-home-layout__filters {
  grid-area: filters;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  width: 100%;
}

.dl-home-layout__main,
.dl-home-layout__aside {
  width: 100%;
  min-width: 0;
}

.dl-browse-topic {
  grid-area: topic;
}

.dl-popular:not(.dl-featured) {
  grid-area: popular;
}

.dl-featured {
  grid-area: featured;
}

.dl-services {
  grid-area: services;
}

.dl-category-sections {
  grid-area: cats;
}

.dl-view-other {
  grid-area: other;
}

.dl-faq {
  grid-area: faq;
}

.dl-feedback {
  grid-area: feedback;
}

.dl-search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
  width: 100%;
}

.dl-search-layout__aside {
  min-width: 0;
}

.dl-search-layout__main {
  min-width: 0;
}

.dl-home-layout__heading,
.dl-filters__title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: 0;
  color: var(--color-text, #303030);
}

.dl-filters-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dl-browse-stage__scroller {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.dl-browse-stage__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 0;
}

.dl-browse-stage .dl-section-title + .dl-browse-stage__scroller {
  margin-top: 20px;
}

.dl-stage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.dl-stage-card__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  margin-bottom: 16px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.dl-stage-card__icon--getting-pregnant {
  background-image: url('../../img/downloads/stages/getting-pregnant.png');
}

.dl-stage-card__icon--pregnancy {
  background-image: url('../../img/downloads/stages/pregnancy.png');
}

.dl-stage-card__icon--birth {
  background-image: url('../../img/downloads/stages/birth.png');
}

.dl-stage-card__icon--newborn {
  background-image: url('../../img/downloads/stages/newborn.png');
}

.dl-stage-card__icon--baby {
  background-image: url('../../img/downloads/stages/baby.png');
}

.dl-stage-card__icon--toddler {
  background-image: url('../../img/downloads/stages/toddler.png');
}

.dl-stage-card__icon--preschool {
  background-image: url('../../img/downloads/stages/preschool.png');
}

.dl-stage-card__icon--child {
  background-image: url('../../img/downloads/stages/child.png');
}

.dl-stage-card__icon--pre-teen {
  background-image: url('../../img/downloads/stages/pre-teen.png');
}

.dl-stage-card__icon--teen {
  background-image: url('../../img/downloads/stages/teen.png');
}

.dl-stage-card__icon--older-teen {
  background-image: url('../../img/downloads/stages/older-teen.png');
}

.dl-stage-card__icon--parenting {
  background-image: url('../../img/downloads/stages/parenting.png');
}

.dl-stage-card__icon--health {
  background-image: url('../../img/downloads/stages/health.png');
}

.dl-stage-card__icon--family {
  background-image: url('../../img/downloads/stages/family.png');
}

.dl-stage-card__icon--special-needs {
  background-image: url('../../img/downloads/stages/special-needs.png');
}

.dl-stage-card__divider {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px; /* same as two-line age text (16+16) */
  margin: 0 0 14px; /* same as .dl-stage-card__age */
  background: transparent;
}

.dl-stage-card__divider::before {
  content: '';
  width: 100%;
  height: 1px;
  background: #dbdbdb;
}

.dl-stage-card__age {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  margin: 0 0 14px;
}

.dl-stage-card__age::before,
.dl-stage-card__age::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: #e6e6e6;
}

.dl-stage-card__age-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  max-width: 46%;
  text-align: center;
}

.dl-stage-card__age-range {
  font-family: var(--font-heading); /* Cinzel */
  font-weight: 400;
  font-size: 14px;
  line-height: 16px;
  color: #303030;
}

.dl-stage-card__age-unit {
  font-family: var(--font-primary); /* Source Sans 3 */
  font-weight: 400;
  font-size: 14px;
  line-height: 16px;
  color: #303030;
}

.dl-stage-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #4d4d4d;
}

.dl-stage-card__count {
  margin: 4px 0 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  color: #808080;
}

.dl-stage-card__desc {
  flex: 1 1 auto;
  margin: 4px 0 12px;
  font-size: 14px;
  line-height: 16px;
  color: #000000;
}

.dl-stage-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--color-accent, #8fb56c);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.dl-card__btn,
.dl-filters__submit,
.dl-modal__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 14px 24px;
  border: 0;
  border-radius: 10px;
  background: var(--color-accent, #8fb56c);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.dl-service-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 8px;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  background: var(--color-accent, #8fb56c);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.dl-service-card__btn--pad-lg {
  padding: 14px 24px;
}

.dl-service-card__btn--pad-sm {
  padding: 10px 16px;
}

.dl-service-card__btn-line {
  display: inline;
}

.dl-service-card__btn-line + .dl-service-card__btn-line::before {
  content: '\00a0';
}

.dl-stage-card__btn:hover,
.dl-card__btn:hover,
.dl-service-card__btn:hover,
.dl-filters__submit:hover,
.dl-modal__download:hover {
  background: var(--color-accent-hover, #7ea35d);
  color: #fff;
}

.dl-stage-card__btn-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: #fff;
  -webkit-mask-image: url('/wp-content/uploads/2026/08/Downloads-icon.png');
  mask-image: url('/wp-content/uploads/2026/08/Downloads-icon.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Filters */
.dl-filters {
  padding: 24px;
  border-radius: 16px;
  background: #fff;
}

.dl-filters__group + .dl-filters__group {
  margin-top: 18px;
}

.dl-filters__group-toggle {
  display: block;
  list-style: none;
  cursor: default;
}

.dl-filters__group-toggle::-webkit-details-marker {
  display: none;
}

.dl-filters__group-title {
  display: block;
  margin: 0 0 12px;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text, #303030);
}

.dl-filters__group-chevron {
  display: none;
}

.dl-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dl-chip {
  display: inline-flex;
  cursor: pointer;
}

.dl-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dl-chip span {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 16px;
  background: #ffd0e0;
  color: #4d4d4d;
}

.dl-chip--topic span {
  background: #b4e3f5;
  color: #4d4d4d;
}

.dl-chip--type span {
  background: #f4e0ab;
  color: #4d4d4d;
}

.dl-chip input:checked + span {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.dl-filters__submit {
  width: auto;
  margin-top: 24px;
}

/* Topics */
.dl-browse-topic__scroller {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.dl-browse-topic__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
  padding: 24px;
  border-radius: 12px;
  background: #ffffff;
}

.dl-browse-topic__head + .dl-browse-topic__scroller .dl-browse-topic__grid {
  margin-top: 0;
}

.dl-browse-topic__head + .dl-browse-topic__scroller {
  margin-top: 20px;
}

.dl-topic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 110px;
  padding: 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
}

.dl-topic-card--pink {
  background: #fef2f4;
  color: #ff6482;
}

.dl-topic-card--blue {
  background: #e5f6fd;
  color: #10b4e2;
}

.dl-topic-card--yellow {
  background: #fff8e5;
  color: #f0b601;
}

.dl-topic-card--rose {
  background: #fdebee;
  color: #c14041;
}

.dl-topic-card--purple {
  background: #eee6f1;
  color: #6f20ad;
}

.dl-topic-card--green {
  background: #edf5ea;
  color: #79b262;
}

.dl-topic-card--slate {
  background: #e4eaf6;
  color: #00187d;
}

.dl-topic-card--orange {
  background: #fff0dd;
  color: #c56600;
}

.dl-topic-card__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
}

.dl-topic-card__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: inherit;
}

.dl-topic-card__title::first-letter {
  text-transform: uppercase;
}

.dl-topic-card__lead {
  display: block;
  margin-top: 12px;
  font-size: 16px;
  line-height: 20px;
  color: inherit;
}

.dl-topic-card__lead-line {
  display: block;
}

.dl-topic-card__icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  margin: 18px 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Cards / popular / category rows */
.dl-popular__scroller,
.dl-cat-row__scroller {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
  padding: 24px;
  border-radius: 12px;
  background: #dbdbdb;
  overflow: hidden;
}

.dl-popular__viewport,
.dl-cat-row__viewport {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 480px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dl-popular__viewport::-webkit-scrollbar,
.dl-cat-row__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Custom scrollbar: white rail, pink thumb, no arrows */
.dl-vscroll {
  flex: 0 0 6px;
  width: 6px;
  align-self: stretch;
}

.dl-vscroll__rail {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 48px;
  background: #ffffff;
  border-radius: 6px;
}

.dl-vscroll__thumb {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #dc0e63;
  border-radius: 6px;
  cursor: pointer;
}

.dl-cat-row .dl-vscroll__thumb {
  background: #6e4f95;
}

.dl-vscroll.is-disabled {
  visibility: hidden;
}

.dl-category-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.dl-cat-row.is-hidden,
.dl-cat-row[hidden] {
  display: none;
}

.dl-popular__track,
.dl-cat-row__track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.dl-popular__scroller .dl-card,
.dl-cat-row__scroller .dl-card {
  /* 5 cards per row: 4 gaps × 12px = 48px */
  flex: 0 0 calc((100% - 48px) / 5);
  width: calc((100% - 48px) / 5);
  max-width: calc((100% - 48px) / 5);
  min-width: 0;
  box-sizing: border-box;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.dl-results-grid .dl-card {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-width: 0;
}

.dl-card__hit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.dl-card__stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #303030;
}

.dl-card__stage-badge-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.dl-card__stage-badge-text {
  font-family: var(--font-heading); /* Cinzel */
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: #303030;
}

.downloads-page--search .dl-card__stage-badge,
.downloads-page--category .dl-card__stage-badge {
  display: none;
}

.dl-card__cover {
  display: block;
  width: 100%;
  max-width: 197px;
  aspect-ratio: 1;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}

.dl-card__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dl-card__cover-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #f3f3f3;
}

.dl-card__body {
  display: flex;
  flex-direction: column;
  margin-top: 4px; /* with hit gap 8px → 12px from cover */
}

.dl-card__title {
  display: block;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  color: #303030;
}

.dl-card__excerpt {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  line-height: 16px;
  color: #4d4d4d;
}

.dl-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbdbdb;
  min-height: 68px;
}

.dl-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 16px;
  color: #4d4d4d;
}

.dl-tag--stage { background: #ffd0e0; }
.dl-tag--type { background: #b4e3f5; }
.dl-tag--topic { background: #f4e0ab; }

.dl-card__btn {
  width: auto;
  align-self: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
}

.dl-card__btn-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 0;
  background-color: #fff;
  background-image: none;
  -webkit-mask-image: url('/wp-content/uploads/2026/08/Downloads-icon.png');
  mask-image: url('/wp-content/uploads/2026/08/Downloads-icon.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

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

.downloads-page--category .dl-cat-grid-wrap {
  width: 100%;
}

.dl-cat-grid-wrap > .dl-results-head__row {
  margin-bottom: 24px;
}

.dl-cat-results-title {
  margin: 0;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 26px;
  line-height: 32px;
  color: var(--color-text, #303030);
}

.downloads-page--category .dl-results-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.downloads-page--category .dl-results-scroller {
  margin-top: 0;
}

.downloads-page--category .dl-pagination-group {
  margin-top: 24px;
}

/* Same structure as .dl-popular__scroller: viewport + custom rail inside */
.dl-results-scroller {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
  padding: 24px;
  border-radius: 12px;
  background: #dbdbdb;
  overflow: hidden;
  box-sizing: border-box;
}

.dl-results-viewport {
  flex: 1 1 auto;
  min-width: 0;
  /* ~2 rows × 4 cards (8 visible) */
  max-height: 1024px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dl-results-viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.dl-results-scroller .dl-vscroll__thumb {
  background: #6e4f95;
}

.downloads-page--search .dl-results-head__title,
.downloads-page--search .js-dl-results-title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  color: #303030;
}

.dl-results-head__title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.dl-search-layout__main .dl-pagination-group {
  margin-top: 24px;
}

.dl-results-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 12px;
}

.dl-results-head__row .dl-results-head__title {
  margin: 0;
}

.dl-results-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.dl-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dl-sort__label {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  color: #4d4d4d;
}

.dl-sort__select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #dbdbdb;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-primary);
  font-size: 14px;
  color: #303030;
}

.dl-applied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 20px;
}

.dl-applied__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dl-applied__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #303030;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
}

.dl-applied__chip:hover {
  background: #e9e9e9;
}

.dl-applied__chip--locked {
  opacity: 0.85;
}

.dl-applied__chip-x {
  font-size: 16px;
  line-height: 1;
  color: #808080;
}

.dl-applied__clear {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary, #dc0e63);
  text-decoration: none;
}

.dl-applied__clear:hover {
  text-decoration: underline;
}

.dl-results-head__filters {
  margin: 0 0 20px;
  color: var(--color-text-secondary);
}

.dl-featured {
  margin-top: 8px;
}

.dl-results-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--color-text-secondary);
}

.dl-chip.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.dl-chip__count {
  margin-left: 4px;
  color: #808080;
  font-weight: 400;
}

.dl-modal__related {
  margin: 0 0 20px;
}

.dl-modal__related-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.dl-modal__related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dl-modal__related-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dbdbdb;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 14px;
}

.dl-modal__related-item:hover {
  border-color: var(--color-primary, #dc0e63);
}

/* Services */
.dl-services__wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  min-width: 0;
}

.dl-services__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.dl-service-card {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 8px 16px;
  padding-right: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.dl-service-card__media {
  flex: 0 0 152px;
  width: 152px;
  height: 152px;
}

.dl-service-card__img,
.dl-service-card__placeholder {
  display: block;
  width: 152px;
  height: 152px;
  border-radius: 12px;
  object-fit: contain;
  background: transparent;
}

.dl-service-card__img--mobile {
  display: none;
}

.dl-service-card__body {
  flex: 1 1 auto;
  max-width: 196px;
  min-width: 0;
  margin-right: 0;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dl-service-card__title {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
}

.dl-services__next {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.dl-services__next img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* Category row */
.dl-cat-row__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dl-cat-row__view-all {
  margin-left: auto;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: var(--color-primary, #dc0e63);
  text-decoration: none;
  white-space: nowrap;
}

.dl-cat-row__view-all:hover {
  text-decoration: underline;
}

.dl-cat-row__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.dl-cat-row__icon--getting-pregnant { background-image: url('../../img/downloads/badges/getting-pregnant.png'); }
.dl-cat-row__icon--pregnancy { background-image: url('../../img/downloads/badges/pregnancy.png'); }
.dl-cat-row__icon--birth { background-image: url('../../img/downloads/badges/birth.png'); }
.dl-cat-row__icon--newborn { background-image: url('../../img/downloads/stages/newborn.png'); }
.dl-cat-row__icon--baby { background-image: url('../../img/downloads/badges/baby.png'); }
.dl-cat-row__icon--toddler { background-image: url('../../img/downloads/stages/toddler.png'); }
.dl-cat-row__icon--preschool { background-image: url('../../img/downloads/stages/preschool.png'); }
.dl-cat-row__icon--child { background-image: url('../../img/downloads/stages/child.png'); }
.dl-cat-row__icon--pre-teen { background-image: url('../../img/downloads/stages/pre-teen.png'); }
.dl-cat-row__icon--teen { background-image: url('../../img/downloads/stages/teen.png'); }
.dl-cat-row__icon--older-teen { background-image: url('../../img/downloads/stages/older-teen.png'); }
.dl-cat-row__icon--parenting { background-image: url('../../img/downloads/stages/parenting.png'); }
.dl-cat-row__icon--health { background-image: url('../../img/downloads/stages/health.png'); }
.dl-cat-row__icon--family { background-image: url('../../img/downloads/stages/family.png'); }
.dl-cat-row__icon--special-needs { background-image: url('../../img/downloads/badges/special-needs.png'); }

.dl-cat-row__title {
  margin: 0;
  font-family: var(--font-primary); /* Source Sans 3 */
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  color: #303030;
}

.dl-view-other {
  display: flex;
  justify-content: center;
}

.dl-view-other__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.dl-view-other__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Per-block card expand — mobile only */
.dl-view-other--cards {
  display: none;
}

/* Category hero — full container width (Figma 1216×279) */
.downloads-page--category .downloads .container > .dl-cat-hero {
  flex: 0 0 auto;
  align-self: stretch;
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.dl-cat-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-width: 0;
  height: 279px;
  min-height: 279px;
  padding: 54px;
  border-radius: 12px;
  background: var(--dl-stage-nav-bg, #592a94);
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.dl-cat-hero__banner {
  display: none;
}

.dl-cat-hero--light,
.dl-cat-hero--light .dl-cat-hero__title,
.dl-cat-hero--light .dl-cat-hero__age,
.dl-cat-hero--light .dl-cat-hero__lead {
  color: #fff;
}

.dl-cat-hero__deco {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 0;
  width: 220px;
  height: 211px;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}

.dl-cat-hero__deco-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dl-cat-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  min-width: 0;
}

.dl-cat-hero__heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dl-cat-hero__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 400;
  line-height: 100%;
  text-transform: none;
  color: #fff;
}

.dl-cat-hero__age {
  position: absolute;
  top: 54px;
  right: 54px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: #fff;
}

.dl-cat-hero__age-range {
  font-family: var(--font-heading); /* Cinzel */
  font-weight: 400;
  font-size: 40px;
  line-height: 100%;
}

.dl-cat-hero__age-unit {
  font-family: var(--font-heading); /* Cinzel */
  font-weight: 400;
  font-size: 20px;
  line-height: 100%;
  text-align: center;
}

.dl-cat-hero__lead {
  margin: 0;
  max-width: 448px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 23px;
  color: #fff;
}

.dl-cat-hero__media {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 171px;
  height: 171px;
}

.dl-cat-hero__glow {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.32) 42%,
    rgba(255, 255, 255, 0) 72%
  );
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.dl-cat-hero__img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.dl-cat-hero__count {
  display: none;
}

@media (max-width: 767.98px) {
  .dl-cat-hero {
    height: auto;
    min-height: 0;
    gap: 16px;
    padding: 16px;
  }

  .dl-cat-hero__deco {
    position: static;
    width: 72px;
    height: 69px;
    transform: none;
  }

  .dl-cat-hero__title {
    font-size: 22px;
    line-height: 26px;
  }

  .dl-cat-hero__age {
    top: 16px;
    right: 16px;
  }

  .dl-cat-hero__age-range {
    font-size: 22px;
  }

  .dl-cat-hero__age-unit {
    font-size: 12px;
  }

  .dl-cat-hero__copy {
    gap: 16px;
  }

  .dl-cat-hero__lead {
    max-width: none;
    font-size: 14px;
    line-height: 18px;
  }

  .dl-cat-hero__media {
    width: 96px;
    height: 96px;
  }

  .dl-cat-hero--mobile-banner {
    aspect-ratio: 3 / 4;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 24px;
    border-radius: 16px;
    overflow: hidden;
  }

  .dl-cat-hero--mobile-banner .dl-cat-hero__banner {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
  }

  .dl-cat-hero--mobile-banner .dl-cat-hero__deco,
  .dl-cat-hero--mobile-banner .dl-cat-hero__media,
  .dl-cat-hero--mobile-banner .dl-cat-hero__age {
    display: none;
  }

  .dl-cat-hero--mobile-banner .dl-cat-hero__copy {
    position: relative;
    z-index: 1;
    gap: 12px;
    width: 100%;
  }

  .dl-cat-hero--mobile-banner .dl-cat-hero__title,
  .dl-cat-hero--mobile-banner .dl-cat-hero__lead {
    color: #fff;
  }

  .dl-cat-hero--mobile-banner .dl-cat-hero__title {
    font-size: 40px;
    line-height: 100%;
  }

  .dl-cat-hero--mobile-banner .dl-cat-hero__lead {
    font-size: 14px;
    line-height: 18px;
  }
}

/* More tools for moms (app cards row) */
.dl-more-tools {
  width: 100%;
}

.dl-more-tools .dl-section-title {
  margin: 0;
}

.dl-more-tools__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.dl-more-tools__card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 80px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: #303030;
  box-sizing: border-box;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.dl-more-tools__card:hover {
  color: #303030;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.dl-more-tools__icon {
  position: relative;
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(45deg, #ddd 25%, transparent 25%),
    linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%),
    linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #f3f3f3;
}

.dl-more-tools__icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dl-more-tools__label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  text-transform: uppercase;
  color: #303030;
}

/* Pagination */
.dl-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.dl-pagination .page-numbers a,
.dl-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  text-decoration: none;
}

.dl-pagination .page-numbers .current {
  background: var(--color-primary);
  color: #fff;
}

/* Pagination Group (Search Results) */
.dl-pagination-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  width: 100%;
  margin: 0;
}

.dl-pagination-group[hidden] {
  display: none !important;
}

.dl-pagination-group__status {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
  white-space: nowrap;
}

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

.dl-pagination-group__pages a,
.dl-pagination-group__pages span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #303030;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-sizing: border-box;
}

.dl-pagination-group__pages .current {
  background: var(--color-accent, #8fb56c);
  color: #fff;
}

.dl-pagination-group__per-page {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.dl-pagination-group__per-page-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 112px;
  height: 40px;
  padding: 0 36px 0 14px;
  border: 0;
  border-radius: 8px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234D4D4D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  color: #303030;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  cursor: pointer;
}

.dl-pagination-group__per-page-select:focus {
  outline: 2px solid var(--color-accent, #8fb56c);
  outline-offset: 2px;
}

/* Stage nav cards (Search Results — Cards.pdf) */
.dl-stage-nav {
  width: 100%;
  padding-top: 32px;
}

.dl-stage-nav__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.dl-stage-nav-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 88px;
  padding: 16px;
  border-radius: 12px;
  background: var(--dl-stage-nav-bg, #592a94);
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dl-stage-nav-card:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.dl-stage-nav-card--light,
.dl-stage-nav-card--light:hover {
  color: #fff;
}

.dl-stage-nav-card--light .dl-stage-nav-card__title,
.dl-stage-nav-card--light .dl-stage-nav-card__age {
  color: #fff;
}

.dl-stage-nav-card__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
}

.dl-stage-nav-card__title {
  font-family: var(--font-heading); /* Cinzel */
  font-size: 20px;
  font-weight: 400;
  line-height: 24px;
  text-transform: lowercase;
  color: #fff;
}

.dl-stage-nav-card:nth-child(2) .dl-stage-nav-card__title {
  font-size: 16px;
  line-height: 24px;
}

.dl-stage-nav-card__age {
  font-family: var(--font-heading); /* Cinzel */
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  color: #fff;
}

.dl-stage-nav-card__media {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
}

.dl-stage-nav-card__glow {
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.22) 42%,
    rgba(255, 255, 255, 0) 72%
  );
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.dl-stage-nav-card__img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Modal */
.dl-modal[hidden] {
  display: none !important;
}

.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 48, 48, 0.55);
}

.dl-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: min(90vh, 860px);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.dl-modal__x {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f2eff8;
  color: var(--color-primary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dl-modal__layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  max-height: min(90vh, 860px);
}

.dl-modal__preview {
  overflow: auto;
  padding: 24px;
  background: #f6f6f6;
}

.dl-modal__preview img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #fff;
}

.dl-modal__info {
  padding: 40px 32px 32px;
  overflow: auto;
}

.dl-modal__title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
}

.dl-modal__excerpt {
  margin: 0 0 20px;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.dl-modal__excerpt p {
  margin: 0 0 0.75em;
}

.dl-modal__excerpt p:last-child {
  margin-bottom: 0;
}

.dl-modal__pdf-error {
  margin: 8px 0 0;
  color: #b42318;
  font-size: 14px;
  line-height: 1.4;
}

.dl-lang-notice {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(47, 128, 237, 0.08);
  color: var(--color-text-secondary, #555);
  font-size: 14px;
  line-height: 1.4;
}

.dl-feedback.height-predictor__suggest {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.downloads .dl-home-band--bottom .dl-feedback.height-predictor__suggest {
  margin-top: 0;
}

.downloads-page--search .dl-feedback.height-predictor__suggest,
.downloads-page--category .dl-feedback.height-predictor__suggest {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

.dl-feedback .height-predictor__suggest-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.dl-feedback .height-predictor__suggest-card {
  flex: 0 1 640px;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.dl-feedback .height-predictor__suggest-select[type="text"],
.dl-feedback .height-predictor__suggest-select[type="email"] {
  width: 100%;
  box-sizing: border-box;
}

.downloads_background_block__cta {
  margin: 16px 0 0;
}

.downloads_background_block__cta-link {
  display: inline-flex;
  text-decoration: none;
}

.dl-modal__meta {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.dl-modal__meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}

.dl-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-modal__close-btn {
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 16px;
}

body.dl-modal-open {
  overflow: hidden;
}

/* FAQ spacing in downloads — 104px after View other categories (home: band margin) */
.downloads .height-predictor-faq.dl-faq {
  margin: 104px 0 0;
}

.downloads .dl-home-band--bottom .height-predictor-faq.dl-faq {
  margin: 0;
}

.downloads-page--search .downloads .height-predictor-faq.dl-faq,
.downloads-page--category .downloads .height-predictor-faq.dl-faq {
  margin: 0;
}

.downloads .dl-faq .height-predictor-faq__header {
  gap: 8px;
}

.downloads .dl-faq .height-predictor-faq__lead {
  margin: 0;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: #4d4d4d;
}

/* Tablet / mobile basics */
@media (max-width: 1199.98px) {
  .dl-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .downloads-page--category .dl-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dl-browse-topic__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .downloads_background_block {
    grid-template-columns: 120px 1fr 180px;
    gap: 32px;
    padding: 28px 32px;
  }

  .downloads_background_block__title {
    font-size: 32px;
  }

  .downloads_background_block__lead {
    margin-top: 24px;
  }

  .dl-browse-type__row {
    width: calc(100% + (100% - 72px) / 14);
  }

  .dl-type-chip {
    flex: 1 1 0;
    min-width: 0;
  }

  .downloads .container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .dl-top,
  .dl-browse-type,
  .dl-home-layout__stage,
  .dl-home-layout__filters,
  .dl-browse-topic,
  .dl-popular,
  .dl-featured,
  .dl-services,
  .dl-category-sections,
  .dl-view-other,
  .dl-faq,
  .dl-feedback {
    grid-area: auto;
  }

  .dl-search-layout,
  .dl-cat-hero,
  .dl-modal__layout {
    grid-template-columns: 1fr;
  }

  .dl-stage-nav__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .dl-stage-nav-card {
    min-height: 76px;
    padding: 12px;
  }

  .dl-stage-nav-card__media {
    width: 56px;
    height: 56px;
  }

  .dl-pagination-group {
    justify-content: center;
  }

  .dl-more-tools__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .dl-browse-stage__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dl-popular__track,
  .dl-cat-row__track {
    gap: 12px;
  }

  .dl-services__next {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .downloads .container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .dl-top,
  .dl-browse-type,
  .dl-home-layout__stage,
  .dl-home-layout__filters,
  .dl-browse-topic,
  .dl-popular,
  .dl-featured,
  .dl-services,
  .dl-category-sections,
  .dl-view-other,
  .dl-faq,
  .dl-feedback {
    grid-area: auto;
  }

  .dl-home-layout__filters,
  .dl-home-layout__aside,
  .dl-filters-wrap,
  .dl-filters {
    width: 100%;
    max-width: none;
  }

  .downloads_background_block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    height: 448px;
    max-height: 448px;
    min-height: 0;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    background-color: #afccea;
    background-image: none;
    overflow: hidden;
    box-sizing: border-box;
  }

  .downloads_background_block__folder {
    display: none;
  }

  .downloads_background_block__content {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .downloads_background_block__title {
    font-size: 40px;
    line-height: 100%;
    text-align: left;
  }

  .downloads_background_block__lead {
    margin-top: 12px;
    max-width: none;
    font-size: 14px;
    line-height: 18px;
    text-align: left;
  }

  .downloads_background_block__cta {
    display: none;
  }

  .downloads_background_block__media {
    display: flex;
    order: 2;
    flex: 1 1 auto;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
  }

  .downloads_background_block__media-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
  }

  .dl-top {
    gap: 56px;
  }

  /* Keep field + submit on one row (do not stack) */
  .dl-search.search-block__hero-search {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
  }

  .downloads-page--search .dl-stage-nav + .dl-search.search-block__hero-search {
    margin-top: -12px;
    padding: 24px 0;
    box-sizing: border-box;
  }

  .downloads-page--category .dl-search.search-block__hero-search {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .dl-search .search-block__hero-search-field {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .dl-search .search-block__hero-search-lang.js-dl-lang,
  .dl-search .search-block__hero-search-lang {
    font-size: 18px;
    line-height: 24px;
  }

  .dl-search .search-block__hero-search-submit {
    grid-column: 2;
    grid-row: 1;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    gap: 0;
    flex-shrink: 0;
  }

  .dl-search .search-block__hero-search-submit-label {
    display: none !important;
  }

  .dl-search .search-block__hero-search-input-cell {
    align-items: center;
    gap: 8px;
  }

  .dl-search .search-block__hero-search-input-inner .search-block__input {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 40px;
    height: 48px;
    align-self: center;
    box-sizing: border-box;
    padding: 14px 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    color: #303030;
  }

  .dl-search .search-block__hero-search-input-inner .search-block__input::placeholder {
    font-size: 16px;
    line-height: 20px;
    color: #a6a6a6;
    opacity: 1;
  }

  .dl-search .search-block__hero-search-input-icon {
    align-self: center;
  }

  .dl-browse-type__scroller {
    margin-top: 16px;
    padding: 0;
  }

  .dl-browse-type__row {
    align-items: stretch;
    gap: 12px;
    width: max-content;
    min-width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
  }

  .dl-type-chip {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 88px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }

  .dl-type-chip__icon {
    width: 48px;
    height: 48px;
  }

  .dl-type-chip__icon-img {
    width: 48px;
    height: 48px;
  }

  .dl-type-chip__label {
    white-space: normal;
    text-overflow: unset;
    font-size: 11px;
    line-height: 16px;
  }

  /* DOM order: Filters → Browse by type → stage (no order hacks) */
  .dl-home-layout__stage {
    margin-top: 16px; /* gap 32 + 16 = 48 after type */
  }

  .dl-browse-topic {
    margin-top: 16px; /* gap 32 + 16 = 48 after stage */
  }

  .dl-services {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .dl-services__wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 24px;
  }

  .dl-services__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    flex: none;
    box-sizing: border-box;
  }

  .dl-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    box-sizing: border-box;
  }

  .dl-service-card__media {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
  }

  .dl-service-card__img,
  .dl-service-card__placeholder {
    display: block;
    width: 100%;
    height: auto;
    max-width: 96px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
  }

  .dl-service-card__img--desktop {
    display: none;
  }

  .dl-service-card__img--mobile {
    display: block;
  }

  .dl-service-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
    width: 100%;
    min-width: 0;
  }

  .dl-service-card__title {
    margin: 0 0 12px;
    font-size: 8px;
    line-height: 1.2;
    text-align: center;
  }

  .dl-service-card__btn {
    max-width: 100%;
    border-radius: 6px;
    font-size: 12px;
    line-height: 16px;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
  }

  .dl-service-card__btn--pad-lg,
  .dl-service-card__btn--pad-sm {
    padding: 4px 8px;
  }

  .dl-section-lead {
    display: none;
  }

  .dl-section-title,
  .dl-home-layout__heading,
  .dl-home-layout__heading--stage,
  .dl-home-layout__heading--filters {
    font-size: 22px;
    line-height: 32px;
  }

  .dl-browse-stage__scroller {
    margin-top: 0;
    padding: 6px 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
  }

  .dl-browse-stage__scroller::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .dl-browse-stage__scroller.is-dragging {
    cursor: grabbing;
    user-select: none;
  }

  .dl-browse-stage__scroller.is-dragging .dl-stage-card {
    pointer-events: none;
  }

  .dl-browse-stage__grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    width: max-content;
    min-width: 100%;
    margin-top: 0;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
  }

  .dl-stage-card {
    position: relative;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-width: 72px;
    max-width: 88px;
    padding: 0;
    background: transparent;
    text-align: center;
  }

  .dl-stage-card__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0;
    border-radius: 50%;
    background-size: 48px 48px;
    background-position: center;
    background-repeat: no-repeat;
  }

  .dl-stage-card:nth-child(5n + 1) .dl-stage-card__icon {
    background-color: #dfd8e5;
  }

  .dl-stage-card:nth-child(5n + 2) .dl-stage-card__icon {
    background-color: #fce0e6;
  }

  .dl-stage-card:nth-child(5n + 3) .dl-stage-card__icon {
    background-color: #e6f6e1;
  }

  .dl-stage-card:nth-child(5n + 4) .dl-stage-card__icon {
    background-color: #c8eaf7;
  }

  .dl-stage-card:nth-child(5n + 5) .dl-stage-card__icon {
    background-color: #faeed4;
  }

  .dl-stage-card__age,
  .dl-stage-card__divider,
  .dl-stage-card__count,
  .dl-stage-card__desc {
    display: none;
  }

  .dl-stage-card__title {
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0;
  }

  .dl-stage-card__btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
    line-height: 0;
    box-shadow: none;
  }

  .dl-stage-card__btn:hover {
    background: transparent;
    color: transparent;
  }

  .dl-stage-card__btn span,
  .dl-stage-card__btn-icon {
    display: none;
  }

  .dl-browse-topic__scroller {
    margin-top: 0;
    padding: 6px 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 48px), transparent 100%);
  }

  .dl-browse-topic__scroller::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .dl-browse-topic__scroller.is-dragging {
    cursor: grabbing;
    user-select: none;
  }

  .dl-browse-topic__scroller.is-dragging .dl-topic-card {
    pointer-events: none;
  }

  .dl-browse-topic__head + .dl-browse-topic__scroller {
    margin-top: 20px;
  }

  .dl-browse-topic__grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    width: max-content;
    min-width: 100%;
    margin-top: 0;
    padding: 26px 16px;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
  }

  .dl-topic-card,
  .dl-topic-card--pink {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 140px;
    max-width: 168px;
    min-height: 0;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
  }

  .dl-topic-card__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;
  }

  .dl-topic-card__title,
  .dl-topic-card__lead {
    text-align: center;
  }

  .dl-topic-card__icon {
    margin-top: 0;
    margin-bottom: 0;
  }

  .dl-results-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .downloads-page--category .dl-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .downloads-page--search .dl-search-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .downloads-page--search .dl-search-layout__aside {
    order: 1;
    width: 100%;
    max-width: none;
  }

  .downloads-page--search .dl-search-layout__main {
    order: 2;
    width: 100%;
  }

  .downloads-page--search .dl-filters__title {
    font-size: 26px;
    line-height: 32px;
  }

  .downloads-page--search .dl-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Exactly 8 cards visible (4 rows × 2); rest via View other */
  .downloads-page--search .dl-results-grid > .dl-card:nth-child(n + 9) {
    display: none;
  }

  .downloads-page--search .dl-results-block.is-expanded .dl-results-grid > .dl-card:nth-child(n + 9) {
    display: flex;
  }

  .downloads-page--search .dl-results-scroller {
    gap: 0;
    padding: 12px 4px;
    background: transparent;
    overflow: visible;
  }

  .downloads-page--search .dl-results-viewport {
    max-height: none !important;
    overflow: visible;
  }

  .downloads-page--search .dl-results-scroller .dl-vscroll {
    display: none;
  }

  .downloads-page--category .dl-results-scroller {
    gap: 0;
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  /* Exactly 6 cards visible (3 rows × 2); rest via View other */
  .downloads-page--category .dl-results-grid > .dl-card:nth-child(n + 7) {
    display: none;
  }

  .downloads-page--category .dl-results-block.is-expanded .dl-results-grid > .dl-card:nth-child(n + 7) {
    display: flex;
  }

  .downloads-page--category .dl-results-viewport {
    max-height: none !important;
    overflow: visible;
  }

  .downloads-page--category .dl-results-scroller .dl-vscroll {
    display: none;
  }

  .downloads-page--search .dl-results-grid .dl-card {
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .downloads-page--search .dl-results-grid .dl-card__hit {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  .downloads-page--search .dl-results-grid .dl-card__stage-badge,
  .downloads-page--category .dl-results-grid .dl-card__stage-badge {
    display: none;
  }

  .downloads-page--search .dl-results-grid .dl-card__cover {
    max-width: 100%;
    border-radius: 8px;
  }

  .downloads-page--search .dl-results-grid .dl-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 0;
    min-width: 0;
  }

  .downloads-page--search .dl-results-grid .dl-card__title {
    font-size: 14px;
    line-height: 18px;
  }

  .downloads-page--search .dl-results-grid .dl-card__excerpt {
    margin-top: 4px;
    height: auto;
    font-size: 12px;
    line-height: 14px;
  }

  .downloads-page--search .dl-results-grid .dl-card__tags {
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    min-height: 0;
  }

  .downloads-page--search .dl-results-grid .dl-tag {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 14px;
  }

  .downloads-page--search .dl-results-grid .dl-card__btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
  }

  .downloads-page--search .dl-results-grid .dl-card__btn-icon {
    width: 16px;
    height: 16px;
  }

  .downloads-page--search .dl-results-block.is-expanded .dl-results-viewport {
    max-height: none !important;
    overflow: visible;
  }

  .downloads-page--search .dl-search-layout__main .dl-pagination-group {
    display: none;
  }

  .dl-stage-nav__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .dl-stage-nav-card {
    min-height: 0;
    padding: 8px;
    gap: 4px;
    border-radius: 6px;
  }

  .dl-stage-nav-card__media {
    width: 32px;
    height: 32px;
  }

  .dl-stage-nav-card__title {
    font-size: 8px;
    line-height: 11px;
  }

  .dl-stage-nav-card:nth-child(2) .dl-stage-nav-card__title {
    font-size: 8px;
    line-height: 11px;
  }

  .dl-stage-nav-card__age {
    font-size: 6px;
    line-height: 9px;
  }

  .dl-pagination-group__status,
  .dl-pagination-group__per-page {
    width: 100%;
    text-align: center;
  }

  .dl-pagination-group__per-page {
    justify-content: center;
  }

  .dl-more-tools__grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
  }

  .dl-more-tools__grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .dl-more-tools__grid.is-dragging {
    cursor: grabbing;
    user-select: none;
  }

  .dl-more-tools__grid.is-dragging .dl-more-tools__card {
    pointer-events: none;
  }

  .dl-more-tools__card {
    flex: 0 0 auto;
    width: 72%;
    max-width: 260px;
    min-height: 72px;
    padding: 10px 12px;
  }

  .dl-more-tools__icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .dl-more-tools__label {
    font-size: 14px;
    line-height: 18px;
  }

  /* Popular / Featured / category rows — 2 cols, 2nd row half-visible + fade */
  .dl-popular .dl-section-lead {
    display: block;
  }

  .dl-popular__scroller,
  .dl-cat-row__scroller {
    position: relative;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
    padding: 12px 4px 0;
    background: transparent;
    overflow: hidden;
  }

  .dl-popular__scroller::after,
  .dl-cat-row__scroller::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(246, 246, 246, 0) 78.31%, #f6f6f6 100%);
  }

  .dl-popular__viewport,
  .dl-cat-row__viewport {
    max-height: none;
    overflow: hidden;
  }

  .dl-popular .dl-vscroll,
  .dl-cat-row .dl-vscroll {
    display: none;
  }

  .dl-popular__track,
  .dl-cat-row__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Keep 4 cards in the peek (row1 full + row2 half) */
  .dl-popular__track > .dl-card:nth-child(n + 5),
  .dl-cat-row__track > .dl-card:nth-child(n + 5) {
    display: none;
  }

  .dl-popular__scroller .dl-card,
  .dl-cat-row__scroller .dl-card {
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .dl-popular .dl-card,
  .dl-cat-row .dl-card {
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .dl-popular .dl-card__hit,
  .dl-cat-row .dl-card__hit {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  .dl-popular .dl-card__stage-badge,
  .dl-cat-row .dl-card__stage-badge {
    display: none;
  }

  .dl-popular .dl-card__cover,
  .dl-cat-row .dl-card__cover {
    max-width: 100%;
    border-radius: 8px;
  }

  .dl-popular .dl-card__body,
  .dl-cat-row .dl-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 0;
    min-width: 0;
  }

  .dl-popular .dl-card__title,
  .dl-cat-row .dl-card__title {
    font-size: 14px;
    line-height: 18px;
  }

  .dl-popular .dl-card__excerpt,
  .dl-cat-row .dl-card__excerpt {
    margin-top: 4px;
    height: auto;
    font-size: 12px;
    line-height: 14px;
  }

  .dl-popular .dl-card__tags,
  .dl-cat-row .dl-card__tags {
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    min-height: 0;
  }

  .dl-popular .dl-tag,
  .dl-cat-row .dl-tag {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 14px;
  }

  /* Download button always visible at card bottom */
  .dl-popular .dl-card__btn,
  .dl-cat-row .dl-card__btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
  }

  .dl-popular .dl-card__btn-icon,
  .dl-cat-row .dl-card__btn-icon {
    width: 16px;
    height: 16px;
  }

  /* View other categories — width fits single-line text */
  .dl-view-other {
    width: 100%;
  }

  .dl-view-other__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    max-width: none;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: 12px;
    background: var(--color-primary, #6e4f95);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Per-block expand (Popular / Featured / category rows) — mobile only */
  .dl-view-other--cards {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 16px;
  }

  .dl-popular.is-expanded .dl-popular__track > .dl-card:nth-child(n + 5),
  .dl-cat-row.is-expanded .dl-cat-row__track > .dl-card:nth-child(n + 5) {
    display: flex;
  }

  .dl-popular.is-expanded .dl-popular__viewport,
  .dl-cat-row.is-expanded .dl-cat-row__viewport {
    max-height: none !important;
    overflow: visible;
  }

  .dl-popular.is-expanded .dl-popular__scroller::after,
  .dl-cat-row.is-expanded .dl-cat-row__scroller::after {
    display: none;
  }

  .dl-popular.is-expanded > .dl-view-other--cards,
  .dl-cat-row.is-expanded > .dl-view-other--cards,
  .downloads-page--category .dl-results-block.is-expanded > .dl-view-other--cards {
    display: none;
  }

  /* Page-level button after all categories — hide on mobile (each block has its own) */
  .dl-category-sections + .dl-view-other {
    display: none !important;
  }

  .dl-cat-row__title {
    font-size: 20px;
    line-height: 24px;
  }

  .dl-cat-row__view-all {
    font-size: 14px;
  }

  .dl-filters {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .dl-filters__group {
    margin: 0;
    border-radius: 12px;
    background: #6e4f95;
    overflow: hidden;
  }

  .dl-filters__group + .dl-filters__group {
    margin-top: 8px;
  }

  .dl-filters__group[open] {
    background: #fff;
  }

  .dl-filters__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
  }

  .dl-filters__group-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    color: #fff;
  }

  .dl-filters__group[open] .dl-filters__group-title {
    color: #4d4d4d;
  }

  .dl-filters__group-chevron {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #a577b7;
    color: #fff;
    transition: transform 0.2s ease;
  }

  .dl-filters__group-chevron svg {
    display: block;
    width: 12px;
    height: 12px;
  }

  .dl-filters__group[open] .dl-filters__group-chevron {
    background: #6e4f95;
    transform: rotate(180deg);
  }

  .dl-filters__chips {
    gap: 8px;
    padding: 0 16px 16px;
  }

  .dl-filters__submit {
    display: none;
  }

  .dl-chip span {
    font-size: 13px;
  }

  .dl-cat-row__head {
    flex-wrap: wrap;
  }

  .dl-cat-row__view-all {
    margin-left: 0;
  }

  .dl-results-head__row {
    flex-direction: column;
    align-items: stretch;
  }

  .dl-sort {
    width: 100%;
    justify-content: space-between;
  }

  .dl-sort__select {
    flex: 1 1 auto;
  }

  .dl-modal {
    padding: 12px;
  }

  .dl-modal__dialog {
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }

  .dl-modal__layout {
    max-height: calc(100vh - 24px);
  }

  .dl-modal__info {
    padding: 20px 16px 16px;
  }

  .dl-modal__title {
    font-size: 22px;
  }

  .dl-modal__x {
    top: 8px;
    right: 8px;
  }

  .downloads .height-predictor-faq.dl-faq {
    margin: 0;
  }

  .dl-home-band--bottom {
    margin-top: 0;
  }
}

@media (max-width: 479.98px) {
  .downloads .container {
    padding-left: 16px;
    padding-right: 16px;
    gap: 48px;
  }

  .downloads_background_block {
    padding: 24px;
    border-radius: 16px;
  }

  .dl-browse-type__row {
    width: max-content;
    min-width: 100%;
    gap: 16px;
  }

  .dl-home-layout__stage {
    margin-top: 0;
  }

  .dl-browse-topic {
    margin-top: 0;
  }

  .dl-browse-stage__grid {
    gap: 16px;
  }

  .dl-browse-topic__grid {
    gap: 12px;
  }

  .dl-type-chip {
    flex: 0 0 auto;
    min-width: 88px;
  }

  .dl-stage-card__title {
    font-size: 10px;
    line-height: 12px;
  }

  .dl-card__btn {
    width: 100%;
  }

  .dl-applied__clear {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .dl-service-card__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    gap: 0;
    white-space: normal;
    text-align: center;
    line-height: 16px;
  }

  .dl-service-card__btn-line {
    display: block;
    width: 100%;
    text-align: center;
  }

  .dl-service-card__btn-line + .dl-service-card__btn-line::before {
    content: none;
  }
}
