/*
 * Custom Prose Styles for Markdown Content
 * Tailwind CSS v4 compatible alternative to @tailwindcss/typography
 */

.prose {
  color: rgb(55 65 81);
  max-width: 65ch;
}

.prose :where(p):not(:where([class~="not-prose"] *)) {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
  color: rgb(75 85 99);
  font-size: 1.25em;
  line-height: 1.6;
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

.prose :where(a):not(:where([class~="not-prose"] *)) {
  color: rgb(79 70 229);
  text-decoration: underline;
  font-weight: 500;
}

.prose :where(a):hover:not(:where([class~="not-prose"] *)) {
  color: rgb(99 102 241);
}

.prose :where(strong):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 600;
}

.prose :where(ol):not(:where([class~="not-prose"] *)) {
  list-style-type: decimal;
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose :where(ul):not(:where([class~="not-prose"] *)) {
  list-style-type: disc;
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose :where(li):not(:where([class~="not-prose"] *)) {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose :where(ol > li):not(:where([class~="not-prose"] *)) {
  padding-left: 0.375em;
}

.prose :where(ul > li):not(:where([class~="not-prose"] *)) {
  padding-left: 0.375em;
}

.prose :where(h1):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 800;
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;
}

.prose :where(h2):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 700;
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
}

.prose :where(h3):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 600;
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.prose :where(h4):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

.prose :where(img):not(:where([class~="not-prose"] *)) {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose :where(code):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 600;
  font-size: 0.875em;
  background-color: rgb(243 244 246);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
}

.prose :where(pre):not(:where([class~="not-prose"] *)) {
  color: rgb(229 231 235);
  background-color: rgb(31 41 55);
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.7142857;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  border-radius: 0.375rem;
  padding: 0.8571429em 1.1428571em;
}

.prose :where(pre code):not(:where([class~="not-prose"] *)) {
  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;
}

.prose :where(table):not(:where([class~="not-prose"] *)) {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875em;
  line-height: 1.7142857;
}

.prose :where(thead):not(:where([class~="not-prose"] *)) {
  border-bottom-width: 1px;
  border-bottom-color: rgb(209 213 219);
}

.prose :where(thead th):not(:where([class~="not-prose"] *)) {
  color: rgb(17 24 39);
  font-weight: 600;
  vertical-align: bottom;
  padding-right: 0.5714286em;
  padding-bottom: 0.5714286em;
  padding-left: 0.5714286em;
}

.prose :where(tbody tr):not(:where([class~="not-prose"] *)) {
  border-bottom-width: 1px;
  border-bottom-color: rgb(229 231 235);
}

.prose :where(tbody td):not(:where([class~="not-prose"] *)) {
  vertical-align: top;
  padding: 0.5714286em;
}

.prose :where(blockquote):not(:where([class~="not-prose"] *)) {
  font-weight: 500;
  font-style: italic;
  color: rgb(17 24 39);
  border-left-width: 0.25rem;
  border-left-color: rgb(229 231 235);
  quotes: "\201C""\201D""\2018""\2019";
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-left: 1em;
}

.prose :where(hr):not(:where([class~="not-prose"] *)) {
  border-color: rgb(229 231 235);
  border-top-width: 1px;
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Prose size variants */
.prose-sm {
  font-size: 0.875rem;
  line-height: 1.7142857;
}

.prose-sm :where(p):not(:where([class~="not-prose"] *)) {
  margin-top: 1.1428571em;
  margin-bottom: 1.1428571em;
}

.prose-sm :where(h2):not(:where([class~="not-prose"] *)) {
  font-size: 1.2857143em;
  margin-top: 1.7777778em;
  margin-bottom: 0.8888889em;
}

.prose-sm :where(h3):not(:where([class~="not-prose"] *)) {
  font-size: 1.1428571em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Max width utilities */
.max-w-none {
  max-width: none;
}

.max-w-prose {
  max-width: 65ch;
}
