/* Typography styles - prose class for content */

.prose {
  color: var(--foreground);
  max-width: 65ch;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.25em;
}

/* Headings */
.prose h1 {
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8889em;
  line-height: 1.1111;
  font-weight: 800;
  color: var(--foreground);
}

.prose h2 {
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333;
  font-weight: 700;
  color: var(--foreground);
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
  font-weight: 600;
  font-style: italic;
  color: var(--foreground);
}

.prose h4 {
  font-size: 1em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
  font-weight: 600;
  color: var(--foreground);
}

/* Paragraphs */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: var(--foreground);
}

/* Links */
.prose a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}

.prose a:hover {
  color: var(--accent);
  text-decoration-style: solid;
}

/* Bold and emphasis */
.prose strong {
  font-weight: 600;
  color: var(--foreground);
}

.prose em {
  font-style: italic;
}

/* Blockquotes */
.prose blockquote {
  font-style: italic;
  border-left: 4px solid color-mix(in srgb, var(--accent) 50%, transparent);
  padding-left: 1em;
  margin: 1.6em 0;
  opacity: 0.85;
}

.prose blockquote p {
  margin: 0;
}

/* 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::marker {
  color: var(--accent);
}

.prose ul > li {
  padding-left: 0.375em;
}

.prose ol > li {
  padding-left: 0.375em;
}

/* Nested lists */
.prose ul ul,
.prose ol ul,
.prose ul ol,
.prose ol ol {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

/* Code */
.prose code {
  font-size: 0.875em;
  font-weight: 500;
  color: var(--foreground);
  background-color: color-mix(in srgb, var(--muted) 75%, transparent);
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
}

.prose code::before,
.prose code::after {
  content: none;
}

.prose pre {
  font-size: 0.875em;
  line-height: 1.7142857;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  border-radius: 0.5rem;
  padding: 1.1428571em 1.4285714em;
  overflow-x: auto;
  background-color: var(--muted);
  border: 1px solid var(--border);
}

.prose pre code {
  background-color: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-weight: 400;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

/* Images */
.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.prose figure {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose figcaption {
  color: var(--foreground);
  opacity: 0.7;
  font-size: 0.875em;
  line-height: 1.4285714;
  margin-top: 0.8571429em;
  text-align: center;
}

/* Horizontal rule */
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Tables */
.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875em;
  line-height: 1.7142857;
  border-collapse: collapse;
}

.prose thead {
  border-bottom: 1px solid var(--border);
}

.prose thead th {
  color: var(--foreground);
  font-weight: 600;
  vertical-align: bottom;
  padding: 0 0.5714286em 0.5714286em;
  border: 1px solid var(--border);
}

.prose tbody tr {
  border-bottom: 1px solid var(--border);
}

.prose tbody tr:last-child {
  border-bottom-width: 0;
}

.prose tbody td {
  vertical-align: baseline;
  padding: 0.5714286em;
  border: 1px solid var(--border);
}

.prose thead th:first-child,
.prose tbody td:first-child {
  padding-left: 0.5714286em;
}

/* Details/Summary */
.prose details {
  display: inline-block;
  cursor: pointer;
  color: var(--foreground);
  user-select: none;
}

.prose summary {
  font-weight: 600;
}

.prose summary:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

/* Video embeds */
.prose video {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5rem;
}

/* Abbreviations */
.prose abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* Keyboard input */
.prose kbd {
  font-family: inherit;
  font-size: 0.875em;
  padding: 0.125em 0.375em;
  border-radius: 0.25em;
  border: 1px solid var(--border);
  background-color: var(--muted);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Mark/highlight */
.prose mark {
  background-color: color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 0.125em 0.25em;
  border-radius: 0.125em;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h1 {
    font-size: 1.875em;
  }

  .prose h2 {
    font-size: 1.375em;
  }

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

  .prose pre {
    font-size: 0.8125em;
    padding: 1em;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }
}

