/**
 * NA-Kit UI — Prose Styles
 * Typography styles for long-form content (blog posts, articles, CMS content).
 * Apply the .prose class to a container to get beautiful default typography.
 */

.prose {
  color: var(--ui-text-primary, #111827);
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.75;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* Headings */
.prose h1 {
  font-size: 2.25em;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 0.9em;
  letter-spacing: -0.025em;
  color: var(--ui-text-primary, #111827);
}

.prose h2 {
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 1em;
  letter-spacing: -0.025em;
  color: var(--ui-text-primary, #111827);
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--ui-border-color, #e5e7eb);
}

.prose h3 {
  font-size: 1.25em;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: var(--ui-text-primary, #111827);
}

.prose h4 {
  font-size: 1em;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--ui-text-primary, #111827);
}

.prose h5, .prose h6 {
  font-size: 0.875em;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: var(--ui-text-secondary, #6b7280);
}

/* Paragraphs */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

/* Links */
.prose a {
  color: var(--ui-color-primary, #6366f1);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 150ms ease;
}

.prose a:hover {
  color: var(--ui-color-primary-hover, #4f46e5);
}

/* Strong & Em */
.prose strong {
  font-weight: 600;
  color: var(--ui-text-primary, #111827);
}

/* Lists */
.prose ul {
  list-style-type: disc;
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose li > ul, .prose li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose li::marker {
  color: var(--ui-text-muted, #9ca3af);
}

/* Blockquote */
.prose blockquote {
  font-style: italic;
  color: var(--ui-text-secondary, #6b7280);
  border-left: 4px solid var(--ui-color-primary, #6366f1);
  padding: 0.5em 1em;
  margin: 1.6em 0;
  background-color: var(--ui-bg-secondary, #f9fafb);
  border-radius: 0 var(--ui-border-radius, 6px) var(--ui-border-radius, 6px) 0;
}

.prose blockquote p:first-child { margin-top: 0; }
.prose blockquote p:last-child { margin-bottom: 0; }

/* Code */
.prose code {
  font-family: var(--ui-font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 0.875em;
  color: var(--ui-color-primary, #6366f1);
  background-color: var(--ui-bg-tertiary, #f3f4f6);
  padding: 0.2em 0.4em;
  border-radius: var(--ui-border-radius-sm, 4px);
  font-weight: 500;
}

.prose pre {
  font-family: var(--ui-font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 0.875em;
  line-height: 1.7;
  background-color: var(--ui-bg-tertiary, #1f2937);
  color: var(--ui-text-primary, #e5e7eb);
  padding: 1em 1.5em;
  border-radius: var(--ui-border-radius-lg, 8px);
  overflow-x: auto;
  margin: 1.7em 0;
  border: 1px solid var(--ui-border-color, #e5e7eb);
}

.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  font-weight: 400;
}

/* Horizontal Rule */
.prose hr {
  border: none;
  border-top: 1px solid var(--ui-border-color, #e5e7eb);
  margin: 3em 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ui-border-radius-lg, 8px);
  margin: 2em 0;
}

.prose figure {
  margin: 2em 0;
}

.prose figcaption {
  font-size: 0.875em;
  color: var(--ui-text-secondary, #6b7280);
  text-align: center;
  margin-top: 0.75em;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.875em;
}

.prose thead {
  border-bottom: 2px solid var(--ui-border-color-strong, #d1d5db);
}

.prose th {
  font-weight: 600;
  text-align: left;
  padding: 0.75em 1em;
  color: var(--ui-text-primary, #111827);
}

.prose td {
  padding: 0.75em 1em;
  border-bottom: 1px solid var(--ui-border-color, #e5e7eb);
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Definition list */
.prose dl {
  margin: 1.25em 0;
}

.prose dt {
  font-weight: 600;
  margin-top: 1.25em;
  color: var(--ui-text-primary, #111827);
}

.prose dd {
  margin-top: 0.5em;
  padding-left: 1.625em;
  color: var(--ui-text-secondary, #6b7280);
}

/* Video / Embed */
.prose video, .prose iframe {
  max-width: 100%;
  border-radius: var(--ui-border-radius-lg, 8px);
  margin: 2em 0;
}

/* Keyboard */
.prose kbd {
  font-family: var(--ui-font-mono, ui-monospace, monospace);
  font-size: 0.8em;
  padding: 0.15em 0.4em;
  background: var(--ui-bg-secondary, #f9fafb);
  border: 1px solid var(--ui-border-color-strong, #d1d5db);
  border-radius: var(--ui-border-radius-sm, 4px);
  box-shadow: 0 1px 0 var(--ui-border-color-strong, #d1d5db);
}

/* Size variants */
.prose-sm { font-size: 0.875rem; }
.prose-lg { font-size: 1.125rem; }
.prose-xl { font-size: 1.25rem; }

/* Full-width prose (no max-width) */
.prose-full { max-width: none; }
