.rl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: var(--rh-border-width) solid var(--rh-border);
  border-radius: var(--rh-radius-xl);
  background: var(--rh-surface);
  color: var(--rh-text);
  transition: box-shadow var(--rh-dur-fast) var(--rh-ease);
}

.rl-card:hover {
  box-shadow: var(--rh-shadow-lg);
}

.rl-card:focus-within {
  box-shadow: var(--rh-shadow-lg), var(--rh-shadow-focus);
}

.rl-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: var(--rh-surface-subtle);
}

.rl-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-card__play {
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  inline-size: var(--rh-space-12);
  block-size: var(--rh-space-12);
  border-radius: var(--rh-radius-full);
  background: var(--rh-surface-overlay);
  color: var(--rh-white);
  transform: translate(-50%, -50%);
  transition: transform var(--rh-dur-fast) var(--rh-ease), background var(--rh-dur-fast) var(--rh-ease);
}

.rl-card__play svg {
  inline-size: var(--rh-space-5);
  block-size: var(--rh-space-5);
  margin-inline-start: var(--rh-space-1);
  fill: currentColor;
}

.rl-card:hover .rl-card__play,
.rl-card:focus-within .rl-card__play {
  background: var(--rh-accent);
  transform: translate(-50%, -50%) scale(1.08);
}

.rl-card__badges {
  position: absolute;
  inset-inline-start: var(--rh-space-2);
  top: var(--rh-space-2);
  display: flex;
  gap: var(--rh-space-1);
}

.rl-card__hot {
  font-family: var(--rh-font-mono);
  font-size: var(--rh-text-xs);
  font-weight: var(--rh-weight-bold);
  letter-spacing: var(--rh-tracking-wide);
  text-transform: uppercase;
  line-height: 1;
  padding: var(--rh-space-1) var(--rh-space-2);
  border-radius: var(--rh-radius-sm);
  white-space: nowrap;
  background: var(--rh-accent);
  color: var(--rh-white);
}

.rl-card__body {
  display: flex;
  flex-direction: column;
  flex: auto;
  min-width: 0;
  padding: var(--rh-space-5);
  font-family: var(--rh-font-body);
  font-size: var(--rh-text-sm);
  line-height: var(--rh-leading-normal);
}

.rl-card__body > p {
  margin: 0 0 var(--rh-space-2);
}

.rl-card__title {
  margin: 0 0 var(--rh-space-2);
  font-family: var(--rh-font-display);
  font-size: 1.1875rem;
  font-weight: var(--rh-weight-bold);
  line-height: 1.3;
  letter-spacing: var(--rh-tracking-normal);
  color: var(--rh-text-strong);
  transition: color var(--rh-dur-fast) var(--rh-ease);
}

.rl-card__title a {
  color: inherit;
  text-decoration: none;
}

.rl-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.rl-card__title a:focus-visible {
  outline: none;
}

.rl-card:hover .rl-card__title,
.rl-card:focus-within .rl-card__title {
  color: var(--rh-accent);
}

.rl-card__by {
  font-weight: var(--rh-weight-regular);
  color: var(--rh-text-strong);
  overflow-wrap: anywhere;
}

.rl-card__face {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-inline-end: var(--rh-space-2);
  border-radius: var(--rh-radius-full);
  object-fit: cover;
  vertical-align: -5px;
  background: var(--rh-surface-sunken);
}

.rl-card__site {
  color: var(--rh-accent);
  text-decoration: none;
}

a.rl-card__site {
  position: relative;
  z-index: 2;
}

a.rl-card__site:hover {
  text-decoration: underline;
}

.rl-card__desc {
  overflow-wrap: anywhere;
}

.rl-found {
  display: block;
  margin: 0 0 var(--rh-space-3);
  font: var(--rh-text-caption);
  color: var(--rl-text-meta);
  overflow-wrap: anywhere;
}

.rl-found__where {
  font-weight: var(--rh-weight-medium);
  color: var(--rh-text);
}

.rl-found mark {
  padding: 0 0.1em;
  border-radius: var(--rh-radius-sm);
  background: var(--rh-accent-tint);
  color: var(--rh-text-strong);
}

.rl-card__tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rh-space-1);
  margin: 0 0 var(--rh-space-3);
}

