/*
 * RecLite Programs — design system (v0.3)
 * Inherits theme tokens: --reclite-color-primary, --reclite-color-secondary,
 *                       --color-primary, --color-primary-white, --color-text
 *
 * Local tokens (scoped fallbacks):
 */
.rl-programs {
  --rlp-primary: var(--reclite-color-primary, #243b80);
  --rlp-secondary: var(--reclite-color-secondary, #086f31);
  --rlp-bg: var(--color-primary-white, #fff);
  --rlp-text: var(--color-text, #1d1d1d);
  --rlp-muted: #6b6b76;
  --rlp-line: #e5e7ee;
  --rlp-surface: #f7f8fb;
  --rlp-pill-bg: #eef1f9;
  --rlp-shadow-sm:
    0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --rlp-shadow-md:
    0 4px 12px rgba(15, 23, 42, 0.06), 0 10px 24px rgba(15, 23, 42, 0.08);
  --rlp-radius: 10px;
  --rlp-radius-sm: 6px;
  color: var(--rlp-text);
}
.rl-programs h1,
.rl-programs h2,
.rl-programs h3,
.rl-programs h4 {
  color: var(--rlp-primary);
  letter-spacing: -0.01em;
}
.rl-programs.rl-wrap {
  background-color: #fff;
  border: 1px solid #acacac;
  max-width: none;
}
/* ---------- OVERFLOW GUARDRAILS ----------
 * At max-width: 100% the layout can spill horizontally if grid/flex children
 * refuse to shrink below their intrinsic content, or if tables/images/quick-nav
 * carry wider intrinsic widths. These rules prevent that WITHOUT capping width.
 */

/* Box-sizing everywhere — theme overrides sometimes flip this. */
.rl-programs,
.rl-programs *,
.rl-programs *::before,
.rl-programs *::after {
  box-sizing: border-box;
}

/* Grid/flex children default to min-width: auto (=content width) — force 0 so
 * they shrink to fit. This is THE fix for "grid item overflows its container." */
.rl-programs .rl-filter-row > *,
.rl-programs .rl-activity-grid > *,
.rl-programs .rl-program-grid > *,
.rl-programs .rl-cat-grid > *,
.rl-programs .rl-prog-hero > *,
.rl-programs .rl-prog-hero-with-image > *,
.rl-programs .rl-section-head > *,
.rl-programs .rl-activity-meta > *,
.rl-programs .rl-hero-meta > *,
.rl-programs .rl-quick-nav > *,
.rl-programs .rl-toolbar > * {
  min-width: 0;
}

/* Images never push wider than their box. */
.rl-programs img {
  max-width: 100%;
  height: auto;
}

/* Long unbroken strings (URLs, IDs) shouldn't blow out cells. */
.rl-programs .rl-card-activity h3,
.rl-programs .rl-card-program h3,
.rl-programs .rl-blurb,
.rl-programs .rl-prog-desc,
.rl-programs .rl-price,
.rl-programs .rl-desc-html {
  overflow-wrap: anywhere;
}

/* Tables sit inside .rl-table-wrap for horizontal scroll on narrow viewports. */
.rl-programs .rl-table-wrap,
.rl-drawer .rl-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 12px;
}
.rl-programs .rl-tier-table,
.rl-programs .rl-table,
.rl-drawer .rl-tier-table,
.rl-drawer .rl-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Quick-nav scrolls internally. Force width:100% + min-width:0 so the flex
 * container can't be inflated by its non-shrinking pills. */
.rl-programs .rl-quick-nav {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Program grid + activity grid: allow narrower cards so they don't reserve
 * more space than the container has. */
.rl-programs .rl-activity-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}
.rl-programs .rl-program-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
.rl-programs .rl-cat-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
}
.rl-programs .rl-skel-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

/* ---------- HERO ---------- */
.rl-prog-hero {
  position: relative;
  border-radius: var(--rlp-radius);
  overflow: hidden;
  margin: 8px 0 24px;
  background: color-mix(in srgb, var(--reclite-color-primary) 10%, transparent);
  color: #fff;
  padding: 38px 32px 34px;
  box-shadow: var(--rlp-shadow-md);
}
.rl-prog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 255, 255, 0.16),
      transparent 38%
    ),
    radial-gradient(circle at 8% 90%, rgba(255, 255, 255, 0.1), transparent 45%);
}
.rl-prog-hero > * {
  position: relative;
  z-index: 1;
}
.rl-prog-hero .rl-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--reclite-color-secondary);
  color: #fff;
  margin-bottom: 12px;
}
.rl-prog-hero h1 {
  color: #fff;
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}
.rl-prog-hero .rl-hero-lead {
  font-size: 16px;
  line-height: 1.55;
  max-width: 64ch;
  opacity: 0.92;
  margin: 0;
}
.rl-prog-hero .rl-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  font-size: 14px;
  opacity: 0.95;
}
.rl-prog-hero .rl-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
}
.rl-prog-hero .rl-hero-meta strong {
  font-weight: 700;
}
.rl-prog-hero .rl-hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rl-prog-hero .rl-btn-on-dark {
  background: #fff;
  color: var(--rlp-primary);
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.rl-prog-hero .rl-btn-on-dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.rl-prog-hero .rl-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.rl-prog-hero .rl-btn-ghost:hover {
  border-color: #fff;
}

.rl-prog-hero-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  /* padding-right: 0; */
}
.rl-prog-hero-with-image .rl-hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--rlp-radius);
  overflow: hidden;
  margin-right: -8px;
  background: rgba(255, 255, 255, 0.08);
}
.rl-prog-hero-with-image .rl-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 800px) {
  .rl-prog-hero-with-image {
    grid-template-columns: 1fr;
    padding-right: 32px;
  }
  .rl-prog-hero-with-image .rl-hero-image {
    margin-right: 0;
    aspect-ratio: 16 / 9;
  }
}

