.related-shapes {
  padding-block: clamp(56px, 8vw, 112px);
}

.related-shapes:has(> .board-rows:empty) {
  display: none;
}

.related-shapes > .section-heading {
  margin-block-end: clamp(24px, 3.8vw, 50px);
}

.related-shapes > .section-heading .eyebrow {
  display: none;
}

.related-shapes > .section-heading h2 {
  margin-block-start: 0;
}

.related-shapes > .board-rows {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 3.25vw, 52px);
}

.related-shapes .board-row .board-row-link {
  grid-template:
    "shape shape" auto
    "name arrow" auto
    "copy copy" 1fr
    "facts facts" auto / minmax(0, 1fr) 38px;
  gap: 8px 12px;
  padding-block: 8px 18px;
}

.related-shapes .board-row .board-row-cutout-frame {
  position: relative;
  container-type: inline-size;
  height: clamp(112px, 12vw, 178px);
  min-height: 0;
  overflow: clip;
}

.related-shapes .board-rows .board-row .board-row-cutout-frame > img {
  position: absolute;
  inset: 50% auto auto 50%;
  width: auto;
  max-width: none;
  height: min(308px, 81cqw);
  object-fit: contain;
  transform: none;
  translate: -50% -50%;
  rotate: 90deg;
  scale: 1;
  transition: none;
}

.related-shapes .board-row .board-row-name {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: 0;
}

.related-shapes .board-row-name h3 {
  font-size: clamp(1.6rem, 2.45vw, 2.7rem);
}

.related-shapes .board-row .board-row-copy {
  max-width: 40ch;
  padding: 0 0 6px;
}

.related-shapes .board-row .board-row-arrow {
  align-self: center;
  width: 38px;
}

.related-shapes .board-row-meta .related-board-price {
  flex-wrap: wrap;
  gap: 0 5px;
  margin-top: 5px;
  color: var(--ink);
}

.related-shapes .related-board-price strong {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 48rem) {
  .related-shapes > .board-rows:has(> .board-row:nth-child(2):last-child),
  .related-shapes > .board-rows:has(> .board-row:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 75rem) {
  .related-shapes > .board-rows:has(> .board-row:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(18px, 2.2vw, 38px);
  }
}

@media (max-width: 47.99rem) {
  .related-shapes > .board-rows {
    grid-template-columns: minmax(0, 1fr);
  }

  .related-shapes .board-row .board-row-link {
    grid-template:
      "shape name arrow" auto
      "shape copy copy" auto
      "shape facts facts" 1fr / clamp(74px, 24vw, 166px) minmax(0, 1fr) 28px;
    align-items: start;
    gap: 6px clamp(12px, 3vw, 22px);
    padding-block: 13px;
  }

  .related-shapes .board-row .board-row-cutout-frame {
    align-self: center;
    height: clamp(132px, 33vw, 180px);
  }

  .related-shapes .board-rows .board-row .board-row-cutout-frame > img {
    max-width: 78%;
    height: 85%;
    rotate: none;
  }

  .related-shapes .board-row .board-row-arrow {
    width: 28px;
    height: 28px;
    align-self: start;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .related-shapes .board-rows .board-row .board-row-cutout-frame > img {
    transition: translate 280ms var(--motion-out), scale 280ms var(--motion-out);
  }

  .related-shapes .board-rows .board-row-link:hover .board-row-cutout-frame > img {
    translate: calc(-50% + 7px) -50%;
    scale: 1.055;
  }

  @media (max-width: 47.99rem) {
    .related-shapes .board-rows .board-row-link:hover .board-row-cutout-frame > img {
      translate: -50% calc(-50% - 6px);
    }
  }
}
