/* Prose typography — manual styles because the Tailwind v4 browser build
   does not support @plugin, so @tailwindcss/typography is unavailable. */

/* ── Light mode ────────────────────────────────────────────────── */

.prose {
  color: #374151;
  line-height: 1.75;
}

.prose :where(h1, h2, h3, h4, h5, h6) {
  color: #111827;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose :where(h1) {
  font-size: 2.25em;
}

.prose :where(h2) {
  font-size: 1.5em;
}

.prose :where(h3) {
  font-size: 1.25em;
}

.prose :where(p) {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.prose :where(a) {
  color: #2563eb;
  text-decoration: underline;
}

.prose :where(a:hover) {
  color: #1d4ed8;
}

.prose :where(strong) {
  font-weight: 700;
}

.prose :where(ul, ol) {
  padding-left: 1.5em;
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.prose :where(ul) {
  list-style-type: disc;
}

.prose :where(ol) {
  list-style-type: decimal;
}

.prose :where(li) {
  margin-top: 0.25em;
  margin-bottom: 0.25em;
}

.prose :where(blockquote) {
  border-left: 4px solid #d1d5db;
  padding-left: 1em;
  font-style: italic;
  color: #6b7280;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose :where(code) {
  background: #f3f4f6;
  padding: 0.15em 0.3em;
  border-radius: 0.25em;
  font-size: 0.875em;
}

.prose :where(pre) {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose :where(pre code) {
  background: none;
  padding: 0;
  font-size: 0.875em;
}

.prose :where(img) {
  max-width: 100%;
  height: auto;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose :where(hr) {
  border-color: #e5e7eb;
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose :where(table) {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose :where(th, td) {
  border: 1px solid #d1d5db;
  padding: 0.5em 0.75em;
  text-align: left;
}

.prose :where(th) {
  background: #f9fafb;
  font-weight: 600;
}

.prose-sm {
  font-size: 0.875em;
}

.prose-lg {
  font-size: 1.125em;
}

/* ── Dark mode ─────────────────────────────────────────────────── */

.dark .prose {
  color: #d1d5db;
}

.dark .prose :where(h1, h2, h3, h4, h5, h6) {
  color: #f3f4f6;
}

.dark .prose :where(a) {
  color: #60a5fa;
}

.dark .prose :where(a:hover) {
  color: #93bbfd;
}

.dark .prose :where(blockquote) {
  border-color: #4b5563;
  color: #9ca3af;
}

.dark .prose :where(code) {
  background: #374151;
  color: #e5e7eb;
}

.dark .prose :where(pre) {
  background: #111827;
}

.dark .prose :where(hr) {
  border-color: #374151;
}

.dark .prose :where(th, td) {
  border-color: #4b5563;
}

.dark .prose :where(th) {
  background: #1f2937;
}