/* ---------- BREADCRUMB / SECTION HEADERS ---------- */
.rl-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}
.rl-section-head h2 {
  margin: 0;
  font-size: 22px;
}
.rl-section-head .rl-section-sub {
  color: var(--rlp-muted);
  font-size: 13px;
}

.rl-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rlp-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.rl-back-link:hover {
  color: var(--rlp-primary);
}

/* ---------- QUICK NAV (category pill row) ---------- */
.rl-quick-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  margin: 0;
  scrollbar-width: thin;
}
.rl-quick-nav::-webkit-scrollbar {
  height: 6px;
}
.rl-quick-nav::-webkit-scrollbar-thumb {
  background: var(--rlp-line);
  border-radius: 3px;
}
.rl-quick-pill {
  flex: 0 0 auto;
  background: var(--rlp-pill-bg);
  color: var(--rlp-text);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.rl-quick-pill:hover {
  background: #e3e7f3;
}
.rl-quick-pill.is-active {
  background: var(--rlp-primary);
  color: #fff;
  border-color: var(--rlp-primary);
}
.rl-quick-pill .rl-count {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color: inherit;
}
.rl-quick-pill:not(.is-active) .rl-count {
  background: rgba(36, 59, 128, 0.1);
  color: var(--rlp-primary);
}

/* ---------- FILTERS (dense, PDOP-style) ---------- */
.rl-filters {
  background: var(--rlp-surface);
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  padding: 14px 16px;
  box-shadow: var(--rlp-shadow-sm);
  margin-bottom: 18px;
}
.rl-filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.rl-filter-row + .rl-filter-row {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
}
.rl-filter-row input,
.rl-filter-row select {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid #bcbcbc; /* theme form-field border */
  border-radius: 4px; /* theme form-field radius */
  font-size: 15px;
  background: #fff;
  color: var(--rlp-text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.rl-filter-row input:focus,
.rl-filter-row select:focus {
  outline: none;
  border-color: var(--rlp-primary);
  box-shadow: 0 0 0 3px rgba(36, 59, 128, 0.12);
}
.rl-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  padding: 8px 0;
  user-select: none;
}
.rl-inline-check input {
  width: auto;
}
@media (max-width: 768px) {
  .rl-filter-row,
  .rl-filter-row + .rl-filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- ACTIVITY META BAR ---------- */
.rl-activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
  font-size: 13px;
  color: var(--rlp-muted);
}
.rl-activity-meta .rl-meta-count {
  font-weight: 600;
  color: var(--rlp-text);
}
.rl-activity-meta .rl-active-filter-chips {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rl-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--rlp-pill-bg);
  color: var(--rlp-primary);
  font-weight: 600;
}

/* ---------- ACTIVITY GRID & CARDS ---------- */
.rl-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.rl-card-activity {
  background: var(--rlp-bg);
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--rlp-shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.rl-card-activity:hover {
  transform: translateY(-3px);
  box-shadow: var(--rlp-shadow-md);
  border-color: color-mix(in srgb, var(--rlp-primary) 30%, var(--rlp-line));
}
.rl-card-activity .rl-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--rlp-primary) 18%, #fff),
    color-mix(in srgb, var(--rlp-secondary) 14%, #fff)
  );
  overflow: hidden;
}
.rl-card-activity .rl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rl-card-activity .rl-thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rlp-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rl-card-activity .rl-thumb-status {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rl-thumb-status.is-open {
  background: var(--rlp-secondary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 50px;
}
.rl-thumb-status.is-full {
  background: #b32d2e;
  color: #fff;
  padding: 3px 10px;
  border-radius: 50px;
}

.rl-card-activity .rl-body {
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.rl-card-activity h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--rlp-text);
}
.rl-card-activity .rl-program-name {
  color: var(--rlp-muted);
  font-size: 12px;
  font-weight: 600;
}
.rl-card-activity .rl-blurb {
  color: #4a4a55;
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}
.rl-card-activity .rl-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--rlp-line);
  font-size: 13px;
}
.rl-card-activity .rl-price {
  font-weight: 700;
  color: var(--rlp-primary);
  font-size: 15px;
}
.rl-card-activity .rl-price small {
  font-weight: 600;
  color: var(--rlp-muted);
  font-size: 11px;
  margin-right: 4px;
  text-transform: uppercase;
}
.rl-card-activity .rl-actions {
  padding: 8px 16px 14px;
  display: flex;
  gap: 8px;
}
.rl-card-activity .rl-btn-card {
  flex: 1;
  text-align: center;
  background: var(--rlp-primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.rl-card-activity .rl-btn-card:hover {
  opacity: 0.92;
}
.rl-card-activity .rl-btn-card-ghost {
  background: transparent;
  color: var(--rlp-primary);
  border: 1.5px solid var(--rlp-primary);
  display: inline-block;
  align-content: center;
}

/* ---------- CATEGORY CARDS (browse) ---------- */
.rl-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.rl-card-cat {
  position: relative;
  background: var(--rlp-bg);
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  padding: 18px 18px 16px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  overflow: hidden;
}
.rl-card-cat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--rlp-primary);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.rl-card-cat:hover {
  transform: translateY(-2px);
  box-shadow: var(--rlp-shadow-md);
  border-color: color-mix(in srgb, var(--rlp-primary) 30%, var(--rlp-line));
}
.rl-card-cat:hover::before {
  opacity: 1;
}
.rl-card-cat h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.rl-card-cat .rl-cat-count {
  color: var(--rlp-muted);
  font-size: 13px;
  font-weight: 600;
}
.rl-card-cat.is-featured::before {
  opacity: 1;
  background: var(--rlp-secondary);
}

/* ---------- PROGRAMS CARDS ---------- */
.rl-program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.rl-card-program {
  background: var(--rlp-bg);
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  padding: 0;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--rlp-shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.rl-card-program:hover {
  transform: translateY(-3px);
  box-shadow: var(--rlp-shadow-md);
  border-color: color-mix(in srgb, var(--rlp-primary) 30%, var(--rlp-line));
}
.rl-card-program .rl-prog-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--rlp-primary) 18%, #fff),
    color-mix(in srgb, var(--rlp-secondary) 14%, #fff)
  );
  overflow: hidden;
}
.rl-card-program .rl-prog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.rl-card-program:hover .rl-prog-thumb img {
  transform: scale(1.04);
}
.rl-card-program .rl-prog-thumb .rl-prog-eyebrow {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.94);
  color: var(--rlp-primary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.rl-card-program .rl-prog-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.rl-card-program .rl-prog-body h3 {
  margin: 0;
  font-size: 18px;
  color: var(--rlp-text);
}
.rl-card-program .rl-prog-dates {
  color: var(--rlp-muted);
  font-size: 12px;
  font-weight: 600;
}
.rl-card-program .rl-prog-desc {
  color: #4a4a55;
  font-size: 13px;
  line-height: 1.5;
  /* Clamp the blurb to at most 5 lines on the card. NOTE: no `flex: 1` here —
   * a flex-grow height gives -webkit-line-clamp extra room and it renders a
   * partial 6th line. The footer uses margin-top:auto to stay pinned instead. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
}
.rl-card-program .rl-prog-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.rl-card-program .rl-prog-foot .rl-count-pill {
  background: var(--rlp-pill-bg);
  color: var(--rlp-primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.rl-card-program .rl-prog-foot .rl-link-cta {
  color: var(--color-tertiary, #1b6ca8);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- PAGINATION ---------- */
.rl-pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 22px 0 32px;
}
.rl-pagination button {
  background: var(--rlp-bg);
  border: 1.5px solid var(--rlp-line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--rlp-text);
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}
.rl-pagination button:hover:not([disabled]) {
  border-color: var(--rlp-primary);
  color: var(--rlp-primary);
}
.rl-pagination button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.rl-pagination .rl-page-info {
  font-size: 13px;
  color: var(--rlp-muted);
}

/* ---------- SEASON TABS (on program detail) ---------- */
.rl-season-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
}
.rl-season-tab {
  background: var(--rlp-pill-bg);
  color: var(--rlp-text);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.rl-season-tab:hover {
  background: #e3e7f3;
}
.rl-season-tab.is-active {
  background: var(--rlp-primary);
  border-color: var(--rlp-primary);
  color: #fff;
}

/* ---------- ACTIVITY DETAIL ---------- */
.rl-activity-detail .rl-grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}
@media (max-width: 920px) {
  .rl-activity-detail .rl-grid-2col {
    grid-template-columns: 1fr;
  }
}
.rl-activity-detail .rl-main {
  min-width: 0;
}
.rl-activity-detail .rl-desc-html {
  line-height: 1.65;
  font-size: 15px;
  color: #2c2c34;
}
.rl-activity-detail .rl-desc-html h2,
.rl-activity-detail .rl-desc-html h3 {
  color: var(--rlp-primary);
  margin-top: 18px;
}

