/* Legacy WordPress post bodies (HTML from the old site, rendered inside .rich-text).
   These elements are not Etch blocks, so they cannot carry style records; this sheet is the one
   place their look lives. Ported 1:1 from the original (ACSS smart spacing + wp-block-library). */
.rich-text {
  --flow-spacing: 1em; --heading-spacing: 1.2em; --paragraph-spacing: 1em; --list-spacing: 1em;
  --list-indent-spacing: 2em; --list-item-spacing: 0.5em; --figure-spacing: 1em; --figcaption-spacing: 0.5em;
  --blockquote-spacing: 1em;
}
.rich-text :where(p, h1, h2, h3, h4, h5, h6, ul, ol, li, figure, blockquote) { margin-block: 0; }
.rich-text :where(p, li) { line-height: calc(6px + 2ex); }
.rich-text :where(h1, h2, h3, h4, h5, h6) { font-family: var(--font-display); font-weight: 700; line-height: calc(4px + 2ex); letter-spacing: 0; text-wrap: pretty; color: var(--color-ink); }
.rich-text h1 { font-size: var(--text-h1); }
.rich-text h2 { font-size: var(--text-h2); }
.rich-text h3 { font-size: var(--text-h3); }
.rich-text h4 { font-size: var(--text-h4); }
.rich-text h5 { font-size: var(--text-h5); }
.rich-text h6 { font-size: var(--text-h6); }
.rich-text > * + * { margin-block-start: var(--flow-spacing); margin-block-end: 0; }
.rich-text > * + :where(h1, h2, h3, h4, h5, h6) { margin-block-start: var(--heading-spacing, var(--flow-spacing)); margin-block-end: 0; }
.rich-text > * + p { margin-block-start: var(--paragraph-spacing, var(--flow-spacing)); margin-block-end: 0; }
.rich-text > :is(* + ul, * + ol) { margin-block: var(--list-spacing, var(--flow-spacing)); }
.rich-text > :is(ul, ol) { padding-inline-start: var(--list-indent-spacing, var(--flow-spacing)); }
.rich-text ul { list-style: disc; }
.rich-text ol { list-style: decimal; }
.rich-text :is(ul, ol) :is(ul, ol) { list-style-type: circle; }
.rich-text > :is(ul, ol) * + li { margin-block-start: var(--list-item-spacing, var(--flow-spacing)); margin-block-end: 0; }
.rich-text > * + :is(figure, picture) { margin-block: var(--figure-spacing, var(--flow-spacing)); }
.rich-text figcaption { margin-block: var(--figcaption-spacing, var(--flow-spacing)); }
.rich-text > * + blockquote:where(:not(figure > blockquote)) { margin-block: var(--blockquote-spacing, var(--flow-spacing)); }
.rich-text > blockquote * + * { margin-block-start: var(--paragraph-spacing, var(--flow-spacing)); margin-block-end: 0; }
.rich-text > :is(figure, blockquote, ul, ol) + * { --paragraph-spacing: 0; --flow-spacing: 0; }
.post-container__text > p:first-of-type::first-letter { font-size: 300%; float: left; font-weight: 700; line-height: 0.95; margin-inline-end: 0.5ex; color: var(--color-primary); }
.rich-text > figure.wp-block-image:first-child { margin-top: 0; }

.rich-text a { color: var(--color-primary); text-decoration: none; }
.rich-text a:hover { color: var(--color-primary-hover); }
.rich-text img { height: auto; max-width: 100%; vertical-align: middle; border-style: none; display: inline; width: auto; }
.rich-text iframe { max-width: 100%; }
.rich-text blockquote { border-left: 4px solid; font-family: georgia, "Times New Roman", times, serif; font-size: 1.3em; margin: 15px 0; padding: 0 0 0 30px; position: relative; text-wrap: pretty; box-sizing: border-box; overflow-wrap: break-word; }
.rich-text :where(figure) { margin-inline: 0; }

