/* Safe Markdown presentation layer.
   Kept separate from styles.css so customized site themes remain untouched. */

.post-body a,
.about-component__copy a,
.comment-card__body a,
.admin-comment-card__body a,
.collection-detail__description a,
.collection-card__description a,
.markdown-inline a {
  color: var(--green, #176a49);
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.post-body a:hover,
.about-component__copy a:hover,
.comment-card__body a:hover,
.admin-comment-card__body a:hover,
.collection-detail__description a:hover,
.collection-card__description a:hover,
.markdown-inline a:hover {
  color: var(--orange, #e86c2f);
  text-decoration-color: currentColor;
}

.post-body .markdown-heading,
.about-component__copy .markdown-heading,
.comment-card__body .markdown-heading,
.admin-comment-card__body .markdown-heading,
.collection-detail__description .markdown-heading,
.collection-card__description .markdown-heading {
  margin: 1.5em 0 0.55em;
  color: var(--ink, #17372c);
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.post-body h2.markdown-heading,
.about-component__copy h2.markdown-heading,
.collection-detail__description h2.markdown-heading {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
}

.post-body h3.markdown-heading,
.about-component__copy h3.markdown-heading,
.collection-detail__description h3.markdown-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.post-body h4.markdown-heading,
.post-body h5.markdown-heading,
.post-body h6.markdown-heading,
.about-component__copy h4.markdown-heading,
.about-component__copy h5.markdown-heading,
.about-component__copy h6.markdown-heading,
.collection-detail__description h4.markdown-heading,
.collection-detail__description h5.markdown-heading,
.collection-detail__description h6.markdown-heading {
  font-size: 1.12rem;
}

.post-body .markdown-list,
.about-component__copy .markdown-list,
.comment-card__body .markdown-list,
.admin-comment-card__body .markdown-list,
.collection-detail__description .markdown-list,
.collection-card__description .markdown-list {
  margin: 1.15em 0 1.45em;
  padding-left: 1.5em;
}

.post-body .markdown-list li,
.about-component__copy .markdown-list li,
.comment-card__body .markdown-list li,
.admin-comment-card__body .markdown-list li,
.collection-detail__description .markdown-list li,
.collection-card__description .markdown-list li {
  margin: 0.35em 0;
  padding-left: 0.15em;
}

.post-body .markdown-blockquote,
.about-component__copy .markdown-blockquote,
.comment-card__body .markdown-blockquote,
.admin-comment-card__body .markdown-blockquote,
.collection-detail__description .markdown-blockquote,
.collection-card__description .markdown-blockquote {
  margin: 1.5em 0;
  padding: 0.15em 0 0.15em clamp(1rem, 3vw, 1.6rem);
  border-left: 2px solid var(--orange, #e86c2f);
  color: var(--ink-soft, #315449);
  font-style: italic;
}

.post-body .markdown-blockquote .stanza,
.about-component__copy .markdown-blockquote .stanza,
.comment-card__body .markdown-blockquote .stanza,
.admin-comment-card__body .markdown-blockquote .stanza,
.collection-detail__description .markdown-blockquote .stanza,
.collection-card__description .markdown-blockquote .stanza {
  margin: 0.65em 0;
}

.post-body code,
.about-component__copy code,
.comment-card__body code,
.admin-comment-card__body code,
.collection-detail__description code,
.collection-card__description code,
.markdown-inline code {
  padding: 0.12em 0.35em;
  border: 1px solid rgba(23, 106, 73, 0.12);
  border-radius: 0.35em;
  background: rgba(23, 106, 73, 0.07);
  color: var(--ink, #17372c);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.88em;
}

.post-body .markdown-code,
.about-component__copy .markdown-code,
.comment-card__body .markdown-code,
.admin-comment-card__body .markdown-code,
.collection-detail__description .markdown-code,
.collection-card__description .markdown-code {
  overflow-x: auto;
  margin: 1.5em 0;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(23, 106, 73, 0.14);
  border-radius: 1rem;
  background: var(--ink, #17372c);
  color: #fffaf0;
  line-height: 1.6;
  tab-size: 2;
}

.post-body .markdown-code code,
.about-component__copy .markdown-code code,
.comment-card__body .markdown-code code,
.admin-comment-card__body .markdown-code code,
.collection-detail__description .markdown-code code,
.collection-card__description .markdown-code code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.88rem;
}

.post-body .markdown-rule,
.about-component__copy .markdown-rule,
.collection-detail__description .markdown-rule {
  width: 100%;
  margin: clamp(2rem, 6vw, 3.5rem) 0;
  border: 0;
  border-top: 1px solid var(--line, rgba(23, 55, 44, 0.14));
}

.post-body strong,
.about-component__copy strong,
.comment-card__body strong,
.admin-comment-card__body strong,
.collection-detail__description strong,
.collection-card__description strong,
.markdown-inline strong {
  color: var(--ink, #17372c);
  font-weight: 700;
}

.post-body del,
.about-component__copy del,
.comment-card__body del,
.admin-comment-card__body del,
.collection-detail__description del,
.collection-card__description del,
.markdown-inline del {
  opacity: 0.62;
}

.collection-card__description > :first-child,
.collection-detail__description > :first-child {
  margin-top: 0;
}

.collection-card__description > :last-child,
.collection-detail__description > :last-child {
  margin-bottom: 0;
}

/* Make Markdown source pleasant to edit without changing the surrounding form theme. */
.editor-form textarea[name="body"],
.editor-form textarea[name="excerpt"],
#collection-description,
#comment-body,
.newsletter-compose textarea {
  tab-size: 2;
}
