/* Safe, scoped typography for database-authored public articles. */

:where(body.inavmModernShell) :where(.modern-prose) {
  color: var(--modern-ink-soft);
  font-size: .94rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

:where(body.inavmModernShell) :where(.modern-prose > :first-child) {
  margin-top: 0;
}

:where(body.inavmModernShell) :where(.modern-prose > :last-child) {
  margin-bottom: 0;
}

:where(body.inavmModernShell) :where(.modern-prose p, .modern-prose ul, .modern-prose ol, .modern-prose blockquote, .modern-prose figure) {
  margin: 0 0 1.05em;
}

:where(body.inavmModernShell) :where(.modern-prose h2, .modern-prose h3, .modern-prose h4) {
  margin: 1.55em 0 .58em;
  color: var(--modern-ink);
  text-wrap: balance;
}

:where(body.inavmModernShell) :where(.modern-prose h2) {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

:where(body.inavmModernShell) :where(.modern-prose h3) {
  font-size: clamp(1.14rem, 2vw, 1.4rem);
}

:where(body.inavmModernShell) :where(.modern-prose h4) {
  font-size: 1.05rem;
}

:where(body.inavmModernShell) :where(.modern-prose ul, .modern-prose ol) {
  padding-left: 1.35em;
}

:where(body.inavmModernShell) :where(.modern-prose li + li) {
  margin-top: .42em;
}

:where(body.inavmModernShell) :where(.modern-prose a) {
  color: var(--modern-brand-deep);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:where(body.inavmModernShell) :where(.modern-prose strong) {
  color: var(--modern-ink);
}

:where(body.inavmModernShell) :where(.modern-prose blockquote) {
  padding: 14px 18px;
  border-left: 4px solid var(--modern-brand);
  border-radius: 0 var(--modern-radius-sm) var(--modern-radius-sm) 0;
  background: var(--modern-brand-soft);
  color: var(--modern-ink);
}

:where(body.inavmModernShell) :where(.modern-prose img) {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1.35em auto;
  border-radius: var(--modern-radius-md);
}

:where(body.inavmModernShell) :where(.modern-prose figcaption) {
  margin-top: -.75em;
  color: var(--modern-ink-muted);
  font-size: .78rem;
  text-align: center;
}

@media (max-width: 576px) {
  :where(body.inavmModernShell) :where(.modern-prose) {
    font-size: .9rem;
    line-height: 1.7;
  }
}