.rl-activity-detail .rl-side .rl-card {
  background: var(--rlp-bg);
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  padding: 18px 20px;
  box-shadow: var(--rlp-shadow-sm);
  margin-bottom: 14px;
}
.rl-activity-detail .rl-price-big {
  font-size: 30px;
  font-weight: 800;
  color: var(--rlp-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.rl-activity-detail .rl-price-from {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rlp-muted);
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}
.rl-activity-detail .rl-status-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.rl-activity-detail .rl-status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rl-activity-detail .rl-status-pill.is-open {
  background: rgba(8, 111, 49, 0.12);
  color: var(--rlp-secondary);
}
.rl-activity-detail .rl-status-pill.is-full {
  background: rgba(179, 45, 46, 0.12);
  color: #b32d2e;
}

.rl-activity-detail .rl-kv {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px 12px;
  font-size: 14px;
  margin: 0;
}
.rl-activity-detail .rl-kv dt {
  color: var(--rlp-muted);
  font-weight: 600;
}
.rl-activity-detail .rl-kv dd {
  margin: 0;
  color: var(--rlp-text);
  font-weight: 500;
}

.rl-activity-detail .rl-tier-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.rl-activity-detail .rl-tier-table th,
.rl-activity-detail .rl-tier-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--rlp-line);
  font-size: 13px;
  text-align: left;
}
.rl-activity-detail .rl-tier-table th {
  background: var(--rlp-surface);
  color: var(--rlp-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.rl-activity-detail .rl-tier-table td.rl-amount {
  font-weight: 700;
  color: var(--rlp-primary);
  text-align: right;
}

.rl-activity-detail .rl-eligibility {
  padding: 18px 20px;
}
.rl-activity-detail .rl-eligibility.is-eligible {
  border-left: 4px solid var(--rlp-secondary);
}
.rl-activity-detail .rl-eligibility.is-blocked {
  border-left: 4px solid #b32d2e;
}
.rl-activity-detail .rl-eligibility .rl-btn {
  width: 100%;
}

/* ---------- DRAWER (activity detail) ---------- */
.rl-drawer[hidden] {
  display: none;
}
.rl-drawer {
  position: fixed;
  inset: 0;
  z-index: 999990;
}
.rl-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.rl-drawer.is-open .rl-drawer-overlay {
  opacity: 1;
}
.rl-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(50%, 92vw);
  background: var(--color-primary-white, #fff);
  box-shadow: -10px 0 32px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rl-drawer.is-open .rl-drawer-panel {
  transform: translateX(0);
}
.rl-drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e5e7ee;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #1d1d1d;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.rl-drawer-close:hover {
  background: #fff;
  transform: scale(1.04);
}
.rl-drawer-body {
  flex: 1;
  overflow-y: auto;
}
body.rl-drawer-open {
  overflow: hidden;
}

/* Drawer header (PROGRAM DETAIL bar) */
.rl-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--rlp-line);
  background: var(--rlp-bg);
  position: sticky;
  top: 0;
  z-index: 3;
}
.rl-drawer-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rlp-text);
}
.rl-drawer-header .rl-drawer-close-inline {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b6b76;
  padding: 4px 8px;
}
.rl-drawer-header .rl-drawer-close-inline:hover {
  color: var(--rlp-text);
}

