.article-editor-content {
    display: flow-root;
    min-inline-size: 0;
    overflow-x: auto;
    overflow-wrap: anywhere;
}

.article-editor-content :where(article, aside, section, div, figure, blockquote, p, dl, ol, ul) {
    max-inline-size: 100%;
}

.article-editor-content :where(h1, h2, h3, h4, h5, h6) {
    margin-block: 1.25em .5em;
}

.article-editor-content :where(p, figure, blockquote, dl, ol, ul, pre) {
    margin-block: 0 1em;
}

.article-editor-content :where(ol, ul) {
    padding-inline-start: 2em;
}

.article-editor-content :where(ul) { list-style-type: disc; }
.article-editor-content :where(ol) { list-style-type: decimal; }
.article-editor-content :where(ul ul) { list-style-type: circle; }
.article-editor-content :where(ul ul ul) { list-style-type: square; }
.article-editor-content :where(li > p, li > ul, li > ol) { margin-block-end: 0; }
.article-editor-content :where(ul, ol).list-paddingleft-1 { padding-inline-start: 0; }
.article-editor-content :where(ul, ol).list-paddingleft-2 { padding-inline-start: 30px; }
.article-editor-content :where(ul, ol).list-paddingleft-3 { padding-inline-start: 60px; }

.article-editor-content :where(a) {
    text-decoration: underline;
}

.article-editor-content :where(blockquote) {
    padding-inline-start: 1em;
    border-inline-start: .2em solid #d9e0e7;
}

.article-editor-content :where(pre) {
    max-inline-size: 100%;
    overflow-x: auto;
    padding: .75em 1em;
    background: #f5f7fa;
    color: inherit;
    white-space: pre;
}

.article-editor-content :where(img, video, audio, iframe) {
    max-inline-size: 100%;
}

.article-editor-content :where(img, video) {
    height: auto;
    object-fit: contain;
}

.article-editor-content :where(iframe) {
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

.article-editor-content :where(iframe:not([width])) {
    width: 100%;
}

.article-editor-content .article-editor-table {
    max-inline-size: 100%;
    margin-block: 0 1em;
    overflow-x: auto;
}

.article-editor-content :where(table) {
    border-collapse: collapse;
}

.article-editor-content :where(table[align="center"]) {
    margin-inline: auto;
}

.article-editor-content :where(th, td) {
    padding: .35em .65em;
    border: 1px solid #d9e0e7;
    overflow-wrap: normal;
}

.article-editor-content :where(table[border="0"] th, table[border="0"] td) {
    border: 0;
}

@media (max-width: 768px) {
    .article-editor-content :where(img, video) {
        height: auto !important;
    }

    .article-editor-content :where(iframe) {
        height: auto !important;
    }
}
