/* Rich text from the editor stays within the page, and a table shows its cells. The editor
   package draws table cells only in overrides.css, which its admin widget alone loads. */
.page-content img,
.ProseMirror img {
    max-width: 100%;
    height: auto;
}
.page-content blockquote,
.ProseMirror blockquote {
    border-inline-start: .25rem solid var(--bs-border-color);
    padding-inline-start: 1rem;
}
.page-content p:empty {
    min-height: 1lh;
}
/* The editor writes alignment as an inline style, which the CSP keeps the page from applying. */
:is(.page-content, .ProseMirror) [style*="text-align: left"] {
    text-align: left;
}
:is(.page-content, .ProseMirror) [style*="text-align: center"] {
    text-align: center;
}
:is(.page-content, .ProseMirror) [style*="text-align: right"] {
    text-align: right;
}
:is(.page-content, .ProseMirror) [style*="text-align: justify"] {
    text-align: justify;
}
.page-content table,
.ProseMirror table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.page-content :is(th, td),
.ProseMirror :is(th, td) {
    border: 1px solid var(--bs-emphasis-color);
    padding: .375rem .5rem;
    overflow-wrap: anywhere;
}
.page-content th,
.ProseMirror th {
    background-color: var(--bs-tertiary-bg);
}
.ProseMirror .selectedCell {
    background: var(--bs-primary-bg-subtle);
}
/* A card shows four lines of the text, which is sent whole, and a heading in it at the text's size. */
.page-preview {
    line-height: 1.5rem;
    max-height: 6rem;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.page-preview :is(h1, h2, h3, h4, h5, h6) {
    margin-bottom: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.page-cover {
    max-height: 14rem;
}
.page-thumb {
    width: 10rem;
    height: 7rem;
    object-fit: cover;
}
@media (max-width: 575.98px) {
    .col-12 > .page-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 1;
    }
}
