/* Descriptions (courses, packages, bundles, live courses) as a page: what
   apps/core/rich_text.py writes from Markdown — headings, paragraphs, lists,
   bold, links — set like a well-made product page. */
.rt { color: var(--color-text-secondary, #475569); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.rt > :first-child { margin-top: 0; }
.rt > :last-child { margin-bottom: 0; }
.rt p { margin: 0 0 1rem; }
.rt strong { color: var(--color-text-heading, #0f172a); font-weight: 700; }
.rt a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.rt h3, .rt h4 {
  color: var(--color-text-heading, #0f172a); font-weight: 800; letter-spacing: -.01em; line-height: 1.3;
}
.rt h3 { font-size: 1.35rem; margin: 2rem 0 .9rem; }
.rt h4 {
  font-size: 1.08rem; margin: 1.9rem 0 .85rem; padding-left: .8rem;
  border-left: 4px solid var(--color-primary);
}
.rt hr { border: 0; border-top: 1px solid var(--color-border, #e2e8f0); margin: 1.75rem 0; }
.rt code { background: var(--color-bg-muted, #f1f5f9); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; }

/* Bullet lists: a soft panel of ticked points, two columns where there is room. */
.rt ul {
  list-style: none; margin: 0 0 1.25rem; padding: 1.1rem 1.25rem;
  background: var(--color-bg-muted, #f8fafc); border: 1px solid var(--color-border, #e2e8f0); border-radius: 14px;
  display: grid; gap: .75rem 1.75rem;
}
@media (min-width: 992px) { .rt ul { grid-template-columns: 1fr 1fr; } }
.rt ul li { position: relative; padding-left: 1.9rem; line-height: 1.6; }
.rt ul li::before {
  content: ""; position: absolute; left: 0; top: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--color-primary);
  -webkit-mask: radial-gradient(circle, #000 99%, transparent 100%);
}
.rt ul li::after {
  content: ""; position: absolute; left: .42rem; top: .43rem; width: .36rem; height: .62rem;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.rt ul li strong { display: block; margin-bottom: .1rem; }

/* Numbered lists: numbered steps. */
.rt ol { list-style: none; counter-reset: rt; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .7rem; }
.rt ol li { counter-increment: rt; position: relative; padding-left: 2.5rem; min-height: 1.8rem; line-height: 1.6; }
.rt ol li::before {
  content: counter(rt); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--color-primary-rgb, 11, 49, 63), .1); color: var(--color-primary); font-weight: 800; font-size: .85rem;
}

/* A long description folds; "Show more" opens it. */
.rt-fold { position: relative; }
/* The fade belongs to the text (positioned on .rt, at its own bottom), so it
   never lies over the "Show more" button under it. */
.rt-fold.is-folded .rt { position: relative; max-height: 34rem; overflow: hidden; }
.rt-fold.is-folded .rt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6rem; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--rt-fade, var(--color-bg-card, #fff)));
}
.rt-fold__toggle {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .9rem; background: var(--color-bg-card, #fff); background: none; border: 1px solid var(--color-border, #e2e8f0); border-radius: 999px;
  padding: .5rem 1.2rem; font-weight: 700; font-size: .9rem; color: var(--color-primary); cursor: pointer;
  border-color: var(--color-primary); box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}
.rt-fold__toggle::after {
  content: ""; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s ease;
}
.rt-fold__toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.rt-fold__toggle:hover { background: var(--color-bg-muted, #f8fafc); }