/* Hide the absolute-positioned close when we have the header bar */
.rl-drawer-panel:has(.rl-drawer-header) .rl-drawer-close {
  display: none;
}

/* Drawer detail layout */
.rl-act-drawer {
  padding: 22px 26px 30px;
}
.rl-act-drawer .rl-act-top {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-bottom: 22px;
}
.rl-act-drawer .rl-act-top-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ebe7f5;
  border-radius: var(--rlp-radius);
  overflow: hidden;
}
.rl-act-drawer .rl-act-top-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rl-act-drawer .rl-act-top-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rl-act-drawer h1.rl-act-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  color: var(--rlp-text);
  letter-spacing: -0.01em;
}
.rl-act-drawer .rl-act-program-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rlp-muted);
}

/* Share row */
.rl-share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rl-share-row .rl-share-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--rlp-text);
  margin-right: 4px;
}
.rl-share-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--rlp-pill-bg);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rlp-primary);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.rl-share-btn:hover {
  background: #dde3f3;
  transform: translateY(-1px);
}
.rl-share-btn svg {
  width: 15px;
  height: 15px;
}

/* Register button with arrow */
.rl-act-register {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--rlp-bg);
  color: var(--rlp-primary);
  border: 1.5px solid var(--rlp-primary);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.rl-act-register .rl-act-register-arrow {
  width: 30px;
  height: 30px;
  margin-left: 14px;
  background: var(--rlp-secondary);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  transition: transform 0.15s ease;
}
.rl-act-register:hover {
  background: var(--rlp-primary);
  color: #fff;
}
.rl-act-register:hover .rl-act-register-arrow {
  transform: translateX(2px);
}

