/* --- Prose: rich text / document typography --- */
/*
 * Reusable container for authored HTML content
 * (body field, CKEditor output, legal/document pages).
 * Applies to .msp-prose and its descendants.
 */

:root {
  --prose-max-width: 48rem;
}

.msp-prose {
  max-width: var(--prose-max-width);
  color: var(--color-text);
  line-height: 1.7;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
}

/* Headings */

.msp-prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-text);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid rgba(94, 152, 202, 0.2);
}

.msp-prose h2:first-child {
  margin-top: 0;
}

.msp-prose h3 {
  margin: 1.75rem 0 0.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.3vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.msp-prose h4 {
  margin: 1.25rem 0 0.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Paragraphs */

.msp-prose p {
  margin: 0 0 1rem;
}

.msp-prose p:last-child {
  margin-bottom: 0;
}

/* Lists */

.msp-prose ul,
.msp-prose ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.msp-prose li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.msp-prose li:last-child {
  margin-bottom: 0;
}

/* Document link list — PDF download links */

.msp-prose ul.msp-doc-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.msp-prose ul.msp-doc-list li {
  margin: 0;
}

.msp-prose ul.msp-doc-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background-color: rgba(94, 152, 202, 0.07);
  border: 1px solid rgba(94, 152, 202, 0.18);
  font-size: 0.9375rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.msp-prose ul.msp-doc-list a::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.375rem;
  background-color: var(--color-primary);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm-1 7V3.5L18.5 9H13Zm-4 4h6v1.5H9V13Zm0 3h6v1.5H9V16Zm0-6h2v1.5H9V10Z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm-1 7V3.5L18.5 9H13Zm-4 4h6v1.5H9V13Zm0 3h6v1.5H9V16Zm0-6h2v1.5H9V10Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.msp-prose ul.msp-doc-list a:hover {
  background-color: rgba(94, 152, 202, 0.14);
  border-color: rgba(94, 152, 202, 0.4);
  color: var(--color-primary);
}

/* Links inline */

.msp-prose a:not(.msp-doc-list a) {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.msp-prose a:not(.msp-doc-list a):hover {
  text-decoration-thickness: 2px;
}

/* Strong / em */

.msp-prose strong {
  font-weight: 700;
}

.msp-prose em {
  font-style: italic;
}

/* Horizontal rule */

.msp-prose hr {
  margin: 2rem 0;
  border: none;
  border-top: 1.5px solid rgba(94, 152, 202, 0.2);
}

/* Inside editorial sections: let the section layout control the width */
.msp-editorial-section .msp-prose {
  max-width: none;
}

/* Responsive */

@media (max-width: 40rem) {
  .msp-prose {
    max-width: 100%;
  }
}
