/* Long-form pages (the methodology write-up). Builds on the tokens in style.css. */

.article-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 0;
}

.article-nav .wordmark {
  font-size: 28px;
  color: var(--ink);
  text-decoration: none;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 96px;
  font-size: 18px;
  line-height: 1.7;
}

.article > header {
  margin-bottom: 48px;
}

.article h1 {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.dek {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.asterisk {
  color: var(--accent);
}

.footnote {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.article h2 {
  margin: 72px 0 8px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.article h3 {
  margin: 44px 0 4px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.article p,
.article li {
  color: #2b3548;
}

/* Links match charliehubbard.org: solid blue, always underlined. */
.article a {
  color: #1659d6;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(22 89 214 / 40%);
  text-underline-offset: 0.2em;
}

.article a:hover {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

.article code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #e4e9f0;
  font-size: 0.88em;
}

/* Figures sit slightly wider than the text column on large screens. */
.article figure {
  margin: 36px -40px;
}

.article figure img,
.article figure iframe {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: var(--well);
  box-shadow: 0 1px 2px rgb(29 39 56 / 6%), 0 8px 24px rgb(29 39 56 / 6%);
}

.article figure iframe {
  aspect-ratio: 16 / 9;
  border: 0;
}

.article figcaption {
  margin: 12px 40px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin: 36px -40px;
}

/* The pair takes the wide margins, so the figures inside must not. */
.article .figure-pair figure {
  margin: 0;
}

.article .figure-pair figcaption {
  margin: 12px 0 0;
}

.note {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--well);
}

.note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.article-end {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}

.figure-narrow img {
  max-width: 360px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .article figure,
  .figure-pair {
    margin: 32px 0;
  }

  .article figcaption {
    margin: 10px 0 0;
  }
}

@media (max-width: 560px) {
  .article {
    font-size: 17px;
  }

  .figure-pair {
    grid-template-columns: 1fr;
  }
}
