.article-cover {
  display: block;
  width: min(100%, 680px);
  max-height: 380px;
  margin: 0 auto 2.5rem;
  object-fit: cover;
  object-position: center;
}

.longform-content {
  line-height: 1.85;
}

.longform-content > h1,
.longform-content > h2,
.longform-content > h3,
.longform-content > h4 {
  scroll-margin-top: 2rem;
}

.longform-content > h1 {
  margin: 2.6rem 0 1rem;
  font-size: 2rem;
}

.longform-content > h2 {
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.55rem;
}

.longform-content > h3 {
  font-size: 1.25rem;
}

.longform-content ul,
.longform-content ol {
  margin: 1rem 0;
  padding-left: 1.8rem;
}

.longform-content li + li {
  margin-top: .35rem;
}

.longform-content a {
  color: #27664f;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.longform-content img {
  width: auto;
  max-width: min(100%, 620px);
  max-height: 600px;
  margin: 1.75rem auto .6rem;
  border-radius: .75rem;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(37, 51, 45, .1);
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4rem 2rem 2rem;
  background: rgba(12, 18, 16, .92);
  backdrop-filter: blur(8px);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 88vh;
  border-radius: .5rem;
  object-fit: contain;
  cursor: zoom-out;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .45);
}

.image-lightbox button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

.longform-content hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.longform-content strong {
  font-weight: 800;
}

.markdown-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px dashed #a9b9b0;
  border-radius: .7rem;
  background: #f4f7f3;
}

.markdown-tools > div {
  grid-column: 1 / -1;
}

.markdown-tools p {
  margin: .2rem 0 0;
}

.markdown-tools input[type="file"] {
  min-width: 0;
}

.markdown-import-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.markdown-import-inputs label {
  display: grid;
  gap: .3rem;
}

.markdown-hint {
  margin: 1rem 0 0;
}

.markdown-hint code {
  padding: .12rem .3rem;
  border-radius: .25rem;
  background: #edf0eb;
  color: #315347;
}

@media (max-width: 600px) {
  .article-cover {
    max-height: 260px;
    margin-bottom: 1.8rem;
  }

  .longform-content img {
    max-width: min(100%, 520px);
    max-height: 480px;
  }

  .image-lightbox {
    padding: 3.5rem .75rem 1rem;
  }

  .markdown-tools {
    grid-template-columns: 1fr;
  }

  .markdown-tools > div {
    grid-column: auto;
  }

  .markdown-import-inputs {
    grid-template-columns: 1fr;
  }
}
