/*
 * Canonical editorial typography layer for classic theme + Gutenberg output.
 * Scope stays inside editorial containers to avoid UI component regressions.
 */

.entry-content,
.wp-block-post-content,
.user-content {
  color: var(--text-primary, #1a1a1a);
  font-size: var(--font-md, 1rem);
  line-height: 1.65;
}

.entry-content :where(h1, h2, h3, h4, h5, h6),
.wp-block-post-content :where(h1, h2, h3, h4, h5, h6),
.user-content :where(h1, h2, h3, h4, h5, h6) {
  color: var(--heading-primary, #1a1a1a);
  line-height: 1.3;
  text-align: start;
  margin-block: 1.6em 0.6em;
}

.entry-content :where(h1),
.wp-block-post-content :where(h1),
.user-content :where(h1) {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
}

.entry-content :where(h2),
.wp-block-post-content :where(h2),
.user-content :where(h2) {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
}

.entry-content :where(h3),
.wp-block-post-content :where(h3),
.user-content :where(h3) {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 600;
}

.entry-content :where(p),
.wp-block-post-content :where(p),
.user-content :where(p) {
  margin-block: 0 1.25rem;
}

.entry-content :where(ul, ol),
.wp-block-post-content :where(ul, ol),
.user-content :where(ul, ol) {
  margin-block: 0 1.25rem;
  padding-inline-start: 1.6rem;
}

.entry-content :where(ul),
.wp-block-post-content :where(ul),
.user-content :where(ul) {
  list-style: disc;
}

.entry-content :where(ol),
.wp-block-post-content :where(ol),
.user-content :where(ol) {
  list-style: decimal;
}

.entry-content :where(li),
.wp-block-post-content :where(li),
.user-content :where(li) {
  margin-block: 0 0.45rem;
}

.entry-content :where(li > ul, li > ol),
.wp-block-post-content :where(li > ul, li > ol),
.user-content :where(li > ul, li > ol) {
  margin-block: 0.45rem 0.6rem;
}

.entry-content :where(blockquote),
.wp-block-post-content :where(blockquote),
.user-content :where(blockquote) {
  margin: 1.5rem 0;
  padding-inline: 1rem 1.2rem;
  border-inline-start: 4px solid var(--brand-orange, #f9844a);
  color: var(--text-secondary, #555555);
}

.entry-content :where(figure),
.wp-block-post-content :where(figure),
.user-content :where(figure) {
  margin: 0 0 1.4rem;
}

.entry-content :where(figcaption),
.wp-block-post-content :where(figcaption),
.user-content :where(figcaption) {
  margin-top: 0.6rem;
  color: var(--text-secondary, #555555);
  font-size: 0.92rem;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image::before,
.wp-block-post-content .wp-block-gallery.has-nested-images figure.wp-block-image::before,
.user-content .wp-block-gallery.has-nested-images figure.wp-block-image::before {
  content: none;
  display: none;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
.wp-block-post-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
.user-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  position: static;
  inset: auto;
  max-height: none;
  overflow: visible;
  margin-top: 0.55rem;
  padding: 0;
  background: none;
  color: var(--text-primary, #1a1a1a);
  text-shadow: none;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: start;
  flex-basis: auto;
  flex-grow: 0;
  scrollbar-color: auto;
  scrollbar-width: auto;
  scrollbar-gutter: auto;
  will-change: auto;
}

.entry-content :where(a),
.wp-block-post-content :where(a),
.user-content :where(a) {
  color: var(--link-primary, #003e86);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.entry-content :where(a:hover),
.wp-block-post-content :where(a:hover),
.user-content :where(a:hover) {
  color: var(--link-hover, #002a5f);
}

.entry-content :where(a:focus-visible),
.wp-block-post-content :where(a:focus-visible),
.user-content :where(a:focus-visible) {
  outline: var(--focus-style, 3px solid #f9844a);
  outline-offset: var(--focus-offset, 2px);
}

.entry-content > :first-child,
.wp-block-post-content > :first-child,
.user-content > :first-child {
  margin-top: 0;
}
