.markdown {
  max-width: 830px;
  line-height: 1.6;
}

.markdown > *:first-child {
  margin-top: 0 !important;
}

.markdown img {
  display: inline-block;
  max-width: 100%;
  margin: 0;
}

/* TODO: this is hacky */
.markdown img[height] {
  height: 65px;
}

.markdown a:not(:has(img)) {
  /* color: #0969da;
  text-decoration: none;*/
  display: inline-block;
  text-decoration: none;
  font-weight: inherit;
  line-height: 1.3;
  position: relative;
  transition: unset;
  opacity: 1;
  color: unset;
  border-color: var(--fg-color-2);
  border-bottom-width: 0.135rem;
  background: transparent;
  background-origin: border-box;
  background-repeat: no-repeat;
  background-position: 50% 100%;
  background-size: 0 0.135rem;
}

/*
.markdown a {
  color: #0969da;
  text-decoration: none;

:global(.dark) .markdown a {
  color: #3291ff;
}

.markdown a:hover {
  text-decoration: underline;
} */

.markdown a:hover:not(:has(img)),
.markdown a:focus:not(:has(img)) {
  color: var(--tw-prose-links);
  text-decoration: none;
  border-bottom-color: transparent;

  background-image: linear-gradient(90.68deg, #b439df 0.26%, #e5337e 102.37%);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.135rem;

  transition-property: background-position, background-size;
  transition-duration: 300ms;
}

.markdown p {
  margin-top: 0;
  margin-bottom: 1em;
}

.markdown li a {
  margin: 0;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.25;
}

.markdown h1 {
  font-size: 2em;
  border-bottom: 1px solid var(--var-bg-2);
}

.markdown h2 {
  font-size: 1.5em;
  border-bottom: 1px solid var(--var-bg-2);
}

.markdown h3 {
  font-size: 1.25em;
}

.markdown h4 {
  font-size: 1em;
}

.markdown h5 {
  font-size: 1em;
  font-weight: 700;
}

.markdown h6 {
  font-size: 1em;
  font-weight: 500;
}

@media (max-width: 800px) {
  .markdown img {
    display: block;
    text-align: center;
    margin: 0 auto;
  }
}
