/* Article-body typography overrides.
   Global reset removes native list indentation, so restore it only inside posts. */

.blog-article-body ul,
.blog-article-body ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.55rem;
  list-style-position: outside;
}

.blog-article-body ol {
  padding-left: 1.7rem;
}

.blog-article-body li {
  padding-left: 0.18rem;
}

.blog-article-body li + li {
  margin-top: 0.38rem;
}

.blog-article-body li > ul,
.blog-article-body li > ol {
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
}

.blog-article-body li > p + p {
  margin-top: 0.45rem;
}

.blog-article-body ul ul,
.blog-article-body ol ul {
  list-style-type: circle;
}

.blog-article-body ul ul ul,
.blog-article-body ol ul ul {
  list-style-type: square;
}

/* TOC entries already inherit any explicit section numbering from headings.
   Do not add a second list marker/ordinal around that text. */
.blog-toc .blog-toc-list {
  margin: 0.65rem 0 0;
  padding-left: 0;
  list-style: none;
}

.blog-toc .blog-toc-list li {
  padding-left: 0;
}

.blog-toc .blog-toc-list li + li {
  margin-top: 0.28rem;
}

.research-note .blog-article-body ul,
.research-note .blog-article-body ol {
  margin-top: 0.65rem;
  margin-bottom: 0.85rem;
}

.research-note .blog-article-body li + li {
  margin-top: 0.3rem;
}

/* Conceptual flows are directional schematics, not code or equations. */
.concept-flow {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.58rem;
  width: 100%;
  margin: 1rem 0 1.15rem;
  padding: 0.38rem 0.15rem 0.48rem;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--text-primary);
  font-family: var(--font-publication);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
  scrollbar-width: thin;
}

.concept-flow-node {
  font-weight: 600;
  letter-spacing: 0.008em;
}

.concept-flow-arrow {
  flex: 0 0 auto;
  color: var(--accent-dim);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08em;
  font-weight: 400;
  opacity: 0.72;
}

/* Composition lines describe what a system contains. */
.concept-composition {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.42rem;
  width: 100%;
  margin: 1rem 0 1.15rem;
  padding: 0.35rem 0.2rem 0.46rem;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: nowrap;
  scrollbar-width: thin;
}

.concept-composition-part {
  font-weight: 700;
  letter-spacing: 0.012em;
}

.concept-composition-separator {
  color: var(--text-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05em;
  font-weight: 400;
  opacity: 0.7;
}

/* Conceptual contrasts put two claims on equal footing around a relation. */
.concept-contrast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.85rem;
  width: min(100%, 34rem);
  margin: 1.05rem auto 1.2rem;
  padding: 0.52rem 0.15rem;
  border-top: 1px solid rgba(36, 33, 27, 0.35);
  border-bottom: 1px solid rgba(36, 33, 27, 0.35);
  color: var(--text-primary);
  font-family: var(--font-publication);
  font-size: 0.9rem;
  line-height: 1.4;
}

.concept-contrast-side:first-child {
  text-align: right;
}

.concept-contrast-side:last-child {
  text-align: left;
}

.concept-contrast-side {
  font-weight: 600;
}

.concept-contrast-operator {
  color: var(--accent-dim);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3em;
  font-weight: 400;
}

/* Proposition lines are linguistic claims, not directional diagrams. */
.concept-proposition {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.34rem 0.48rem;
  width: min(100%, 38rem);
  margin: 0.9rem auto 1.05rem;
  padding: 0.3rem 0.15rem 0.42rem;
  color: var(--text-primary);
  font-family: var(--font-publication);
  font-size: 0.91rem;
  line-height: 1.45;
  text-align: center;
}

.concept-proposition-subject,
.concept-proposition-object {
  font-weight: 600;
}

.concept-proposition-relation {
  color: var(--accent-dim);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.research-note .concept-flow,
.research-note .concept-composition,
.research-note .concept-contrast,
.research-note .concept-proposition {
  font-size: 0.84rem;
}

/* Paper-style mathematics. MathJax inherits the article color and centers
   display equations while preserving horizontal scrolling for long formulas. */
.blog-article mjx-container {
  color: var(--text-primary);
}

.blog-article mjx-container[display="true"] {
  max-width: 100%;
  margin: 1.15rem 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.08rem 0;
}

.blog-article-body .legacy-math-display {
  display: block;
  width: 100%;
  text-align: center;
}

.blog-article-body .legacy-math-inline {
  white-space: nowrap;
}

.research-note mjx-container[display="true"] {
  margin: 1rem 0 !important;
}

@media (max-width: 620px) {
  .blog-article-body ul {
    padding-left: 1.4rem;
  }

  .blog-article-body ol {
    padding-left: 1.55rem;
  }

  .concept-flow,
  .concept-composition {
    justify-content: flex-start;
    padding-bottom: 0.55rem;
  }

  .concept-contrast {
    column-gap: 0.55rem;
    font-size: 0.84rem;
  }

  .concept-proposition {
    font-size: 0.86rem;
  }

  .blog-article mjx-container[display="true"] {
    font-size: 0.94em;
  }
}