.rl-tag,
.rl-card__tags summary {
  font-size: var(--rh-text-xs);
  line-height: 1;
  padding: 0.38em 0.6em;
  border: var(--rh-border-width) solid var(--rh-border);
  border-radius: var(--rh-radius-full);
}

.rl-tag {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  background: var(--rh-surface-subtle);
  color: var(--rh-gray-700);
  text-decoration: none;
}

[data-theme="dark"] .rl-tag {
  background: var(--rh-gray-800);
  color: var(--rh-gray-100);
}

a.rl-tag:hover,
a.rl-tag:focus-visible {
  border-color: var(--rh-accent);
  color: var(--rh-accent);
}

.rl-card__tags details {
  display: contents;
}

.rl-card__tags summary {
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
  font-weight: var(--rh-weight-medium);
  border-color: transparent;
  color: var(--rh-accent);
}

.rl-card__tags summary::-webkit-details-marker {
  display: none;
}

.rl-card__tags details[open] summary {
  display: none;
}

.rl-card__tags a:focus-visible,
.rl-card__tags summary:focus-visible,
a.rl-card__site:focus-visible {
  outline: none;
  box-shadow: var(--rh-shadow-focus);
}

.rl-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rh-space-1);
  color: var(--rh-text);
}

.rl-card__sep {
  color: var(--rh-text-muted);
}

.rl-icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

.rl-card__body > .rl-card__foot {
  margin: auto 0 0;
  padding-top: var(--rh-space-2);
  display: flex;
  align-items: center;
  gap: var(--rh-space-2);
}

.rl-level {
  display: inline-block;
  font-family: var(--rh-font-body);
  font-size: var(--rh-text-xs);
  font-weight: var(--rh-weight-bold);
  line-height: var(--rh-leading-snug);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.15em 0.6em;
  border: var(--rh-border-width) solid currentColor;
  border-radius: var(--rh-radius-md);
  background: none;
  white-space: nowrap;
}

.rl-level--introductory { color: var(--rh-gray-600); }
.rl-level--beginner { color: var(--rh-success-600); }
.rl-level--intermediate { color: var(--rh-warning-600); }
.rl-level--advanced { color: var(--rh-info-600); }
.rl-level--all-levels { color: var(--rh-gray-700); }

[data-theme="dark"] .rl-level--introductory { color: var(--rh-text-muted); }
[data-theme="dark"] .rl-level--all-levels { color: var(--rh-text-muted); }
[data-theme="dark"] .rl-level--beginner { color: color-mix(in srgb, var(--rh-success-600) 60%, var(--rh-white)); }
[data-theme="dark"] .rl-level--intermediate { color: color-mix(in srgb, var(--rh-warning-600) 75%, var(--rh-white)); }
[data-theme="dark"] .rl-level--advanced { color: color-mix(in srgb, var(--rh-info-600) 60%, var(--rh-white)); }

.rl-older {
  display: inline-block;
  font-family: var(--rh-font-body);
  font-size: var(--rh-text-xs);
  font-weight: var(--rh-weight-medium);
  line-height: var(--rh-leading-snug);
  padding: 0.15em 0.6em;
  border: var(--rh-border-width) solid var(--rh-border);
  border-radius: var(--rh-radius-full);
  background: var(--rh-surface-subtle);
  color: var(--rh-gray-700);
  white-space: nowrap;
}

[data-theme="dark"] .rl-older {
  background: var(--rh-gray-800);
  color: var(--rh-gray-100);
}

.rl-card__cta {
  display: block;
  margin-top: var(--rh-space-3);
  padding: var(--rh-space-3);
  text-align: center;
  font-size: var(--rh-text-sm);
  font-weight: var(--rh-weight-medium);
  line-height: 1;
  border-radius: var(--rh-radius-md);
  background: var(--rh-accent);
  color: var(--rh-white);
  transition: background var(--rh-dur-fast) var(--rh-ease);
}

.rl-card:hover .rl-card__cta {
  background: var(--rh-accent-hover);
}

.rl-card__act {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: var(--rh-space-3);
}

@media (prefers-reduced-motion: reduce) {
  .rl-card,
  .rl-card__title,
  .rl-card__play,
  .rl-card__cta { transition: none; }
}

.rl-card__prog {
  font-size: var(--rh-text-sm);
  font-weight: var(--rh-weight-medium);
  color: var(--rh-text-muted);
}
