/* Wider article column (theme default is mw7 / mw8 = 48em / 64em) */
article.mw7,
article.mw8 {
  max-width: 1200px;
}

/* Keep headings inside article content subordinate to the page title */
article .nested-copy-line-height h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

article .nested-copy-line-height h2,
article .nested-copy-line-height h3,
article .nested-copy-line-height h4,
article .nested-copy-line-height h5,
article .nested-copy-line-height h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
article .nested-copy-line-height h2 { font-size: 1.4rem; }
article .nested-copy-line-height h3 { font-size: 1.2rem; }
article .nested-copy-line-height h4 { font-size: 1.05rem; }
article .nested-copy-line-height h5 { font-size: 0.95rem; }
article .nested-copy-line-height h6 { font-size: 0.85rem; }

/* Sans-serif headings, including the page title */
article h1,
article .nested-copy-line-height h2,
article .nested-copy-line-height h3,
article .nested-copy-line-height h4,
article .nested-copy-line-height h5,
article .nested-copy-line-height h6 {
  font-family: -apple-system, BlinkMacSystemFont, "avenir next", avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif;
}

/* Home page thumbnail gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
}
.gallery-item {
  display: block;
  color: inherit;
  text-decoration: none;
}
.gallery-item img,
.gallery-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #ddd;
  border-radius: 4px;
  transition: opacity 0.15s;
}
.gallery-item:hover img,
.gallery-item:hover .gallery-placeholder {
  opacity: 0.8;
}
.gallery-title {
  display: block;
  margin-top: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "avenir next", avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

/* GitHub-style alerts: > [!TIP], > [!CAUTION] etc. */
.alert {
  --alert-color: #0969da;
  margin: 1.5rem 0;
  padding: 0.25rem 1rem;
  border-left: 4px solid var(--alert-color);
  background: color-mix(in srgb, var(--alert-color) 8%, transparent);
  border-radius: 0 4px 4px 0;
}
.alert-title {
  margin: 0.75rem 0 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "avenir next", avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif;
  font-weight: 600;
  color: var(--alert-color);
}
.alert-tip { --alert-color: #1a7f37; }
.alert-important { --alert-color: #8250df; }
.alert-warning { --alert-color: #9a6700; }
.alert-caution { --alert-color: #cf222e; }