.rich-text .has-text-align-center { text-align: center; }
.rich-text .has-text-align-left { text-align: left; }
.rich-text .has-text-align-right { text-align: right; }
.rich-text .aligncenter { clear: both; }
.rich-text .alignleft { float: left; margin: 0.5em 1em 0.5em 0; }
.rich-text .alignright { float: right; margin: 0.5em 0 0.5em 1em; }
.rich-text img.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.rich-text .wp-block-image:not(.alignleft):not(.aligncenter):not(.alignright),
.rich-text .wp-block-embed { margin-block: 1em; }
.rich-text .wp-block-image img { box-sizing: border-box; height: auto; max-width: 100%; vertical-align: bottom; }
.rich-text .wp-block-image > a { display: inline-block; }
.rich-text .wp-block-image.aligncenter { text-align: center; }
.rich-text .wp-block-image .aligncenter,
.rich-text .wp-block-image .alignleft,
.rich-text .wp-block-image .alignright,
.rich-text .wp-block-image.aligncenter,
.rich-text .wp-block-image.alignleft,
.rich-text .wp-block-image.alignright { display: table; }
.rich-text .wp-block-image.aligncenter > figcaption,
.rich-text .wp-block-image.alignleft > figcaption,
.rich-text .wp-block-image.alignright > figcaption { caption-side: bottom; display: table-caption; }
.rich-text .wp-block-image .aligncenter { margin-left: auto; margin-right: auto; }
.rich-text .wp-block-image figcaption { margin-bottom: 1em; margin-top: 0.5em; }
.rich-text .wp-block-image figure { margin: 0; }

.rich-text .wp-block-gallery.has-nested-images { display: flex; flex-wrap: wrap; align-items: normal; gap: 0.5em; --wp--style--unstable-gallery-gap: 0.5em; }
.rich-text .wp-block-gallery.has-nested-images > * { margin: 0; }
.rich-text .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { box-sizing: border-box; display: flex; flex-direction: column; flex-grow: 1; justify-content: center; max-width: 100%; position: relative; margin: 0; width: calc(50% - var(--wp--style--unstable-gallery-gap) / 2); }
.rich-text .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) > a { flex-direction: column; flex-grow: 1; margin: 0; }
.rich-text .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img { display: block; height: auto; width: auto; max-width: 100% !important; }
.rich-text .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) > a { display: flex; }
.rich-text .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,
.rich-text .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img { flex: 1 0 0%; height: 100%; object-fit: cover; width: 100%; }
.rich-text .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) { align-self: inherit; }
.rich-text .wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image) { margin-bottom: auto; margin-top: 0; }
.rich-text .wp-block-gallery.has-nested-images figcaption { flex-basis: 100%; flex-grow: 1; text-align: center; }
.rich-text .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) figcaption { position: absolute; bottom: 0; left: 0; right: 0; max-height: 100%; box-sizing: border-box; color: #fff; font-size: 13px; margin: 0; overflow: auto; padding: 1em; text-align: center; text-shadow: 0 0 1.5px #000; background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), transparent); }
.rich-text .wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image) { width: 100%; }
@media (min-width: 600px) {
  .rich-text .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image),
  .rich-text .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image) { width: calc(33.33333% - var(--wp--style--unstable-gallery-gap) * 0.66667); }
  .rich-text .wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image) { width: calc(25% - var(--wp--style--unstable-gallery-gap) * 0.75); }
  .rich-text .wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image) { width: calc(20% - var(--wp--style--unstable-gallery-gap) * 0.8); }
  .rich-text .wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image) { width: calc(16.66667% - var(--wp--style--unstable-gallery-gap) * 0.83333); }
  .rich-text .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child { width: 100%; }
  .rich-text .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),
  .rich-text .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2) ~ figure.wp-block-image { width: calc(50% - var(--wp--style--unstable-gallery-gap) * 0.5); }
}

.rich-text .is-layout-flex { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em; }
.rich-text .is-layout-grid { display: grid; gap: 0.5em; }
.rich-text :is(.is-layout-flex, .is-layout-grid) > * { margin: 0; }
.rich-text .wp-block-group { box-sizing: border-box; }
.rich-text .wp-block-group.is-layout-flex .wp-block-embed { flex: 1 1 0%; min-width: 0; }
.rich-text .wp-block-group-is-layout-grid { grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); container-type: inline-size; }

.rich-text .wp-block-embed { overflow-wrap: break-word; }
.rich-text .wp-block-embed iframe { max-width: 100%; }
.rich-text .wp-block-embed figcaption { margin-bottom: 1em; margin-top: 0.5em; }
.rich-text .wp-block-embed__wrapper { position: relative; }
.rich-text .wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 50%; }
.rich-text .wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { padding-top: 56.25%; }
.rich-text .wp-embed-aspect-4-3 .wp-block-embed__wrapper::before { padding-top: 75%; }
.rich-text .wp-has-aspect-ratio iframe { inset: 0; height: 100%; position: absolute; width: 100%; }

.rich-text .wp-block-file { margin-bottom: 1.5em; }
.rich-text .wp-block-file__embed { margin-bottom: 1em; }
.rich-text .wp-block-file__button { background: #32373c; color: #fff; text-decoration: none; border-radius: 2em; display: inline-block; font-size: 0.8em; padding: 0.5em 1em; margin-left: 0.75em; }
