/*
 * Post typography for the blog article template (ark/transitional-single.php).
 * Linked only from that template, so no other page requests it.
 *
 * Tailwind's preflight in /dist/output.css zeroes p/h1-h6/blockquote/hr margins,
 * strips ul/ol markers and indent, resets heading size and weight, and makes
 * links inherit colour and text-decoration. Editor content arrives with none of
 * those classes, so they have to be put back here.
 */

/* Shared measure, so the article text and the comment form line up. */
.article-body,
.article-column {
  max-width: 40rem;
  margin-inline: auto;
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.article-body > * + * {
  margin-top: 1.15em;
}

.article-body h2 {
  margin: 2em 0 0.6em;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-body h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.article-body h4 {
  margin: 1.6em 0 0.4em;
  font-size: 1.125rem;
  font-weight: 600;
}

/* Left over from the old site's editor; they only add a stray gap. */
.article-body h1:empty,
.article-body h2:empty,
.article-body h3:empty,
.article-body h4:empty {
  display: none;
}

.article-body ul {
  list-style: disc;
  padding-left: 1.5em;
}

.article-body ol {
  list-style: decimal;
  padding-left: 1.5em;
}

.article-body li + li {
  margin-top: 0.4em;
}

.article-body blockquote {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 3px solid #cbd5e1;
  color: #475569;
  font-style: italic;
}

.article-body hr {
  margin: 2.5em 0;
  border-top-width: 1px;
  border-color: #e2e8f0;
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.article-body .aligncenter {
  margin-inline: auto;
}

.article-body .alignleft {
  float: left;
  margin: 0.5em 1.25em 0.5em 0;
}

.article-body .alignright {
  float: right;
  margin: 0.5em 0 0.5em 1.25em;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  padding: 0.4em 0.6em;
  border: 1px solid #e2e8f0;
}

/* Preflight makes links inherit, so article links are otherwise invisible. */
.article-body a {
  color: #4f46e5;
  text-decoration: underline;
}
