/* ==========================================================================
   THEMES GALLERY — /themes/
   Page: themes/index.html. Filtering: /assets/js/themes-filters.js
   ========================================================================== */

/* Eyebrows use js-section__subtitle--accent (base.css) for case, tracking and
   color; this only sets the face and size, like sm-eyebrow on shipping-methods */
.themes-eyebrow {
  margin: 0;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   HERO
   ========================================================================== */

/* The solid header already offsets the first section (base.css), so the
   padding is only the hero's own breathing room */
.themes-hero {
  padding: 52px 40px 64px;
  overflow-x: clip;
  overflow-y: hidden;
}

.themes-hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 45px;
}

.themes-hero__copy {
  flex: 1 1 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* Size, weight and face come from js-section__title (base.css) */
.themes-hero__title {
  max-width: 560px;
  line-height: 1.05;
  text-wrap: balance;
}

.themes-hero__text {
  margin: 0;
  max-width: 440px;
}

.themes-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 10px;
}

/* Three devices placed in % of a 32:19 box so the whole composition scales.
   The shadow and ring are resolved here, on the onyx hero, because each
   device carries the carbon bundle for its frame. */
.themes-hero__visual {
  --themes-device-ring: var(--color-main-op2);
  --themes-device-shadow: var(--color-background-op6);
  --themes-pill-shadow: var(--color-background-op4);

  position: relative;
  flex: 1 1 420px;
  max-width: 640px;
  margin-left: auto;
  aspect-ratio: 32 / 19;
}

/* js-glow (base.css) sized up to the composition; the margin keeps its orbit
   centred the way base.css does for 120px */
.themes-hero__visual.js-glow::before {
  width: 220px;
  height: 220px;
}

@supports (offset-path: circle()) {
  .themes-hero__visual.js-glow::before {
    margin: -82px 0 0 -82px;
  }
}

.themes-device {
  position: absolute;
  overflow: hidden;
  border: 5px solid var(--color-background);
  background: var(--color-background);
  box-shadow:
    0 0 0 1px var(--themes-device-ring),
    0 24px 48px var(--themes-device-shadow);
}

.themes-device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.themes-device--tablet {
  top: 2%;
  right: 0;
  z-index: 1;
  width: 38%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  rotate: 6deg;
}

.themes-device--laptop {
  top: 20%;
  left: 22%;
  z-index: 2;
  width: 58%;
  overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
}

.themes-device__screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 5px solid var(--color-background);
  border-radius: 10px 10px 0 0;
  background: var(--color-background);
  box-shadow:
    0 0 0 1px var(--themes-device-ring),
    0 24px 48px var(--themes-device-shadow);
}

.themes-device__base {
  height: 9px;
  margin: 0 -5%;
  border-radius: 0 0 14px 14px;
  background: var(--color-background);
  box-shadow: 0 0 0 1px var(--themes-device-ring);
}

.themes-device--phone {
  top: 16%;
  left: 4%;
  z-index: 3;
  width: 18%;
  aspect-ratio: 9 / 19;
  border-width: 4px;
  border-radius: 18px;
  rotate: -8deg;
}

.themes-hero__pill {
  position: absolute;
  z-index: 4;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-background);
  color: var(--color-main);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 6px 16px var(--themes-pill-shadow);
}

.themes-hero__pill--phone {
  top: 5%;
  left: 5%;
}

.themes-hero__pill--laptop {
  top: 9%;
  left: 33%;
}

.themes-hero__pill--tablet {
  top: 40%;
  right: -3%;
}

/* ==========================================================================
   GALLERY — sidebar + grid
   ========================================================================== */

.themes-gallery {
  padding: 48px 40px 80px;
}

.themes-gallery__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}

/* Sidebar -------------------------------------------------------------- */

.themes-filters {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.themes-filter fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.themes-filter__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  list-style: none;
  pointer-events: none;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-main);
}

.themes-filter__title::-webkit-details-marker {
  display: none;
}

.themes-filter__title .ph {
  display: none;
  transition: var(--js-transition);
}

/* Checked business types, shown on the summary only where the list can be closed */
.themes-filter__selected {
  display: none;
}

/* Each business type is a small card; the checked one lifts off the tint */
.themes-filter__option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-md);
  background: var(--color-main-op05);
  font-size: 15px;
  line-height: 1.3;
  color: var(--color-main);
  cursor: pointer;
  transition: var(--js-transition);
}

.themes-filter__option:hover {
  border-color: var(--color-main-op3);
}

