.math-article .post-content {
  max-width: 65ch;
  line-height: 1.65;
}

.math-article .post-content h3 {
  margin: 32px 0 12px;
  font-size: 1.18rem;
  line-height: 1.4;
}

.math-article .post-content h3:first-child {
  margin-top: 0;
}

.math-article .post-content h4 {
  margin: 26px 0 12px;
  font-size: 1.05rem;
  line-height: 1.4;
}

.math-article .post-content h3,
.math-article .post-content h4 {
  scroll-margin-top: 92px;
  break-after: avoid;
}

.math-article .equation {
  max-width: 100%;
  margin: 22px 0;
  padding: 8px 2px 7px;
  border-bottom: 1px solid transparent;
  overflow-x: auto;
  overflow-y: hidden;
  break-inside: avoid;
}

.math-article .equation:focus-visible {
  outline: none;
  border-bottom-color: currentColor;
}

.math-article .katex {
  font-size: 1.08em;
}

.math-article .katex-display {
  margin: 0;
}

.math-article .katex-display > .katex {
  width: max-content;
  min-width: 100%;
}

.math-article .post-content hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.math-article .post-content ol {
  padding-left: 1.4rem;
}

.math-article .post-content li + li {
  margin-top: 12px;
}

@media print {
  .math-article {
    break-inside: auto;
  }

  .math-article .post-content {
    max-width: none;
  }

  .math-article .post-content p {
    orphans: 3;
    widows: 3;
  }

  .math-article .equation {
    padding: 5px 0;
    border-bottom: 0;
    overflow: visible;
  }
}
