/* Brand: red links inside headings and prose-rendered body content. */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.prose a {
  color: #dc3545;
  text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
.prose a:hover {
  color: #b02a37;
  text-decoration: underline;
}

/* Article-body media should never push the page wider than the viewport.
   Trix-authored content can include images / iframes / tables / pre
   blocks sized in absolute pixels; clamp them to their container. */
.prose img,
.prose video,
.prose iframe,
.prose embed,
.prose object,
.prose table {
  max-width: 100%;
  height: auto;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Action Text body typography.
   Trix's upstream CSS does `.trix-content * { margin: 0 }`, which collapses
   every paragraph and list against the next. We re-establish block-level
   rhythm and list markers so authored content (here and in the Phoenix
   admin Trix editor) renders readably. Hand-rolled instead of
   @tailwindcss/typography to keep the dependency surface small. */
.trix-content p,
.trix-content ul,
.trix-content ol,
.trix-content blockquote,
.trix-content pre {
  margin-bottom: 1em;
}

.trix-content > :last-child {
  margin-bottom: 0;
}

.trix-content h1 {
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.trix-content h2 {
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.trix-content h3 {
  font-size: 1.1em;
  font-weight: 700;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.trix-content ul {
  list-style: disc;
  padding-left: 1.5em;
}

.trix-content ol {
  list-style: decimal;
  padding-left: 1.5em;
}

.trix-content li {
  margin-bottom: 0.25em;
}

.trix-content blockquote {
  border-left: 0.25em solid #d1d5db;
  padding-left: 1em;
  color: #4b5563;
  font-style: italic;
}

.trix-content pre {
  background-color: #f3f4f6;
  border-radius: 0.25em;
  padding: 0.75em 1em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

.trix-content code {
  background-color: #f3f4f6;
  border-radius: 0.2em;
  padding: 0.1em 0.3em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.trix-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: inherit;
}
