.wrrp-related {
  --wrrp-accent: var(--accent, var(--primary, #071d40));
  --wrrp-border: var(--line, rgba(7, 29, 64, 0.18));
  --wrrp-muted: var(--muted, #667085);
  --wrrp-text: var(--ink, #071d40);
  --wrrp-surface: var(--panel-strong, var(--surface, #fff));
  --wrrp-heading-surface: rgba(7, 29, 64, 0.045);
  --wrrp-control-hover: rgba(7, 29, 64, 0.06);
  --wrrp-media-surface: rgba(127, 127, 127, 0.08);
  box-sizing: border-box;
  width: 100%;
  clear: both;
  margin: clamp(1.4rem, 3vw, 2rem) 0;
  overflow: hidden;
  border: 1px solid var(--wrrp-border);
  border-radius: 0;
  background: var(--wrrp-surface);
  color: var(--wrrp-text);
}

html[data-watch-theme="dark"] .wrrp-related {
  --wrrp-heading-surface: rgba(255, 208, 0, 0.055);
  --wrrp-control-hover: rgba(255, 208, 0, 0.1);
  --wrrp-media-surface: rgba(244, 239, 230, 0.07);
}

html[data-watch-theme="light"] .wrrp-related {
  --wrrp-heading-surface: rgba(0, 27, 68, 0.045);
  --wrrp-control-hover: rgba(0, 27, 68, 0.06);
  --wrrp-media-surface: rgba(0, 27, 68, 0.06);
}

.wrrp-related .wrrp-related__heading {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--wrrp-border);
  background: var(--wrrp-heading-surface);
  color: var(--wrrp-accent);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wrrp-related__viewport {
  width: 100%;
  min-width: 0;
}

.wrrp-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrrp-related__item,
.wrrp-related__item article {
  min-width: 0;
  margin: 0;
}

.wrrp-related__card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  min-height: 150px;
  padding: 0.8rem;
}

.wrrp-related__media {
  display: block;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 0.4rem;
  background: var(--wrrp-media-surface);
  text-decoration: none;
}

.wrrp-related__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.wrrp-related__media:hover .wrrp-related__image {
  transform: scale(1.025);
}

.wrrp-related__copy {
  display: grid;
  gap: 0.45rem;
  align-content: center;
  min-width: 0;
  padding: 0;
}

.wrrp-related .wrrp-related__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  font-weight: 750;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wrrp-related__title-link {
  color: var(--wrrp-text);
  text-decoration: none;
  transition: color 160ms ease;
}

.wrrp-related__title-link:hover,
.wrrp-related__title-link:focus-visible {
  color: var(--wrrp-accent);
  text-decoration: underline;
  text-underline-offset: 0.13em;
}

.wrrp-related__title-link:focus-visible,
.wrrp-related__media:focus-visible,
.wrrp-related__arrow:focus-visible,
.wrrp-related__dot:focus-visible,
.wrrp-related__viewport:focus-visible {
  outline: 2px solid var(--wrrp-accent);
  outline-offset: 2px;
}

.wrrp-related .wrrp-related__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--wrrp-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.wrrp-related__item.has-no-thumbnail .wrrp-related__card {
  grid-template-columns: 1fr;
  min-height: 0;
}

.wrrp-related--carousel .wrrp-related__viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.wrrp-related--carousel .wrrp-related__viewport::-webkit-scrollbar {
  display: none;
}

.wrrp-related--carousel .wrrp-related__list {
  display: flex;
}

.wrrp-related--carousel .wrrp-related__item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.wrrp-related__controls {
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 1.8rem;
  padding: 0 0.8rem 0.55rem;
}

.wrrp-related__controls:not([hidden]) {
  display: flex;
}

.wrrp-related__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
}

.wrrp-related__dot,
.wrrp-related__arrow {
  appearance: none;
  margin: 0;
  border: 0;
  color: var(--wrrp-accent);
  cursor: pointer;
}

.wrrp-related__dot {
  width: 0.48rem;
  height: 0.48rem;
  padding: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.25;
}

.wrrp-related__dot[aria-current="true"] {
  opacity: 1;
}

.wrrp-related__arrow {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid var(--wrrp-border);
  border-radius: 50%;
  background: transparent;
  line-height: 0;
}

.wrrp-related__arrow-icon {
  display: block;
  width: 0.82rem;
  height: 0.82rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.wrrp-related__arrow:hover {
  background: var(--wrrp-control-hover);
}

@media (prefers-reduced-motion: reduce) {
  .wrrp-related__image,
  .wrrp-related__title-link {
    transition: none;
  }
}

@media (max-width: 520px) {
  .wrrp-related__card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 104px;
    padding: 0.7rem;
  }

  .wrrp-related__media {
    width: 104px;
    height: 104px;
  }

  .wrrp-related__excerpt {
    font-size: 0.8rem;
    line-height: 1.35;
    -webkit-line-clamp: 3;
  }
}