/* Section bands (DESCRIPTION / INFORMATION) */
.rl-section-band {
  background: color-mix(in srgb, var(--reclite-color-primary) 10%, transparent);
  color: var(--rlp-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 4px;
  margin: 22px 0 14px;
}

.rl-act-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--rlp-text);
}
.rl-act-desc p {
  margin: 0 0 12px;
}
.rl-act-desc p:last-child {
  margin-bottom: 0;
}

/* Information grid */
.rl-act-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  row-gap: 0;
  margin-bottom: 18px;
}
.rl-act-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rlp-line);
}
.rl-act-info-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--rlp-primary);
  margin-top: 1px;
}
.rl-act-info-icon svg {
  width: 100%;
  height: 100%;
}
.rl-act-info-text {
  font-size: 14px;
  line-height: 1.4;
}
.rl-act-info-text .rl-act-info-label {
  color: var(--rlp-muted);
  font-weight: 500;
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}
.rl-act-info-text .rl-act-info-value {
  color: var(--rlp-text);
  font-weight: 600;
}

/* Top pills + category chips */
.rl-act-top-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rl-act-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Program category chips (RL-997 PublicProgram.categories[]) on the program
   hub card body and the program detail hero. Small top gap off the dates. */
.rl-prog-cats {
  margin-top: 8px;
}

