/* Coq letter/heading FX + list markers. Everything else stays re-terminal. */

.coq-theme {
  font-family: inherit;
  filter: none;
}

article.post.coq-theme {
  margin-top: 0;
}

article.post.coq-theme > h1.post-title {
  text-align: left;
  border-bottom: none;
  margin-top: 0;
}

.coq-theme h2,
.coq-theme h3,
.coq-theme h4,
.coq-theme h5,
.coq-theme h6 {
  text-align: left;
}

.coq-theme .post-title a {
  color: inherit;
  text-decoration: none;
}

.coq-theme .post-title a:hover {
  background-color: transparent;
  text-shadow: none;
}

.coq-theme h4::before {
  content: "▸ ";
  color: var(--coq-C);
}

.coq-theme p,
.coq-theme li {
  color: inherit;
}

.coq-theme a {
  color: inherit;
  text-decoration-color: var(--accent);
}

.coq-theme a:hover {
  color: var(--accent);
  background-color: transparent;
  text-shadow: none;
}

.coq-theme .coq-cite-ref a,
.coq-theme .coq-footnote-ref a {
  color: var(--accent);
  text-decoration: none;
}

.coq-theme .hanchor:hover {
  background-color: transparent;
  text-shadow: none;
}

/* Captions: re-terminal accent bar, not Coq cyan text. */
.coq-theme figcaption,
.coq-figure figcaption {
  color: var(--accent-contrast-color);
  background: var(--accent);
}

/* Prefer Coq □ over the theme's '-' dashes. */
.post.coq-theme ul li:not(:empty)::before,
.post.coq-theme ul li::before {
  content: "□";
  color: var(--coq-Y);
  position: static;
  left: auto;
  margin-right: 8px;
  display: inline-block;
  width: 1em;
  margin-left: -1.2em;
}

.post.coq-theme ol li::before {
  content: counter(coq-ol) ".";
  color: var(--coq-O);
  position: absolute;
  left: 0;
  top: 0;
  width: 2em;
  margin: 0;
}

/* Inline code: re-terminal chips, not Coq green pills. */
.coq-theme code {
  font-family: inherit;
  background: color-mix(in srgb, var(--accent), transparent 80%);
  color: var(--accent);
  border: none;
  border-radius: 0;
  padding: 1px 6px;
  box-shadow: none;
}

.coq-theme pre {
  background-color: transparent;
  color: inherit;
  border: none;
  box-shadow: none;
}

.coq-theme pre code {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
}

.coq-theme blockquote {
  border-top: none;
  border-bottom: none;
  border-left: 3px solid var(--coq-m);
  margin: 18px 0 18px 10px;
  padding: 12px 15px;
  color: var(--coq-C);
  background-color: rgba(15, 59, 58, 0.2);
  font-style: italic;
}

.coq-theme blockquote p:first-of-type:before {
  content: none;
}

/* Caption width follows the image, not the full column. */
.coq-figure:not(.figure-split) {
  display: table;
  width: auto;
  max-width: 100%;
  margin-left: 0;
  margin-right: auto;
}

.coq-figure:not(.figure-split) img {
  display: block;
}

.coq-figure:not(.figure-split) figcaption {
  display: table-caption;
  caption-side: bottom;
  text-align: left;
}

/* If markdown still wraps a figure in <p>, don't keep the paragraph box. */
.post-content p:has(> .coq-figure) {
  display: contents;
}

.figure-row {
  margin: 1.5rem 0;
}