.themes-filter__option:has(.form-check-input:checked) {
  border-color: var(--color-main-op5);
  background: var(--color-background);
  box-shadow: 0 1px 4px var(--color-shadow);
}

/* Overrides Bootstrap's .form-check-input, which themes-filters.js still selects. */
.themes-filter__option .form-check-input {
  flex: 0 0 auto;
  float: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
  appearance: auto;
  outline: none;
  accent-color: var(--color-main);
  cursor: pointer;
}

.themes-filter__option .form-check-input:focus-visible,
.themes-filter__title:focus-visible {
  outline: 2px solid var(--color-main);
  outline-offset: 2px;
}

.themes-filter__count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  margin-left: auto;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-main-op1);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-main-op7);
}

/* Results -------------------------------------------------------------- */

.themes-results {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.themes-results__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.themes-results__title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-main);
}

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

/* A text button: it only appears while a business type is checked */
.themes-results__clear {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-button);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.themes-results__clear:is(:hover, :focus-visible) {
  color: var(--color-main-op7);
}

.themes-results__clear:focus-visible {
  outline: 2px solid var(--color-main);
  outline-offset: 2px;
}

.themes-results__count {
  font-weight: 500;
  color: var(--color-main-op6);
}

/* Hidden until themes-filters.js shuffles the cards, only when scripts run;
   the delayed reveal covers a script that never loads */
.themes-js .themes-grid:not(.is-shuffled) {
  visibility: hidden;
  animation: themes-grid-reveal 0s 3s forwards;
}

@keyframes themes-grid-reveal {
  to {
    visibility: visible;
  }
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 36px;
}

/* Card ----------------------------------------------------------------- */

.themes-card__link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.themes-card__shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--color-main-op1);
  border-radius: var(--js-radius-lg);
  background: var(--color-surface);
  transition: var(--js-transition);
}

.themes-card__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.themes-card__link:is(:hover, :focus-visible) .themes-card__shot {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px var(--color-shadow);
}

/* Hover scrolls the screenshot down to its bottom; it scrolls back faster on leave. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .themes-card__shot img {
    transition: object-position 0.8s ease-in-out;
  }

  .themes-card__link:is(:hover, :focus-visible) .themes-card__shot img {
    object-position: bottom;
    transition-duration: 2s;
  }
}

.themes-card__info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.themes-card__name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-main);
  font-size: 20px;
  line-height: 1.2;
  color: var(--color-main);
}

.themes-card__variant {
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-main-op7);
}

.themes-card__price {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-main);
}

/* Banner inside the grid ------------------------------------------------ */

