.bt-theme-intro {
  margin-block: 1rem 1.5rem;
}

.bt-theme-intro h1 {
  margin-block: 1.25rem .5rem;
}

.bt-theme-intro p {
  max-inline-size: 70ch;
  margin-block: 0;
  line-height: 1.65;
}

.bt-theme-banner {
  display: grid;
  place-items: center;
  min-block-size: clamp(7rem, 18vw, 12rem);
  padding: 1.5rem;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
}

.bt-theme-banner img {
  display: block;
  inline-size: min(100%, 17rem);
  block-size: auto;
  max-block-size: clamp(4rem, calc(18vw - 3rem), 9rem);
  object-fit: contain;
}

.bt-theme-banner img[src="/img/catalogue-themes/star-wars.png"] {
  filter: brightness(0);
}

.bt-theme-nav {
  flex-wrap: wrap;
  gap: .5rem;
  margin-block-end: 1.75rem;
}

.bt-theme-section {
  margin-block: 1.75rem;
  scroll-margin-top: 6rem;
}

.bt-theme .bt-seo-directory {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

.bt-theme-series-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: .75rem;
  align-items: start;
}

.bt-theme-series-group {
  min-inline-size: 0;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.bt-theme-series-group summary {
  padding: .85rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

.bt-theme-series-group summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 12px;
}

.bt-theme-series-count {
  margin-inline-start: .45rem;
  font-weight: 400;
}

.bt-theme-series-links {
  display: grid;
  gap: .25rem;
  list-style: none;
  padding: .25rem 1rem .75rem;
  margin: 0;
}

.bt-theme-series-links a {
  display: block;
  padding-block: .4rem;
  overflow-wrap: anywhere;
}

/* Fill the available space within BT's standard centred page limit. */
main.bt-theme--catalogue {
  width: 100%;
  max-width: var(--maxw);
}

.bt-theme--catalogue .bt-theme-intro p {
  max-inline-size: none;
}

.bt-theme-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.75rem 1rem;
}

.bt-theme a.bt-theme-index-card {
  display: block;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}

.bt-theme-index-card .bt-theme-banner {
  min-block-size: clamp(7rem, 15vw, 10rem);
  border: 0;
  border-radius: 0;
}

.bt-theme-index-card .bt-theme-banner img {
  inline-size: min(100%, 13rem);
  max-block-size: clamp(4rem, calc(15vw - 3rem), 7rem);
}

.bt-theme-index-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border-top: 1px solid #ddd;
  font-weight: 700;
}

.bt-theme-index-card:hover .bt-theme-index-label {
  background: #f3f3f3;
}

.bt-theme-index-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .bt-theme-index-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bt-theme-recommendations .bt-theme-banner {
  min-block-size: 6rem;
  padding: 1rem;
}

.bt-theme-recommendations .bt-theme-banner img {
  inline-size: min(100%, 9rem);
  max-block-size: 4rem;
}

@media (min-width: 641px) {
  .bt-theme-recommendations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bt-theme-banner:has(img[src="/img/catalogue-themes/alien.webp"]) {
  align-content: center;
  background: #000;
  border-color: #151515;
}

.bt-theme-banner:has(img[src="/img/catalogue-themes/alien.webp"])::after {
  content: "";
  inline-size: min(72%, 14rem);
  aspect-ratio: 6 / 1;
  margin-block-start: -.15rem;
  background: url("/img/catalogue-themes/alien-slime.webp") center / contain no-repeat;
}

.bt-theme-index-card .bt-theme-banner:has(img[src="/img/catalogue-themes/alien.webp"])::after {
  inline-size: min(72%, 10rem);
}

.bt-theme-recommendations .bt-theme-banner:has(img[src="/img/catalogue-themes/alien.webp"])::after {
  inline-size: min(72%, 6.75rem);
}
