/* Shared styling for Strapi richtext/Markdown output.
   Tailwind preflight removes list markers, so CMS-rendered lists need an
   explicit project style instead of editor-authored HTML classes. */

.cms-rich-text,
.prose {
  color: inherit;
}

.cms-rich-text :where(p),
.prose :where(p) {
  margin: 0 0 1rem;
}

.cms-rich-text > :last-child,
.prose > :last-child {
  margin-bottom: 0;
}

.cms-rich-text :where(strong, b),
.prose :where(strong, b),
.cms-rich-inline :where(strong, b),
strong,
b {
  font-weight: 700;
}

.cms-rich-text :where(del, s),
.prose :where(del, s),
.cms-rich-inline :where(del, s) {
  text-decoration: line-through;
}

.cms-rich-text :where(ul),
.prose :where(ul),
.cms-rich-text :where(ol),
.prose :where(ol) {
  margin: 0.75rem 0 1rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.cms-rich-text :where(li),
.prose :where(li) {
  position: relative;
  margin: 0.45rem 0;
  padding-left: 1.45rem;
}

.cms-rich-text :where(ul > li)::before,
.prose :where(ul > li)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #0b4fa3;
  transform: translateY(-50%);
}

.cms-rich-text :where(ol),
.prose :where(ol) {
  counter-reset: cms-rich-list;
}

.cms-rich-text :where(ol > li),
.prose :where(ol > li) {
  counter-increment: cms-rich-list;
  padding-left: 1.85rem;
}

.cms-rich-text :where(ol > li)::before,
.prose :where(ol > li)::before {
  content: counter(cms-rich-list) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: #0b4fa3;
  font-weight: 700;
}

.cms-rich-text :where(li > ul, li > ol),
.prose :where(li > ul, li > ol) {
  margin: 0.45rem 0 0;
}

.cms-rich-text :where(a),
.prose :where(a) {
  color: #0b4fa3;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