.themes-banner {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  padding: 30px 56px;
  border-radius: var(--js-radius-xl);
  /* Onyx base (data-bundle-color="onyx" on the element) with a soft green
     glow behind her, like the approved mock */
  background-color: var(--color-background);
  background-image: radial-gradient(
    ellipse 60% 70% at 78% 38%,
    var(--js-color-green-glow) 0%,
    transparent 70%
  );
  color: var(--color-main);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.themes-banner[hidden] {
  display: none;
}

.themes-banner__copy {
  flex: 1 1 320px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.themes-banner .themes-eyebrow {
  font-size: 14px;
}

/* Weight, face and color come from js-section__title / js-section__text; the
   size steps down from the section title so the in-grid banner stays a banner
   (same approach as sm-title--hero on shipping-methods) */
.js-section__title.themes-banner__title {
  font-size: calc(var(--font-base-size) * 2.5);
  line-height: 1.1;
  text-wrap: balance;
}

.themes-banner__text {
  margin: 0;
}

.themes-banner .button {
  margin-top: 8px;
}

/* The store she is building, around her. Everything inside is placed in % of
   this 1218:1130 box and sized in units of 1% of its width (--themes-u), so the whole scene scales as one on
   phones. Her cut-out stands on the banner's bottom edge: the negative margin
   cancels the banner's bottom padding */
.themes-banner__visual {
  --themes-device-ring: var(--color-main-op2);
  --themes-device-shadow: var(--color-background-op6);

  position: relative;
  isolation: isolate;
  --themes-w: 500px;
  --themes-u: calc(var(--themes-w) / 100);
  flex: 0 0 auto;
  align-self: flex-end;
  width: var(--themes-w);
  aspect-ratio: 1218 / 1130;
  margin: 0 0 -48px auto;
}

.themes-banner__person {
  position: absolute;
  bottom: 0;
  left: 22%;
  z-index: 3;
  display: block;
  width: auto;
  height: 93%;
}

/* Parallax: themes-filters.js sets --themes-y (-1..1, from the scroll) and
   --themes-x (-1..1, from the pointer) on the banner; each piece moves by its
   own depth in px. X is the subtle axis: the pointer moves a piece only
   --themes-x-ratio of its depth (0.2 unless a page overrides it). The separate
   translate property leaves the rotate of the tilted thumb alone */
.themes-banner__person,
.themes-banner__window,
.themes-banner__thumb,
.themes-banner__panel {
  translate:
    calc(var(--themes-x, 0) * var(--themes-depth, 0px) * var(--themes-x-ratio, 0.2))
    calc(var(--themes-y, 0) * var(--themes-depth, 0px));
  will-change: translate;
}

.themes-banner__person {
  --themes-depth: 30px;
}

.themes-banner__window {
  --themes-depth: -50px;
}

.themes-banner__thumb {
  --themes-depth: -60px;
}

.themes-banner__shipping {
  --themes-depth: -70px;
}

.themes-banner__palette {
  --themes-depth: -80px;
}

.themes-banner__type {
  --themes-depth: -90px;
}

/* Browser window with a live theme, behind her on the right */
.themes-banner__window {
  position: absolute;
  top: 19%;
  left: 60%;
  z-index: 1;
  width: 40%;
  height: 27%;
  overflow: hidden;
  border-radius: calc(var(--themes-u) * 1.6);
  background: var(--color-background);
  box-shadow: 0 0 0 1px var(--themes-device-ring), 0 calc(var(--themes-u) * 3) calc(var(--themes-u) * 6) var(--themes-device-shadow);
}

.themes-banner__window-bar {
  display: flex;
  align-items: center;
  gap: calc(var(--themes-u) * 0.8);
  padding: 0 calc(var(--themes-u) * 1.8);
  background: var(--color-main-op1);
}

.themes-banner__window-bar span {
  flex: 0 0 auto;
  width: calc(var(--themes-u) * 1.1);
  height: calc(var(--themes-u) * 1.1);
  border-radius: 50%;
  background: var(--color-main-op3);
}

.themes-banner__window-bar .themes-banner__window-url {
  flex: 1 1 auto;
  width: auto;
  height: calc(var(--themes-u) * 2.2);
  margin-left: calc(var(--themes-u) * 1.4);
  border-radius: calc(var(--themes-u) * 1.1);
  background: var(--color-main-op1);
}

.themes-banner__window img {
  display: block;
  width: 100%;
  height: calc(100% - calc(var(--themes-u) * 4.4));
  object-fit: cover;
  object-position: top;
}

/* Second theme: a small tilted screen, top left */
.themes-banner__thumb {
  top: 13%;
  left: 12%;
  z-index: 1;
  width: 20%;
  aspect-ratio: 16 / 10;
  border-width: 3px;
  border-radius: calc(var(--themes-u) * 1.6);
  rotate: -8deg;
}

/* Floating panels share one glassy card look */
.themes-banner__panel {
  position: absolute;
  z-index: 2;
  padding: calc(var(--themes-u) * 2) calc(var(--themes-u) * 2.4);
  border-radius: calc(var(--themes-u) * 2);
  background: var(--color-background);
  color: var(--color-main);
  box-shadow: 0 0 0 1px var(--themes-device-ring), 0 calc(var(--themes-u) * 3) calc(var(--themes-u) * 6) var(--themes-device-shadow);
}

.themes-banner__panel-title,
.themes-banner__panel-label {
  margin: 0;
  font-size: calc(var(--themes-u) * 2.6);
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.themes-banner__panel-label {
  display: flex;
  align-items: center;
  gap: calc(var(--themes-u) * 1);
  font-weight: 500;
  font-size: calc(var(--themes-u) * 2.2);
  white-space: nowrap;
}

.themes-banner__panel-label i {
  color: var(--color-accent);
}

/* Shipping methods: light card, partly behind her */
.themes-banner__shipping {
  top: 33%;
  left: 2%;
  z-index: 2;
  width: 35%;
  height: 32%;
  display: flex;
  flex-direction: column;
  gap: calc(var(--themes-u) * 1.6);
}

.themes-banner__row {
  display: flex;
  align-items: center;
  gap: calc(var(--themes-u) * 1.4);
  padding: calc(var(--themes-u) * 1.4) calc(var(--themes-u) * 1.6);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--themes-u) * 1.2);
}

.themes-banner__row--active {
  border-color: var(--color-accent);
  background: var(--color-main-op05);
}

.themes-banner__row i {
  flex: 0 0 auto;
  width: calc(var(--themes-u) * 1.8);
  height: calc(var(--themes-u) * 1.8);
  border-radius: 50%;
  border: 1px solid var(--color-main-op4);
}

.themes-banner__row--active i {
  border: calc(var(--themes-u) * 0.5) solid var(--color-accent);
}

.themes-banner__row b {
  flex: 1 1 auto;
  height: calc(var(--themes-u) * 1.2);
  border-radius: calc(var(--themes-u) * 1);
  background: var(--color-main-op2);
}

.themes-banner__row em {
  flex: 0 0 auto;
  width: calc(var(--themes-u) * 2.8);
  height: calc(var(--themes-u) * 2.8);
  border-radius: 50%;
  background: var(--color-accent);
}

/* Colour palette, top right */
.themes-banner__palette {
  top: 4%;
  left: 70%;
  z-index: 4;
  width: 23%;
}

.themes-banner__swatches {
  display: flex;
  gap: calc(var(--themes-u) * 1);
  margin-top: calc(var(--themes-u) * 1.6);
}

.themes-banner__swatches span {
  flex: 1 1 0;
  aspect-ratio: 1;
  border-radius: calc(var(--themes-u) * 1.2);
  box-shadow: 0 0 0 1px var(--color-main-op2);
}

/* Typography, bottom right */
.themes-banner__type {
  top: 67%;
  left: 70%;
  z-index: 4;
  width: 30%;
  text-align: center;
}

.themes-banner__type .themes-banner__panel-label {
  justify-content: flex-start;
}

.themes-banner__type-sample {
  margin: calc(var(--themes-u) * 2) 0 calc(var(--themes-u) * 0.6);
  font-size: calc(var(--themes-u) * 3.8);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.themes-banner__type-sample span {
  font-weight: 400;
}

.themes-banner__type-body {
  margin: 0;
  font-family: var(--font-secondary, var(--font-main));
  font-size: calc(var(--themes-u) * 2.4);
  color: var(--color-main-op7);
}

/* ==========================================================================
   PUBLISH YOUR THEME
   ========================================================================== */

.themes-publish {
  padding: 0 40px 96px;
  background: var(--color-background);
}

/* A quiet strip for designers: the merchant CTA (the banner) stays the loud one */
.themes-publish__panel {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.themes-publish__copy {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.themes-publish__title {
  margin: 0;
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-main);
  text-wrap: balance;
}

.themes-publish__text {
  margin: 0;
  color: var(--color-secondary-op7);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* The sidebar wraps above the grid below ~820px; lay it out as a row there. */
/* Beside the grid the sidebar follows the scroll; the list scrolls on its own
   when it is taller than the viewport. The padding keeps focus rings inside
   the scroll box. */
@media (min-width: 992px) {
  /* Resolved here, on the bright section, so the summary (light bundle for its
     phone button look) can still paint the sidebar's own background */
  .themes-filters {
    --themes-sidebar-bg: var(--color-background);
    flex-basis: 228px;
    position: sticky;
    top: calc(var(--header-height-desktop) + 24px);
    max-height: calc(100vh - var(--header-height-desktop) - 48px);
    margin: -4px;
    padding: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--color-main-op2) transparent;
    /* Keeps the focused checkbox clear of the sticky title below */
    scroll-padding-top: 48px;
  }

  /* The 228px sidebar fits the cards with tighter padding and a smaller count */
  .themes-filter__option {
    gap: 8px;
    min-height: 44px;
    padding: 6px 6px 6px 10px;
    font-size: 14px;
  }

  .themes-filter__option .form-check-input {
    width: 18px;
    height: 18px;
  }

  .themes-filter__count {
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    font-size: 12px;
  }

  /* The title stays on top while the list scrolls under it */
  .themes-filter__title {
    position: sticky;
    top: -4px;
    z-index: 1;
    padding-bottom: 8px;
    padding-top: 12px;
    background-color: var(--themes-sidebar-bg);
  }
}

/* Where the two buttons no longer fit on one row, stack them at one width */
@media (max-width: 1199px) {
  .themes-hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 360px;
  }

  .themes-hero__actions .button {
    width: auto;
  }

}

/* The banner stacks here on purpose and centres, like the hero below 992px:
   below this width its copy and the 420px composition no longer share a row */
@media (max-width: 1311px) {
  .themes-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .themes-banner__copy {
    flex: 0 0 auto;
    align-items: center;
  }

  .themes-banner__visual {
    margin-inline: auto;
  }
}

@media (max-width: 991px) {
  /* The hero stacks here on purpose (not wherever flex happens to wrap) and
     centres its copy, buttons and composition */
  .themes-hero__inner {
    flex-direction: column;
  }

  .themes-hero__copy {
    flex: 0 0 auto;
    align-items: center;
    text-align: center;
  }

  .themes-hero__visual {
    flex: 0 0 auto;
    width: 100%;
    margin-inline: auto;
  }

  /* Stacked above the grid, the filter stays pinned right under the fixed
     header while the cards scroll; the negative margin plus padding lets its
     background reach the section edges so cards pass behind it cleanly */
  .themes-filters {
    position: sticky;
    top: var(--header-height-desktop);
    z-index: 10;
    flex: 1 1 100%;
    gap: 20px;
    margin-inline: -40px;
    padding: 12px 40px;
    background: var(--color-background);
  }

  /* Open list = modal: the page stops scrolling and a huge shadow dims
     everything outside the filter, header included (z-index above it) */
  html.themes-filter-open {
    overflow: hidden;
  }

  html.themes-filter-open .themes-filters {
    z-index: 101;
    box-shadow: 0 0 0 100vmax var(--color-main-op6);
  }

  /* Opened while pinned, the list scrolls on its own instead of covering
     the whole screen */
  .themes-filter__details[open] fieldset {
    max-height: calc(100vh - var(--header-height-desktop) - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .themes-filter fieldset {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 8px 12px;
  }

  .themes-filter__title {
    min-height: 44px;
    margin-bottom: 0;
    padding: 0 14px;
    border: 1px solid var(--color-main-op5);
    border-radius: var(--js-radius-md);
    background: var(--color-background);
    pointer-events: auto;
    cursor: pointer;
  }

  .themes-filter__title .ph {
    display: block;
  }

  .themes-filter__selected:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--color-button-secondary-bg);
    color: var(--color-button-secondary-text);
    font-family: var(--font-secondary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
  }

  .themes-filter__details[open] .themes-filter__title {
    margin-bottom: 8px;
  }

  .themes-filter__details[open] .themes-filter__title .ph {
    transform: rotate(180deg);
  }

  .themes-banner__person {
    --themes-depth: -15px;
  }
}

@media (max-width: 767px) {
  .themes-hero {
    padding: 32px 16px 48px;
  }

  .themes-hero__inner {
    gap: 32px;
  }

  .themes-device {
    border-width: 3px;
  }

  .themes-device__screen {
    border-width: 3px;
  }

  .themes-device--phone {
    border-radius: 12px;
  }

  .themes-hero__pill {
    padding: 4px 10px;
    font-size: 11px;
  }

  .themes-gallery {
    padding: 32px 16px 56px;
  }

  .themes-filters {
    top: var(--header-height-mobile);
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .themes-filter__details[open] fieldset {
    max-height: calc(100vh - var(--header-height-mobile) - 120px);
  }

  .themes-gallery__inner {
    gap: 28px;
  }

  .themes-results__title {
    font-size: 20px;
  }

  .themes-card__name {
    font-size: 18px;
  }

  .themes-banner {
    min-height: 0;
    padding: 32px 24px;
  }

  /* On phones the composition scales to the banner width, her on the right */
  .themes-banner__visual {
    /* 100vw minus the page gutters (16 + 16) and the banner padding (24 + 24) */
    --themes-w: min(420px, calc(100vw - 80px));
    margin: 0 auto -32px;
  }

  /* !important only to beat the base.css phone sizes, which use it too */
  .js-section__title.themes-banner__title {
    font-size: calc(var(--font-base-size) * 2) !important;
  }

  .themes-publish__title {
    font-size: 20px;
  }

  .themes-publish {
    padding: 0 16px 56px;
  }

  .themes-publish__panel {
    gap: 16px;
    padding: 24px 20px;
  }

  .themes-publish__copy {
    flex-basis: 100%;
  }
}

/* Back to the base js-glow size where the composition is small */
@media (max-width: 767px) {
  .themes-hero__visual.js-glow::before {
    width: 120px;
    height: 120px;
  }

  @supports (offset-path: circle()) {
    .themes-hero__visual.js-glow::before {
      margin: -45px 0 0 -45px;
    }
  }
}

/* On phones the labels would cover the screenshots: the devices speak alone */
@media (max-width: 575px) {
  .themes-hero__pill {
    display: none;
  }
}
