:root {
    --jb-prose-gap: 1rem;
    --jb-prose-gap-h2: 2rem;
    --jb-prose-gap-h2-bottom: 1rem;
    --jb-prose-gap-h3: 1.5rem;
    --jb-prose-gap-h3-bottom: 0.75rem;
    --jb-prose-gap-h3-p: 0.75rem;
    --jb-prose-gap-buttons: 2.5rem;
    --jb-prose-gap-image: 2rem;
    --jb-prose-image-padding: 1.5rem;
}

:is(.jb-prose, .editor-styles-wrapper) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, .wp-block-image) {
    margin-top: var(--jb-prose-gap)!important;
}

:is(.jb-prose, .editor-styles-wrapper) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, .wp-block-image):first-child {
    margin-top: 0;
}

:is(.jb-prose, .editor-styles-wrapper) .wp-block-image {
    margin-top: var(--jb-prose-gap-image);
    padding-bottom: var(--jb-prose-image-padding);

    a {
        margin: auto;
        width: 100%;
    }
}

:is(.jb-prose, .editor-styles-wrapper) h2 {
    margin-top: var(--jb-prose-gap-h2);
    margin-bottom: var(--jb-prose-gap-h2-bottom);
    font-size: clamp(1.4rem, 1.25rem + 1.8vw, 1.8rem);
}

:is(.jb-prose, .editor-styles-wrapper) h3 {
    margin-top: var(--jb-prose-gap-h3);
    margin-bottom: var(--jb-prose-gap-h3-bottom);
    font-size: var(--wp--preset--font-size--heading-small);
}

:is(.jb-prose, .editor-styles-wrapper) h2 + h3 { margin-top: 0; }
:is(.jb-prose, .editor-styles-wrapper) h3 + p { margin-top: var(--jb-prose-gap-h3-p); }

:is(.jb-prose, .editor-styles-wrapper) :where(h1, h2, h3, h4, h5, h6, p) + .wp-block-buttons {
    margin-top: var(--jb-prose-gap-buttons);
}

:is(.jb-prose, .editor-styles-wrapper) ul,
:is(.jb-prose, .editor-styles-wrapper) ol {
    padding-left: 1.25rem;
    color: var(--wp--preset--color--text-secondary);
}

:is(.jb-prose, .editor-styles-wrapper) li + li { margin-top: 0.5rem; }

:is(.jb-prose, .editor-styles-wrapper) blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--wp--preset--color--accent);
    font-style: italic;
    color: var(--wp--preset--color--text-secondary);
}

:is(.jb-prose, .editor-styles-wrapper) blockquote p { margin-top: 0; }

:is(.jb-prose, .editor-styles-wrapper) a {
    color: var(--wp--preset--color--accent);
    text-decoration: underline;
    font-weight: 500;
}

:is(.jb-prose, .editor-styles-wrapper) .wp-block-image img {
    display: block;
    margin-inline: auto;
    max-width: 100%;
    max-height: 550px;
    width: auto;
    height: auto;
    border-radius: var(--card-radius);
}