/* Pricing tier table inside drawer */
.rl-act-drawer .rl-tier-table {
  margin-bottom: 12px;
}
.rl-act-drawer .rl-tier-table th,
.rl-act-drawer .rl-tier-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rlp-line);
  font-size: 13px;
  text-align: left;
}
.rl-act-drawer .rl-tier-table th {
  /* background: var(--rlp-surface); */
  color: var(--reclite-color-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.rl-act-drawer .rl-tier-table td.rl-amount {
  font-weight: 700;
  color: var(--rlp-primary);
  text-align: left;
}

/* Requirements list */
.rl-act-reqs {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.rl-act-reqs li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rlp-line);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rl-act-reqs .rl-muted-inline {
  color: var(--rlp-muted);
  font-size: 13px;
}

/* Eligibility block in drawer */
.rl-act-drawer .rl-eligibility {
  margin-top: 18px;
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  padding: 18px 20px;
  background: color-mix(in srgb, var(--reclite-color-primary) 10%, transparent);
}
/* Space between the member select and the eligibility result */
.rl-eligibility [data-elig-result]:not(:empty) {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rlp-line);
}
.rl-eligibility [data-elig-member] {
  margin-bottom: 4px;
}
.rl-eligibility [data-elig-result] .rl-btn,
.rl-eligibility [data-elig-result] [data-register] {
  margin-top: 10px;
}

@media (max-width: 700px) {
  .rl-act-drawer {
    padding: 18px 18px 26px;
  }
  .rl-act-drawer .rl-act-top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .rl-act-drawer .rl-act-top-img {
    aspect-ratio: 4 / 3;
  }
  .rl-act-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Card actions: two-button row */
.rl-card-activity .rl-actions {
  padding: 8px 14px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ---------- LOADING & EMPTY STATES ---------- */
.rl-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--rlp-muted);
  background: var(--rlp-surface);
  border: 1px dashed var(--rlp-line);
  border-radius: var(--rlp-radius);
}
.rl-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--rlp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rlp-primary);
  font-size: 24px;
  font-weight: 700;
  border: 1.5px solid var(--rlp-line);
}
.rl-skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.rl-skel {
  background: var(--rlp-bg);
  border: 1px solid var(--rlp-line);
  border-radius: var(--rlp-radius);
  overflow: hidden;
}
.rl-skel-img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(110deg, #eef0f6 8%, #f7f8fb 30%, #eef0f6 50%);
  background-size: 200% 100%;
  animation: rl-shimmer 1.4s infinite linear;
}
.rl-skel-body {
  padding: 14px 16px;
}
.rl-skel-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(110deg, #eef0f6 8%, #f7f8fb 30%, #eef0f6 50%);
  background-size: 200% 100%;
  animation: rl-shimmer 1.4s infinite linear;
  margin-bottom: 8px;
}
.rl-skel-line.w-60 {
  width: 60%;
}
.rl-skel-line.w-40 {
  width: 40%;
}
@keyframes rl-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- MOBILE RESPONSIVE PASS ----------
 * Fixes for narrow viewports. Ordered from largest to smallest breakpoint.
 */

