:root {
  --amsart-indent-size: 1rem; /* Just guessing here... */
}

article.amsart {
  line-height: 1.15;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* By default paragraphs are indented */
.amsart p {
  text-indent: var(--amsart-indent-size);
  margin: 0;
}

article.amsart > * + * {
  margin-top: 0;
}

/* amsart heading typography */
/* todo: line-heights?

/* h1 is used for the title */
article.amsart h1 {
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
  margin: 1.2rem;
  line-height: 1;
}

/* author names */
article.amsart h1+p {
  text-indent: 0;
  font-size: 0.8rem;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 2em;
}

/* h2 is equivalent to section */
article.amsart h2 {
  font-size: 1rem;
  font-variant: small-caps;
  text-align: center;
  font-weight: normal;
  line-height: 1;
  margin: 1.2rem 0 0.5em 0;
}

/* h3 is a subsection, h4 is a subsubsection.
These are inlined with a small space after */
article.amsart h3, article.amsart h4 {
  font-size: 1rem;
  display: inline-block;
  margin: 0.5em 0 0 0;
  line-height: 1;
}

article.amsart h3::after, article.amsart h4::after {
  content: '.';
  margin-right: .4ch;
}

article.amsart h3 {
  font-weight: bold;
}

article.amsart h4 {
  font-weight: normal;
  font-style: italic;
}

article.amsart h3+p, article.amsart h4+p {
  display: inline;
}

/* Copied from original Latex.css style */
article.amsart p.no-indent,
p.no-indent {
  text-indent: 0;
}

article.amsart ol,
article.amsart ul,
article.amsart table,
article.amsart .theorem,
article.amsart .lemma,
article.amsart .corollary {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

article.amsart ol p,
article.amsart ul p {
  text-indent: 0;
}