/* Tablet / narrow desktop */
@media (max-width: 900px) {
  .rl-prog-hero {
    padding: 30px 24px 26px;
  }
  .rl-prog-hero h1 {
    font-size: 26px;
  }
  .rl-act-drawer .rl-act-top {
    grid-template-columns: 240px 1fr;
    gap: 18px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  /* Full-bleed padding — pull sides in so cards get more room */
  .rl-programs.rl-wrap {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Hero */
  .rl-prog-hero {
    padding: 22px 18px 20px;
    margin: 4px 0 18px;
    border-radius: 8px;
  }
  .rl-prog-hero h1 {
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .rl-prog-hero .rl-hero-lead {
    font-size: 14px;
  }
  .rl-prog-hero .rl-hero-meta {
    gap: 8px 12px;
    font-size: 13px;
  }
  .rl-prog-hero .rl-eyebrow {
    font-size: 11px;
    padding: 3px 8px;
    margin-bottom: 8px;
  }
  .rl-prog-hero .rl-btn-on-dark,
  .rl-prog-hero .rl-btn-ghost {
    padding: 9px 18px;
    font-size: 13px;
  }

  /* Program-with-image hero: stack, cap the image height */
  .rl-prog-hero-with-image {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .rl-prog-hero-with-image .rl-hero-image {
    aspect-ratio: 16 / 9;
    margin-right: 0;
    max-height: 200px;
  }

  /* Section head — stack the title and any right-aligned actions */
  .rl-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 16px 0 10px;
  }
  .rl-section-head h2 {
    font-size: 18px;
  }
  .rl-section-head h1 {
    font-size: 22px;
  }

  /* Filters — full stack, tighter padding */
  .rl-filters {
    padding: 12px;
  }
  .rl-filter-row,
  .rl-filter-row + .rl-filter-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }
  .rl-filter-row input,
  .rl-filter-row select {
    font-size: 14px;
    padding: 8px 10px;
  }
  .rl-inline-check {
    padding: 4px 0;
  }

  /* Quick-nav — reduce pill padding */
  .rl-quick-pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Cards — allow narrower minmax so a single card gets full width */
  .rl-activity-grid {
    gap: 14px;
  }
  .rl-card-activity .rl-thumb {
    aspect-ratio: 16 / 9;
  }
  .rl-card-activity h3 {
    font-size: 15px;
  }
  .rl-card-activity .rl-body {
    padding: 12px 14px 6px;
  }
  .rl-card-activity .rl-actions {
    grid-template-columns: 1fr; /* stack View + Register on very narrow */
    padding: 6px 14px 12px;
  }
  .rl-card-activity .rl-btn-card {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Category cards */
  .rl-card-cat {
    padding: 16px 14px 14px;
  }
  .rl-card-cat h3 {
    font-size: 16px;
  }

  /* Program cards */
  .rl-card-program .rl-prog-body {
    padding: 14px 14px 16px;
  }
  .rl-card-program .rl-prog-body h3 {
    font-size: 16px;
  }

  /* Activity drawer — much less chrome */
  .rl-drawer-panel {
    width: 100vw;
  }
  .rl-drawer-header {
    padding: 14px 18px;
  }
  .rl-drawer-header h2 {
    font-size: 14px;
    letter-spacing: 0.06em;
  }
  .rl-act-drawer {
    padding: 16px 16px 24px;
  }
  .rl-act-drawer .rl-act-top {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .rl-act-drawer .rl-act-top-img {
    aspect-ratio: 16 / 10;
  }
  .rl-act-drawer h1.rl-act-title {
    font-size: 18px;
  }
  .rl-act-drawer .rl-act-top-info {
    gap: 12px;
  }
  .rl-act-drawer .rl-eligibility {
    padding: 14px 16px;
  }

  /* Register CTA — allow it to breathe */
  .rl-act-register {
    padding: 6px 6px 6px 16px;
    font-size: 14px;
  }
  .rl-act-register .rl-act-register-arrow {
    width: 26px;
    height: 26px;
    margin-left: 12px;
  }

  /* Info grid — labels and values wrap cleanly */
  .rl-act-info-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  /* Share row — smaller buttons */
  .rl-share-row {
    gap: 6px;
  }
  .rl-share-btn {
    width: 30px;
    height: 30px;
  }

  /* Section bands */
  .rl-section-band {
    padding: 8px 12px;
    font-size: 12px;
    margin: 18px 0 10px;
  }

  /* Pricing / info tables — allow horizontal scroll inside wrap */
  .rl-programs .rl-table-wrap,
  .rl-drawer .rl-table-wrap {
    border-radius: 6px;
  }
  .rl-programs .rl-tier-table th,
  .rl-programs .rl-tier-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Very narrow phones */
@media (max-width: 400px) {
  .rl-prog-hero {
    padding: 18px 14px 18px;
  }
  .rl-prog-hero h1 {
    font-size: 20px;
  }
  .rl-act-drawer {
    padding: 14px 12px 22px;
  }
  .rl-drawer-header {
    padding: 12px 14px;
  }
  .rl-share-row .rl-share-label {
    display: none;
  }
}

/* ---------- Image placeholders (no upstream image) ----------
 * The JS falls back to a shared inline-SVG placeholder whenever an
 * activity or program has no image so layout stays consistent. The
 * classes below tone down hover/zoom animations that only make sense
 * for real photography. */
.rl-thumb-placeholder,
.rl-act-top-img-placeholder,
.rl-prog-hero-placeholder .rl-hero-image {
  background: #eef1f8;
}
.rl-thumb-placeholder img,
.rl-act-top-img-placeholder img,
.rl-prog-hero-placeholder .rl-hero-image img {
  object-fit: cover;
  filter: none !important;
  transform: none !important;
}
/* Suppress card hover-zoom on placeholders. */
.rl-card-activity:hover .rl-thumb-placeholder img { transform: none; }

/* Ultra-wide (1920px+): cap the program / activity listings at 5 columns,
   centred, so cards keep a sensible width on large monitors. */
@media (min-width: 1920px) {
  .rl-programs .rl-program-grid,
  .rl-programs .rl-activity-grid,
  .rl-programs .rl-skel-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 1900px;
    margin-inline: auto;
  }
}
